diff options
| author | Kristian Høgsberg <krh@redhat.com> | 2008-10-07 10:10:36 -0400 |
|---|---|---|
| committer | Kristian Høgsberg <krh@redhat.com> | 2008-11-06 10:51:43 -0500 |
| commit | 05eff51e413ff48c2edd2a2ab3ca9f9435c5c855 (patch) | |
| tree | 7c2251d4bafd6d7f8daa347b19d07f0ccb1ddd53 /wayland-client.c | |
| parent | Bunch of new stuff: simple compositor, cairo+gem use in client, events. (diff) | |
| download | wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar.gz wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar.bz2 wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar.lz wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar.xz wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.tar.zst wayland-05eff51e413ff48c2edd2a2ab3ca9f9435c5c855.zip | |
Add surface.map request.
Diffstat (limited to 'wayland-client.c')
| -rw-r--r-- | wayland-client.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/wayland-client.c b/wayland-client.c index 2e5bd18..afa43c8 100644 --- a/wayland-client.c +++ b/wayland-client.c @@ -192,7 +192,23 @@ wl_display_create_surface(struct wl_display *display) return surface; } -#define WL_SURFACE_ATTACH 0 +#define WL_SURFACE_DESTROY 0 +#define WL_SURFACE_ATTACH 1 +#define WL_SURFACE_MAP 2 + +void wl_surface_destroy(struct wl_surface *surface) +{ + uint32_t request[2]; + struct wl_connection *connection; + + request[0] = surface->proxy.id; + request[1] = WL_SURFACE_DESTROY | ((sizeof request) << 16); + + connection = surface->proxy.connection; + memcpy(connection->out.data + connection->out.head, + request, sizeof request); + connection->out.head += sizeof request; +} void wl_surface_attach(struct wl_surface *surface, uint32_t name, int width, int height, int stride) @@ -212,3 +228,23 @@ void wl_surface_attach(struct wl_surface *surface, request, sizeof request); connection->out.head += sizeof request; } + + +void wl_surface_map(struct wl_surface *surface, + int32_t x, int32_t y, int32_t width, int32_t height) +{ + uint32_t request[6]; + struct wl_connection *connection; + + request[0] = surface->proxy.id; + request[1] = WL_SURFACE_MAP | ((sizeof request) << 16); + request[2] = x; + request[3] = y; + request[4] = width; + request[5] = height; + + connection = surface->proxy.connection; + memcpy(connection->out.data + connection->out.head, + request, sizeof request); + connection->out.head += sizeof request; +} |
