mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-21 06:59:46 -05:00
Pass version number to global bind function
This commit is contained in:
parent
c5ec478d46
commit
13ca937944
2 changed files with 12 additions and 7 deletions
|
|
@ -84,7 +84,7 @@ struct wl_frame_listener {
|
|||
|
||||
struct wl_global {
|
||||
struct wl_object *object;
|
||||
wl_client_connect_func_t func;
|
||||
wl_global_bind_func_t func;
|
||||
struct wl_list link;
|
||||
};
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ display_bind(struct wl_client *client,
|
|||
|
||||
wl_list_for_each(global, &display->global_list, link)
|
||||
if (global->object->id == id && global->func)
|
||||
global->func(client, global->object);
|
||||
global->func(client, global->object, version);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -603,7 +603,7 @@ wl_display_add_object(struct wl_display *display, struct wl_object *object)
|
|||
|
||||
WL_EXPORT int
|
||||
wl_display_add_global(struct wl_display *display,
|
||||
struct wl_object *object, wl_client_connect_func_t func)
|
||||
struct wl_object *object, wl_global_bind_func_t func)
|
||||
{
|
||||
struct wl_global *global;
|
||||
|
||||
|
|
@ -615,7 +615,7 @@ wl_display_add_global(struct wl_display *display,
|
|||
global->func = func;
|
||||
wl_list_insert(display->global_list.prev, &global->link);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
|
|
|
|||
|
|
@ -81,11 +81,16 @@ int wl_display_add_socket(struct wl_display *display, const char *name);
|
|||
void wl_display_terminate(struct wl_display *display);
|
||||
void wl_display_run(struct wl_display *display);
|
||||
|
||||
void wl_display_add_object(struct wl_display *display, struct wl_object *object);
|
||||
void wl_display_add_object(struct wl_display *display,
|
||||
struct wl_object *object);
|
||||
|
||||
typedef void (*wl_client_connect_func_t)(struct wl_client *client, struct wl_object *global);
|
||||
typedef void (*wl_global_bind_func_t)(struct wl_client *client,
|
||||
struct wl_object *global,
|
||||
uint32_t version);
|
||||
|
||||
int wl_display_add_global(struct wl_display *display, struct wl_object *object, wl_client_connect_func_t func);
|
||||
int wl_display_add_global(struct wl_display *display,
|
||||
struct wl_object *object,
|
||||
wl_global_bind_func_t func);
|
||||
|
||||
struct wl_client *wl_client_create(struct wl_display *display, int fd);
|
||||
void wl_client_destroy(struct wl_client *client);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue