typedef struct _RrImage RrImage;
typedef struct _RrImagePic RrImagePic;
typedef struct _RrImageCache RrImageCache;
+typedef struct _RrButton RrButton;
typedef guint32 RrPixel32;
typedef guint16 RrPixel16;
typedef enum {
RR_RELIEF_FLAT,
RR_RELIEF_RAISED,
- RR_RELIEF_SUNKEN
+ RR_RELIEF_SUNKEN,
+ RR_RELIEF_NUM_TYPES
} RrReliefType;
typedef enum {
RR_BEVEL_1,
- RR_BEVEL_2
+ RR_BEVEL_2,
+ RR_BEVEL_NUM_TYPES
} RrBevelType;
typedef enum {
RR_SURFACE_DIAGONAL,
RR_SURFACE_CROSS_DIAGONAL,
RR_SURFACE_PYRAMID,
- RR_SURFACE_MIRROR_HORIZONTAL
+ RR_SURFACE_MIRROR_HORIZONTAL,
+ RR_SURFACE_NUM_TYPES
} RrSurfaceColorType;
typedef enum {
RR_TEXTURE_TEXT,
RR_TEXTURE_LINE_ART,
RR_TEXTURE_RGBA,
- RR_TEXTURE_IMAGE
+ RR_TEXTURE_IMAGE,
+ RR_TEXTURE_NUM_TYPES
} RrTextureType;
typedef enum {
RR_JUSTIFY_LEFT,
RR_JUSTIFY_CENTER,
- RR_JUSTIFY_RIGHT
+ RR_JUSTIFY_RIGHT,
+ RR_JUSTIFY_NUM_TYPES
} RrJustify;
/* Put middle first so it's the default */
RR_ELLIPSIZE_MIDDLE,
RR_ELLIPSIZE_NONE,
RR_ELLIPSIZE_START,
- RR_ELLIPSIZE_END
+ RR_ELLIPSIZE_END,
+ RR_ELLIPSIZE_NUM_TYPES
} RrEllipsizeMode;
typedef enum {
RR_FONTWEIGHT_NORMAL,
RR_FONTWEIGHT_SEMIBOLD,
RR_FONTWEIGHT_BOLD,
- RR_FONTWEIGHT_ULTRABOLD
+ RR_FONTWEIGHT_ULTRABOLD,
+ RR_FONTWEIGHT_NUM_TYPES
} RrFontWeight;
typedef enum {
RR_FONTSLANT_NORMAL,
RR_FONTSLANT_ITALIC,
- RR_FONTSLANT_OBLIQUE
+ RR_FONTSLANT_OBLIQUE,
+ RR_FONTSLANT_NUM_TYPES
} RrFontSlant;
struct _RrSurface {
struct _RrAppearance {
const RrInstance *inst;
-
+
RrSurface surface;
gint textures;
RrTexture *texture;
gpointer destroy_data;
};
+struct _RrButton {
+ const RrInstance *inst;
+
+ /* colors */
+ RrColor *focused_unpressed_color;
+ RrColor *unfocused_unpressed_color;
+ RrColor *focused_pressed_color;
+ RrColor *unfocused_pressed_color;
+ RrColor *disabled_focused_color;
+ RrColor *disabled_unfocused_color;
+ RrColor *hover_focused_color;
+ RrColor *hover_unfocused_color;
+ RrColor *toggled_hover_focused_color;
+ RrColor *toggled_hover_unfocused_color;
+ RrColor *toggled_focused_pressed_color;
+ RrColor *toggled_unfocused_pressed_color;
+ RrColor *toggled_focused_unpressed_color;
+ RrColor *toggled_unfocused_unpressed_color;
+
+ /* masks */
+ RrPixmapMask *mask;
+ RrPixmapMask *pressed_mask;
+ RrPixmapMask *disabled_mask;
+ RrPixmapMask *hover_mask;
+ RrPixmapMask *toggled_mask;
+ RrPixmapMask *toggled_hover_mask;
+ RrPixmapMask *toggled_pressed_mask;
+
+ /* textures */
+ RrAppearance *a_focused_unpressed;
+ RrAppearance *a_unfocused_unpressed;
+ RrAppearance *a_focused_pressed;
+ RrAppearance *a_unfocused_pressed;
+ RrAppearance *a_disabled_focused;
+ RrAppearance *a_disabled_unfocused;
+ RrAppearance *a_hover_focused;
+ RrAppearance *a_hover_unfocused;
+ RrAppearance *a_toggled_focused_unpressed;
+ RrAppearance *a_toggled_unfocused_unpressed;
+ RrAppearance *a_toggled_focused_pressed;
+ RrAppearance *a_toggled_unfocused_pressed;
+ RrAppearance *a_toggled_hover_focused;
+ RrAppearance *a_toggled_hover_unfocused;
+
+};
+
/* these are the same on all endian machines because it seems to be dependant
on the endianness of the gfx card, not the cpu. */
#define RrDefaultAlphaOffset 24
gint RrBlueMask (const RrInstance *inst);
RrColor *RrColorNew (const RrInstance *inst, gint r, gint g, gint b);
+RrColor *RrColorCopy (RrColor *c);
RrColor *RrColorParse (const RrInstance *inst, gchar *colorname);
void RrColorFree (RrColor *in);
/*! Always call this when changing the type of a texture in an appearance */
void RrAppearanceClearTextures(RrAppearance *a);
+RrButton *RrButtonNew (const RrInstance *inst);
+void RrButtonFree(RrButton *b);
+
RrFont *RrFontOpen (const RrInstance *inst, const gchar *name,
gint size, RrFontWeight weight, RrFontSlant slant);
RrFont *RrFontOpenDefault (const RrInstance *inst);