typedef struct _RrImageSet RrImageSet;
typedef struct _RrImagePic RrImagePic;
typedef struct _RrImageCache RrImageCache;
+typedef struct _RrButton RrButton;
-typedef guint32 RrPixel32; /* RGBA format */
+typedef guint32 RrPixel32; /* ARGB format, not premultiplied alpha */
typedef guint16 RrPixel16;
typedef guchar RrPixel8;
struct _RrAppearance {
const RrInstance *inst;
-
+
RrSurface surface;
gint textures;
RrTexture *texture;
gint n_resized;
};
+struct _RrButton {
+ const RrInstance *inst;
+
+ /* colors */
+ RrColor *focused_unpressed_color;
+ RrColor *unfocused_unpressed_color;
+ RrColor *focused_pressed_color;
+ RrColor *unfocused_pressed_color;
+ RrColor *focused_disabled_color;
+ RrColor *unfocused_disabled_color;
+ RrColor *focused_hover_color;
+ RrColor *unfocused_hover_color;
+ RrColor *focused_hover_toggled_color;
+ RrColor *unfocused_hover_toggled_color;
+ RrColor *focused_pressed_toggled_color;
+ RrColor *unfocused_pressed_toggled_color;
+ RrColor *focused_unpressed_toggled_color;
+ RrColor *unfocused_unpressed_toggled_color;
+
+ /* masks */
+ RrPixmapMask *unpressed_mask;
+ RrPixmapMask *pressed_mask;
+ RrPixmapMask *disabled_mask;
+ RrPixmapMask *hover_mask;
+ RrPixmapMask *unpressed_toggled_mask;
+ RrPixmapMask *hover_toggled_mask;
+ RrPixmapMask *pressed_toggled_mask;
+
+ /* textures */
+ RrAppearance *a_focused_unpressed;
+ RrAppearance *a_unfocused_unpressed;
+ RrAppearance *a_focused_pressed;
+ RrAppearance *a_unfocused_pressed;
+ RrAppearance *a_focused_disabled;
+ RrAppearance *a_unfocused_disabled;
+ RrAppearance *a_focused_hover;
+ RrAppearance *a_unfocused_hover;
+ RrAppearance *a_focused_unpressed_toggled;
+ RrAppearance *a_unfocused_unpressed_toggled;
+ RrAppearance *a_focused_pressed_toggled;
+ RrAppearance *a_unfocused_pressed_toggled;
+ RrAppearance *a_focused_hover_toggled;
+ RrAppearance *a_unfocused_hover_toggled;
+
+};
+
/* 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);