Ardour  8.7-14-g57a6773833
gdk.h
Go to the documentation of this file.
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 #ifndef __GDK_H__
28 #define __GDK_H__
29 
30 #define __GDK_H_INSIDE__
31 
33 #include <gdk/gdkcairo.h>
34 #include <gdk/gdkcolor.h>
35 #include <gdk/gdkcursor.h>
36 #include <gdk/gdkdisplay.h>
37 #include <gdk/gdkdisplaymanager.h>
38 #include <gdk/gdkdnd.h>
39 #include <gdk/gdkdrawable.h>
40 #include <gdk/gdkenumtypes.h>
41 #include <gdk/gdkevents.h>
42 #include <gdk/gdkfont.h>
43 #include <gdk/gdkgc.h>
44 #include <gdk/gdkimage.h>
45 #include <gdk/gdkinput.h>
46 #include <gdk/gdkkeys.h>
47 #include <gdk/gdkpango.h>
48 #include <gdk/gdkpixbuf.h>
49 #include <gdk/gdkpixmap.h>
50 #include <gdk/gdkproperty.h>
51 #include <gdk/gdkregion.h>
52 #include <gdk/gdkrgb.h>
53 #include <gdk/gdkscreen.h>
54 #include <gdk/gdkselection.h>
55 #include <gdk/gdkspawn.h>
56 #include <gdk/gdktestutils.h>
57 #include <gdk/gdktypes.h>
58 #include <gdk/gdkvisual.h>
59 #include <gdk/gdkwindow.h>
60 
61 #undef __GDK_H_INSIDE__
62 
63 G_BEGIN_DECLS
64 
65 
66 /* Initialization, exit and events
67  */
68 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
69 void gdk_parse_args (gint *argc,
70  gchar ***argv);
71 void gdk_init (gint *argc,
72  gchar ***argv);
73 gboolean gdk_init_check (gint *argc,
74  gchar ***argv);
75 void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
77 
78 #ifndef GDK_DISABLE_DEPRECATED
79 void gdk_exit (gint error_code);
80 gchar* gdk_set_locale (void);
81 #endif /* GDK_DISABLE_DEPRECATED */
82 
83 const char * gdk_get_program_class (void);
84 void gdk_set_program_class (const char *program_class);
85 
86 /* Push and pop error handlers for X errors
87  */
88 void gdk_error_trap_push (void);
89 gint gdk_error_trap_pop (void);
90 
91 #ifndef GDK_DISABLE_DEPRECATED
92 void gdk_set_use_xshm (gboolean use_xshm);
93 gboolean gdk_get_use_xshm (void);
94 #endif /* GDK_DISABLE_DEPRECATED */
95 
96 gchar* gdk_get_display (void);
97 const gchar* gdk_get_display_arg_name (void);
98 
99 #ifndef GDK_DISABLE_DEPRECATED
100 gint gdk_input_add_full (gint source,
101  GdkInputCondition condition,
102  GdkInputFunction function,
103  gpointer data,
104  GDestroyNotify destroy);
105 gint gdk_input_add (gint source,
106  GdkInputCondition condition,
107  GdkInputFunction function,
108  gpointer data);
109 void gdk_input_remove (gint tag);
110 #endif /* GDK_DISABLE_DEPRECATED */
111 
113  gboolean owner_events,
114  GdkEventMask event_mask,
115  GdkWindow *confine_to,
116  GdkCursor *cursor,
117  guint32 time_);
119  gboolean owner_events,
120  guint32 time_);
121 
123  GdkWindow **grab_window,
124  gboolean *owner_events);
126  GdkWindow **grab_window,
127  gboolean *owner_events);
128 
129 #ifndef GDK_MULTIHEAD_SAFE
130 void gdk_pointer_ungrab (guint32 time_);
131 void gdk_keyboard_ungrab (guint32 time_);
132 gboolean gdk_pointer_is_grabbed (void);
133 
134 gint gdk_screen_width (void) G_GNUC_CONST;
135 gint gdk_screen_height (void) G_GNUC_CONST;
136 
137 gint gdk_screen_width_mm (void) G_GNUC_CONST;
138 gint gdk_screen_height_mm (void) G_GNUC_CONST;
139 
140 void gdk_beep (void);
141 #endif /* GDK_MULTIHEAD_SAFE */
142 
143 void gdk_flush (void);
144 
145 #ifndef GDK_MULTIHEAD_SAFE
146 void gdk_set_double_click_time (guint msec);
147 #endif
148 
149 /* Rectangle utilities
150  */
151 gboolean gdk_rectangle_intersect (const GdkRectangle *src1,
152  const GdkRectangle *src2,
153  GdkRectangle *dest);
155  const GdkRectangle *src2,
156  GdkRectangle *dest);
157 
158 GType gdk_rectangle_get_type (void) G_GNUC_CONST;
159 
160 #define GDK_TYPE_RECTANGLE (gdk_rectangle_get_type ())
161 
162 /* Conversion functions between wide char and multibyte strings.
163  */
164 #ifndef GDK_DISABLE_DEPRECATED
165 gchar *gdk_wcstombs (const GdkWChar *src);
166 gint gdk_mbstowcs (GdkWChar *dest,
167  const gchar *src,
168  gint dest_max);
169 #endif
170 
171 /* Miscellaneous */
172 #ifndef GDK_MULTIHEAD_SAFE
174  GdkNativeWindow winid);
176 #endif
178  GdkEvent *event,
179  GdkNativeWindow winid);
180 
182 
183 void gdk_notify_startup_complete_with_id (const gchar* startup_id);
184 
185 /* Threading
186  */
187 
188 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
189 GDKVAR GMutex *gdk_threads_mutex; /* private */
190 #endif
191 
194 
195 void gdk_threads_enter (void);
196 void gdk_threads_leave (void);
197 void gdk_threads_init (void);
198 void gdk_threads_set_lock_functions (GCallback enter_fn,
199  GCallback leave_fn);
200 
201 guint gdk_threads_add_idle_full (gint priority,
202  GSourceFunc function,
203  gpointer data,
204  GDestroyNotify notify);
205 guint gdk_threads_add_idle (GSourceFunc function,
206  gpointer data);
207 guint gdk_threads_add_timeout_full (gint priority,
208  guint interval,
209  GSourceFunc function,
210  gpointer data,
211  GDestroyNotify notify);
212 guint gdk_threads_add_timeout (guint interval,
213  GSourceFunc function,
214  gpointer data);
216  guint interval,
217  GSourceFunc function,
218  gpointer data,
219  GDestroyNotify notify);
220 guint gdk_threads_add_timeout_seconds (guint interval,
221  GSourceFunc function,
222  gpointer data);
223 
224 #ifdef G_THREADS_ENABLED
225 # define GDK_THREADS_ENTER() G_STMT_START { \
226  if (gdk_threads_lock) \
227  (*gdk_threads_lock) (); \
228  } G_STMT_END
229 # define GDK_THREADS_LEAVE() G_STMT_START { \
230  if (gdk_threads_unlock) \
231  (*gdk_threads_unlock) (); \
232  } G_STMT_END
233 #else /* !G_THREADS_ENABLED */
234 # define GDK_THREADS_ENTER()
235 # define GDK_THREADS_LEAVE()
236 #endif /* !G_THREADS_ENABLED */
237 
238 G_END_DECLS
239 
240 #ifdef __APPLE__
241 #define ARDOUR_CANVAS_NSVIEW_TAG 0xa2d0c2c4
242 #endif
243 
244 #endif /* __GDK_H__ */
GdkGrabStatus gdk_pointer_grab(GdkWindow *window, gboolean owner_events, GdkEventMask event_mask, GdkWindow *confine_to, GdkCursor *cursor, guint32 time_)
gint gdk_screen_width_mm(void) G_GNUC_CONST
gboolean gdk_pointer_grab_info_libgtk_only(GdkDisplay *display, GdkWindow **grab_window, gboolean *owner_events)
gint gdk_screen_width(void) G_GNUC_CONST
guint gdk_threads_add_timeout_seconds(guint interval, GSourceFunc function, gpointer data)
gboolean gdk_init_check(gint *argc, gchar ***argv)
gboolean gdk_get_use_xshm(void)
guint gdk_threads_add_idle_full(gint priority, GSourceFunc function, gpointer data, GDestroyNotify notify)
gint gdk_mbstowcs(GdkWChar *dest, const gchar *src, gint dest_max)
gchar * gdk_wcstombs(const GdkWChar *src)
void gdk_notify_startup_complete(void)
gchar * gdk_get_display(void)
guint gdk_threads_add_timeout_seconds_full(gint priority, guint interval, GSourceFunc function, gpointer data, GDestroyNotify notify)
gint gdk_input_add_full(gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GDestroyNotify destroy)
guint gdk_threads_add_timeout_full(gint priority, guint interval, GSourceFunc function, gpointer data, GDestroyNotify notify)
void gdk_add_option_entries_libgtk_only(GOptionGroup *group)
gboolean gdk_keyboard_grab_info_libgtk_only(GdkDisplay *display, GdkWindow **grab_window, gboolean *owner_events)
void gdk_rectangle_union(const GdkRectangle *src1, const GdkRectangle *src2, GdkRectangle *dest)
gchar * gdk_set_locale(void)
gboolean gdk_event_send_client_message(GdkEvent *event, GdkNativeWindow winid)
void gdk_threads_set_lock_functions(GCallback enter_fn, GCallback leave_fn)
void gdk_flush(void)
gboolean gdk_rectangle_intersect(const GdkRectangle *src1, const GdkRectangle *src2, GdkRectangle *dest)
void gdk_beep(void)
gboolean gdk_pointer_is_grabbed(void)
GdkGrabStatus gdk_keyboard_grab(GdkWindow *window, gboolean owner_events, guint32 time_)
void gdk_threads_enter(void)
void gdk_pointer_ungrab(guint32 time_)
const gchar * gdk_get_display_arg_name(void)
gboolean gdk_event_send_client_message_for_display(GdkDisplay *display, GdkEvent *event, GdkNativeWindow winid)
void gdk_input_remove(gint tag)
void gdk_pre_parse_libgtk_only(void)
void gdk_notify_startup_complete_with_id(const gchar *startup_id)
GType gdk_rectangle_get_type(void) G_GNUC_CONST
void gdk_event_send_clientmessage_toall(GdkEvent *event)
void gdk_init(gint *argc, gchar ***argv)
GDKVAR GCallback gdk_threads_unlock
Definition: gdk.h:193
GDKVAR GMutex * gdk_threads_mutex
Definition: gdk.h:189
gint gdk_error_trap_pop(void)
gint gdk_screen_height_mm(void) G_GNUC_CONST
const char * gdk_get_program_class(void)
void gdk_set_double_click_time(guint msec)
void gdk_exit(gint error_code)
void gdk_parse_args(gint *argc, gchar ***argv)
void gdk_keyboard_ungrab(guint32 time_)
guint gdk_threads_add_timeout(guint interval, GSourceFunc function, gpointer data)
void gdk_threads_leave(void)
void gdk_threads_init(void)
void gdk_error_trap_push(void)
guint gdk_threads_add_idle(GSourceFunc function, gpointer data)
void gdk_set_use_xshm(gboolean use_xshm)
GDKVAR GCallback gdk_threads_lock
Definition: gdk.h:192
gint gdk_input_add(gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data)
void gdk_set_program_class(const char *program_class)
gint gdk_screen_height(void) G_GNUC_CONST
GdkEventMask
Definition: gdkevents.h:162
#define GDKVAR
Definition: gdktypes.h:47
guint32 GdkNativeWindow
Definition: gdktypes.h:97
GdkGrabStatus
Definition: gdktypes.h:176
void(* GdkInputFunction)(gpointer data, gint source, GdkInputCondition condition)
Definition: gdktypes.h:184
guint32 GdkWChar
Definition: gdktypes.h:78
GdkInputCondition
Definition: gdktypes.h:156