1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 */
24
25#ifndef __GDK_MAIN_H__
26#define __GDK_MAIN_H__
27
28#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
29#error "Only <gdk/gdk.h> can be included directly."
30#endif
31
32#include <gdk/gdkversionmacros.h>
33#include <gdk/gdktypes.h>
34
35G_BEGIN_DECLS
36
37
38/* Initialization, exit and events
39 */
40
41#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
42
43GDK_AVAILABLE_IN_ALL
44void gdk_parse_args (gint *argc,
45 gchar ***argv);
46GDK_AVAILABLE_IN_ALL
47void gdk_init (gint *argc,
48 gchar ***argv);
49GDK_AVAILABLE_IN_ALL
50gboolean gdk_init_check (gint *argc,
51 gchar ***argv);
52GDK_DEPRECATED_IN_3_16
53void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
54GDK_DEPRECATED_IN_3_16
55void gdk_pre_parse_libgtk_only (void);
56
57GDK_AVAILABLE_IN_ALL
58const gchar * gdk_get_program_class (void);
59GDK_AVAILABLE_IN_ALL
60void gdk_set_program_class (const gchar *program_class);
61
62GDK_AVAILABLE_IN_ALL
63void gdk_notify_startup_complete (void);
64GDK_AVAILABLE_IN_ALL
65void gdk_notify_startup_complete_with_id (const gchar* startup_id);
66
67/* Push and pop error handlers for X errors
68 */
69GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_push)
70void gdk_error_trap_push (void);
71/* warn unused because you could use pop_ignored otherwise */
72GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_pop)
73G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
74GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_pop_ignored)
75void gdk_error_trap_pop_ignored (void);
76
77
78GDK_AVAILABLE_IN_ALL
79const gchar * gdk_get_display_arg_name (void);
80
81GDK_DEPRECATED_IN_3_8_FOR(gdk_display_get_name (gdk_display_get_default ()))
82gchar* gdk_get_display (void);
83
84#ifndef GDK_MULTIDEVICE_SAFE
85GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
86GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
87 gboolean owner_events,
88 GdkEventMask event_mask,
89 GdkWindow *confine_to,
90 GdkCursor *cursor,
91 guint32 time_);
92GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
93GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
94 gboolean owner_events,
95 guint32 time_);
96#endif /* GDK_MULTIDEVICE_SAFE */
97
98#ifndef GDK_MULTIDEVICE_SAFE
99GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
100void gdk_pointer_ungrab (guint32 time_);
101GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
102void gdk_keyboard_ungrab (guint32 time_);
103GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
104gboolean gdk_pointer_is_grabbed (void);
105#endif /* GDK_MULTIDEVICE_SAFE */
106
107GDK_DEPRECATED_IN_3_22
108gint gdk_screen_width (void) G_GNUC_CONST;
109GDK_DEPRECATED_IN_3_22
110gint gdk_screen_height (void) G_GNUC_CONST;
111
112GDK_DEPRECATED_IN_3_22
113gint gdk_screen_width_mm (void) G_GNUC_CONST;
114GDK_DEPRECATED_IN_3_22
115gint gdk_screen_height_mm (void) G_GNUC_CONST;
116
117GDK_DEPRECATED_IN_3_22_FOR(gdk_display_set_double_click_time)
118void gdk_set_double_click_time (guint msec);
119
120GDK_DEPRECATED_IN_3_22_FOR(gdk_display_beep)
121void gdk_beep (void);
122
123GDK_DEPRECATED_IN_3_22_FOR(gdk_display_flush)
124void gdk_flush (void);
125
126GDK_AVAILABLE_IN_ALL
127void gdk_disable_multidevice (void);
128
129GDK_AVAILABLE_IN_3_10
130void gdk_set_allowed_backends (const gchar *backends);
131
132G_END_DECLS
133
134#endif /* __GDK_MAIN_H__ */
135