]> Pileus Git - ~andy/gtk/blob - gdk/gdkmain.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / gdkmain.h
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
35 G_BEGIN_DECLS
36
37
38 /* Initialization, exit and events
39  */
40
41 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
42
43 void                  gdk_parse_args                      (gint           *argc,
44                                                            gchar        ***argv);
45 void                  gdk_init                            (gint           *argc,
46                                                            gchar        ***argv);
47 gboolean              gdk_init_check                      (gint           *argc,
48                                                            gchar        ***argv);
49 void                  gdk_add_option_entries_libgtk_only  (GOptionGroup   *group);
50 void                  gdk_pre_parse_libgtk_only           (void);
51
52 const gchar *         gdk_get_program_class               (void);
53 void                  gdk_set_program_class               (const gchar    *program_class);
54
55 void                  gdk_notify_startup_complete         (void);
56 void                  gdk_notify_startup_complete_with_id (const gchar* startup_id);
57
58 /* Push and pop error handlers for X errors
59  */
60 void                           gdk_error_trap_push        (void);
61 /* warn unused because you could use pop_ignored otherwise */
62 G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop         (void);
63 void                           gdk_error_trap_pop_ignored (void);
64
65
66 const gchar *         gdk_get_display_arg_name (void);
67
68 /**
69  * gdk_get_display:
70  *
71  * Gets the name of the display, which usually comes from the
72  * <envar>DISPLAY</envar> environment variable or the
73  * <option>--display</option> command line option.
74  *
75  * Returns: the name of the display.
76  */
77 gchar*        gdk_get_display        (void);
78
79 #ifndef GDK_MULTIDEVICE_SAFE
80 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
81 GdkGrabStatus gdk_pointer_grab       (GdkWindow    *window,
82                                       gboolean      owner_events,
83                                       GdkEventMask  event_mask,
84                                       GdkWindow    *confine_to,
85                                       GdkCursor    *cursor,
86                                       guint32       time_);
87 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_grab)
88 GdkGrabStatus gdk_keyboard_grab      (GdkWindow    *window,
89                                       gboolean      owner_events,
90                                       guint32       time_);
91 #endif /* GDK_MULTIDEVICE_SAFE */
92
93 #ifndef GDK_MULTIHEAD_SAFE
94
95 #ifndef GDK_MULTIDEVICE_SAFE
96 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
97 void          gdk_pointer_ungrab     (guint32       time_);
98 GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
99 void          gdk_keyboard_ungrab    (guint32       time_);
100 GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
101 gboolean      gdk_pointer_is_grabbed (void);
102 #endif /* GDK_MULTIDEVICE_SAFE */
103
104 gint gdk_screen_width  (void) G_GNUC_CONST;
105 gint gdk_screen_height (void) G_GNUC_CONST;
106
107 gint gdk_screen_width_mm  (void) G_GNUC_CONST;
108 gint gdk_screen_height_mm (void) G_GNUC_CONST;
109
110 void gdk_set_double_click_time (guint msec);
111
112 void gdk_beep (void);
113
114 #endif /* GDK_MULTIHEAD_SAFE */
115
116 void gdk_flush (void);
117
118 void gdk_disable_multidevice (void);
119
120 G_END_DECLS
121
122 #endif /* __GDK_MAIN_H__ */