VirtualBox

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

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

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

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

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