shell: Use G_DECLARE_*_TYPE macros
Cut down on boilerplate by using the (no longer that) new helper macros. We don't care about breaking ABI in private libraries, so use G_DECLARE_FINAL_TYPE even where the class struct used to be exposed in the header, except for types we inherit from ourselves (obviously) or where the class exposes any vfuncs (where changes could affect inheritance in extensions).
This commit is contained in:
@@ -5,30 +5,7 @@
|
||||
#include "st.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define SHELL_TYPE_STACK (shell_stack_get_type ())
|
||||
#define SHELL_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_STACK, ShellStack))
|
||||
#define SHELL_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_STACK, ShellStackClass))
|
||||
#define SHELL_IS_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_STACK))
|
||||
#define SHELL_IS_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_STACK))
|
||||
#define SHELL_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_STACK, ShellStackClass))
|
||||
|
||||
typedef struct _ShellStack ShellStack;
|
||||
typedef struct _ShellStackClass ShellStackClass;
|
||||
|
||||
typedef struct _ShellStackPrivate ShellStackPrivate;
|
||||
|
||||
struct _ShellStack
|
||||
{
|
||||
StWidget parent;
|
||||
|
||||
ShellStackPrivate *priv;
|
||||
};
|
||||
|
||||
struct _ShellStackClass
|
||||
{
|
||||
StWidgetClass parent_class;
|
||||
};
|
||||
|
||||
GType shell_stack_get_type (void) G_GNUC_CONST;
|
||||
#define SHELL_TYPE_STACK (shell_stack_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (ShellStack, shell_stack, SHELL, STACK, StWidget)
|
||||
|
||||
#endif /* __SHELL_STACK_H__ */
|
||||
|
Reference in New Issue
Block a user