From 5e51600cfe713fa320734291ec15a7a584c1c25b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 11 Apr 2015 18:41:00 +0100 Subject: Add gtk compatability for margin setting. --- gtk/compat.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gtk/compat.h') 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); -- cgit v1.2.3