diff options
Diffstat (limited to 'src/plugins/callbacks.h')
-rw-r--r-- | src/plugins/callbacks.h | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/plugins/callbacks.h b/src/plugins/callbacks.h index 782f152b..99ba76eb 100644 --- a/src/plugins/callbacks.h +++ b/src/plugins/callbacks.h @@ -40,39 +40,42 @@ #include "command/cmd_defs.h" -typedef struct p_command { - char *command_name; +typedef struct p_command +{ + char* command_name; int min_args; int max_args; - CommandHelp *help; - void *callback; - void (*callback_exec)(struct p_command *command, gchar **args); - void (*callback_destroy)(void *callback); + CommandHelp* help; + void* callback; + void (*callback_exec)(struct p_command* command, gchar** args); + void (*callback_destroy)(void* callback); } PluginCommand; -typedef struct p_timed_function { - void *callback; - void (*callback_exec)(struct p_timed_function *timed_function); - void (*callback_destroy)(void *callback); +typedef struct p_timed_function +{ + void* callback; + void (*callback_exec)(struct p_timed_function* timed_function); + void (*callback_destroy)(void* callback); int interval_seconds; - GTimer *timer; + GTimer* timer; } PluginTimedFunction; -typedef struct p_window_input_callback { - void *callback; - void (*callback_exec)(struct p_window_input_callback *window_callback, const char *tag, const char * const line); - void (*callback_destroy)(void *callback); +typedef struct p_window_input_callback +{ + void* callback; + void (*callback_exec)(struct p_window_input_callback* window_callback, const char* tag, const char* const line); + void (*callback_destroy)(void* callback); } PluginWindowCallback; void callbacks_init(void); -void callbacks_remove(const char *const plugin_name); +void callbacks_remove(const char* const plugin_name); void callbacks_close(void); -void callbacks_add_command(const char *const plugin_name, PluginCommand *command); -void callbacks_add_timed(const char *const plugin_name, PluginTimedFunction *timed_function); -gboolean callbacks_win_exists(const char *const plugin_name, const char *tag); -void callbacks_add_window_handler(const char *const plugin_name, const char *tag, PluginWindowCallback *window_callback); -void * callbacks_get_window_handler(const char *tag); -void callbacks_remove_win(const char *const plugin_name, const char *const tag); +void callbacks_add_command(const char* const plugin_name, PluginCommand* command); +void callbacks_add_timed(const char* const plugin_name, PluginTimedFunction* timed_function); +gboolean callbacks_win_exists(const char* const plugin_name, const char* tag); +void callbacks_add_window_handler(const char* const plugin_name, const char* tag, PluginWindowCallback* window_callback); +void* callbacks_get_window_handler(const char* tag); +void callbacks_remove_win(const char* const plugin_name, const char* const tag); #endif |