]> Pileus Git - ~andy/gtk/blob - gdk/gdkmain.h
Inclusion cleanups in headers
[~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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
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/.
25  */
26
27 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
29 #endif
30
31 #ifndef __GDK_MAIN_H__
32 #define __GDK_MAIN_H__
33
34 #include <gdk/gdktypes.h>
35
36 G_BEGIN_DECLS
37
38
39 /* Initialization, exit and events
40  */
41
42 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
43
44 void                  gdk_parse_args                      (gint           *argc,
45                                                            gchar        ***argv);
46 void                  gdk_init                            (gint           *argc,
47                                                            gchar        ***argv);
48 gboolean              gdk_init_check                      (gint           *argc,
49                                                            gchar        ***argv);
50 void                  gdk_add_option_entries_libgtk_only  (GOptionGroup   *group);
51 void                  gdk_pre_parse_libgtk_only           (void);
52
53 gchar*                gdk_set_locale                      (void);
54 void                  gdk_enable_multidevice              (void);
55
56 G_CONST_RETURN gchar *gdk_get_program_class               (void);
57 void                  gdk_set_program_class               (const gchar    *program_class);
58
59 void                  gdk_notify_startup_complete         (void);
60 void                  gdk_notify_startup_complete_with_id (const gchar* startup_id);
61
62 /* Push and pop error handlers for X errors
63  */
64 void                           gdk_error_trap_push        (void);
65 /* warn unused because you could use pop_ignored otherwise */
66 G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop         (void);
67 void                           gdk_error_trap_pop_ignored (void);
68
69
70 G_CONST_RETURN gchar *gdk_get_display_arg_name (void);
71 gchar*                gdk_get_display          (void);
72
73 #ifndef GDK_MULTIDEVICE_SAFE
74 GdkGrabStatus gdk_pointer_grab       (GdkWindow    *window,
75                                       gboolean      owner_events,
76                                       GdkEventMask  event_mask,
77                                       GdkWindow    *confine_to,
78                                       GdkCursor    *cursor,
79                                       guint32       time_);
80 GdkGrabStatus gdk_keyboard_grab      (GdkWindow    *window,
81                                       gboolean      owner_events,
82                                       guint32       time_);
83 #endif /* GDK_MULTIDEVICE_SAFE */
84
85 #ifndef GDK_MULTIHEAD_SAFE
86
87 #ifndef GDK_MULTIDEVICE_SAFE
88 void          gdk_pointer_ungrab     (guint32       time_);
89 void          gdk_keyboard_ungrab    (guint32       time_);
90 gboolean      gdk_pointer_is_grabbed (void);
91 #endif /* GDK_MULTIDEVICE_SAFE */
92
93 gint gdk_screen_width  (void) G_GNUC_CONST;
94 gint gdk_screen_height (void) G_GNUC_CONST;
95
96 gint gdk_screen_width_mm  (void) G_GNUC_CONST;
97 gint gdk_screen_height_mm (void) G_GNUC_CONST;
98
99 void gdk_set_double_click_time (guint msec);
100
101 void gdk_beep (void);
102
103 #endif /* GDK_MULTIHEAD_SAFE */
104
105 void gdk_flush (void);
106
107 G_END_DECLS
108
109 #endif /* __GDK_MAIN_H__ */