Add a gtk_scrollable_get_border

Add a vfunc to return a non-scrollable border around scrollables.
This would be nicer as a property, but we can't add properties
to an interface without breaking 3rd party implementations, so
make this an optional vfunc, and handle it not being set.
This commit is contained in:
Matthias Clasen
2014-12-10 06:45:21 -05:00
parent 691c96db2a
commit 6f2fff56fb
3 changed files with 37 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include <gdk/gdk.h>
#include <gtk/gtkenums.h>
#include <gtk/gtktypes.h>
#include <gtk/gtkborder.h>
G_BEGIN_DECLS
@ -39,6 +40,9 @@ typedef struct _GtkScrollableInterface GtkScrollableInterface;
struct _GtkScrollableInterface
{
GTypeInterface base_iface;
gboolean (* get_border) (GtkScrollable *scrollable,
GtkBorder *border);
};
/* Public API */
@ -65,6 +69,10 @@ GDK_AVAILABLE_IN_ALL
void gtk_scrollable_set_vscroll_policy (GtkScrollable *scrollable,
GtkScrollablePolicy policy);
GDK_AVAILABLE_IN_3_16
gboolean gtk_scrollable_get_border (GtkScrollable *scrollable,
GtkBorder *border);
G_END_DECLS
#endif /* __GTK_SCROLLABLE_H__ */