summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorTim Janik <timj@gimp.org>1998-02-27 16:31:06 +0000
committerTim Janik <timj@src.gnome.org>1998-02-27 16:31:06 +0000
commit693fa02b839c54d0670f39df3f6dfde98a4d7788 (patch)
tree6213e60524c0c7e9d7bb469b0f9cdaf38ea60f6b /gtk/gtkstyle.c
parenta36ffb12a5e730c6f811bdf4c53ad0f1ffc95161 (diff)
downloadgtk+-693fa02b839c54d0670f39df3f6dfde98a4d7788.tar.gz
we make an active server grab now, this way we can change the cursor
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org> * gtk/gtktipsquery.c: we make an active server grab now, this way we can change the cursor globally and don't need to tweak event masks of other windows. * gtk/gtkframe.c (gtk_frame_style_set): recompute label size. * gtk/gtkwidget.h: * gtk/gtkwidget.c: New signal GtkWidget::style_set to be emitted when a widget's style changed. New flag GTK_RC_STYLE to indicate whether an rc lookup has been perfomed for the widget. (gtk_widget_ensure_style): New function. (gtk_widget_set_rc_style): New function. * docs/styles.txt: new file.
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 5075891a7c..9aa87de2ac 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -158,6 +158,31 @@ static GSList *unattached_styles = NULL;
static GMemChunk *key_mem_chunk = NULL;
+GtkStyle*
+gtk_style_copy (GtkStyle *style)
+{
+ GtkStyle *new_style;
+ guint i;
+
+ g_return_val_if_fail (style != NULL, NULL);
+
+ new_style = gtk_style_new ();
+
+ for (i = 0; i < 5; i++)
+ {
+ new_style->fg[i] = style->fg[i];
+ new_style->bg[i] = style->bg[i];
+ new_style->text[i] = style->text[i];
+ new_style->base[i] = style->base[i];
+
+ new_style->bg_pixmap[i] = style->bg_pixmap[i];
+ }
+
+ new_style->font = style->font;
+ gdk_font_ref (new_style->font);
+
+ return new_style;
+}
GtkStyle*
gtk_style_new ()