diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-17 17:37:52 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-17 17:38:52 -0400 |
commit | 19dbbf6fa5518122099e90a5be04cbb540900cc6 (patch) | |
tree | 3fd7e7d2f1df867db65ecb44b5a90be80d93f2e2 /gtk/gtkaspectframe.h | |
parent | b5d17d2f9b958f95538bffed396ebec028db82fc (diff) | |
download | gtk+-19dbbf6fa5518122099e90a5be04cbb540900cc6.tar.gz |
aspectframe: Modernize
Make GtkAspectFrame not derive from GtkFrame anymore,
since frames now always draw, well, a frame. Also,
add proper setters for the properties of GtkAspectFrame.
Update our sole user.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2627
Diffstat (limited to 'gtk/gtkaspectframe.h')
-rw-r--r-- | gtk/gtkaspectframe.h | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/gtk/gtkaspectframe.h b/gtk/gtkaspectframe.h index 10e028bc56..e6e834bca1 100644 --- a/gtk/gtkaspectframe.h +++ b/gtk/gtkaspectframe.h @@ -30,7 +30,7 @@ #error "Only <gtk/gtk.h> can be included directly." #endif -#include <gtk/gtkframe.h> +#include <gtk/gtkwidget.h> G_BEGIN_DECLS @@ -44,18 +44,34 @@ typedef struct _GtkAspectFrame GtkAspectFrame; GDK_AVAILABLE_IN_ALL GType gtk_aspect_frame_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_aspect_frame_new (const gchar *label, - gfloat xalign, - gfloat yalign, - gfloat ratio, +GtkWidget* gtk_aspect_frame_new (float xalign, + float yalign, + float ratio, gboolean obey_child); + GDK_AVAILABLE_IN_ALL -void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, - gfloat xalign, - gfloat yalign, - gfloat ratio, - gboolean obey_child); +void gtk_aspect_frame_set_xalign (GtkAspectFrame *self, + float xalign); +GDK_AVAILABLE_IN_ALL +float gtk_aspect_frame_get_xalign (GtkAspectFrame *self); + +GDK_AVAILABLE_IN_ALL +void gtk_aspect_frame_set_yalign (GtkAspectFrame *self, + float yalign); +GDK_AVAILABLE_IN_ALL +float gtk_aspect_frame_get_yalign (GtkAspectFrame *self); +GDK_AVAILABLE_IN_ALL +void gtk_aspect_frame_set_ratio (GtkAspectFrame *self, + float ratio); +GDK_AVAILABLE_IN_ALL +float gtk_aspect_frame_get_ratio (GtkAspectFrame *self); + +GDK_AVAILABLE_IN_ALL +void gtk_aspect_frame_set_obey_child (GtkAspectFrame *self, + gboolean obey_child); +GDK_AVAILABLE_IN_ALL +gboolean gtk_aspect_frame_get_obey_child (GtkAspectFrame *self); G_END_DECLS |