gdkdrawable.h

Go to the documentation of this file.
00001 #ifndef __GDK_DRAWABLE_H__
00002 #define __GDK_DRAWABLE_H__
00003 
00004 #include <gdk/gdktypes.h>
00005 #include <gdk/gdkgc.h>
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif                          /* __cplusplus */
00010 
00011    typedef struct _GdkDrawableClass GdkDrawableClass;
00012 
00013 /* Types of windows.
00014  *   Root: There is only 1 root window and it is initialized
00015  *         at startup. Creating a window of type GDK_WINDOW_ROOT
00016  *         is an error.
00017  *   Toplevel: Windows which interact with the window manager.
00018  *   Child: Windows which are children of some other type of window.
00019  *          (Any other type of window). Most windows are child windows.
00020  *   Dialog: A special kind of toplevel window which interacts with
00021  *           the window manager slightly differently than a regular
00022  *           toplevel window. Dialog windows should be used for any
00023  *           transient window.
00024  *   Pixmap: Pixmaps are really just another kind of window which
00025  *           doesn't actually appear on the screen. It can't have
00026  *           children, either and is really just a convenience so
00027  *           that the drawing functions can work on both windows
00028  *           and pixmaps transparently. (ie. You shouldn't pass a
00029  *           pixmap to any procedure which accepts a window with the
00030  *           exception of the drawing functions).
00031  *   Foreign: A window that actually belongs to another application
00032  */
00033    typedef enum {
00034       GDK_WINDOW_ROOT,
00035       GDK_WINDOW_TOPLEVEL,
00036       GDK_WINDOW_CHILD,
00037       GDK_WINDOW_DIALOG,
00038       GDK_WINDOW_TEMP,
00039       GDK_DRAWABLE_PIXMAP,
00040       GDK_WINDOW_FOREIGN
00041    } GdkDrawableType;
00042 
00043    struct _GdkDrawable {
00044       gpointer user_data;
00045    };
00046 
00047    struct _GdkDrawableClass {
00048       void (*destroy) (GdkDrawable * drawable);
00049       GdkGC *(*create_gc) (GdkDrawable * drawable,
00050                            GdkGCValues * values, GdkGCValuesMask mask);
00051       void (*draw_rectangle) (GdkDrawable * drawable,
00052                               GdkGC * gc,
00053                               gint filled,
00054                               gint x, gint y, gint width, gint height);
00055       void (*draw_arc) (GdkDrawable * drawable,
00056                         GdkGC * gc,
00057                         gint filled,
00058                         gint x,
00059                         gint y,
00060                         gint width, gint height, gint angle1, gint angle2);
00061       void (*draw_polygon) (GdkDrawable * drawable,
00062                             GdkGC * gc,
00063                             gint filled, GdkPoint * points, gint npoints);
00064       void (*draw_text) (GdkDrawable * drawable,
00065                          GdkFont * font,
00066                          GdkGC * gc,
00067                          gint x,
00068                          gint y, const gchar * text, gint text_length);
00069       void (*draw_text_wc) (GdkDrawable * drawable,
00070                             GdkFont * font,
00071                             GdkGC * gc,
00072                             gint x,
00073                             gint y,
00074                             const GdkWChar * text, gint text_length);
00075       void (*draw_drawable) (GdkDrawable * drawable,
00076                              GdkGC * gc,
00077                              GdkDrawable * src,
00078                              gint xsrc,
00079                              gint ysrc,
00080                              gint xdest,
00081                              gint ydest, gint width, gint height);
00082       void (*draw_points) (GdkDrawable * drawable,
00083                            GdkGC * gc, GdkPoint * points, gint npoints);
00084       void (*draw_segments) (GdkDrawable * drawable,
00085                              GdkGC * gc, GdkSegment * segs, gint nsegs);
00086       void (*draw_lines) (GdkDrawable * drawable,
00087                           GdkGC * gc, GdkPoint * points, gint npoints);
00088    };
00089 
00090 /* Manipulation of drawables
00091  */
00092    GdkDrawable *gdk_drawable_alloc(void);
00093 
00094    GdkDrawableType gdk_drawable_get_type(GdkDrawable * window);
00095 
00096    void gdk_drawable_set_data(GdkDrawable * drawable,
00097                               const gchar * key,
00098                               gpointer data, GDestroyNotify destroy_func);
00099    void gdk_drawable_get_data(GdkDrawable * drawable, const gchar * key);
00100 
00101    void gdk_drawable_get_size(GdkWindow * drawable,
00102                               gint * width, gint * height);
00103    void gdk_drawable_set_colormap(GdkDrawable * drawable,
00104                                   GdkColormap * colormap);
00105    GdkColormap *gdk_drawable_get_colormap(GdkDrawable * drawable);
00106    GdkVisual *gdk_drawable_get_visual(GdkDrawable * drawable);
00107    GdkDrawable *gdk_drawable_ref(GdkDrawable * drawable);
00108    void gdk_drawable_unref(GdkDrawable * drawable);
00109 
00110 /* Drawing
00111  */
00112    void gdk_draw_point(GdkDrawable * drawable, GdkGC * gc, gint x, gint y);
00113    void gdk_draw_line(GdkDrawable * drawable,
00114                       GdkGC * gc, gint x1, gint y1, gint x2, gint y2);
00115    void gdk_draw_rectangle(GdkDrawable * drawable,
00116                            GdkGC * gc,
00117                            gint filled,
00118                            gint x, gint y, gint width, gint height);
00119    void gdk_draw_arc(GdkDrawable * drawable,
00120                      GdkGC * gc,
00121                      gint filled,
00122                      gint x,
00123                      gint y,
00124                      gint width, gint height, gint angle1, gint angle2);
00125    void gdk_draw_polygon(GdkDrawable * drawable,
00126                          GdkGC * gc,
00127                          gint filled, GdkPoint * points, gint npoints);
00128    void gdk_draw_string(GdkDrawable * drawable,
00129                         GdkFont * font,
00130                         GdkGC * gc, gint x, gint y, const gchar * string);
00131    void gdk_draw_text(GdkDrawable * drawable,
00132                       GdkFont * font,
00133                       GdkGC * gc,
00134                       gint x,
00135                       gint y, const gchar * text, gint text_length);
00136    void gdk_draw_text_wc(GdkDrawable * drawable,
00137                          GdkFont * font,
00138                          GdkGC * gc,
00139                          gint x,
00140                          gint y, const GdkWChar * text, gint text_length);
00141    void gdk_draw_drawable(GdkDrawable * drawable,
00142                           GdkGC * gc,
00143                           GdkDrawable * src,
00144                           gint xsrc,
00145                           gint ysrc,
00146                           gint xdest, gint ydest, gint width, gint height);
00147    void gdk_draw_image(GdkDrawable * drawable,
00148                        GdkGC * gc,
00149                        GdkImage * image,
00150                        gint xsrc,
00151                        gint ysrc,
00152                        gint xdest, gint ydest, gint width, gint height);
00153    void gdk_draw_points(GdkDrawable * drawable,
00154                         GdkGC * gc, GdkPoint * points, gint npoints);
00155    void gdk_draw_segments(GdkDrawable * drawable,
00156                           GdkGC * gc, GdkSegment * segs, gint nsegs);
00157    void gdk_draw_lines(GdkDrawable * drawable,
00158                        GdkGC * gc, GdkPoint * points, gint npoints);
00159 
00160 #ifdef __cplusplus
00161 }
00162 #endif                          /* __cplusplus */
00163 #endif                          /* __GDK_DRAWABLE_H__ */

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