summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-05-03 08:59:38 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-05-03 12:59:30 +0200
commite6335b7467b6b7d7ba99d4874b6b4731325a2b63 (patch)
treee03dfab4e1a3151a576f25d380d9cf65c3e6084b
parent5f1d8dca990796368e98d0d8219d38dda6e809a8 (diff)
Updated the xcomposite extension
-rw-r--r--src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml6
-rw-r--r--src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h53
-rw-r--r--src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c10
-rw-r--r--src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h2
4 files changed, 25 insertions, 46 deletions
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml b/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
index 1bef458a8..b63982e7a 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
+++ b/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
@@ -2,15 +2,15 @@
<protocol name="xcomposite">
<!-- XComposite support. This object is created by the server and published
using the display's global event. -->
- <interface name="xcomposite" version="1">
+ <interface name="wl_xcomposite" version="1">
<!-- Create a wayland buffer for X Window. -->
<request name="create_buffer">
- <arg name="id" type="new_id" interface="buffer"/>
+ <arg name="id" type="new_id" interface="wl_buffer"/>
<arg name="x_window" type="uint"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
- <arg name="visual" type="object" interface="visual"/>
+ <arg name="visual" type="object" interface="wl_visual"/>
</request>
<!-- Notification of the root window to use for the X Window created
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
index 1955a74c5..fd3fc681b 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
+++ b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
@@ -36,84 +36,63 @@ struct wl_client;
struct wl_xcomposite;
-struct wl_proxy;
-
-extern void
-wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...);
-extern struct wl_proxy *
-wl_proxy_create(struct wl_proxy *factory,
- const struct wl_interface *interface);
-extern struct wl_proxy *
-wl_proxy_create_for_id(struct wl_display *display,
- const struct wl_interface *interface, uint32_t id);
-extern void
-wl_proxy_destroy(struct wl_proxy *proxy);
-
-extern int
-wl_proxy_add_listener(struct wl_proxy *proxy,
- void (**implementation)(void), void *data);
-
-extern void
-wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data);
-
-extern void *
-wl_proxy_get_user_data(struct wl_proxy *proxy);
-
extern const struct wl_interface wl_xcomposite_interface;
struct wl_xcomposite_listener {
void (*root)(void *data,
- struct wl_xcomposite *xcomposite,
+ struct wl_xcomposite *wl_xcomposite,
const char *display_name,
uint32_t root_window);
};
static inline int
-wl_xcomposite_add_listener(struct wl_xcomposite *xcomposite,
- const struct wl_xcomposite_listener *listener, void *data)
+wl_xcomposite_add_listener(struct wl_xcomposite *wl_xcomposite,
+ const struct wl_xcomposite_listener *listener, void *data)
{
- return wl_proxy_add_listener((struct wl_proxy *) xcomposite,
+ return wl_proxy_add_listener((struct wl_proxy *) wl_xcomposite,
(void (**)(void)) listener, data);
}
#define WL_XCOMPOSITE_CREATE_BUFFER 0
static inline struct wl_xcomposite *
-wl_xcomposite_create(struct wl_display *display, uint32_t id)
+wl_xcomposite_create(struct wl_display *display, uint32_t id, uint32_t version)
{
+ wl_display_bind(display, id, "wl_xcomposite", version);
+
return (struct wl_xcomposite *)
wl_proxy_create_for_id(display, &wl_xcomposite_interface, id);
}
static inline void
-wl_xcomposite_set_user_data(struct wl_xcomposite *xcomposite, void *user_data)
+wl_xcomposite_set_user_data(struct wl_xcomposite *wl_xcomposite, void *user_data)
{
- wl_proxy_set_user_data((struct wl_proxy *) xcomposite, user_data);
+ wl_proxy_set_user_data((struct wl_proxy *) wl_xcomposite, user_data);
}
static inline void *
-wl_xcomposite_get_user_data(struct wl_xcomposite *xcomposite)
+wl_xcomposite_get_user_data(struct wl_xcomposite *wl_xcomposite)
{
- return wl_proxy_get_user_data((struct wl_proxy *) xcomposite);
+ return wl_proxy_get_user_data((struct wl_proxy *) wl_xcomposite);
}
static inline void
-wl_xcomposite_destroy(struct wl_xcomposite *xcomposite)
+wl_xcomposite_destroy(struct wl_xcomposite *wl_xcomposite)
{
- wl_proxy_destroy((struct wl_proxy *) xcomposite);
+ wl_proxy_destroy((struct wl_proxy *) wl_xcomposite);
}
static inline struct wl_buffer *
-wl_xcomposite_create_buffer(struct wl_xcomposite *xcomposite, uint32_t x_window, int width, int height, struct wl_visual *visual)
+wl_xcomposite_create_buffer(struct wl_xcomposite *wl_xcomposite, uint32_t x_window, int width, int height, struct wl_visual *visual)
{
struct wl_proxy *id;
- id = wl_proxy_create((struct wl_proxy *) xcomposite,
+ id = wl_proxy_create((struct wl_proxy *) wl_xcomposite,
&wl_buffer_interface);
if (!id)
return NULL;
- wl_proxy_marshal((struct wl_proxy *) xcomposite,
+ wl_proxy_marshal((struct wl_proxy *) wl_xcomposite,
WL_XCOMPOSITE_CREATE_BUFFER, id, x_window, width, height, visual);
return (struct wl_buffer *) id;
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
index da2e4a2d0..1771ed7c7 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
+++ b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
@@ -25,17 +25,17 @@
#include <stdint.h>
#include "wayland-util.h"
-static const struct wl_message xcomposite_requests[] = {
+static const struct wl_message wl_xcomposite_requests[] = {
{ "create_buffer", "nuiio" },
};
-static const struct wl_message xcomposite_events[] = {
+static const struct wl_message wl_xcomposite_events[] = {
{ "root", "su" },
};
WL_EXPORT const struct wl_interface wl_xcomposite_interface = {
- "xcomposite", 1,
- ARRAY_LENGTH(xcomposite_requests), xcomposite_requests,
- ARRAY_LENGTH(xcomposite_events), xcomposite_events,
+ "wl_xcomposite", 1,
+ ARRAY_LENGTH(wl_xcomposite_requests), wl_xcomposite_requests,
+ ARRAY_LENGTH(wl_xcomposite_events), wl_xcomposite_events,
};
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
index 6902c74d7..091fa0218 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
+++ b/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
@@ -40,7 +40,7 @@ extern const struct wl_interface wl_xcomposite_interface;
struct wl_xcomposite_interface {
void (*create_buffer)(struct wl_client *client,
- struct wl_xcomposite *xcomposite,
+ struct wl_xcomposite *wl_xcomposite,
uint32_t id,
uint32_t x_window,
int width,