00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __GDK_H__
00028 #define __GDK_H__
00029
00030 #include <gdk/gdkcc.h>
00031 #include <gdk/gdkcolor.h>
00032 #include <gdk/gdkcursor.h>
00033 #include <gdk/gdkdnd.h>
00034 #include <gdk/gdkdrawable.h>
00035 #include <gdk/gdkevents.h>
00036 #include <gdk/gdkfont.h>
00037 #include <gdk/gdkgc.h>
00038 #include <gdk/gdkim.h>
00039 #include <gdk/gdkimage.h>
00040 #include <gdk/gdkinput.h>
00041 #include <gdk/gdkpixmap.h>
00042 #include <gdk/gdkproperty.h>
00043 #include <gdk/gdkregion.h>
00044 #include <gdk/gdkrgb.h>
00045 #include <gdk/gdkselection.h>
00046 #include <gdk/gdktypes.h>
00047 #include <gdk/gdkvisual.h>
00048 #include <gdk/gdkwindow.h>
00049
00050 #include <gdk/gdkcompat.h>
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056
00057
00058
00059 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
00060 void gdk_init(gint * argc, gchar *** argv);
00061 gboolean gdk_init_check(gint * argc, gchar *** argv);
00062 void gdk_exit(gint error_code);
00063 gchar *gdk_set_locale(void);
00064
00065
00066
00067 void gdk_error_trap_push(void);
00068 gint gdk_error_trap_pop(void);
00069
00070
00071 void gdk_set_use_xshm(gboolean use_xshm);
00072
00073 gboolean gdk_get_use_xshm(void);
00074 gchar *gdk_get_display(void);
00075
00076 gint gdk_input_add_full(gint source,
00077 GdkInputCondition condition,
00078 GdkInputFunction function,
00079 gpointer data, GdkDestroyNotify destroy);
00080 gint gdk_input_add(gint source,
00081 GdkInputCondition condition,
00082 GdkInputFunction function, gpointer data);
00083 void gdk_input_remove(gint tag);
00084
00085 gint gdk_pointer_grab(GdkWindow * window,
00086 gboolean owner_events,
00087 GdkEventMask event_mask,
00088 GdkWindow * confine_to,
00089 GdkCursor * cursor, guint32 time);
00090 void gdk_pointer_ungrab(guint32 time);
00091 gint gdk_keyboard_grab(GdkWindow * window,
00092 gboolean owner_events, guint32 time);
00093 void gdk_keyboard_ungrab(guint32 time);
00094 gboolean gdk_pointer_is_grabbed(void);
00095 gint gdk_button_grab(gint button, gint mod, GdkWindow * window,
00096 gboolean owner_events,
00097 GdkEventMask event_mask,
00098 GdkWindow * confine_to,
00099 GdkCursor * cursor);
00100 void gdk_button_ungrab(gint button, gint mod, GdkWindow * window);
00101 gint gdk_key_grab(gint keycode, gint mod, GdkWindow * window);
00102 void gdk_key_ungrab(gint keycode, gint mod, GdkWindow * window);
00103
00104 gint gdk_screen_width(void);
00105 gint gdk_screen_height(void);
00106
00107 gint gdk_screen_width_mm(void);
00108 gint gdk_screen_height_mm(void);
00109
00110 void gdk_flush(void);
00111 void gdk_beep(void);
00112
00113 void gdk_key_repeat_disable(void);
00114 void gdk_key_repeat_restore(void);
00115
00116
00117
00118 gboolean gdk_rectangle_intersect(GdkRectangle * src1,
00119 GdkRectangle * src2,
00120 GdkRectangle * dest);
00121 void gdk_rectangle_union(GdkRectangle * src1,
00122 GdkRectangle * src2, GdkRectangle * dest);
00123
00124
00125
00126 gchar *gdk_wcstombs(const GdkWChar * src);
00127 gint gdk_mbstowcs(GdkWChar * dest, const gchar * src, gint dest_max);
00128
00129
00130 void gdk_event_send_clientmessage_toall(GdkEvent * event);
00131 gboolean gdk_event_send_client_message(GdkEvent * event, guint32 xid);
00132
00133
00134
00135 gchar *gdk_keyval_name(guint keyval);
00136 guint gdk_keyval_from_name(const gchar * keyval_name);
00137 void gdk_keyval_convert_case(guint symbol,
00138 guint * lower, guint * upper);
00139 guint gdk_keyval_to_upper(guint keyval);
00140 guint gdk_keyval_to_lower(guint keyval);
00141 gboolean gdk_keyval_is_upper(guint keyval);
00142 gboolean gdk_keyval_is_lower(guint keyval);
00143
00144
00145
00146
00147
00148 GDKVAR GMutex *gdk_threads_mutex;
00149
00150 void gdk_threads_enter(void);
00151 void gdk_threads_leave(void);
00152
00153 #ifdef G_THREADS_ENABLED
00154 # define GDK_THREADS_ENTER() G_STMT_START { \
00155 if (gdk_threads_mutex) \
00156 g_mutex_lock (gdk_threads_mutex); \
00157 } G_STMT_END
00158 # define GDK_THREADS_LEAVE() G_STMT_START { \
00159 if (gdk_threads_mutex) \
00160 g_mutex_unlock (gdk_threads_mutex); \
00161 } G_STMT_END
00162 #else
00163 # define GDK_THREADS_ENTER()
00164 # define GDK_THREADS_LEAVE()
00165 #endif
00166
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170 #endif