Qt 4.8
wayland-xcomposite-client-protocol.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef XCOMPOSITE_CLIENT_PROTOCOL_H
43 #define XCOMPOSITE_CLIENT_PROTOCOL_H
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #include <stdint.h>
50 #include <stddef.h>
51 #include "wayland-util.h"
52 
53 struct wl_client;
54 
55 struct wl_xcomposite;
56 
57 extern const struct wl_interface wl_xcomposite_interface;
58 
60  void (*root)(void *data,
61  struct wl_xcomposite *wl_xcomposite,
62  const char *display_name,
63  uint32_t root_window);
64 };
65 
66 static inline int
67 wl_xcomposite_add_listener(struct wl_xcomposite *wl_xcomposite,
68  const struct wl_xcomposite_listener *listener, void *data)
69 {
70  return wl_proxy_add_listener((struct wl_proxy *) wl_xcomposite,
71  (void (**)(void)) listener, data);
72 }
73 
74 #define WL_XCOMPOSITE_CREATE_BUFFER 0
75 
76 static inline struct wl_xcomposite *
77 wl_xcomposite_create(struct wl_display *display, uint32_t id, uint32_t version)
78 {
79  wl_display_bind(display, id, "wl_xcomposite", version);
80 
81  return (struct wl_xcomposite *)
82  wl_proxy_create_for_id(display, &wl_xcomposite_interface, id);
83 }
84 
85 static inline void
86 wl_xcomposite_set_user_data(struct wl_xcomposite *wl_xcomposite, void *user_data)
87 {
88  wl_proxy_set_user_data((struct wl_proxy *) wl_xcomposite, user_data);
89 }
90 
91 static inline void *
92 wl_xcomposite_get_user_data(struct wl_xcomposite *wl_xcomposite)
93 {
94  return wl_proxy_get_user_data((struct wl_proxy *) wl_xcomposite);
95 }
96 
97 static inline void
98 wl_xcomposite_destroy(struct wl_xcomposite *wl_xcomposite)
99 {
100  wl_proxy_destroy((struct wl_proxy *) wl_xcomposite);
101 }
102 
103 static inline struct wl_buffer *
104 wl_xcomposite_create_buffer(struct wl_xcomposite *wl_xcomposite, uint32_t x_window, int width, int height, struct wl_visual *visual)
105 {
106  struct wl_proxy *id;
107 
108  id = wl_proxy_create((struct wl_proxy *) wl_xcomposite,
109  &wl_buffer_interface);
110  if (!id)
111  return NULL;
112 
113  wl_proxy_marshal((struct wl_proxy *) wl_xcomposite,
114  WL_XCOMPOSITE_CREATE_BUFFER, id, x_window, width, height, visual);
115 
116  return (struct wl_buffer *) id;
117 }
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif
static struct wl_buffer * wl_xcomposite_create_buffer(struct wl_xcomposite *wl_xcomposite, uint32_t x_window, int width, int height, struct wl_visual *visual)
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static void wl_xcomposite_set_user_data(struct wl_xcomposite *wl_xcomposite, void *user_data)
static const char * data(const QByteArray &arr)
#define WL_XCOMPOSITE_CREATE_BUFFER
void(* root)(void *data, struct wl_xcomposite *wl_xcomposite, const char *display_name, uint32_t root_window)
static void * wl_xcomposite_get_user_data(struct wl_xcomposite *wl_xcomposite)
static struct wl_xcomposite * wl_xcomposite_create(struct wl_display *display, uint32_t id, uint32_t version)
static void wl_xcomposite_destroy(struct wl_xcomposite *wl_xcomposite)
static QNSListener * listener
static int wl_xcomposite_add_listener(struct wl_xcomposite *wl_xcomposite, const struct wl_xcomposite_listener *listener, void *data)
const struct wl_interface wl_xcomposite_interface