diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-08-25 23:11:46 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-08-25 23:11:46 +0000 |
commit | b94e6c0a8036a0489ac8ca71de75ba7611218e50 (patch) | |
tree | ef9133c8c4a587c14896addfe16dadacca320d82 /gtk/gtkbutton.h | |
parent | 8de6598f6a45a2df6cba482955c92b422db404dc (diff) | |
download | gtk+-b94e6c0a8036a0489ac8ca71de75ba7611218e50.tar.gz |
Add optional movement on push to buttons (based on patch from Soeren
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
on push to buttons (based on patch from Soeren Sandmann, #54720)
- Add child_displacement_x/y style properties to control how far the
child moves when the button is depressed.
- Add non-exported function _gtk_button_set_depressed to clean
up the handling of the in/out shadow and separate it frmo
widget->state.
- Lots of code cleanup and simplification of state handling
for GtkButton/GtkToggleButton.
* tests/testgtkrc: Set the x/y displacement to 1 to provide a test
of button movement. testgtk + testgtkrc == test ugly GTK+, as always.
Diffstat (limited to 'gtk/gtkbutton.h')
-rw-r--r-- | gtk/gtkbutton.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h index 525b9cce65..1a5cbaf3d9 100644 --- a/gtk/gtkbutton.h +++ b/gtk/gtkbutton.h @@ -61,6 +61,7 @@ struct _GtkButton guint in_button : 1; guint button_down : 1; guint relief : 2; + guint depressed : 1; }; struct _GtkButtonClass @@ -76,7 +77,7 @@ struct _GtkButtonClass }; -GtkType gtk_button_get_type (void) G_GNUC_CONST; +GtkType gtk_button_get_type (void) G_GNUC_CONST; GtkWidget* gtk_button_new (void); GtkWidget* gtk_button_new_with_label (const gchar *label); GtkWidget* gtk_button_new_from_stock (const gchar *stock_id); @@ -89,7 +90,8 @@ void gtk_button_leave (GtkButton *button); void gtk_button_set_relief (GtkButton *button, GtkReliefStyle newstyle); GtkReliefStyle gtk_button_get_relief (GtkButton *button); - +void _gtk_button_set_depressed (GtkButton *button, + gboolean depressed); #ifdef __cplusplus } |