gdkgc.h

Go to the documentation of this file.
00001 #ifndef __GDK_GC_H__
00002 #define __GDK_GC_H__
00003 
00004 #include <gdk/gdkcolor.h>
00005 #include <gdk/gdktypes.h>
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif                          /* __cplusplus */
00010 
00011    typedef struct _GdkGCValues GdkGCValues;
00012    typedef struct _GdkGCClass GdkGCClass;
00013 
00014 /* GC cap styles
00015  *  CapNotLast:
00016  *  CapButt:
00017  *  CapRound:
00018  *  CapProjecting:
00019  */
00020    typedef enum {
00021       GDK_CAP_NOT_LAST,
00022       GDK_CAP_BUTT,
00023       GDK_CAP_ROUND,
00024       GDK_CAP_PROJECTING
00025    } GdkCapStyle;
00026 
00027 /* GC fill types.
00028  *  Solid:
00029  *  Tiled:
00030  *  Stippled:
00031  *  OpaqueStippled:
00032  */
00033    typedef enum {
00034       GDK_SOLID,
00035       GDK_TILED,
00036       GDK_STIPPLED,
00037       GDK_OPAQUE_STIPPLED
00038    } GdkFill;
00039 
00040 /* GC function types.
00041  *   Copy: Overwrites destination pixels with the source pixels.
00042  *   Invert: Inverts the destination pixels.
00043  *   Xor: Xor's the destination pixels with the source pixels.
00044  *   Clear: set pixels to 0
00045  *   And: source AND destination
00046  *   And Reverse: source AND (NOT destination)
00047  *   And Invert: (NOT source) AND destination
00048  *   Noop: destination
00049  *   Or: source OR destination
00050  *   Nor: (NOT source) AND (NOT destination)
00051  *   Equiv: (NOT source) XOR destination
00052  *   Xor Reverse: source OR (NOT destination)
00053  *   Copy Inverted: NOT source
00054  *   Xor Inverted: (NOT source) OR destination
00055  *   Nand: (NOT source) OR (NOT destination)
00056  *   Set: set pixels to 1
00057  */
00058    typedef enum {
00059       GDK_COPY,
00060       GDK_INVERT,
00061       GDK_XOR,
00062       GDK_CLEAR,
00063       GDK_AND,
00064       GDK_AND_REVERSE,
00065       GDK_AND_INVERT,
00066       GDK_NOOP,
00067       GDK_OR,
00068       GDK_EQUIV,
00069       GDK_OR_REVERSE,
00070       GDK_COPY_INVERT,
00071       GDK_OR_INVERT,
00072       GDK_NAND,
00073       GDK_SET
00074    } GdkFunction;
00075 
00076 /* GC join styles
00077  *  JoinMiter:
00078  *  JoinRound:
00079  *  JoinBevel:
00080  */
00081    typedef enum {
00082       GDK_JOIN_MITER,
00083       GDK_JOIN_ROUND,
00084       GDK_JOIN_BEVEL
00085    } GdkJoinStyle;
00086 
00087 /* GC line styles
00088  *  Solid:
00089  *  OnOffDash:
00090  *  DoubleDash:
00091  */
00092    typedef enum {
00093       GDK_LINE_SOLID,
00094       GDK_LINE_ON_OFF_DASH,
00095       GDK_LINE_DOUBLE_DASH
00096    } GdkLineStyle;
00097 
00098    typedef enum {
00099       GDK_CLIP_BY_CHILDREN = 0,
00100       GDK_INCLUDE_INFERIORS = 1
00101    } GdkSubwindowMode;
00102 
00103    typedef enum {
00104       GDK_GC_FOREGROUND = 1 << 0,
00105       GDK_GC_BACKGROUND = 1 << 1,
00106       GDK_GC_FONT = 1 << 2,
00107       GDK_GC_FUNCTION = 1 << 3,
00108       GDK_GC_FILL = 1 << 4,
00109       GDK_GC_TILE = 1 << 5,
00110       GDK_GC_STIPPLE = 1 << 6,
00111       GDK_GC_CLIP_MASK = 1 << 7,
00112       GDK_GC_SUBWINDOW = 1 << 8,
00113       GDK_GC_TS_X_ORIGIN = 1 << 9,
00114       GDK_GC_TS_Y_ORIGIN = 1 << 10,
00115       GDK_GC_CLIP_X_ORIGIN = 1 << 11,
00116       GDK_GC_CLIP_Y_ORIGIN = 1 << 12,
00117       GDK_GC_EXPOSURES = 1 << 13,
00118       GDK_GC_LINE_WIDTH = 1 << 14,
00119       GDK_GC_LINE_STYLE = 1 << 15,
00120       GDK_GC_CAP_STYLE = 1 << 16,
00121       GDK_GC_JOIN_STYLE = 1 << 17
00122    } GdkGCValuesMask;
00123 
00124    struct _GdkGCValues {
00125       GdkColor foreground;
00126       GdkColor background;
00127       GdkFont *font;
00128       GdkFunction function;
00129       GdkFill fill;
00130       GdkPixmap *tile;
00131       GdkPixmap *stipple;
00132       GdkPixmap *clip_mask;
00133       GdkSubwindowMode subwindow_mode;
00134       gint ts_x_origin;
00135       gint ts_y_origin;
00136       gint clip_x_origin;
00137       gint clip_y_origin;
00138       gint graphics_exposures;
00139       gint line_width;
00140       GdkLineStyle line_style;
00141       GdkCapStyle cap_style;
00142       GdkJoinStyle join_style;
00143    };
00144 
00145    struct _GdkGC {
00146       gint dummy_var;
00147    };
00148 
00149    struct _GdkGCClass {
00150       void (*destroy) (GdkGC * gc);
00151       void (*get_values) (GdkGC * gc, GdkGCValues * values);
00152       void (*set_values) (GdkGC * gc,
00153                           GdkGCValues * values, GdkGCValuesMask mask);
00154       void (*set_dashes) (GdkGC * gc,
00155                           gint dash_offset, gchar dash_list[], gint n);
00156    };
00157 
00158 
00159    GdkGC *gdk_gc_new(GdkDrawable * drawable);
00160    GdkGC *gdk_gc_alloc(void);
00161 
00162    GdkGC *gdk_gc_new_with_values(GdkDrawable * drawable,
00163                                  GdkGCValues * values,
00164                                  GdkGCValuesMask values_mask);
00165    void gdk_gc_set_values(GdkGC * gc,
00166                                  GdkGCValues * values,
00167                                  GdkGCValuesMask values_mask);
00168    void gdk_gc_init(GdkGC * gc, GdkGCClass * klass);
00169    GdkGC *gdk_gc_ref(GdkGC * gc);
00170    void gdk_gc_unref(GdkGC * gc);
00171    void gdk_gc_get_values(GdkGC * gc, GdkGCValues * values);
00172    void gdk_gc_set_foreground(GdkGC * gc, GdkColor * color);
00173    void gdk_gc_set_background(GdkGC * gc, GdkColor * color);
00174    void gdk_gc_set_font(GdkGC * gc, GdkFont * font);
00175    void gdk_gc_set_function(GdkGC * gc, GdkFunction function);
00176    void gdk_gc_set_fill(GdkGC * gc, GdkFill fill);
00177    void gdk_gc_set_tile(GdkGC * gc, GdkPixmap * tile);
00178    void gdk_gc_set_stipple(GdkGC * gc, GdkPixmap * stipple);
00179    void gdk_gc_set_ts_origin(GdkGC * gc, gint x, gint y);
00180    void gdk_gc_set_clip_origin(GdkGC * gc, gint x, gint y);
00181    void gdk_gc_set_clip_mask(GdkGC * gc, GdkBitmap * mask);
00182    void gdk_gc_set_clip_rectangle(GdkGC * gc, GdkRectangle * rectangle);
00183    void gdk_gc_set_clip_region(GdkGC * gc, GdkRegion * region);
00184    void gdk_gc_set_subwindow(GdkGC * gc, GdkSubwindowMode mode);
00185    void gdk_gc_set_exposures(GdkGC * gc, gboolean exposures);
00186    void gdk_gc_set_line_attributes(GdkGC * gc,
00187                                    gint line_width,
00188                                    GdkLineStyle line_style,
00189                                    GdkCapStyle cap_style,
00190                                    GdkJoinStyle join_style);
00191    void gdk_gc_set_dashes(GdkGC * gc,
00192                           gint dash_offset, gint8 dash_list[], gint n);
00193    void gdk_gc_copy(GdkGC * dst_gc, GdkGC * src_gc);
00194    guint gdk_gc_set_text_align(GdkGC * gc, guint tAlign);
00195 
00196 #ifdef __cplusplus
00197 }
00198 #endif                          /* __cplusplus */
00199 #endif                          /* __GDK_DRAWABLE_H__ */

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