codegen: Don't check for comma expression in visit_addressof_expression
[vala-lang.git] / vapi / xcb.vapi
blobeee9afd654f2f0efe7589160b3359aa667f31d20
1 /* xcb.vapi
2  *
3  * Copyright (C) 2009  Jürg Billeter
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  * Author:
20  *      Jürg Billeter <j@bitron.ch>
21  */
23 [CCode (lower_case_cprefix = "xcb_", cheader_filename = "xcb/xcb.h")]
24 namespace Xcb {
25         [Compact]
26         [CCode (cname = "xcb_connection_t", cprefix = "xcb_", ref_function = "", unref_function = "")]
27         public class Connection {
28                 public void disconnect ();
29                 public void flush ();
30                 public uint32 generate_id ();
31                 public Setup get_setup ();
32         }
34         [Compact]
35         [CCode (cname = "xcb_setup_t", ref_function = "", unref_function = "")]
36         public class Setup {
37                 public ScreenIterator roots_iterator ();
38         }
40         public const char COPY_FROM_PARENT;
42         [CCode (cname = "xcb_window_class_t")]
43         public enum WindowClass {
44                 COPY_FROM_PARENT,
45                 INPUT_OUTPUT,
46                 INPUT_ONLY
47         }
49         [Compact]
50         [CCode (cname = "xcb_generic_event_t", ref_function = "", unref_function = "")]
51         public class GenericEvent {
52                 public uint8 response_type;
53         }
55         public const uint8 BUTTON_PRESS;
56         public const uint8 BUTTON_RELEASE;
57         public const uint8 EXPOSE;
58         public const uint8 MOTION_NOTIFY;
59         public const uint8 ENTER_NOTIFY;
60         public const uint8 LEAVE_NOTIFY;
62         [CCode (cname = "xcb_button_press_event_t", ref_function = "", unref_function = "")]
63         public class ButtonPressEvent : GenericEvent {
64                 public Button detail;
65                 public Window root;
66                 public Window event;
67                 public Window child;
68                 public uint16 root_x;
69                 public uint16 root_y;
70                 public uint16 event_x;
71                 public uint16 event_y;
72         }
74         [CCode (cname = "xcb_button_release_event_t", ref_function = "", unref_function = "")]
75         public class ButtonReleaseEvent : GenericEvent {
76                 public Button detail;
77                 public Window root;
78                 public Window event;
79                 public Window child;
80                 public uint16 root_x;
81                 public uint16 root_y;
82                 public uint16 event_x;
83                 public uint16 event_y;
84         }
86         [CCode (cname = "xcb_motion_notify_event_t", ref_function = "", unref_function = "")]
87         public class MotionNotifyEvent : GenericEvent {
88                 public Window root;
89                 public Window event;
90                 public Window child;
91                 public uint16 root_x;
92                 public uint16 root_y;
93                 public uint16 event_x;
94                 public uint16 event_y;
95         }
97         [CCode (cname = "xcb_expose_event_t", ref_function = "", unref_function = "")]
98         public class ExposeEvent : GenericEvent {
99                 public Window window;
100                 public uint16 x;
101                 public uint16 y;
102                 public uint16 width;
103                 public uint16 height;
104         }
106         [CCode (cname = "xcb_cw_t")]
107         public enum CW {
108                 BACK_PIXMAP,
109                 BACK_PIXEL,
110                 BORDER_PIXMAP,
111                 BORDER_PIXEL,
112                 BIT_GRAVITY,
113                 WIN_GRAVITY,
114                 BACKING_STORE,
115                 BACKING_PLANES,
116                 BACKING_PIXEL,
117                 OVERRIDE_REDIRECT,
118                 SAVE_UNDER,
119                 EVENT_MASK,
120                 DONT_PROPAGATE,
121                 COLORMAP,
122                 CURSOR
123         }
125         [CCode (cname = "xcb_event_mask_t")]
126         public enum EventMask {
127                 NO_EVENT,
128                 KEY_PRESS,
129                 KEY_RELEASE,
130                 BUTTON_PRESS,
131                 BUTTON_RELEASE,
132                 ENTER_WINDOW,
133                 LEAVE_WINDOW,
134                 POINTER_MOTION,
135                 POINTER_MOTION_HINT,
136                 BUTTON_1MOTION,
137                 BUTTON_2MOTION,
138                 BUTTON_3MOTION,
139                 BUTTON_4MOTION,
140                 BUTTON_5MOTION,
141                 BUTTON_MOTION,
142                 KEYMAP_STATE,
143                 EXPOSURE,
144                 VISIBILITY_CHANGE,
145                 STRUCTURE_NOTIFY,
146                 RESIZE_REDIRECT,
147                 SUBSTRUCTURE_NOTIFY,
148                 SUBSTRUCTURE_REDIRECT,
149                 FOCUS_CHANGE,
150                 PROPERTY_CHANGE,
151                 COLOR_MAP_CHANGE,
152                 OWNER_GRAB_BUTTON
153         }
155         [Compact]
156         [CCode (cname = "xcb_screen_t", ref_function = "", unref_function = "")]
157         public class Screen {
158                 public Window root;
159                 public uint32 white_pixel;
160                 public uint32 black_pixel;
161                 public VisualID root_visual;
162                 public DepthIterator allowed_depths_iterator ();
163         }
165         [CCode (cname = "xcb_screen_iterator_t")]
166         public struct ScreenIterator {
167                 public unowned Screen data;
168                 public int rem;
169                 public int next;
170         }
172         [Compact]
173         [CCode (cname = "xcb_depth_t", ref_function = "", unref_function = "")]
174         public class Depth {
175                 public uint8 depth;
176                 public VisualTypeIterator visuals_iterator ();
177         }
179         [CCode (cname = "xcb_depth_iterator_t")]
180         public struct DepthIterator {
181                 public unowned Depth data;
182                 public int rem;
183                 [CCode (cname = "xcb_depth_next")]
184                 public void next ();
185         }
187         [CCode (cname = "xcb_visualtype_iterator_t")]
188         public struct VisualTypeIterator {
189                 public unowned VisualType data;
190                 public int rem;
191                 [CCode (cname = "xcb_visualtype_next")]
192                 public void next ();
193         }
195         public Connection connect (string? display = null, out int screen = null);
196         public VoidCookie create_window (Connection connection, uint8 depth, Window wid, Window parent, int16 x, int16 y, uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, [CCode (array_length = false)] uint32[] value_list);
197         public VoidCookie map_window (Connection connection, Window wid);
199         public struct VoidCookie {
200         }
202         public struct VisualID : uint32 {
203         }
205         public struct Button : uint8 {
206         }
208         [CCode (cname = "xcb_drawable_t")]
209         public struct Drawable : uint32 {
210         }
212         [CCode (cname = "xcb_window_t")]
213         public struct Window : Drawable {
214         }
216         [Compact]
217         [CCode (cname = "xcb_visualtype_t", ref_function = "", unref_function = "")]
218         public class VisualType {
219                 public VisualID visual_id;
220                 public uint8 _class;
221                 public uint8 bits_per_rgb_value;
222         }