#ifndef GTK_TEXT_TAG_H
#define GTK_TEXT_TAG_H
-#include <gtk/gtkobject.h>
+#include <glib-object.h>
#include <gdk/gdk.h>
+#include <gtk/gtkenums.h>
+
+/* Not needed, retained for compatibility -Yosh */
+#include <gtk/gtkobject.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _GtkTextIter GtkTextIter;
-typedef struct _GtkTextBTreeNode GtkTextBTreeNode;
typedef struct _GtkTextTagTable GtkTextTagTable;
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;
*/
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;
guint pad3 : 1;
};
-struct _GtkTextTagClass
+struct _GtkTextTagClass
{
GObjectClass parent_class;
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;
struct _GtkTextAppearance
{
+ /*< public >*/
GdkColor bg_color;
GdkColor fg_color;
GdkBitmap *bg_stipple;
/* 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;
*/
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;
* 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;
/* colors are allocated etc. */
guint realized : 1;
+ /*< private >*/
guint pad1 : 1;
guint pad2 : 1;
guint pad3 : 1;
void gtk_text_attributes_unref (GtkTextAttributes *values);
void gtk_text_attributes_ref (GtkTextAttributes *values);
+GType gtk_text_attributes_get_type (void);
+
#ifdef __cplusplus
}