gdk.h

Go to the documentation of this file.
00001 /* GDK - The GIMP Drawing Kit
00002  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 
00020 /*
00021  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
00022  * file for a list of people on the GTK+ Team.  See the ChangeLog
00023  * files for a list of changes.  These files are distributed with
00024  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
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                          /* __cplusplus */
00055 
00056 
00057 /* Initialization, exit and events
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 /* Push and pop error handlers for X errors
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 /* Rectangle utilities
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 /* Conversion functions between wide char and multibyte strings. 
00125  */
00126    gchar *gdk_wcstombs(const GdkWChar * src);
00127    gint gdk_mbstowcs(GdkWChar * dest, const gchar * src, gint dest_max);
00128 
00129 /* Miscellaneous */
00130    void gdk_event_send_clientmessage_toall(GdkEvent * event);
00131    gboolean gdk_event_send_client_message(GdkEvent * event, guint32 xid);
00132 
00133 /* Key values
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 /* Threading
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                           /* !G_THREADS_ENABLED */
00163 #  define GDK_THREADS_ENTER()
00164 #  define GDK_THREADS_LEAVE()
00165 #endif                          /* !G_THREADS_ENABLED */
00166 
00167 #ifdef __cplusplus
00168 }
00169 #endif                          /* __cplusplus */
00170 #endif                          /* __GDK_H__ */

Generated on Tue Jul 5 14:14:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1