Source: klineakconfig/functions.h
|
|
|
|
/***************************************************************************
functions.h - description
-------------------
begin : Wed Apr 10 2002
copyright : (C) 2002 by Sheldon Lee Wen
email : tormak@rogers.com
***************************************************************************/
/***************************************************************************
* *
* 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 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include
#include
#include "klineakconfigui.h"
extern "C" {
#include "defines.h"
#include "supportpriv.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define NR_SPECIALS 5
#define EAK_EJECT "EAK_EJECT"
#define EAK_VOLUP "EAK_VOLUP"
#define EAK_VOLDOWN "EAK_VOLDOWN"
#define EAK_MUTE "EAK_MUTE"
#define EAK_SLEEP "EAK_SLEEP"
extern int nrkeyboards;
extern char **longkbname;
extern char *kbtype;
extern char *cdromdev;
extern gboolean changing_text_from_signal;
//gboolean ApplyUsed;
extern char *DUMMY_STRING;
extern int selected_key;
int parseconffile(void);
int parsedeffile(void);
int initEAK (void);
void cleanKeylist (void);
int cleanexit(void);
gboolean backup_conffile (void);
gboolean restore_conffile (void);
gboolean save_conffile (void);
gint get_lineakd_pid(void);
char *cfgSectionNumberToName(int num);
/* constants for recognized value types */
typedef enum {
CFG_END,
CFG_BOOL,
CFG_STRING,
CFG_INT,
CFG_UINT,
CFG_LONG,
CFG_ULONG,
CFG_STRING_LIST,
CFG_FLOAT,
CFG_DOUBLE
} cfgValueType;
/* type of the configuration file */
typedef enum {
CFG_SIMPLE,
CFG_INI
} cfgFileType;
typedef struct {
char *parameterName;
cfgValueType type;
void *value;
} cfgStruct;
typedef struct cfgList_tag {
char *str;
struct cfgList_tag *next;
} cfgList;
/* EAKey as member of list */
typedef struct strEAkey {
struct strEAkey *next;
char *EAkeyname;
int EAkeycode;
KeySym EAkeysym;
char *EAcommand;
} EAkey;
/* the EAK we will use.. */
typedef struct {
int EAKnr;
char *EAKtype;
char *EAKname;
EAkey *EAKeylist;
} EAKeyboard;
/* provides indexes etc of the actions for the gui ( 0 - (n-1) ) */
//typedef struct {
// char *action;
// char *longname;
//} specialact;
//extern specialact specialacts[NR_SPECIALS];
extern cfgStruct confdata;
extern cfgStruct defdata;
extern EAKeyboard myEAK;
}
/* refresh *ALL* the data on the GUI (this is called on startup) */
int refreshGUIdata(QWidget *widget);
/* refresh EAK types */
int refresh_kbtypes (QWidget *widget);
/* refresh CD-ROM entry */
int refresh_cdromdev (QWidget *widget);
/* refresh keyboard image */
int refresh_kbimage (QWidget *widget);
/* refresh key list */
int refresh_keylist (QWidget *widget);
/* refresh command/action */
int refresh_keycommand (QWidget *widget, int i);
int refresh_specials (QWidget *widget);
QWidget *add_specmenu_item (QWidget *menu, char *act, char *name, int add_callback);
int is_special_action (char *command);
/* select a new keyboard */
void select_new_keyboard(QWidget *widget, gpointer data);
/* change the key command data to the users input */
void change_key_command(EAkey *thiskey, gchar *entrytext);
/* wrapper for change_key_command, lookups the selected key */
void change_selectedkey_command(gchar *entrytext);
Generated by: sheldonl on shugaru.khardan on Thu May 16 23:41:27 2002, using kdoc 2.0a53. |