plugin: Use G_DECLARE_FINAL_TYPE
libmutter-4 added support for this, so we can also drop the boilerplate. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/315
This commit is contained in:
parent
b1f893e998
commit
a4c159ecad
@ -48,14 +48,9 @@
|
|||||||
#include "shell-wm-private.h"
|
#include "shell-wm-private.h"
|
||||||
|
|
||||||
#define GNOME_TYPE_SHELL_PLUGIN (gnome_shell_plugin_get_type ())
|
#define GNOME_TYPE_SHELL_PLUGIN (gnome_shell_plugin_get_type ())
|
||||||
#define GNOME_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPlugin))
|
G_DECLARE_FINAL_TYPE (GnomeShellPlugin, gnome_shell_plugin,
|
||||||
#define GNOME_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass))
|
GNOME, SHELL_PLUGIN,
|
||||||
#define GNOME_IS_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_SHELL_PLUGIN_TYPE))
|
MetaPlugin)
|
||||||
#define GNOME_IS_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SHELL_PLUGIN))
|
|
||||||
#define GNOME_SHELL_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass))
|
|
||||||
|
|
||||||
typedef struct _GnomeShellPlugin GnomeShellPlugin;
|
|
||||||
typedef struct _GnomeShellPluginClass GnomeShellPluginClass;
|
|
||||||
|
|
||||||
struct _GnomeShellPlugin
|
struct _GnomeShellPlugin
|
||||||
{
|
{
|
||||||
@ -69,13 +64,6 @@ struct _GnomeShellPlugin
|
|||||||
ShellGlobal *global;
|
ShellGlobal *global;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GnomeShellPluginClass
|
|
||||||
{
|
|
||||||
MetaPluginClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gnome_shell_plugin_get_type (void);
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GnomeShellPlugin, gnome_shell_plugin, META_TYPE_PLUGIN)
|
G_DEFINE_TYPE (GnomeShellPlugin, gnome_shell_plugin, META_TYPE_PLUGIN)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user