diff options
Diffstat (limited to 'harness/include/plugin.h')
-rw-r--r-- | harness/include/plugin.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/harness/include/plugin.h b/harness/include/plugin.h index bde8990..37e36ba 100644 --- a/harness/include/plugin.h +++ b/harness/include/plugin.h @@ -6,6 +6,7 @@ #include <pthread.h> #include <stdint.h> #include <stdlib.h> +#include <wlr/types/wlr_keyboard.h> #include <foreign_intf.h> @@ -18,6 +19,7 @@ #define EXPORT_INCLUDE(a) EXPORT_INCLUDE(<foreign_intf.h>) +EXPORT_INCLUDE(<wlr / types / wlr_keyboard.h>) #define MAX_QUEUED_ACTIONS 8 @@ -31,12 +33,12 @@ struct PLUGIN; /* This structure represents an action requested by the plugin for the harness. */ typedef struct { - int (*action)(struct PLUGIN *requester, void* arg); - void (*arg_dtor)(void* arg); + int (*action)(struct PLUGIN *requester, void *arg); + void (*arg_dtor)(void *arg); union { - void* ptr_arg; + void *ptr_arg; int int_arg; - char* str_arg; + char *str_arg; }; } requested_action_t; @@ -96,7 +98,7 @@ typedef struct PLUGIN { /** Intializes the plugin with the given argc/argv. This is the first thing * called on the plugin and is called immediately after the library is loaded. */ - EXPORT(void (*plugin_load)(int argc, char** argv, foreign_interface_t *intf)); + EXPORT(void (*plugin_load)(int argc, char **argv, foreign_interface_t *intf)); /* Start the plugin with the marshalled state from the previous plugin. * @@ -132,7 +134,9 @@ typedef struct PLUGIN { /* * Handles a keybinding. */ - EXPORT(opqst_t (*plugin_handle_keybinding)(uint32_t keysym, opqst_t state)); + EXPORT(opqst_t (*plugin_handle_keybinding)( + struct wlr_event_keyboard_key *event, uint32_t modifiers, uint32_t keysym, + int *out_handled, opqst_t state)); /* * Handles a surface being mapped, unmapped or destroyed. @@ -166,7 +170,7 @@ int plugin_hot_reload(int argc, char **argv, const char *filepath, int plugin_hot_reload_same_state(plugin_t *plugin); /* Starts a plugin in a cold state. Called after load_plugin_from_file. */ -void plugin_cold_start(plugin_t* plugin); +void plugin_cold_start(plugin_t *plugin); /* Reads a plugin from a filename. */ int load_plugin_from_file(int argc, char **argv, const char *filename, |