[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
1.2 style colours
From: |
Kevin Ryde |
Subject: |
1.2 style colours |
Date: |
Fri, 09 Jan 2004 09:50:41 +1000 |
User-agent: |
Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3 (gnu/linux) |
I added style colour field accessor functions. gtk-style-white
duplicates the current gtk-style-get-white, but I think the latter
name doesn't really match field accessors elsewhere. It can be left
in, but gtk-style-white would be the function to use.
* gtk-1.2.defs (gtk_style_white, gtk_style_black, gtk_style_fg,
gtk_style_bg, gtk_style_light, gtk_style_dark, gtk_style_mid,
gtk_style_text): New functions.
--- gtk-1.2.defs.~1.17.~ 2004-01-09 09:46:06.000000000 +1000
+++ gtk-1.2.defs 2004-01-09 09:47:33.000000000 +1000
@@ -314,6 +314,49 @@
GdkColor
((GtkStyle style)))
+(define-func gtk_style_white
+ GdkColor
+ ((GtkStyle style)))
+
+(define-func gtk_style_black
+ GdkColor
+ ((GtkStyle style)))
+
+(define-func gtk_style_fg
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_bg
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_light
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_dark
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_mid
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_text
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
+(define-func gtk_style_base
+ GdkColor
+ ((GtkStyle style)
+ (GtkStateType state)))
+
(define-func gtk_style_fg_gc
GdkGC
((GtkStyle style)
--- gtk-support.c.~1.11.~ 2003-09-25 09:40:02.000000000 +1000
+++ gtk-support.c 2004-01-09 09:28:04.000000000 +1000
@@ -25,6 +25,81 @@
+GdkColor*
+gtk_style_white (GtkStyle *style)
+{
+ return &style->white;
+}
+
+GdkColor*
+gtk_style_black (GtkStyle *style)
+{
+ return &style->black;
+}
+
+GdkColor *
+gtk_style_fg (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->fg))
+ return NULL;
+ else
+ return &style->fg[state];
+}
+
+GdkColor *
+gtk_style_bg (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->bg))
+ return NULL;
+ else
+ return &style->bg[state];
+}
+
+GdkColor *
+gtk_style_light (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->light))
+ return NULL;
+ else
+ return &style->light[state];
+}
+
+GdkColor *
+gtk_style_dark (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->dark))
+ return NULL;
+ else
+ return &style->dark[state];
+}
+
+GdkColor *
+gtk_style_mid (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->mid))
+ return NULL;
+ else
+ return &style->mid[state];
+}
+
+GdkColor *
+gtk_style_text (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->text))
+ return NULL;
+ else
+ return &style->text[state];
+}
+
+GdkColor *
+gtk_style_base (GtkStyle *style, GtkStateType state)
+{
+ if (state < 0 || state >= numberof (style->base))
+ return NULL;
+ else
+ return &style->base[state];
+}
+
GdkGC *
gtk_style_fg_gc (GtkStyle *style, GtkStateType state)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 1.2 style colours,
Kevin Ryde <=