Idź do dokumentacji tego pliku.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __EKG_VARS_H
00021 #define __EKG_VARS_H
00022
00023 #include "dynstuff.h"
00024 #include "plugins.h"
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030 typedef enum {
00031 VAR_STR,
00032 VAR_INT,
00033 VAR_BOOL,
00034 VAR_MAP,
00035 VAR_FILE,
00036 VAR_DIR,
00037 VAR_THEME
00038 } variable_class_t;
00039
00040 typedef struct {
00041 char *label;
00042 int value;
00043 int conflicts;
00044 } variable_map_t;
00045
00046 typedef void (variable_notify_func_t)(const char *);
00047 typedef void (variable_check_func_t)(const char *, const char *);
00048 typedef int (variable_display_func_t)(const char *);
00049
00050 typedef struct variable {
00051 struct variable *next;
00052
00053 char *name;
00054 plugin_t *plugin;
00055 int name_hash;
00056 int type;
00057 int display;
00058 void *ptr;
00059 variable_check_func_t *check;
00060
00061
00062 variable_notify_func_t *notify;
00063
00064 variable_map_t *map;
00065 variable_display_func_t *dyndisplay;
00066
00067
00068 } variable_t;
00069
00070 #ifndef EKG2_WIN32_NOFUNCTION
00071
00072 extern variable_t *variables;
00073
00074 void variable_init();
00075 void variable_set_default();
00076 variable_t *variable_find(const char *name);
00077 variable_map_t *variable_map(int count, ...);
00078 #define variable_hash ekg_hash
00079
00080 variable_t *variable_add(
00081 plugin_t *plugin,
00082 const char *name,
00083 int type,
00084 int display,
00085 void *ptr,
00086 variable_notify_func_t *notify,
00087 variable_map_t *map,
00088 variable_display_func_t *dyndisplay);
00089
00090 int variable_set(const char *name, const char *value);
00091 void variable_help(const char *name);
00092 int variable_remove(plugin_t *plugin, const char *name);
00093
00094 variable_t *variables_removei(variable_t *v);
00095 void variables_destroy();
00096
00097 #endif
00098
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102
00103 #endif
00104
00105
00106
00107
00108
00109
00110
00111
00112