Commit 9ad04c4c authored by Guido Gunther's avatar Guido Gunther Committed by Adrien Plazas
Browse files

HdyLealflet: Use glib-mkenums

This makes the enums clickable in the HdyLeaflet documentation
and makes the code smaller.
parent 0f60c988
/*** BEGIN file-header ***/
#include "config.h"
#include "hdy-enums.h"
#include "hdy-arrows.h"
#include "hdy-enums.h"
#include "hdy-leaflet.h"
/*** END file-header ***/
......
......@@ -2888,46 +2888,3 @@ hdy_leaflet_buildable_init (GtkBuildableIface *iface)
{
}
GType
hdy_leaflet_mode_transition_type_get_type (void)
{
static volatile gsize hdy_leaflet_mode_transition_type_type = 0;
if (g_once_init_enter (&hdy_leaflet_mode_transition_type_type)) {
static const GEnumValue values[] = {
{ HDY_LEAFLET_MODE_TRANSITION_TYPE_NONE, "HDY_LEAFLET_MODE_TRANSITION_TYPE_NONE", "none" },
{ HDY_LEAFLET_MODE_TRANSITION_TYPE_SLIDE, "HDY_LEAFLET_MODE_TRANSITION_TYPE_SLIDE", "slide" },
{ 0, NULL, NULL },
};
GType type;
type = g_enum_register_static ("HdyLeafletModeTransitionType", values);
g_once_init_leave (&hdy_leaflet_mode_transition_type_type, type);
}
return hdy_leaflet_mode_transition_type_type;
}
GType
hdy_leaflet_child_transition_type_get_type (void)
{
static volatile gsize hdy_leaflet_child_transition_type_type = 0;
if (g_once_init_enter (&hdy_leaflet_child_transition_type_type)) {
static const GEnumValue values[] = {
{ HDY_LEAFLET_CHILD_TRANSITION_TYPE_NONE, "HDY_LEAFLET_CHILD_TRANSITION_TYPE_NONE", "none" },
{ HDY_LEAFLET_CHILD_TRANSITION_TYPE_CROSSFADE, "HDY_LEAFLET_CHILD_TRANSITION_TYPE_CROSSFADE", "crossfade" },
{ HDY_LEAFLET_CHILD_TRANSITION_TYPE_SLIDE, "HDY_LEAFLET_CHILD_TRANSITION_TYPE_SLIDE", "slide" },
{ HDY_LEAFLET_CHILD_TRANSITION_TYPE_OVER, "HDY_LEAFLET_CHILD_TRANSITION_TYPE_OVER", "over" },
{ 0, NULL, NULL },
};
GType type;
type = g_enum_register_static ("HdyLeafletChildTransitionType", values);
g_once_init_leave (&hdy_leaflet_child_transition_type_type, type);
}
return hdy_leaflet_child_transition_type_type;
}
......@@ -13,13 +13,10 @@
#include <gtk/gtk.h>
#include "hdy-fold.h"
#include "hdy-enums.h"
G_BEGIN_DECLS
#define HDY_TYPE_LEAFLET_MODE_TRANSITION_TYPE (hdy_leaflet_mode_transition_type_get_type ())
#define HDY_TYPE_LEAFLET_CHILD_TRANSITION_TYPE (hdy_leaflet_child_transition_type_get_type ())
#define HDY_TYPE_LEAFLET (hdy_leaflet_get_type())
G_DECLARE_DERIVABLE_TYPE (HdyLeaflet, hdy_leaflet, HDY, LEAFLET, GtkContainer)
......@@ -51,9 +48,6 @@ struct _HdyLeafletClass
void (*todo) (HdyLeaflet *self);
};
GType hdy_leaflet_mode_transition_type_get_type (void);
GType hdy_leaflet_child_transition_type_get_type (void);
GtkWidget *hdy_leaflet_new (void);
HdyFold hdy_leaflet_get_fold (HdyLeaflet *self);
GtkWidget *hdy_leaflet_get_visible_child (HdyLeaflet *self);
......
......@@ -7,7 +7,9 @@ libhandy_resources = gnome.compile_resources(
c_name: 'hdy',
)
hdy_enum_headers = ['hdy-arrows.h']
hdy_enum_headers = ['hdy-arrows.h',
'hdy-leaflet.h',
]
version_data = configuration_data()
version_data.set('HDY_MAJOR_VERSION', handy_version_major)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment