static void global_handler(struct display *display, uint32_t name, const char *interface, uint32_t version, void *data) { struct virtual_keyboard *keyboard = data; if (!strcmp(interface, "wl_input_panel")) { keyboard->input_panel = display_bind(display, name, &wl_input_panel_interface, 1); } else if (!strcmp(interface, "wl_input_method")) { keyboard->input_method = display_bind(display, name, &wl_input_method_interface, 1); wl_input_method_add_listener(keyboard->input_method, &input_method_listener, keyboard); } }
static void global_handler(struct display *display, uint32_t name, const char *interface, uint32_t version, void *data) { struct wscreensaver *screensaver = data; if (!strcmp(interface, "screensaver")) { screensaver->interface = display_bind(display, name, &screensaver_interface, 1); } }
static void global_handler(struct display *display, uint32_t name, const char *interface, uint32_t version, void *data) { struct editor *editor = data; if (!strcmp(interface, "wl_text_input_manager")) { editor->text_input_manager = display_bind(display, name, &wl_text_input_manager_interface, 1); } }
static void global_handler(struct display *display, uint32_t name, const char *interface, uint32_t version, void *data) { struct editor *editor = data; if (!strcmp(interface, "text_model_factory")) { editor->text_model_factory = display_bind(display, name, &text_model_factory_interface, 1); } }
static void global_handler(struct display *display, uint32_t id, const char *interface, uint32_t version, void *data) { struct fullscreen *fullscreen = data; if (strcmp(interface, "_wl_fullscreen_shell") == 0) { fullscreen->fshell = display_bind(display, id, &_wl_fullscreen_shell_interface, 1); _wl_fullscreen_shell_add_listener(fullscreen->fshell, &fullscreen_shell_listener, fullscreen); } }
static void global_handler(struct display *display, uint32_t name, const char *interface, uint32_t version, void *data) { struct box *box = data; if (strcmp(interface, "wl_scaler") == 0) { box->scaler_version = version < 2 ? version : 2; box->scaler = display_bind(display, name, &wl_scaler_interface, box->scaler_version); box->viewport = wl_scaler_get_viewport(box->scaler, widget_get_wl_surface(box->widget)); set_my_viewport(box); } }