X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtktexttag.h;h=0d73be129e7c7428e093f9db90b6e01492f2c715;hb=1d8bfb86713337090a203f6f763b97d49edb0ba6;hp=f75a1760b0635991ef4381bca7eaebf7ee6e268e;hpb=b4e4a0ed9d66132efad0539bc5901b35ea262d88;p=~andy%2Fgtk diff --git a/gtk/gtktexttag.h b/gtk/gtktexttag.h index f75a1760b..0d73be129 100644 --- a/gtk/gtktexttag.h +++ b/gtk/gtktexttag.h @@ -1,15 +1,18 @@ #ifndef GTK_TEXT_TAG_H #define GTK_TEXT_TAG_H -#include +#include #include +#include + +/* Not needed, retained for compatibility -Yosh */ +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkTextIter GtkTextIter; -typedef struct _GtkTextBTreeNode GtkTextBTreeNode; typedef struct _GtkTextTagTable GtkTextTagTable; typedef struct _GtkTextAttributes GtkTextAttributes; @@ -21,6 +24,8 @@ typedef struct _GtkTextAttributes GtkTextAttributes; #define GTK_IS_TEXT_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_TAG)) #define GTK_TEXT_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT_TAG, GtkTextTagClass)) +#define GTK_TYPE_TEXT_ATTRIBUTES (gtk_text_attributes_get_type ()) + typedef struct _GtkTextTag GtkTextTag; typedef struct _GtkTextTagClass GtkTextTagClass; @@ -47,19 +52,13 @@ struct _GtkTextTag */ GtkTextAttributes *values; - + /* Flags for whether a given value is set; if a value is unset, then * this tag does not affect it. */ guint bg_color_set : 1; guint bg_stipple_set : 1; guint fg_color_set : 1; - guint family_set : 1; - guint style_set : 1; - guint variant_set : 1; - guint weight_set : 1; - guint stretch_set : 1; - guint size_set : 1; guint scale_set : 1; guint fg_stipple_set : 1; guint justification_set : 1; @@ -83,7 +82,7 @@ struct _GtkTextTag guint pad3 : 1; }; -struct _GtkTextTagClass +struct _GtkTextTagClass { GObjectClass parent_class; @@ -91,6 +90,12 @@ struct _GtkTextTagClass GObject *event_object, /* widget, canvas item, whatever */ GdkEvent *event, /* the event itself */ const GtkTextIter *iter); /* location of event in buffer */ + + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); }; GType gtk_text_tag_get_type (void) G_GNUC_CONST; @@ -111,6 +116,7 @@ typedef struct _GtkTextAppearance GtkTextAppearance; struct _GtkTextAppearance { + /*< public >*/ GdkColor bg_color; GdkColor fg_color; GdkBitmap *bg_stipple; @@ -118,7 +124,14 @@ struct _GtkTextAppearance /* super/subscript rise, can be negative */ gint rise; - + + /*< private >*/ + /* I'm not sure this can really be used without breaking some things + * an app might do :-/ + */ + gpointer padding1; + + /*< public >*/ guint underline : 4; /* PangoUnderline */ guint strikethrough : 1; @@ -135,19 +148,27 @@ struct _GtkTextAppearance */ guint inside_selection : 1; guint is_text : 1; + + /*< private >*/ + guint pad1 : 1; + guint pad2 : 1; + guint pad3 : 1; + guint pad4 : 1; }; struct _GtkTextAttributes { + /*< private >*/ guint refcount; + /*< public >*/ GtkTextAppearance appearance; GtkJustification justification; GtkTextDirection direction; /* Individual chunks of this can be set/unset as a group */ - PangoFontDescription font; + PangoFontDescription *font; gdouble font_scale; @@ -170,8 +191,15 @@ struct _GtkTextAttributes * GTK_WRAPMODE_NONE, GTK_WRAPMODE_WORD */ - gchar *language; + PangoLanguage *language; + + /*< private >*/ + /* I'm not sure this can really be used without breaking some things + * an app might do :-/ + */ + gpointer padding1; + /*< public >*/ /* hide the text */ guint invisible : 1; @@ -186,6 +214,7 @@ struct _GtkTextAttributes /* colors are allocated etc. */ guint realized : 1; + /*< private >*/ guint pad1 : 1; guint pad2 : 1; guint pad3 : 1; @@ -199,6 +228,8 @@ void gtk_text_attributes_copy_values (GtkTextAttributes *src, void gtk_text_attributes_unref (GtkTextAttributes *values); void gtk_text_attributes_ref (GtkTextAttributes *values); +GType gtk_text_attributes_get_type (void); + #ifdef __cplusplus }