diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-05-26 15:34:31 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-26 15:34:31 -0400 |
commit | fb334b1b15b3ec67fc5da33f164aa8f91add177e (patch) | |
tree | 1072b9bfc87a83a97415a6c4e46aff9487fef602 /gtk/gtkswitch.c | |
parent | 96eefd49fa7ec1ed57ee987ac702bd4130420678 (diff) | |
download | gtk+-fb334b1b15b3ec67fc5da33f164aa8f91add177e.tar.gz |
switch: Make final
This should not be subclassed.
Diffstat (limited to 'gtk/gtkswitch.c')
-rw-r--r-- | gtk/gtkswitch.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index c0bc4ecc4f..71f97024e1 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -73,6 +73,9 @@ #include "fallback-c89.c" +typedef struct _GtkSwitchPrivate GtkSwitchPrivate; +typedef struct _GtkSwitchClass GtkSwitchClass; + struct _GtkSwitchPrivate { GtkActionHelper *action_helper; @@ -91,7 +94,27 @@ struct _GtkSwitchPrivate GtkWidget *off_image; GtkWidget *slider; }; -typedef struct _GtkSwitchPrivate GtkSwitchPrivate; + +/** + * GtkSwitch: + * + * The #GtkSwitch-struct contains private + * data and it should only be accessed using the provided API. + */ +struct _GtkSwitch +{ + /*< private >*/ + GtkWidget parent_instance; +}; + +struct _GtkSwitchClass +{ + GtkWidgetClass parent_class; + + void (* activate) (GtkSwitch *sw); + + gboolean (* state_set) (GtkSwitch *sw, gboolean state); +}; enum { |