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