1 | /* $Id: vbox-gtk.h 108024 2025-02-03 13:26:59Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Guest Additions - Definitions from Gtk 3.24.38 and Glib 2.17 libraries.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2024 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.alldomusa.eu.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | /* GTK - The GIMP Toolkit
|
---|
29 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
---|
30 | *
|
---|
31 | * This library is free software; you can redistribute it and/or
|
---|
32 | * modify it under the terms of the GNU Lesser General Public
|
---|
33 | * License as published by the Free Software Foundation; either
|
---|
34 | * version 2 of the License, or (at your option) any later version.
|
---|
35 | *
|
---|
36 | * This library is distributed in the hope that it will be useful,
|
---|
37 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
38 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
39 | * Lesser General Public License for more details.
|
---|
40 | *
|
---|
41 | * You should have received a copy of the GNU Lesser General Public
|
---|
42 | * License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
---|
43 | */
|
---|
44 |
|
---|
45 | /*
|
---|
46 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
---|
47 | * file for a list of people on the GTK+ Team. See the ChangeLog
|
---|
48 | * files for a list of changes. These files are distributed with
|
---|
49 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
---|
50 | */
|
---|
51 |
|
---|
52 | /* GLIB - Library of useful routines for C programming
|
---|
53 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
---|
54 | *
|
---|
55 | * SPDX-License-Identifier: LGPL-2.1-or-later
|
---|
56 | *
|
---|
57 | * This library is free software; you can redistribute it and/or
|
---|
58 | * modify it under the terms of the GNU Lesser General Public
|
---|
59 | * License as published by the Free Software Foundation; either
|
---|
60 | * version 2.1 of the License, or (at your option) any later version.
|
---|
61 | *
|
---|
62 | * This library is distributed in the hope that it will be useful,
|
---|
63 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
64 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
65 | * Lesser General Public License for more details.
|
---|
66 | *
|
---|
67 | * You should have received a copy of the GNU Lesser General Public
|
---|
68 | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
---|
69 | */
|
---|
70 |
|
---|
71 | /*
|
---|
72 | * Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
---|
73 | * file for a list of people on the GLib Team. See the ChangeLog
|
---|
74 | * files for a list of changes. These files are distributed with
|
---|
75 | * GLib at ftp://ftp.gtk.org/pub/gtk/.
|
---|
76 | */
|
---|
77 |
|
---|
78 | /*
|
---|
79 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
80 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
81 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
82 | * a choice of LGPL license versions is made available with the language indicating
|
---|
83 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
84 | * of the LGPL is applied is otherwise unspecified.
|
---|
85 | */
|
---|
86 |
|
---|
87 | #ifndef GA_INCLUDED_SRC_x11_VBoxClient_vbox_gtk_h
|
---|
88 | #define GA_INCLUDED_SRC_x11_VBoxClient_vbox_gtk_h
|
---|
89 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
90 | # pragma once
|
---|
91 | #endif
|
---|
92 |
|
---|
93 | extern "C"
|
---|
94 | {
|
---|
95 |
|
---|
96 |
|
---|
97 | /**
|
---|
98 | * Gtk definitions.
|
---|
99 | */
|
---|
100 |
|
---|
101 |
|
---|
102 | #ifndef FALSE
|
---|
103 | #define FALSE (0)
|
---|
104 | #endif
|
---|
105 |
|
---|
106 | #ifndef TRUE
|
---|
107 | #define TRUE (!FALSE)
|
---|
108 | #endif
|
---|
109 |
|
---|
110 | #define G_SOURCE_REMOVE FALSE
|
---|
111 |
|
---|
112 | #define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
---|
113 | #define _GDK_MAKE_ATOM(val) ((GdkAtom)GUINT_TO_POINTER(val))
|
---|
114 |
|
---|
115 | #define GDK_NONE _GDK_MAKE_ATOM (0)
|
---|
116 |
|
---|
117 | #define GDK_SELECTION_CLIPBOARD _GDK_MAKE_ATOM (69)
|
---|
118 |
|
---|
119 | #define _G_TYPE_CIC(ip, gt, ct) ((ct*) (void *) ip)
|
---|
120 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
|
---|
121 |
|
---|
122 | #define G_CALLBACK(f) ((GCallback) (f))
|
---|
123 | #define g_signal_connect(instance, detailed_signal, c_handler, data) \
|
---|
124 | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0)
|
---|
125 |
|
---|
126 | #define g_signal_connect_after(instance, detailed_signal, c_handler, data) \
|
---|
127 | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER)
|
---|
128 |
|
---|
129 | #define GTK_TYPE_WINDOW (gtk_window_get_type ())
|
---|
130 | #define GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
|
---|
131 |
|
---|
132 | #define GTK_TYPE_CONTAINER (gtk_container_get_type ())
|
---|
133 | #define GTK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
|
---|
134 |
|
---|
135 | #define GTK_TYPE_BOX (gtk_box_get_type ())
|
---|
136 | #define GTK_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX, GtkBox))
|
---|
137 |
|
---|
138 | #define GTK_TYPE_WIDGET (gtk_widget_get_type ())
|
---|
139 | #define GTK_WIDGET(widget) (G_TYPE_CHECK_INSTANCE_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
|
---|
140 |
|
---|
141 | #define G_TYPE_APPLICATION (g_application_get_type ())
|
---|
142 | #define G_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_APPLICATION, GApplication))
|
---|
143 |
|
---|
144 | typedef enum
|
---|
145 | {
|
---|
146 | G_APPLICATION_FLAGS_NONE = 0,
|
---|
147 | G_APPLICATION_DEFAULT_FLAGS = 0,
|
---|
148 | G_APPLICATION_IS_SERVICE = (1 << 0),
|
---|
149 | G_APPLICATION_IS_LAUNCHER = (1 << 1),
|
---|
150 |
|
---|
151 | G_APPLICATION_HANDLES_OPEN = (1 << 2),
|
---|
152 | G_APPLICATION_HANDLES_COMMAND_LINE = (1 << 3),
|
---|
153 | G_APPLICATION_SEND_ENVIRONMENT = (1 << 4),
|
---|
154 |
|
---|
155 | G_APPLICATION_NON_UNIQUE = (1 << 5),
|
---|
156 |
|
---|
157 | G_APPLICATION_CAN_OVERRIDE_APP_ID = (1 << 6),
|
---|
158 | G_APPLICATION_ALLOW_REPLACEMENT = (1 << 7),
|
---|
159 | G_APPLICATION_REPLACE = (1 << 8)
|
---|
160 | } GApplicationFlags;
|
---|
161 |
|
---|
162 | typedef enum
|
---|
163 | {
|
---|
164 | GTK_WINDOW_TOPLEVEL,
|
---|
165 | GTK_WINDOW_POPUP
|
---|
166 | } GtkWindowType;
|
---|
167 |
|
---|
168 | typedef enum
|
---|
169 | {
|
---|
170 | GDK_NOTHING = -1,
|
---|
171 | GDK_DELETE = 0,
|
---|
172 | GDK_DESTROY = 1,
|
---|
173 | GDK_EXPOSE = 2,
|
---|
174 | GDK_MOTION_NOTIFY = 3,
|
---|
175 | GDK_BUTTON_PRESS = 4,
|
---|
176 | GDK_2BUTTON_PRESS = 5,
|
---|
177 | GDK_DOUBLE_BUTTON_PRESS = GDK_2BUTTON_PRESS,
|
---|
178 | GDK_3BUTTON_PRESS = 6,
|
---|
179 | GDK_TRIPLE_BUTTON_PRESS = GDK_3BUTTON_PRESS,
|
---|
180 | GDK_BUTTON_RELEASE = 7,
|
---|
181 | GDK_KEY_PRESS = 8,
|
---|
182 | GDK_KEY_RELEASE = 9,
|
---|
183 | GDK_ENTER_NOTIFY = 10,
|
---|
184 | GDK_LEAVE_NOTIFY = 11,
|
---|
185 | GDK_FOCUS_CHANGE = 12,
|
---|
186 | GDK_CONFIGURE = 13,
|
---|
187 | GDK_MAP = 14,
|
---|
188 | GDK_UNMAP = 15,
|
---|
189 | GDK_PROPERTY_NOTIFY = 16,
|
---|
190 | GDK_SELECTION_CLEAR = 17,
|
---|
191 | GDK_SELECTION_REQUEST = 18,
|
---|
192 | GDK_SELECTION_NOTIFY = 19,
|
---|
193 | GDK_PROXIMITY_IN = 20,
|
---|
194 | GDK_PROXIMITY_OUT = 21,
|
---|
195 | GDK_DRAG_ENTER = 22,
|
---|
196 | GDK_DRAG_LEAVE = 23,
|
---|
197 | GDK_DRAG_MOTION = 24,
|
---|
198 | GDK_DRAG_STATUS = 25,
|
---|
199 | GDK_DROP_START = 26,
|
---|
200 | GDK_DROP_FINISHED = 27,
|
---|
201 | GDK_CLIENT_EVENT = 28,
|
---|
202 | GDK_VISIBILITY_NOTIFY = 29,
|
---|
203 | GDK_SCROLL = 31,
|
---|
204 | GDK_WINDOW_STATE = 32,
|
---|
205 | GDK_SETTING = 33,
|
---|
206 | GDK_OWNER_CHANGE = 34,
|
---|
207 | GDK_GRAB_BROKEN = 35,
|
---|
208 | GDK_DAMAGE = 36,
|
---|
209 | GDK_TOUCH_BEGIN = 37,
|
---|
210 | GDK_TOUCH_UPDATE = 38,
|
---|
211 | GDK_TOUCH_END = 39,
|
---|
212 | GDK_TOUCH_CANCEL = 40,
|
---|
213 | GDK_TOUCHPAD_SWIPE = 41,
|
---|
214 | GDK_TOUCHPAD_PINCH = 42,
|
---|
215 | GDK_PAD_BUTTON_PRESS = 43,
|
---|
216 | GDK_PAD_BUTTON_RELEASE = 44,
|
---|
217 | GDK_PAD_RING = 45,
|
---|
218 | GDK_PAD_STRIP = 46,
|
---|
219 | GDK_PAD_GROUP_MODE = 47,
|
---|
220 | GDK_EVENT_LAST /* helper variable for decls */
|
---|
221 | } GdkEventType;
|
---|
222 |
|
---|
223 | typedef enum
|
---|
224 | {
|
---|
225 | GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
|
---|
226 | GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
|
---|
227 | GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
|
---|
228 | GDK_WINDOW_STATE_STICKY = 1 << 3,
|
---|
229 | GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
|
---|
230 | GDK_WINDOW_STATE_ABOVE = 1 << 5,
|
---|
231 | GDK_WINDOW_STATE_BELOW = 1 << 6,
|
---|
232 | GDK_WINDOW_STATE_FOCUSED = 1 << 7,
|
---|
233 | GDK_WINDOW_STATE_TILED = 1 << 8,
|
---|
234 | GDK_WINDOW_STATE_TOP_TILED = 1 << 9,
|
---|
235 | GDK_WINDOW_STATE_TOP_RESIZABLE = 1 << 10,
|
---|
236 | GDK_WINDOW_STATE_RIGHT_TILED = 1 << 11,
|
---|
237 | GDK_WINDOW_STATE_RIGHT_RESIZABLE = 1 << 12,
|
---|
238 | GDK_WINDOW_STATE_BOTTOM_TILED = 1 << 13,
|
---|
239 | GDK_WINDOW_STATE_BOTTOM_RESIZABLE = 1 << 14,
|
---|
240 | GDK_WINDOW_STATE_LEFT_TILED = 1 << 15,
|
---|
241 | GDK_WINDOW_STATE_LEFT_RESIZABLE = 1 << 16
|
---|
242 | } GdkWindowState;
|
---|
243 |
|
---|
244 | typedef enum
|
---|
245 | {
|
---|
246 | GTK_ORIENTATION_HORIZONTAL,
|
---|
247 | GTK_ORIENTATION_VERTICAL
|
---|
248 | } GtkOrientation;
|
---|
249 |
|
---|
250 | typedef enum
|
---|
251 | {
|
---|
252 | G_CONNECT_DEFAULT = 0,
|
---|
253 | G_CONNECT_AFTER = 1 << 0,
|
---|
254 | G_CONNECT_SWAPPED = 1 << 1
|
---|
255 | } GConnectFlags;
|
---|
256 |
|
---|
257 | typedef enum
|
---|
258 | {
|
---|
259 | GTK_DIR_TAB_FORWARD,
|
---|
260 | GTK_DIR_TAB_BACKWARD,
|
---|
261 | GTK_DIR_UP,
|
---|
262 | GTK_DIR_DOWN,
|
---|
263 | GTK_DIR_LEFT,
|
---|
264 | GTK_DIR_RIGHT
|
---|
265 | } GtkDirectionType;
|
---|
266 |
|
---|
267 | typedef struct _GdkWindow GdkWindow;
|
---|
268 | typedef char gint8;
|
---|
269 |
|
---|
270 | struct _GdkEventWindowState
|
---|
271 | {
|
---|
272 | GdkEventType type;
|
---|
273 | GdkWindow *window;
|
---|
274 | gint8 send_event;
|
---|
275 | GdkWindowState changed_mask;
|
---|
276 | GdkWindowState new_window_state;
|
---|
277 | };
|
---|
278 |
|
---|
279 | typedef struct _GList GList;
|
---|
280 | typedef struct _GdkAtom *GdkAtom;
|
---|
281 | typedef struct _GtkTargetList GtkTargetList;
|
---|
282 | typedef struct _GtkTargetEntry GtkTargetEntry;
|
---|
283 | typedef struct _GtkClipboard GtkClipboard;
|
---|
284 | typedef struct _GtkSelectionData GtkSelectionData;
|
---|
285 | typedef struct _GtkWindow GtkWindow;
|
---|
286 | typedef struct _GClosure GClosure;
|
---|
287 | typedef struct _GdkEventWindowState GdkEventWindowState;
|
---|
288 | typedef struct _GtkContainer GtkContainer;
|
---|
289 | typedef struct _GtkBox GtkBox;
|
---|
290 | typedef struct _GtkButton GtkButton;
|
---|
291 | typedef struct _GtkApplication GtkApplication;
|
---|
292 | typedef struct _GApplication GApplication;
|
---|
293 | typedef union _GdkEvent GdkEvent;
|
---|
294 |
|
---|
295 | typedef struct _GtkWidget GtkWidget;
|
---|
296 | typedef int gint;
|
---|
297 | typedef gint gboolean;
|
---|
298 | typedef char gchar;
|
---|
299 | typedef unsigned char guchar;
|
---|
300 | typedef unsigned int guint;
|
---|
301 | typedef unsigned long gulong;
|
---|
302 | typedef void* gpointer;
|
---|
303 | typedef double gdouble;
|
---|
304 | typedef gulong GType;
|
---|
305 |
|
---|
306 | typedef gboolean (*GSourceFunc) (gpointer user_data);
|
---|
307 | typedef void (*GtkClipboardGetFunc) (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer user_data_or_owner);
|
---|
308 | typedef void (*GtkClipboardClearFunc)(GtkClipboard *clipboard, gpointer user_data_or_owner);
|
---|
309 | typedef void (*GCallback) (void);
|
---|
310 | typedef void (*GClosureNotify) (gpointer data, GClosure *closure);
|
---|
311 | typedef void (*GtkClipboardReceivedFunc) (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data);
|
---|
312 |
|
---|
313 |
|
---|
314 | extern GdkAtom gdk_atom_intern(const gchar *atom_name, gboolean only_if_exists);
|
---|
315 | extern gchar* gdk_atom_name(GdkAtom atom);
|
---|
316 |
|
---|
317 | extern guint gdk_threads_add_timeout(guint interval, GSourceFunc function, gpointer data);
|
---|
318 |
|
---|
319 | extern GtkApplication *gtk_application_new(const gchar *application_id, GApplicationFlags flags);
|
---|
320 | extern GtkWidget *gtk_application_window_new(GtkApplication *application);
|
---|
321 |
|
---|
322 | extern GType gtk_box_get_type(void);
|
---|
323 | extern GtkWidget* gtk_box_new(GtkOrientation orientation, gint spacing);
|
---|
324 | extern void gtk_box_pack_start(GtkBox* box, GtkWidget* child, gboolean expand, gboolean fill,
|
---|
325 | guint padding);
|
---|
326 | extern GtkWidget* gtk_button_new(void);
|
---|
327 |
|
---|
328 | extern GtkClipboard *gtk_clipboard_get(GdkAtom selection);
|
---|
329 | extern void gtk_clipboard_request_contents(GtkClipboard *clipboard, GdkAtom target,
|
---|
330 | GtkClipboardReceivedFunc callback, gpointer user_data);
|
---|
331 | extern gboolean gtk_clipboard_set_with_data(GtkClipboard* clipboard, const GtkTargetEntry* targets,
|
---|
332 | guint n_targets, GtkClipboardGetFunc get_func,
|
---|
333 | GtkClipboardClearFunc clear_func, gpointer user_data);
|
---|
334 | extern void gtk_clipboard_store(GtkClipboard* clipboard);
|
---|
335 | extern gboolean gtk_clipboard_wait_for_targets(GtkClipboard *clipboard, GdkAtom **targets, gint *n_targets);
|
---|
336 | extern void gtk_container_add(GtkContainer* container, GtkWidget* widget);
|
---|
337 | extern GType gtk_container_get_type(void);
|
---|
338 |
|
---|
339 | extern void gtk_init(int *argc, char ***argv);
|
---|
340 | extern void gtk_main(void);
|
---|
341 | extern void gtk_main_quit(void);
|
---|
342 |
|
---|
343 | extern guchar *gtk_selection_data_get_data(const GtkSelectionData* selection_data);
|
---|
344 | extern GdkAtom gtk_selection_data_get_data_type(const GtkSelectionData *selection_data);
|
---|
345 | extern const guchar *gtk_selection_data_get_data_with_length(const GtkSelectionData *selection_data, gint *length);
|
---|
346 | extern GdkAtom gtk_selection_data_get_target(const GtkSelectionData* selection_data);
|
---|
347 | extern void gtk_selection_data_set(GtkSelectionData* selection_data, GdkAtom type, gint format, const guchar* data, gint length);
|
---|
348 |
|
---|
349 | extern void gtk_target_list_add(GtkTargetList *list, GdkAtom target, guint flags, guint info);
|
---|
350 | extern GtkTargetList *gtk_target_list_new(const GtkTargetEntry *targets, guint ntargets);
|
---|
351 | extern void gtk_target_list_unref(GtkTargetList *list);
|
---|
352 |
|
---|
353 | extern void gtk_target_table_free(GtkTargetEntry* targets, gint n_targets);
|
---|
354 | extern GtkTargetEntry *gtk_target_table_new_from_list(GtkTargetList* list, gint* n_targets);
|
---|
355 |
|
---|
356 | extern void gtk_widget_destroy(GtkWidget* widget);
|
---|
357 | extern GType gtk_widget_get_type(void);
|
---|
358 | extern void gtk_widget_set_opacity(GtkWidget* widget, double opacity);
|
---|
359 | extern void gtk_widget_show_all(GtkWidget* widget);
|
---|
360 |
|
---|
361 | extern GType gtk_window_get_type(void);
|
---|
362 | extern void gtk_window_iconify(GtkWindow* window);
|
---|
363 | extern void gtk_window_present(GtkWindow* window);
|
---|
364 | extern void gtk_window_resize(GtkWindow* window, gint width, gint height);
|
---|
365 | extern void gtk_window_set_default_size(GtkWindow* window, gint width, gint height);
|
---|
366 |
|
---|
367 |
|
---|
368 | /**
|
---|
369 | * Glib definitions.
|
---|
370 | */
|
---|
371 |
|
---|
372 |
|
---|
373 | extern GType g_application_get_type(void);
|
---|
374 | extern gulong g_signal_connect_data(gpointer instance, const gchar *detailed_signal,
|
---|
375 | GCallback c_handler, gpointer data,
|
---|
376 | GClosureNotify destroy_data, GConnectFlags connect_flags);
|
---|
377 | extern void g_free(gpointer mem);
|
---|
378 |
|
---|
379 | extern int g_application_run(GApplication *application, int argc, char **argv);
|
---|
380 | extern GApplication *g_application_get_default(void);
|
---|
381 | extern void g_application_quit(GApplication *application);
|
---|
382 | extern void g_object_unref(gpointer object);
|
---|
383 |
|
---|
384 | } /* extern "C" */
|
---|
385 |
|
---|
386 | #endif /* !GA_INCLUDED_SRC_x11_VBoxClient_vbox_gtk_h */
|
---|
387 |
|
---|