1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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.
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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
31 #ifndef __GDK_MAIN_H__
32 #define __GDK_MAIN_H__
34 #include <gdk/gdkversionmacros.h>
35 #include <gdk/gdktypes.h>
40 /* Initialization, exit and events
43 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
45 void gdk_parse_args (gint *argc,
47 void gdk_init (gint *argc,
49 gboolean gdk_init_check (gint *argc,
51 void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
52 void gdk_pre_parse_libgtk_only (void);
54 const gchar * gdk_get_program_class (void);
55 void gdk_set_program_class (const gchar *program_class);
57 void gdk_notify_startup_complete (void);
58 void gdk_notify_startup_complete_with_id (const gchar* startup_id);
60 /* Push and pop error handlers for X errors
62 void gdk_error_trap_push (void);
63 /* warn unused because you could use pop_ignored otherwise */
64 G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
65 void gdk_error_trap_pop_ignored (void);
68 const gchar * gdk_get_display_arg_name (void);
73 * Gets the name of the display, which usually comes from the
74 * <envar>DISPLAY</envar> environment variable or the
75 * <option>--display</option> command line option.
77 * Returns: the name of the display.
79 gchar* gdk_get_display (void);
81 #ifndef GDK_MULTIDEVICE_SAFE
82 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
83 GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
84 gboolean owner_events,
85 GdkEventMask event_mask,
86 GdkWindow *confine_to,
89 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
90 GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
91 gboolean owner_events,
93 #endif /* GDK_MULTIDEVICE_SAFE */
95 #ifndef GDK_MULTIHEAD_SAFE
97 #ifndef GDK_MULTIDEVICE_SAFE
98 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
99 void gdk_pointer_ungrab (guint32 time_);
100 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
101 void gdk_keyboard_ungrab (guint32 time_);
102 GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
103 gboolean gdk_pointer_is_grabbed (void);
104 #endif /* GDK_MULTIDEVICE_SAFE */
106 gint gdk_screen_width (void) G_GNUC_CONST;
107 gint gdk_screen_height (void) G_GNUC_CONST;
109 gint gdk_screen_width_mm (void) G_GNUC_CONST;
110 gint gdk_screen_height_mm (void) G_GNUC_CONST;
112 void gdk_set_double_click_time (guint msec);
114 void gdk_beep (void);
116 #endif /* GDK_MULTIHEAD_SAFE */
118 void gdk_flush (void);
120 void gdk_disable_multidevice (void);
124 #endif /* __GDK_MAIN_H__ */