mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
fixed-layout: Use macros for subclassing boilerplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
parent
23d9210806
commit
5b527ac89b
@ -34,7 +34,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBrightnessContrastEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterClone, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDesaturateEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFixedLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFlowLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterGridLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterInputDevice, g_object_unref)
|
||||
|
@ -39,9 +39,14 @@
|
||||
#include "clutter/clutter-fixed-layout.h"
|
||||
#include "clutter/clutter-private.h"
|
||||
|
||||
G_DEFINE_TYPE (ClutterFixedLayout,
|
||||
clutter_fixed_layout,
|
||||
CLUTTER_TYPE_LAYOUT_MANAGER);
|
||||
struct _ClutterFixedLayout
|
||||
{
|
||||
ClutterLayoutManager parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_FINAL_TYPE (ClutterFixedLayout,
|
||||
clutter_fixed_layout,
|
||||
CLUTTER_TYPE_LAYOUT_MANAGER);
|
||||
|
||||
static void
|
||||
clutter_fixed_layout_get_preferred_width (ClutterLayoutManager *manager,
|
||||
|
@ -33,35 +33,12 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_FIXED_LAYOUT (clutter_fixed_layout_get_type ())
|
||||
#define CLUTTER_FIXED_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_FIXED_LAYOUT, ClutterFixedLayout))
|
||||
#define CLUTTER_IS_FIXED_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_FIXED_LAYOUT))
|
||||
#define CLUTTER_FIXED_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_FIXED_LAYOUT, ClutterFixedLayoutClass))
|
||||
#define CLUTTER_IS_FIXED_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_FIXED_LAYOUT))
|
||||
#define CLUTTER_FIXED_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_FIXED_LAYOUT, ClutterFixedLayoutClass))
|
||||
|
||||
typedef struct _ClutterFixedLayout ClutterFixedLayout;
|
||||
typedef struct _ClutterFixedLayoutClass ClutterFixedLayoutClass;
|
||||
|
||||
struct _ClutterFixedLayout
|
||||
{
|
||||
/*< private >*/
|
||||
ClutterLayoutManager parent_instance;
|
||||
};
|
||||
|
||||
/**
|
||||
* ClutterFixedLayoutClass:
|
||||
*
|
||||
* The #ClutterFixedLayoutClass structure contains only private data
|
||||
* and it should be accessed using the provided API
|
||||
*/
|
||||
struct _ClutterFixedLayoutClass
|
||||
{
|
||||
/*< private >*/
|
||||
ClutterLayoutManagerClass parent_class;
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_fixed_layout_get_type (void) G_GNUC_CONST;
|
||||
G_DECLARE_FINAL_TYPE (ClutterFixedLayout,
|
||||
clutter_fixed_layout,
|
||||
CLUTTER, FIXED_LAYOUT,
|
||||
ClutterLayoutManager)
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterLayoutManager *clutter_fixed_layout_new (void);
|
||||
|
Loading…
Reference in New Issue
Block a user