summaryrefslogtreecommitdiff
path: root/src/totem.h
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-04-07 14:29:53 +0200
committerBastien Nocera <hadess@hadess.net>2022-08-18 15:51:10 +0200
commitf1da2e45aa85178d08fbda9a22c44e3b60a8b84f (patch)
treef392599103aa8cbb3b8fdcc2c8a5ea0ec458ca23 /src/totem.h
parent21b0a07ad84d3541a812197c565f376b3a4afacc (diff)
downloadtotem-f1da2e45aa85178d08fbda9a22c44e3b60a8b84f.tar.gz
main: Simplify TotemObjectClass declaration
Diffstat (limited to 'src/totem.h')
-rw-r--r--src/totem.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/totem.h b/src/totem.h
index ec0cd9edc..0f95a32f4 100644
--- a/src/totem.h
+++ b/src/totem.h
@@ -121,44 +121,20 @@ GQuark totem_remote_setting_quark (void);
#define TOTEM_TYPE_REMOTE_SETTING (totem_remote_setting_get_type())
#define TOTEM_REMOTE_SETTING totem_remote_setting_quark ()
-#define TOTEM_TYPE_OBJECT (totem_object_get_type ())
-#define TOTEM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), totem_object_get_type (), TotemObject))
-#define TOTEM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), totem_object_get_type (), TotemObjectClass))
-#define TOTEM_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, totem_object_get_type ()))
-#define TOTEM_IS_OBJECT_CLASS(klass) (G_CHECK_INSTANCE_GET_CLASS ((klass), totem_object_get_type ()))
-
/**
* Totem:
*
* The #Totem object is a handy synonym for #TotemObject, and the two can be used interchangably.
**/
+typedef struct _TotemObject Totem;
/**
* TotemObject:
*
* All the fields in the #TotemObject structure are private and should never be accessed directly.
**/
-typedef struct _TotemObject Totem;
-typedef struct _TotemObject TotemObject;
-
-typedef struct {
- GtkApplicationClass parent_class;
-
- void (*file_opened) (TotemObject *totem, const char *mrl);
- void (*file_closed) (TotemObject *totem);
- void (*file_has_played) (TotemObject *totem, const char *mrl);
- void (*metadata_updated) (TotemObject *totem,
- const char *artist,
- const char *title,
- const char *album,
- guint track_num);
- char * (*get_user_agent) (TotemObject *totem,
- const char *mrl);
- char * (*get_text_subtitle) (TotemObject *totem,
- const char *mrl);
-} TotemObjectClass;
-
-GType totem_object_get_type (void);
+#define TOTEM_TYPE_OBJECT (totem_object_get_type ())
+G_DECLARE_FINAL_TYPE(TotemObject, totem_object, TOTEM, OBJECT, GtkApplication)
void totem_object_exit (TotemObject *totem) G_GNUC_NORETURN;
void totem_object_play (TotemObject *totem);