diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-04-11 18:41:00 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-04-11 18:41:00 +0100 |
commit | 5e51600cfe713fa320734291ec15a7a584c1c25b (patch) | |
tree | 79a1764a55a181b2dc92da3f651c1557b0716c59 /gtk/compat.h | |
parent | df4e9e322dc8c64af1fc8aabc26c8d4ddab32574 (diff) | |
download | netsurf-5e51600cfe713fa320734291ec15a7a584c1c25b.tar.gz netsurf-5e51600cfe713fa320734291ec15a7a584c1c25b.tar.bz2 |
Add gtk compatability for margin setting.
Diffstat (limited to 'gtk/compat.h')
-rw-r--r-- | gtk/compat.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/compat.h b/gtk/compat.h index d35c5d75f..e90cdc615 100644 --- a/gtk/compat.h +++ b/gtk/compat.h @@ -94,6 +94,20 @@ typedef enum { */ void nsgtk_widget_set_alignment(GtkWidget *widget, GtkAlign halign, GtkAlign valign); +/** + * Set the margins of a widget + * + * Sets the margin all round a widget. + * + * @note this type of margin was not available prior to GTK 3.0 so + * we emulate it using gtk_misc_set_padding. + * + * \param widget The widget to set alignent on. + * \param hmargin The horizontal margin. + * \param vmargin The vertical margin. + */ +void nsgtk_widget_set_margins(GtkWidget *widget, gint hmargin, gint vmargin); + void nsgtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus); gboolean nsgtk_widget_has_focus(GtkWidget *widget); gboolean nsgtk_widget_get_visible(GtkWidget *widget); |