# Source: klineakconfig/lineakconfig.h |
Annotated List
Files
Globals
Hierarchy
Index

    /*
      LinEAK - Linux support for Easy Access and Internet Keyboards
      Copyright (C) 2001,2002 Mark Smulders

      lineakconfig, GTK+ interface for configuring lineakd

      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2, or (at your option)
      any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
    */

    #ifndef HAVE_LINEAKCFG_H
    #define HAVE_LINEAKCFG_H

    /* configuration file parsing (parsecfg (c) by Yuuki NINOMIYA, gm@debian.or.jp) */
    #include "parsecfg.h"
    #include "support.h"

    #ifdef __cplusplus
    extern "C" {
    #endif

    /* the conf and def filenames */
    #define CONFFILE "/.lineak/lineakd.conf" /* (relative from $HOME dir) */
    #define BAKFILE "/.lineak/.lineakd.conf.backup"
    #define PIDFILE "/.lineak/lineakd.pid"
    #define DEFFILE  "lineakkb.def"
    #define TRUE 1
    #define FALSE 0

    //int is_special_action (char *command);

    char *cfile=NULL, *dfile=NULL, *backupfile=NULL;

    #define NOIMAGEXPM "noimage.xpm"

    /* This is a dummy pixmap we use when a pixmap can't be found. */
    static char *dummy_pixmap_xpm[] = {
    /* columns rows colors chars-per-pixel */
    "1 1 1 1",
    "  c None",
    /* pixels */
    " "
    };

    /* to read the data from .conf file (user configuration settings) */
    /*  (the commands go into a dummy. we don't need them right now)  */
    //char *kbtype, *cdromdev;
    char *DUMMY_STRING;
    //char *cmdPlay, *cmdPrevious, *cmdNext, *cmdStop, *cmdPause, *cmdEject;
    //char *cmdInternet, *cmdMail, *cmdCalculator, *cmdFilemanager, *cmdMycomputer, *cmdMydocuments;
    //char *cmdCommunities, *cmdVendorhome, *cmdSearch, *cmdLightbulb, *cmdShop, *cmdPrint, *cmdGo, *cmdFavorites;
    cfgStruct confdata[] = {
      { "KeyboardType", CFG_STRING, &kbtype },
      { "CdromDevice", CFG_STRING, &cdromdev },
      { "Play", CFG_STRING, &DUMMY_STRING /*&cmdPlay*/ },
      { "Previous", CFG_STRING, &DUMMY_STRING /*&cmdPrevious*/ },
      { "Next", CFG_STRING, &DUMMY_STRING /*&cmdNext*/ },
      { "Stop", CFG_STRING, &DUMMY_STRING /*&cmdStop*/ },
      { "Pause", CFG_STRING, &DUMMY_STRING /*&cmdPause*/ },
      { "Eject", CFG_STRING, &DUMMY_STRING /*&cmdEject*/ },
      { "Internet", CFG_STRING, &DUMMY_STRING /*&cmdInternet*/ },
      { "Home", CFG_STRING, &DUMMY_STRING },
      { "WebBack", CFG_STRING, &DUMMY_STRING },
      { "WebForward", CFG_STRING, &DUMMY_STRING },
      { "WebStop", CFG_STRING, &DUMMY_STRING },
      { "WebReload", CFG_STRING, &DUMMY_STRING },
      { "Mail", CFG_STRING, &DUMMY_STRING /*&cmdMail*/ },
      { "Calculator", CFG_STRING, &DUMMY_STRING /*&cmdCalculator*/ },
      { "FileManager", CFG_STRING, &DUMMY_STRING /*&cmdFilemanager*/ },
      { "Terminal", CFG_STRING, &DUMMY_STRING },
      { "News", CFG_STRING, &DUMMY_STRING },
      { "MyComputer", CFG_STRING, &DUMMY_STRING /*&cmdMycomputer*/ },
      { "MyDocuments", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Communities", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Market", CFG_STRING, &DUMMY_STRING },
      { "Meeting", CFG_STRING, &DUMMY_STRING },
      { "VendorHome", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Search", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Lightbulb", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Shop", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Print", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Go", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Favorites", CFG_STRING, &DUMMY_STRING /*&cmdMydocuments*/ },
      { "Eject", CFG_STRING, &DUMMY_STRING },
      { "VolumeUp", CFG_STRING, &DUMMY_STRING },
      { "VolumeDown", CFG_STRING, &DUMMY_STRING },
      { "Mute", CFG_STRING, &DUMMY_STRING },
      { "Sleep", CFG_STRING, &DUMMY_STRING },
      { "ZoomIn", CFG_STRING, &DUMMY_STRING },
      { "ZoomOut", CFG_STRING, &DUMMY_STRING },
      { "ScrollUp", CFG_STRING, &DUMMY_STRING },
      { "ScrollDown", CFG_STRING, &DUMMY_STRING },
      { "Screensaver", CFG_STRING, &DUMMY_STRING },
      { "Power", CFG_STRING, &DUMMY_STRING },
      { "Wake", CFG_STRING, &DUMMY_STRING },
      { NULL, CFG_END, NULL }
    };

    /* to read the data from keyboard definition file (all possible keys) */
    /*  (the keys go into a dummy. we don't need them right now)          */
    int nrkeyboards;
    char **longkbname;
    cfgList **keylist;
    int *DUMMY_INT;
    //int *keyplay, *keyprevious, *keynext, *keystop, *keypause, *keyeject;
    //int *keymail, *keycommunities, *keyvendorhome, *keyinternet, *keysearch, *keylightbulb, *keyshop;
    //int *keyprint, *keyvolumedown, *keymute, *keyvolumeup;
    //int *keymycomputer, *keymydocuments, *keyfilemanager, *keyfavorites, *keycalculator, *keysleep, *keygo;
    cfgStruct defdata[] = {
      { "LONGNAME", CFG_STRING, &longkbname },
      { "KEYS", CFG_STRING_LIST, &keylist },
      { "PLAY", CFG_INT, &DUMMY_INT /*&keyplay*/ },
      { "PREVIOUS", CFG_INT, &DUMMY_INT /*&keyprevious*/ },
      { "NEXT", CFG_INT, &DUMMY_INT /*&keynext*/ },
      { "STOP", CFG_INT, &DUMMY_INT /*&keystop*/ },
      { "PAUSE", CFG_INT, &DUMMY_INT /*&keypause*/ },
      { "EJECT", CFG_INT, &DUMMY_INT /*&keyeject*/ },
      { "MAIL", CFG_INT, &DUMMY_INT /*&keymail*/ },
      { "COMMUNITIES", CFG_INT, &DUMMY_INT /*&keycommunities*/ },
      { "MARKET", CFG_STRING, &DUMMY_STRING },
      { "MEETING", CFG_STRING, &DUMMY_STRING },
      { "VENDORHOME", CFG_INT, &DUMMY_INT /*&keyvendorhome*/ },
      { "INTERNET", CFG_INT, &DUMMY_INT /*&keyinternet*/ },
      { "HOME", CFG_STRING, &DUMMY_STRING },
      { "WEBBACK", CFG_STRING, &DUMMY_STRING },
      { "WEBFORWARD", CFG_STRING, &DUMMY_STRING },
      { "WEBSTOP", CFG_STRING, &DUMMY_STRING },
      { "WEBRELOAD", CFG_STRING, &DUMMY_STRING },
      { "SEARCH", CFG_INT, &DUMMY_INT /*&keysearch*/ },
      { "LIGHTBULB", CFG_INT, &DUMMY_INT /*&keylightbulb*/ },
      { "SHOP", CFG_INT, &DUMMY_INT /*&keyshop*/ },
      { "PRINT", CFG_INT, &DUMMY_INT /*&keyprint*/ },
      { "VOLUMEDOWN", CFG_INT, &DUMMY_INT /*&keyvolumedown*/ },
      { "MUTE", CFG_INT, &DUMMY_INT /*&keymute*/ },
      { "VOLUMEUP", CFG_INT, &DUMMY_INT /*&keyvolumeup*/ },
      { "MYCOMPUTER", CFG_INT, &DUMMY_INT /*&keymycomputer*/ },
      { "MYDOCUMENTS", CFG_INT, &DUMMY_INT /*&keymydocuments*/ },
      { "FILEMANAGER", CFG_INT, &DUMMY_INT /*&keyfilemanager*/ },
      { "TERMINAL", CFG_STRING, &DUMMY_STRING },
      { "NEWS", CFG_STRING, &DUMMY_STRING },
      { "FAVORITES", CFG_INT, &DUMMY_INT /*&keyfavorites*/ },
      { "CALCULATOR", CFG_INT, &DUMMY_INT /*&keycalculator*/ },
      { "SLEEP", CFG_INT, &DUMMY_INT /*&keysleep*/ },
      { "GO", CFG_INT, &DUMMY_INT /*&keygo*/ },
      { "ZoomIn", CFG_STRING, &DUMMY_STRING },
      { "ZoomOut", CFG_STRING, &DUMMY_STRING },
      { "ScrollUp", CFG_STRING, &DUMMY_STRING },
      { "ScrollDown", CFG_STRING, &DUMMY_STRING },
      { "Screensaver", CFG_STRING, &DUMMY_STRING },
      { "Power", CFG_STRING, &DUMMY_STRING },
      { "Wake", CFG_STRING, &DUMMY_STRING },
      { NULL, CFG_END, NULL }
    };

    #ifdef __cplusplus
    }
    #endif

    #endif

Generated by: sheldonl on shugaru.khardan on Thu May 16 23:41:27 2002, using kdoc 2.0a53.