Generate the wl_*_add_listener() stubs as well

This commit is contained in:
Kristian Høgsberg 2010-08-10 10:53:44 -04:00
parent 230ee37361
commit ccb75867ac
2 changed files with 55 additions and 80 deletions

View file

@ -79,26 +79,6 @@ struct wl_visual {
struct wl_proxy proxy;
};
struct wl_output {
struct wl_proxy proxy;
};
struct wl_shell {
struct wl_proxy proxy;
};
struct wl_drm {
struct wl_proxy proxy;
};
struct wl_buffer {
struct wl_proxy proxy;
};
struct wl_input_device {
struct wl_proxy proxy;
};
struct wl_display {
struct wl_proxy proxy;
struct wl_connection *connection;
@ -219,7 +199,7 @@ wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface)
return proxy;
}
static int
WL_EXPORT int
wl_proxy_add_listener(struct wl_proxy *proxy, void (**implementation)(void), void *data)
{
struct wl_listener *listener;
@ -247,33 +227,6 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...)
va_end(ap);
}
WL_EXPORT int
wl_output_add_listener(struct wl_output *output,
const struct wl_output_listener *listener,
void *data)
{
return wl_proxy_add_listener(&output->proxy,
(void (**)(void)) listener, data);
}
WL_EXPORT int
wl_shell_add_listener(struct wl_shell *shell,
const struct wl_shell_listener *listener,
void *data)
{
return wl_proxy_add_listener(&shell->proxy,
(void (**)(void)) listener, data);
}
WL_EXPORT int
wl_drm_add_listener(struct wl_drm *drm,
const struct wl_drm_listener *listener,
void *data)
{
return wl_proxy_add_listener(&drm->proxy,
(void (**)(void)) listener, data);
}
static void
add_visual(struct wl_display *display, struct wl_global *global)
{
@ -308,15 +261,6 @@ wl_display_get_rgb_visual(struct wl_display *display)
return display->rgb_visual;
}
WL_EXPORT int
wl_input_device_add_listener(struct wl_input_device *input_device,
const struct wl_input_device_listener *listener,
void *data)
{
return wl_proxy_add_listener(&input_device->proxy,
(void (**)(void)) listener, data);
}
static void
display_handle_invalid_object(void *data,
struct wl_display *display, uint32_t id)
@ -566,15 +510,6 @@ wl_display_get_compositor(struct wl_display *display)
return display->compositor;
}
WL_EXPORT int
wl_compositor_add_listener(struct wl_compositor *compositor,
const struct wl_compositor_listener *listener,
void *data)
{
return wl_proxy_add_listener(&compositor->proxy,
(void (**)(void)) listener, data);
}
WL_EXPORT void
wl_surface_set_user_data(struct wl_surface *surface, void *user_data)
{