X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.h;h=69841a5c491d95b42a504e02d37d6ee54851012b;hb=45ad47c91e62bdb802eb88e44e9f469956d24f34;hp=9f5264c050bf6deb22ad50b5509ca25739bd976a;hpb=8a6611e7e3bbba8be61cd35f8701f50d6e255e44;p=pspp diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 9f5264c050..69841a5c49 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -57,7 +57,26 @@ union value *text_to_value__ (const gchar *text, const struct fmt_spec *, /* Create a deep copy of SRC */ GtkListStore * clone_list_store (const GtkListStore *src); -void psppire_box_pack_start_defaults (GtkBox *box, GtkWidget *widget); +/* gtk_box_pack_start_defaults is deprecated. + Therefore we roll our own until a better solution is found */ +static inline void +psppire_box_pack_start_defaults (GtkBox *box, GtkWidget *widget) +{ + gtk_box_pack_start (box, widget, TRUE, TRUE, 0); +} + +/* Starting with gcc8 the warning Wcast-function-type will + trigger if no intermediate (void (*)(void)) cast is done + for a function cast to GFunc when the number of parameters + is not 2. The reason is that the compiler behaviour in this + situation is undefined according to C standard although many + implementations rely on this. */ +#define GFUNC_COMPAT_CAST(x) ((GFunc) (void (*)(void)) (x)) +/* Return the width of an upper case M (in pixels) when rendered onto + WIDGET with its current style. */ +gdouble width_of_m (GtkWidget *widget); + #endif +