VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/VBoxClient/vbox-gtk.h@ 108453

最後變更 在這個檔案從108453是 108024,由 vboxsync 提交於 6 週 前

Additions: X11: vbox-gtk.h: update header text (scm), bugref:10796.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 14.5 KB
 
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
93extern "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
144typedef 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
162typedef enum
163{
164 GTK_WINDOW_TOPLEVEL,
165 GTK_WINDOW_POPUP
166} GtkWindowType;
167
168typedef 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
223typedef 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
244typedef enum
245{
246 GTK_ORIENTATION_HORIZONTAL,
247 GTK_ORIENTATION_VERTICAL
248} GtkOrientation;
249
250typedef enum
251{
252 G_CONNECT_DEFAULT = 0,
253 G_CONNECT_AFTER = 1 << 0,
254 G_CONNECT_SWAPPED = 1 << 1
255} GConnectFlags;
256
257typedef 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
267typedef struct _GdkWindow GdkWindow;
268typedef char gint8;
269
270struct _GdkEventWindowState
271{
272 GdkEventType type;
273 GdkWindow *window;
274 gint8 send_event;
275 GdkWindowState changed_mask;
276 GdkWindowState new_window_state;
277};
278
279typedef struct _GList GList;
280typedef struct _GdkAtom *GdkAtom;
281typedef struct _GtkTargetList GtkTargetList;
282typedef struct _GtkTargetEntry GtkTargetEntry;
283typedef struct _GtkClipboard GtkClipboard;
284typedef struct _GtkSelectionData GtkSelectionData;
285typedef struct _GtkWindow GtkWindow;
286typedef struct _GClosure GClosure;
287typedef struct _GdkEventWindowState GdkEventWindowState;
288typedef struct _GtkContainer GtkContainer;
289typedef struct _GtkBox GtkBox;
290typedef struct _GtkButton GtkButton;
291typedef struct _GtkApplication GtkApplication;
292typedef struct _GApplication GApplication;
293typedef union _GdkEvent GdkEvent;
294
295typedef struct _GtkWidget GtkWidget;
296typedef int gint;
297typedef gint gboolean;
298typedef char gchar;
299typedef unsigned char guchar;
300typedef unsigned int guint;
301typedef unsigned long gulong;
302typedef void* gpointer;
303typedef double gdouble;
304typedef gulong GType;
305
306typedef gboolean (*GSourceFunc) (gpointer user_data);
307typedef void (*GtkClipboardGetFunc) (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer user_data_or_owner);
308typedef void (*GtkClipboardClearFunc)(GtkClipboard *clipboard, gpointer user_data_or_owner);
309typedef void (*GCallback) (void);
310typedef void (*GClosureNotify) (gpointer data, GClosure *closure);
311typedef void (*GtkClipboardReceivedFunc) (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data);
312
313
314extern GdkAtom gdk_atom_intern(const gchar *atom_name, gboolean only_if_exists);
315extern gchar* gdk_atom_name(GdkAtom atom);
316
317extern guint gdk_threads_add_timeout(guint interval, GSourceFunc function, gpointer data);
318
319extern GtkApplication *gtk_application_new(const gchar *application_id, GApplicationFlags flags);
320extern GtkWidget *gtk_application_window_new(GtkApplication *application);
321
322extern GType gtk_box_get_type(void);
323extern GtkWidget* gtk_box_new(GtkOrientation orientation, gint spacing);
324extern void gtk_box_pack_start(GtkBox* box, GtkWidget* child, gboolean expand, gboolean fill,
325 guint padding);
326extern GtkWidget* gtk_button_new(void);
327
328extern GtkClipboard *gtk_clipboard_get(GdkAtom selection);
329extern void gtk_clipboard_request_contents(GtkClipboard *clipboard, GdkAtom target,
330 GtkClipboardReceivedFunc callback, gpointer user_data);
331extern 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);
334extern void gtk_clipboard_store(GtkClipboard* clipboard);
335extern gboolean gtk_clipboard_wait_for_targets(GtkClipboard *clipboard, GdkAtom **targets, gint *n_targets);
336extern void gtk_container_add(GtkContainer* container, GtkWidget* widget);
337extern GType gtk_container_get_type(void);
338
339extern void gtk_init(int *argc, char ***argv);
340extern void gtk_main(void);
341extern void gtk_main_quit(void);
342
343extern guchar *gtk_selection_data_get_data(const GtkSelectionData* selection_data);
344extern GdkAtom gtk_selection_data_get_data_type(const GtkSelectionData *selection_data);
345extern const guchar *gtk_selection_data_get_data_with_length(const GtkSelectionData *selection_data, gint *length);
346extern GdkAtom gtk_selection_data_get_target(const GtkSelectionData* selection_data);
347extern void gtk_selection_data_set(GtkSelectionData* selection_data, GdkAtom type, gint format, const guchar* data, gint length);
348
349extern void gtk_target_list_add(GtkTargetList *list, GdkAtom target, guint flags, guint info);
350extern GtkTargetList *gtk_target_list_new(const GtkTargetEntry *targets, guint ntargets);
351extern void gtk_target_list_unref(GtkTargetList *list);
352
353extern void gtk_target_table_free(GtkTargetEntry* targets, gint n_targets);
354extern GtkTargetEntry *gtk_target_table_new_from_list(GtkTargetList* list, gint* n_targets);
355
356extern void gtk_widget_destroy(GtkWidget* widget);
357extern GType gtk_widget_get_type(void);
358extern void gtk_widget_set_opacity(GtkWidget* widget, double opacity);
359extern void gtk_widget_show_all(GtkWidget* widget);
360
361extern GType gtk_window_get_type(void);
362extern void gtk_window_iconify(GtkWindow* window);
363extern void gtk_window_present(GtkWindow* window);
364extern void gtk_window_resize(GtkWindow* window, gint width, gint height);
365extern void gtk_window_set_default_size(GtkWindow* window, gint width, gint height);
366
367
368/**
369 * Glib definitions.
370 */
371
372
373extern GType g_application_get_type(void);
374extern gulong g_signal_connect_data(gpointer instance, const gchar *detailed_signal,
375 GCallback c_handler, gpointer data,
376 GClosureNotify destroy_data, GConnectFlags connect_flags);
377extern void g_free(gpointer mem);
378
379extern int g_application_run(GApplication *application, int argc, char **argv);
380extern GApplication *g_application_get_default(void);
381extern void g_application_quit(GApplication *application);
382extern void g_object_unref(gpointer object);
383
384} /* extern "C" */
385
386#endif /* !GA_INCLUDED_SRC_x11_VBoxClient_vbox_gtk_h */
387
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette