diff options
Diffstat (limited to 'arken/src/plugin.c')
| -rw-r--r-- | arken/src/plugin.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/arken/src/plugin.c b/arken/src/plugin.c index 3edf486..ab02599 100644 --- a/arken/src/plugin.c +++ b/arken/src/plugin.c @@ -1,5 +1,4 @@ #include "plugin.h" -#include "wl.h" #include <ctype.h> #include <dlfcn.h> @@ -53,66 +52,6 @@ static void lock(plugin_t *plugin) { pthread_mutex_lock(&plugin->lock); }; static void unlock(plugin_t *plugin) { pthread_mutex_unlock(&plugin->lock); }; -static int plugin_hot_reload_same_state_action_(plugin_t *plugin, void *ignore) -{ - return plugin_hot_reload_same_state(plugin); -} - -void montis_do_request_hot_reload(void *plugv) -{ - plugin_t *plugin = plugv; - - size_t n = plugin->n_requested_actions++; - if (n < 8) { - plugin->requested_actions[n].action = plugin_hot_reload_same_state_action_; - plugin->requested_actions[n].arg_dtor = NULL; - } -} - -static int plugin_do_log(plugin_t *plugin, void *chrs) -{ - char *str = chrs; - puts(str); - return 0; -} - -void montis_do_request_log(void *plugv, const char *str) -{ - plugin_t *plugin = plugv; - - size_t n = plugin->n_requested_actions++; - if (n < 8) { - plugin->requested_actions[n].action = plugin_do_log; - plugin->requested_actions[n].str_arg = strdup(str); - plugin->requested_actions[n].arg_dtor = free; - } -} - -static int montis_plugin_do_exit(void *plugv, int ec) -{ - exit(ec); - return 0; -} - -void montis_do_request_exit(void *plugv, int ec) -{ - plugin_t *plugin = plugv; - - size_t n = plugin->n_requested_actions++; - if (n < 8) { - plugin->requested_actions[n].action = - (int (*)(plugin_t *, void *))montis_plugin_do_exit; - plugin->requested_actions[n].int_arg = ec; - plugin->requested_actions[n].arg_dtor = NULL; - } -} - -void *montis_plugin_get_seat(void *ctx) -{ - struct montis_server *server = wl_container_of(ctx, server, plugin); - return server->seat; -} - static int load_plugin_from_file_(int argc, char **argv, const char *filename, plugin_t *plugin) { |