[epiphany] EphyEmbedShell: Use G_DECLARE_DERIVABLE_TYPE
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyEmbedShell: Use G_DECLARE_DERIVABLE_TYPE
- Date: Sat, 7 Nov 2015 16:54:04 +0000 (UTC)
commit ca94952c579dffe22f6fee662f911d2db49ecdc8
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Sep 15 20:36:14 2015 -0500
EphyEmbedShell: Use G_DECLARE_DERIVABLE_TYPE
embed/ephy-embed-shell.c | 5 ++---
embed/ephy-embed-shell.h | 17 ++---------------
2 files changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index f385732..b5d66bb 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -46,8 +46,7 @@
#define PRINT_SETTINGS_FILENAME "print-settings.ini"
#define OVERVIEW_RELOAD_DELAY 500
-struct _EphyEmbedShellPrivate
-{
+typedef struct {
WebKitWebContext *web_context;
EphyHistoryService *global_history_service;
EphyEncodings *encodings;
@@ -62,7 +61,7 @@ struct _EphyEmbedShellPrivate
GDBusConnection *bus;
GList *web_extensions;
guint web_extensions_page_created_signal_id;
-};
+} EphyEmbedShellPrivate;
enum
{
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 73354ac..c862ae5 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -31,16 +31,9 @@
G_BEGIN_DECLS
-#define EPHY_TYPE_EMBED_SHELL (ephy_embed_shell_get_type ())
-#define EPHY_EMBED_SHELL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_SHELL, EphyEmbedShell))
-#define EPHY_EMBED_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_EMBED_SHELL, EphyEmbedShellClass))
-#define EPHY_IS_EMBED_SHELL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_SHELL))
-#define EPHY_IS_EMBED_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_SHELL))
-#define EPHY_EMBED_SHELL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_EMBED_SHELL,
EphyEmbedShellClass))
+#define EPHY_TYPE_EMBED_SHELL (ephy_embed_shell_get_type ())
-typedef struct _EphyEmbedShellClass EphyEmbedShellClass;
-typedef struct _EphyEmbedShell EphyEmbedShell;
-typedef struct _EphyEmbedShellPrivate EphyEmbedShellPrivate;
+G_DECLARE_DERIVABLE_TYPE (EphyEmbedShell, ephy_embed_shell, EPHY, EMBED_SHELL, GtkApplication)
typedef enum
{
@@ -56,11 +49,6 @@ typedef enum
#define EPHY_EMBED_SHELL_MODE_HAS_PRIVATE_PROFILE(mode) \
(mode == EPHY_EMBED_SHELL_MODE_PRIVATE || mode == EPHY_EMBED_SHELL_MODE_INCOGNITO)
-struct _EphyEmbedShell
-{
- GtkApplication parent;
-};
-
struct _EphyEmbedShellClass
{
GtkApplicationClass parent_class;
@@ -70,7 +58,6 @@ struct _EphyEmbedShellClass
void (* restored_window) (EphyEmbedShell *shell);
};
-GType ephy_embed_shell_get_type (void);
EphyEmbedShell *ephy_embed_shell_get_default (void);
WebKitWebContext *ephy_embed_shell_get_web_context (EphyEmbedShell *shell);
GObject *ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]