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 "plugins.h"
00024
00025 typedef enum {
00026 VAR_STR,
00027 VAR_INT,
00028 VAR_BOOL,
00029 VAR_MAP,
00030 VAR_FILE,
00031 VAR_DIR,
00032 VAR_THEME,
00033
00034 VAR_REMOTE
00035 } variable_class_t;
00036
00037 typedef struct {
00038 char *label;
00039 int value;
00040 int conflicts;
00041 } variable_map_t;
00042
00043 typedef void (variable_notify_func_t)(const char *);
00044 typedef void (variable_check_func_t)(const char *, const char *);
00045 typedef int (variable_display_func_t)(const char *);
00046
00047 typedef struct variable {
00048 struct variable *next;
00049
00050 char *name;
00051 plugin_t *plugin;
00052 int name_hash;
00053 int type;
00054 int display;
00055 void *ptr;
00056 variable_check_func_t *check;
00057 variable_notify_func_t *notify;
00058 variable_map_t *map;
00059 variable_display_func_t *dyndisplay;
00060 } variable_t;
00061
00062 extern variable_t *variables;
00063
00064 void variable_init();
00065 variable_t *variable_find(const char *name);
00066 variable_map_t *variable_map(int count, ...);
00067
00068 variable_t *variable_add(plugin_t *plugin, const char *name, int type, int display, void *ptr, variable_notify_func_t *notify, variable_map_t *map, variable_display_func_t *dyndisplay);
00069 variable_t *remote_variable_add(const char *name, const char *value);
00070
00071 variable_t *variables_removei(variable_t *v);
00072
00073 void variables_destroy();
00074
00075 #endif
00076
00077
00078
00079
00080
00081
00082
00083
00084