mirror of
https://github.com/brl/mutter.git
synced 2025-06-15 01:39:30 +00:00
output: Make implementations inherit MetaOutput
Instead of the home baked "inheritance" system, using a gpointer and a GDestroyNotify function to keep the what effectively is sub type details, make MetaOutput an abstract derivable type, and make the implementations inherit it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
4920b5064d
commit
4a4f2d8264
@ -101,14 +101,6 @@ typedef struct _MetaOutputInfo
|
||||
MetaTileInfo tile_info;
|
||||
} MetaOutputInfo;
|
||||
|
||||
struct _MetaOutput
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
gpointer driver_private;
|
||||
GDestroyNotify driver_notify;
|
||||
};
|
||||
|
||||
#define META_TYPE_OUTPUT_INFO (meta_output_info_get_type ())
|
||||
META_EXPORT_TEST
|
||||
GType meta_output_info_get_type (void);
|
||||
@ -129,7 +121,13 @@ void meta_output_info_parse_edid (MetaOutputInfo *output_info,
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaOutputInfo, meta_output_info_unref)
|
||||
|
||||
#define META_TYPE_OUTPUT (meta_output_get_type ())
|
||||
META_EXPORT_TEST G_DECLARE_FINAL_TYPE (MetaOutput, meta_output, META, OUTPUT, GObject)
|
||||
META_EXPORT_TEST
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaOutput, meta_output, META, OUTPUT, GObject)
|
||||
|
||||
struct _MetaOutputClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
META_EXPORT_TEST
|
||||
uint64_t meta_output_get_id (MetaOutput *output);
|
||||
|
Reference in New Issue
Block a user