Main Page Alphabetical List Compound List File List Compound Members File Members

# lineakconfig.h

Go to the documentation of this file.

    00001 /*
    00002   LinEAK - Linux support for Easy Access and Internet Keyboards
    00003   Copyright (C) 2001,2002 Mark Smulders <Mark@PIRnet.nl>
    00004
    00005   lineakconfig, GTK+ interface for configuring lineakd
    00006
    00007   This program is free software; you can redistribute it and/or modify
    00008   it under the terms of the GNU General Public License as published by
    00009   the Free Software Foundation; either version 2, or (at your option)
    00010   any later version.
    00011
    00012   This program is distributed in the hope that it will be useful,
    00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00015   GNU General Public License for more details.
    00016
    00017   You should have received a copy of the GNU General Public License
    00018   along with this program; if not, write to the
    00019   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020   Boston, MA 02111-1307, USA.
    00021 */
    00022
    00023 #ifndef HAVE_LINEAKCFG_H
    00024 #define HAVE_LINEAKCFG_H
    00025
    00026 /* configuration file parsing (parsecfg (c) by Yuuki NINOMIYA, gm@debian.or.jp) */
    00027 #include "parsecfg.h"
    00028 #include "support.h"
    00029
    00030 #ifdef __cplusplus
    00031 extern "C" {
    00032 #endif
    00033
    00034
    00035 /* the conf and def filenames */
    00036 #define CONFFILE "/.lineak/lineakd.conf" /* (relative from $HOME dir) */
    00037 #define BAKFILE "/.lineak/.lineakd.conf.backup"
    00038 #define PIDFILE "/.lineak/lineakd.pid"
    00039 #define DEFFILE  "lineakkb.def"
    00040 #define TRUE 1
    00041 #define FALSE 0
    00042
    00043 //int is_special_action (char *command);
    00044
    00045 char *cfile=NULL, *dfile=NULL, *backupfile=NULL;
    00046
    00047 #define NOIMAGEXPM "noimage.xpm"
    00048
    00049 /* This is a dummy pixmap we use when a pixmap can't be found. */
    00050 static char *dummy_pixmap_xpm[] = {
    00051 /* columns rows colors chars-per-pixel */
    00052 "1 1 1 1",
    00053 "  c None",
    00054 /* pixels */
    00055 " "
    00056 };
    00057
    00058
    00059 /* to read the data from .conf file (user configuration settings) */
    00060 /*  (the commands go into a dummy. we don't need them right now)  */
    00061 //char *kbtype, *cdromdev;
    00062 char *DUMMY_STRING;
    00063 //char *cmdPlay, *cmdPrevious, *cmdNext, *cmdStop, *cmdPause, *cmdEject;
    00064 //char *cmdInternet, *cmdMail, *cmdCalculator, *cmdFilemanager, *cmdMycomputer, *cmdMydocuments;
    00065 //char *cmdCommunities, *cmdVendorhome, *cmdSearch, *cmdLightbulb, *cmdShop, *cmdPrint, *cmdGo, *cmdFavorites;
    00066 cfgStruct confdata[] = {
    00067   { "KeyboardType", CFG_STRING, &kbtype },
    00068   { "CdromDevice", CFG_STRING, &cdromdev },
    00069   { "Play", CFG_STRING, &DUMMY_STRING /*&cmdPlay*/ },
    00070   { "Previous", CFG_STRING, &DUMMY_STRING /*&cmdPrevious*/ },
    00071   { "Next", CFG_STRING, &DUMMY_STRING /*&cmdNext*/ },
    00072   { "Stop", CFG_STRING, &DUMMY_STRING /*&cmdStop*/ },
    00073   { "Pause", CFG_STRING, &DUMMY_STRING /*&cmdPause*/ },
    00074   { "Eject", CFG_STRING, &DUMMY_STRING /*&cmdEject*/ },
    00075   { "Internet", CFG_STRING, &DUMMY_STRING /*&cmdInternet*/ },
    00076   { "Home", CFG_STRING, &DUMMY_STRING },
    00077   { "WebBack", CFG_STRING, &DUMMY_STRING },
    00078   { "WebForward", CFG_STRING, &DUMMY_STRING },
    00079   { "WebStop", CFG_STRING, &DUMMY_STRING },
    00080   { "WebReload", CFG_STRING, &DUMMY_STRING },
    00081   { "Mail", CFG_STRING, &DUMMY_STRING /*&cmdMail*/ },
    00082   { "Calculator", CFG_STRING, &DUMMY_STRING /*&cmdCalculator*/ },
    00083   { "FileManager", CFG_STRING, &DUMMY_STRING /*&cmdFilemanager*/ },
    00084   { "Terminal", CFG_STRING, &DUMMY_STRING },
    00085   { "News", CFG_STRING, &DUMMY_STRING },
    00086   { "MyComputer", CFG_STRING, &DUMMY_STRING /*&cmdMycomputer*/ },
    00087   { "MyDocuments", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00088   { "Communities", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00089   { "Market", CFG_STRING, &DUMMY_STRING },
    00090   { "Meeting", CFG_STRING, &DUMMY_STRING },
    00091   { "VendorHome", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00092   { "Search", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00093   { "Lightbulb", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00094   { "Shop", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00095   { "Print", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00096   { "Go", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00097   { "Favorites", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
    00098   { "Eject", CFG_STRING, &DUMMY_STRING },
    00099   { "VolumeUp", CFG_STRING, &DUMMY_STRING },
    00100   { "VolumeDown", CFG_STRING, &DUMMY_STRING },
    00101   { "Mute", CFG_STRING, &DUMMY_STRING },
    00102   { "Sleep", CFG_STRING, &DUMMY_STRING },
    00103   { "ZoomIn", CFG_STRING, &DUMMY_STRING },
    00104   { "ZoomOut", CFG_STRING, &DUMMY_STRING },
    00105   { "ScrollUp", CFG_STRING, &DUMMY_STRING },
    00106   { "ScrollDown", CFG_STRING, &DUMMY_STRING },
    00107   { "Screensaver", CFG_STRING, &DUMMY_STRING },
    00108   { "Power", CFG_STRING, &DUMMY_STRING },
    00109   { "Wake", CFG_STRING, &DUMMY_STRING },
    00110   { NULL, CFG_END, NULL }
    00111 };
    00112
    00113 /* to read the data from keyboard definition file (all possible keys) */
    00114 /*  (the keys go into a dummy. we don't need them right now)          */
    00115 int nrkeyboards;
    00116 char **longkbname;
    00117 cfgList **keylist;
    00118 int *DUMMY_INT;
    00119 //int *keyplay, *keyprevious, *keynext, *keystop, *keypause, *keyeject;
    00120 //int *keymail, *keycommunities, *keyvendorhome, *keyinternet, *keysearch, *keylightbulb, *keyshop;
    00121 //int *keyprint, *keyvolumedown, *keymute, *keyvolumeup;
    00122 //int *keymycomputer, *keymydocuments, *keyfilemanager, *keyfavorites, *keycalculator, *keysleep, *keygo;
    00123 cfgStruct defdata[] = {
    00124   { "LONGNAME", CFG_STRING, &longkbname },
    00125   { "KEYS", CFG_STRING_LIST, &keylist },
    00126   { "PLAY", CFG_INT, &DUMMY_INT /*&keyplay*/ },
    00127   { "PREVIOUS", CFG_INT, &DUMMY_INT /*&keyprevious*/ },
    00128   { "NEXT", CFG_INT, &DUMMY_INT /*&keynext*/ },
    00129   { "STOP", CFG_INT, &DUMMY_INT /*&keystop*/ },
    00130   { "PAUSE", CFG_INT, &DUMMY_INT /*&keypause*/ },
    00131   { "EJECT", CFG_INT, &DUMMY_INT /*&keyeject*/ },
    00132   { "MAIL", CFG_INT, &DUMMY_INT /*&keymail*/ },
    00133   { "COMMUNITIES", CFG_INT, &DUMMY_INT /*&keycommunities*/ },
    00134   { "MARKET", CFG_STRING, &DUMMY_STRING },
    00135   { "MEETING", CFG_STRING, &DUMMY_STRING },
    00136   { "VENDORHOME", CFG_INT, &DUMMY_INT /*&keyvendorhome*/ },
    00137   { "INTERNET", CFG_INT, &DUMMY_INT /*&keyinternet*/ },
    00138   { "HOME", CFG_STRING, &DUMMY_STRING },
    00139   { "WEBBACK", CFG_STRING, &DUMMY_STRING },
    00140   { "WEBFORWARD", CFG_STRING, &DUMMY_STRING },
    00141   { "WEBSTOP", CFG_STRING, &DUMMY_STRING },
    00142   { "WEBRELOAD", CFG_STRING, &DUMMY_STRING },
    00143   { "SEARCH", CFG_INT, &DUMMY_INT /*&keysearch*/ },
    00144   { "LIGHTBULB", CFG_INT, &DUMMY_INT /*&keylightbulb*/ },
    00145   { "SHOP", CFG_INT, &DUMMY_INT /*&keyshop*/ },
    00146   { "PRINT", CFG_INT, &DUMMY_INT /*&keyprint*/ },
    00147   { "VOLUMEDOWN", CFG_INT, &DUMMY_INT /*&keyvolumedown*/ },
    00148   { "MUTE", CFG_INT, &DUMMY_INT /*&keymute*/ },
    00149   { "VOLUMEUP", CFG_INT, &DUMMY_INT /*&keyvolumeup*/ },
    00150   { "MYCOMPUTER", CFG_INT, &DUMMY_INT /*&keymycomputer*/ },
    00151   { "MYDOCUMENTS", CFG_INT, &DUMMY_INT /*&keymydocuments*/ },
    00152   { "FILEMANAGER", CFG_INT, &DUMMY_INT /*&keyfilemanager*/ },
    00153   { "TERMINAL", CFG_STRING, &DUMMY_STRING },
    00154   { "NEWS", CFG_STRING, &DUMMY_STRING },
    00155   { "FAVORITES", CFG_INT, &DUMMY_INT /*&keyfavorites*/ },
    00156   { "CALCULATOR", CFG_INT, &DUMMY_INT /*&keycalculator*/ },
    00157   { "SLEEP", CFG_INT, &DUMMY_INT /*&keysleep*/ },
    00158   { "GO", CFG_INT, &DUMMY_INT /*&keygo*/ },
    00159   { "ZoomIn", CFG_STRING, &DUMMY_STRING },
    00160   { "ZoomOut", CFG_STRING, &DUMMY_STRING },
    00161   { "ScrollUp", CFG_STRING, &DUMMY_STRING },
    00162   { "ScrollDown", CFG_STRING, &DUMMY_STRING },
    00163   { "Screensaver", CFG_STRING, &DUMMY_STRING },
    00164   { "Power", CFG_STRING, &DUMMY_STRING },
    00165   { "Wake", CFG_STRING, &DUMMY_STRING },
    00166   { NULL, CFG_END, NULL }
    00167 };
    00168
    00169 #ifdef __cplusplus
    00170 }
    00171 #endif
    00172
    00173
    00174 #endif