[gnome-bluetooth] settings-row: Use G_DECLARE_DERIVABLE_TYPE



commit 80bfa7862390c5096fcd0461418ad1150e7867c3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Oct 28 12:43:52 2021 -0300

    settings-row: Use G_DECLARE_DERIVABLE_TYPE
    
    Makes the header a bit cleaner.

 lib/bluetooth-settings-row.h | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/lib/bluetooth-settings-row.h b/lib/bluetooth-settings-row.h
index 0d3cb1ee..fb09387c 100644
--- a/lib/bluetooth-settings-row.h
+++ b/lib/bluetooth-settings-row.h
@@ -23,34 +23,11 @@
 #include <gtk/gtk.h>
 
 #define BLUETOOTH_TYPE_SETTINGS_ROW (bluetooth_settings_row_get_type())
-#define BLUETOOTH_SETTINGS_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
-                               BLUETOOTH_TYPE_SETTINGS_ROW, BluetoothSettingsRow))
-#define BLUETOOTH_SETTINGS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
-                               BLUETOOTH_TYPE_SETTINGS_ROW, BluetoothSettingsRowClass))
-#define BLUETOOTH_IS_SETTINGS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
-                                               BLUETOOTH_TYPE_SETTINGS_ROW))
-#define BLUETOOTH_IS_SETTINGS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
-                                               BLUETOOTH_TYPE_SETTINGS_ROW))
-#define BLUETOOTH_GET_SETTINGS_ROW_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
-                               BLUETOOTH_TYPE_SETTINGS_ROW, BluetoothSettingsRowClass))
+G_DECLARE_DERIVABLE_TYPE (BluetoothSettingsRow, bluetooth_settings_row, BLUETOOTH, SETTINGS_ROW, 
GtkListBoxRow)
 
-/**
- * BluetoothSettingsRow:
- *
- * The <structname>BluetoothSettingsRow</structname> struct contains
- * only private fields and should not be directly accessed.
- */
-typedef struct _BluetoothSettingsRow BluetoothSettingsRow;
-typedef struct _BluetoothSettingsRowClass BluetoothSettingsRowClass;
-
-struct _BluetoothSettingsRow {
-       GtkListBoxRow parent;
+struct _BluetoothSettingsRowClass
+{
+  GtkListBoxRowClass parent_class;
 };
 
-struct _BluetoothSettingsRowClass {
-       GtkListBoxRowClass parent_class;
-};
-
-GType bluetooth_settings_row_get_type (void);
-
 GtkWidget *bluetooth_settings_row_new (void);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]