GOBJECT 继承类的声明部分
G_DECLARE_FINAL_TYPE (MainScreen, main_screen, MAIN, SCREEN, GtkApplicationWindow)
GType main_screen_get_type (void);
__pragma (warning (push))
__pragma (warning (disable : 4996))
typedef struct _MainScreen MainScreen;
typedef struct {
GtkApplicationWindowClass parent_class;
} MainScreenClass;
static inline MainScreen * MAIN_SCREEN (gpointer ptr) {
return (((MainScreen*) (void *) g_type_check_instance_cast ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
static inline gboolean MAIN_IS_SCREEN (gpointer ptr) {
return ((g_type_check_instance_is_a ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
__pragma (warning (pop))
G_DECLARE_DERIVABLE_TYPE (MainScreen, main_screen, MAIN, SCREEN, GtkApplicationWindow)
GType main_screen_get_type (void);
__pragma (warning (push))
__pragma (warning (disable : 4996))
typedef struct _MainScreen MainScreen;
typedef struct _MainScreenClass MainScreenClass;
struct _MainScreen {
GtkApplicationWindow parent_instance;
};
static inline MainScreen * MAIN_SCREEN (gpointer ptr) {
return (((MainScreen*) (void *) g_type_check_instance_cast ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
static inline MainScreenClass * MAIN_SCREEN_CLASS (gpointer ptr) {
return (((MainScreenClass*) (void *) g_type_check_class_cast ((GTypeClass*) (ptr), (main_screen_get_type ()))));
}
static inline gboolean MAIN_IS_SCREEN (gpointer ptr) {
return ((g_type_check_instance_is_a ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
static inline gboolean MAIN_IS_SCREEN_CLASS (gpointer ptr) {
return ((g_type_check_class_is_a ((GTypeClass*) (ptr), (main_screen_get_type ()))));
}
static inline MainScreenClass * MAIN_SCREEN_GET_CLASS (gpointer ptr) {
return (((MainScreenClass*) (((GTypeInstance*) (ptr))->g_class)));
}
__pragma (warning (pop))
G_DECLARE_INTERFACE (MainScreen, main_screen, MAIN, SCREEN, GtkApplicationWindow)
GType main_screen_get_type (void);
__pragma (warning (push))
__pragma (warning (disable : 4996))
typedef struct _MainScreen MainScreen;
typedef struct _MainScreenInterface MainScreenInterface;
static inline MainScreen * MAIN_SCREEN (gpointer ptr) {
return (((MainScreen*) (void *) g_type_check_instance_cast ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
static inline gboolean MAIN_IS_SCREEN (gpointer ptr) {
return ((g_type_check_instance_is_a ((GTypeInstance*) (ptr), (main_screen_get_type ()))));
}
static inline MainScreenInterface * MAIN_SCREEN_GET_IFACE (gpointer ptr) {
return (((MainScreenInterface*) g_type_interface_peek (((GTypeInstance*) (ptr))->g_class, (main_screen_get_type ()))));
}
__pragma (warning (pop))
*/
GOBJECT 继承类的实现部分:
G_DEFINE_TYPE(MainScreen, main_screen, GTK_TYPE_APPLICATION_WINDOW);
static void main_screen_init (MainScreen *self);
static void main_screen_class_init (MainScreenClass *klass);
static GType main_screen_get_type_once (void);
static gpointer main_screen_parent_class = 0;
static gint MainScreen_private_offset;
static void main_screen_class_intern_init (gpointer klass) {
main_screen_parent_class = g_type_class_peek_parent (klass); if (MainScreen_private_offset != 0) g_type_class_adjust_private_offset (klass, &MainScreen_private_offset); main_screen_class_init ((MainScreenClass*) klass);
}
static inline gpointer main_screen_get_instance_private (MainScreen *self) {
return (((gpointer) ((guint8*) (self) + (glong) (MainScreen_private_offset))));
}
GType main_screen_get_type (void) {
static gsize static_g_define_type_id = 0; if ((g_once_init_enter((&static_g_define_type_id)))) { GType g_define_type_id = main_screen_get_type_once (); (g_once_init_leave((&static_g_define_type_id), (gsize) (g_define_type_id))); }
return static_g_define_type_id;
}
__declspec (noinline) static GType main_screen_get_type_once (void) {
GType g_define_type_id = g_type_register_static_simple ((gtk_application_window_get_type ()), g_intern_static_string ("MainScreen"), sizeof (MainScreenClass), (GClassInitFunc)(void (*)(void)) main_screen_class_intern_init, sizeof (MainScreen), (GInstanceInitFunc)(void (*)(void)) main_screen_init, (GTypeFlags) 0); { {{};} }
return g_define_type_id;
}
G_DEFINE_TYPE_WITH_CODE(MainScreen, main_screen, GTK_TYPE_APPLICATION_WINDOW XXXXXXX);
static void main_screen_init (MainScreen *self);
static void main_screen_class_init (MainScreenClass *klass);
static GType main_screen_get_type_once (void);
static gpointer main_screen_parent_class = 0;
static gint MainScreen_private_offset;
static void main_screen_class_intern_init (gpointer klass) {
main_screen_parent_class = g_type_class_peek_parent (klass); if (MainScreen_private_offset != 0) g_type_class_adjust_private_offset (klass, &MainScreen_private_offset); main_screen_class_init ((MainScreenClass*) klass);
}
static inline gpointer main_screen_get_instance_private (MainScreen *self) {
return (((gpointer) ((guint8*) (self) + (glong) (MainScreen_private_offset))));
}
GType main_screen_get_type (void) {
static gsize static_g_define_type_id = 0; if ((g_once_init_enter((&static_g_define_type_id)))) { GType g_define_type_id = main_screen_get_type_once (); (g_once_init_leave((&static_g_define_type_id), (gsize) (g_define_type_id))); } return static_g_define_type_id;
}
__declspec (noinline) static GType main_screen_get_type_once (void) {
GType g_define_type_id = g_type_register_static_simple (
(gtk_application_window_get_type ()) XXXXXXX,
g_intern_static_string ("MainScreen"),
sizeof (MainScreenClass),
(GClassInitFunc)(void (*)(void)) main_screen_class_intern_init,
sizeof (MainScreen),
(GInstanceInitFunc)(void (*)(void)) main_screen_init,
(GTypeFlags) 0);
{ {;} }
return g_define_type_id;
}
G_DEFINE_TYPE_WITH_PRIVATE(MainScreen, main_screen, GTK_TYPE_APPLICATION_WINDOW);
static void main_screen_init (MainScreen *self);
static void main_screen_class_init (MainScreenClass *klass);
static GType main_screen_get_type_once (void);
static gpointer main_screen_parent_class = 0;
static gint MainScreen_private_offset;
static void main_screen_class_intern_init (gpointer klass) {
main_screen_parent_class = g_type_class_peek_parent (klass); if (MainScreen_private_offset != 0) g_type_class_adjust_private_offset (klass, &MainScreen_private_offset); main_screen_class_init ((MainScreenClass*) klass);
}
static inline gpointer main_screen_get_instance_private (MainScreen *self) {
return (((gpointer) ((guint8*) (self) + (glong) (MainScreen_private_offset))));
}
GType main_screen_get_type (void) {
static gsize static_g_define_type_id = 0; if ((g_once_init_enter((&static_g_define_type_id)))) { GType g_define_type_id = main_screen_get_type_once (); (g_once_init_leave((&static_g_define_type_id), (gsize) (g_define_type_id))); } return static_g_define_type_id;
}
__declspec (noinline) static GType main_screen_get_type_once (void) {
GType g_define_type_id = g_type_register_static_simple ((gtk_application_window_get_type ()), g_intern_static_string ("MainScreen"), sizeof (MainScreenClass), (GClassInitFunc)(void (*)(void)) main_screen_class_intern_init, sizeof (MainScreen), (GInstanceInitFunc)(void (*)(void)) main_screen_init, (GTypeFlags) 0); { {{ MainScreen_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (MainScreenPrivate)); };} } return g_define_type_id;
}
G_DEFINE_INTERFACE(MainScreen, main_screen, GTK_TYPE_APPLICATION_WINDOW)
static void main_screen_default_init (MainScreenInterface *klass);
GType main_screen_get_type (void) {
static gsize static_g_define_type_id = 0;
if ((g_once_init_enter((&static_g_define_type_id)))) {
GType g_define_type_id = g_type_register_static_simple (((GType) ((2) << (2))), g_intern_static_string ("MainScreen"), sizeof (MainScreenInterface), (GClassInitFunc)(void (*)(void)) main_screen_default_init, 0, (GInstanceInitFunc)0, (GTypeFlags) 0); if ((gtk_application_window_get_type ()) != ((GType) ((0) << (2)))) g_type_interface_add_prerequisite (g_define_type_id, (gtk_application_window_get_type ())); { {;;} } (g_once_init_leave((&static_g_define_type_id), (gsize) (g_define_type_id)));
}
return static_g_define_type_id;
}
G_DEFINE_ABSTRACT_TYPE(MainScreen, main_screen, GTK_TYPE_APPLICATION_WINDOW)
static void main_screen_init (MainScreen *self);
static void main_screen_class_init (MainScreenClass *klass);
static GType main_screen_get_type_once (void);
static gpointer main_screen_parent_class = 0;
static gint MainScreen_private_offset;
static void main_screen_class_intern_init (gpointer klass) {
main_screen_parent_class = g_type_class_peek_parent (klass);
if (MainScreen_private_offset != 0)
g_type_class_adjust_private_offset (klass, &MainScreen_private_offset);
main_screen_class_init ((MainScreenClass*) klass);
}
static inline gpointer main_screen_get_instance_private (MainScreen *self) {
return (((gpointer) ((guint8*) (self) + (glong) (MainScreen_private_offset))));
}
GType main_screen_get_type (void) {
static gsize static_g_define_type_id = 0;
if ((g_once_init_enter((&static_g_define_type_id)))) { GType g_define_type_id = main_screen_get_type_once (); (g_once_init_leave((&static_g_define_type_id), (gsize) (g_define_type_id)));
}
return static_g_define_type_id;
}
__declspec (noinline) static GType main_screen_get_type_once (void) {
GType g_define_type_id = g_type_register_static_simple ((gtk_application_window_get_type ()), g_intern_static_string ("MainScreen"), sizeof (MainScreenClass), (GClassInitFunc)(void (*)(void)) main_screen_class_intern_init, sizeof (MainScreen), (GInstanceInitFunc)(void (*)(void)) main_screen_init, (GTypeFlags) G_TYPE_FLAG_ABSTRACT); { {{};} } return g_define_type_id;
}