gdkwindow.h

Go to the documentation of this file.
00001 #ifndef __GDK_WINDOW_H__
00002 #define __GDK_WINDOW_H__
00003 
00004 #include <gdk/gdkdrawable.h>
00005 #include <gdk/gdktypes.h>
00006 #include <gdk/gdkwindow.h>
00007 #include <gdk/gdkevents.h>
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif                          /* __cplusplus */
00012 
00013    typedef struct _GdkGeometry GdkGeometry;
00014    typedef struct _GdkWindowAttr GdkWindowAttr;
00015 
00016 /* Classes of windows.
00017  *   InputOutput: Almost every window should be of this type. Such windows
00018  *                receive events and are also displayed on screen.
00019  *   InputOnly: Used only in special circumstances when events need to be
00020  *              stolen from another window or windows. Input only windows
00021  *              have no visible output, so they are handy for placing over
00022  *              top of a group of windows in order to grab the events (or
00023  *              filter the events) from those windows.
00024  */
00025    typedef enum {
00026       GDK_INPUT_OUTPUT,
00027       GDK_INPUT_ONLY
00028    } GdkWindowClass;
00029 
00030 
00031 /* Window attribute mask values.
00032  *   GDK_WA_TITLE: The "title" field is valid.
00033  *   GDK_WA_X: The "x" field is valid.
00034  *   GDK_WA_Y: The "y" field is valid.
00035  *   GDK_WA_CURSOR: The "cursor" field is valid.
00036  *   GDK_WA_COLORMAP: The "colormap" field is valid.
00037  *   GDK_WA_VISUAL: The "visual" field is valid.
00038  */
00039    typedef enum {
00040       GDK_WA_TITLE = 1 << 1,
00041       GDK_WA_X = 1 << 2,
00042       GDK_WA_Y = 1 << 3,
00043       GDK_WA_CURSOR = 1 << 4,
00044       GDK_WA_COLORMAP = 1 << 5,
00045       GDK_WA_VISUAL = 1 << 6,
00046       GDK_WA_WMCLASS = 1 << 7,
00047       GDK_WA_NOREDIR = 1 << 8
00048    } GdkWindowAttributesType;
00049 
00050 /* Size restriction enumeration.
00051  */
00052    typedef enum {
00053       GDK_HINT_POS = 1 << 0,
00054       GDK_HINT_MIN_SIZE = 1 << 1,
00055       GDK_HINT_MAX_SIZE = 1 << 2,
00056       GDK_HINT_BASE_SIZE = 1 << 3,
00057       GDK_HINT_ASPECT = 1 << 4,
00058       GDK_HINT_RESIZE_INC = 1 << 5
00059    } GdkWindowHints;
00060 
00061 /* The next two enumeration values current match the
00062  * Motif constants. If this is changed, the implementation
00063  * of gdk_window_set_decorations/gdk_window_set_functions
00064  * will need to change as well.
00065  */
00066    typedef enum {
00067       GDK_DECOR_ALL = 1 << 0,
00068       GDK_DECOR_BORDER = 1 << 1,
00069       GDK_DECOR_RESIZEH = 1 << 2,
00070       GDK_DECOR_TITLE = 1 << 3,
00071       GDK_DECOR_MENU = 1 << 4,
00072       GDK_DECOR_MINIMIZE = 1 << 5,
00073       GDK_DECOR_MAXIMIZE = 1 << 6
00074    } GdkWMDecoration;
00075 
00076    typedef enum {
00077       GDK_FUNC_ALL = 1 << 0,
00078       GDK_FUNC_RESIZE = 1 << 1,
00079       GDK_FUNC_MOVE = 1 << 2,
00080       GDK_FUNC_MINIMIZE = 1 << 3,
00081       GDK_FUNC_MAXIMIZE = 1 << 4,
00082       GDK_FUNC_CLOSE = 1 << 5
00083    } GdkWMFunction;
00084 
00085    struct _GdkWindowAttr {
00086       gchar *title;
00087       gint event_mask;
00088       gint16 x, y;
00089       gint16 width;
00090       gint16 height;
00091       GdkWindowClass wclass;
00092       GdkVisual *visual;
00093       GdkColormap *colormap;
00094       GdkDrawableType window_type;
00095       GdkCursor *cursor;
00096       gchar *wmclass_name;
00097       gchar *wmclass_class;
00098       gboolean override_redirect;
00099    };
00100 
00101    struct _GdkGeometry {
00102       gint min_width;
00103       gint min_height;
00104       gint max_width;
00105       gint max_height;
00106       gint base_width;
00107       gint base_height;
00108       gint width_inc;
00109       gint height_inc;
00110       gdouble min_aspect;
00111       gdouble max_aspect;
00112       /* GdkGravity gravity; */
00113    };
00114 
00115 /* Windows
00116  */
00117    GdkWindow *gdk_window_new(GdkWindow * parent,
00118                              GdkWindowAttr * attributes,
00119                              gint attributes_mask);
00120 
00121    void gdk_window_destroy(GdkWindow * window, gboolean xdestroy);
00122 
00123    GdkWindow *gdk_window_at_pointer(gint * win_x, gint * win_y);
00124    void gdk_window_show(GdkWindow * window);
00125    void gdk_window_hide(GdkWindow * window);
00126    void gdk_window_withdraw(GdkWindow * window);
00127    void gdk_window_move(GdkWindow * window, gint x, gint y);
00128    void gdk_window_resize(GdkWindow * window, gint width, gint height);
00129    void gdk_window_move_resize(GdkWindow * window,
00130                                gint x, gint y, gint width, gint height);
00131    void gdk_window_reparent(GdkWindow * window,
00132                             GdkWindow * new_parent, gint x, gint y);
00133    void gdk_window_clear(GdkWindow * window);
00134    void gdk_window_clear_area(GdkWindow * window,
00135                               gint x, gint y, gint width, gint height);
00136    void gdk_window_clear_area_e(GdkWindow * window,
00137                                 gint x, gint y, gint width, gint height);
00138    void gdk_window_raise(GdkWindow * window);
00139    void gdk_window_lower(GdkWindow * window);
00140 
00141    void gdk_window_set_user_data(GdkWindow * window, gpointer user_data);
00142    void gdk_window_set_override_redirect(GdkWindow * window,
00143                                          gboolean override_redirect);
00144 
00145    void gdk_window_add_filter(GdkWindow * window,
00146                               GdkFilterFunc function, gpointer data);
00147    void gdk_window_remove_filter(GdkWindow * window,
00148                                  GdkFilterFunc function, gpointer data);
00149 
00150 /* 
00151  * This allows for making shaped (partially transparent) windows
00152  * - cool feature, needed for Drag and Drag for example.
00153  *  The shape_mask can be the mask
00154  *  from gdk_pixmap_create_from_xpm.   Stefan Wille
00155  */
00156    void gdk_window_shape_combine_mask(GdkWindow * window,
00157                                       GdkBitmap * shape_mask,
00158                                       gint offset_x, gint offset_y);
00159 /*
00160  * This routine allows you to quickly take the shapes of all the child windows
00161  * of a window and use their shapes as the shape mask for this window - useful
00162  * for container windows that dont want to look like a big box
00163  * 
00164  * - Raster
00165  */
00166    void gdk_window_set_child_shapes(GdkWindow * window);
00167 
00168 /*
00169  * This routine allows you to merge (ie ADD) child shapes to your
00170  * own window's shape keeping its current shape and ADDING the child
00171  * shapes to it.
00172  * 
00173  * - Raster
00174  */
00175    void gdk_window_merge_child_shapes(GdkWindow * window);
00176 
00177 /*
00178  * Check if a window has been shown, and whether all its
00179  * parents up to a toplevel have been shown, respectively.
00180  * Note that a window that is_viewable below is not necessarily
00181  * viewable in the X sense.
00182  */
00183    gboolean gdk_window_is_visible(GdkWindow * window);
00184    gboolean gdk_window_is_viewable(GdkWindow * window);
00185 
00186 /* Set static bit gravity on the parent, and static
00187  * window gravity on all children.
00188  */
00189    gboolean gdk_window_set_static_gravities(GdkWindow * window,
00190                                             gboolean use_static);
00191 
00192 /* GdkWindow */
00193 
00194    void gdk_window_set_hints(GdkWindow * window,
00195                              gint x,
00196                              gint y,
00197                              gint min_width,
00198                              gint min_height,
00199                              gint max_width, gint max_height, gint flags);
00200    void gdk_window_set_geometry_hints(GdkWindow * window,
00201                                       GdkGeometry * geometry,
00202                                       GdkWindowHints flags);
00203    void gdk_set_sm_client_id(const gchar * sm_client_id);
00204 
00205 
00206    void gdk_window_set_title(GdkWindow * window, const gchar * title);
00207    void gdk_window_set_role(GdkWindow * window, const gchar * role);
00208    void gdk_window_set_transient_for(GdkWindow * window,
00209                                      GdkWindow * leader);
00210    void gdk_window_set_background(GdkWindow * window, GdkColor * color);
00211    void gdk_window_set_back_pixmap(GdkWindow * window,
00212                                    GdkPixmap * pixmap,
00213                                    gboolean parent_relative);
00214    void gdk_window_set_cursor(GdkWindow * window, GdkCursor * cursor);
00215    void gdk_window_get_user_data(GdkWindow * window, gpointer * data);
00216    void gdk_window_get_geometry(GdkWindow * window,
00217                                 gint * x,
00218                                 gint * y,
00219                                 gint * width, gint * height, gint * depth);
00220    void gdk_window_get_position(GdkWindow * window, gint * x, gint * y);
00221    gint gdk_window_get_origin(GdkWindow * window, gint * x, gint * y);
00222    gboolean gdk_window_get_deskrelative_origin(GdkWindow * window,
00223                                                gint * x, gint * y);
00224    void gdk_window_get_root_origin(GdkWindow * window, gint * x, gint * y);
00225    GdkWindow *gdk_window_get_pointer(GdkWindow * window,
00226                                      gint * x,
00227                                      gint * y, GdkModifierType * mask);
00228    GdkWindow *gdk_window_get_parent(GdkWindow * window);
00229    GdkWindow *gdk_window_get_toplevel(GdkWindow * window);
00230    GList *gdk_window_get_children(GdkWindow * window);
00231    GdkEventMask gdk_window_get_events(GdkWindow * window);
00232    void gdk_window_set_events(GdkWindow * window, GdkEventMask event_mask);
00233 
00234    void gdk_window_set_icon(GdkWindow * window,
00235                             GdkWindow * icon_window,
00236                             GdkPixmap * pixmap, GdkBitmap * mask);
00237    void gdk_window_set_icon_name(GdkWindow * window, const gchar * name);
00238    void gdk_window_set_group(GdkWindow * window, GdkWindow * leader);
00239    void gdk_window_set_decorations(GdkWindow * window,
00240                                    GdkWMDecoration decorations);
00241    void gdk_window_set_functions(GdkWindow * window,
00242                                  GdkWMFunction functions);
00243    GList *gdk_window_get_toplevels(void);
00244 
00245    void gdk_window_register_dnd(GdkWindow * window);
00246 
00247 #ifdef __cplusplus
00248 }
00249 #endif                          /* __cplusplus */
00250 #endif                          /* __GDK_WINDOW_H__ */

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