[gnome-bluetooth] pairing-dialog: Use G_DECLARE_DERIVABLE_TYPE



commit 566ec0fe78700dd19d19487bbc6f987ac0d057c4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Oct 28 13:40:17 2021 -0300

    pairing-dialog: Use G_DECLARE_DERIVABLE_TYPE
    
    Makes the header a bit cleaner.

 lib/bluetooth-pairing-dialog.h | 30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)
---
diff --git a/lib/bluetooth-pairing-dialog.h b/lib/bluetooth-pairing-dialog.h
index 8133b713..b732794a 100644
--- a/lib/bluetooth-pairing-dialog.h
+++ b/lib/bluetooth-pairing-dialog.h
@@ -22,33 +22,13 @@
 
 #include <gtk/gtk.h>
 
-#define BLUETOOTH_TYPE_PAIRING_DIALOG (bluetooth_pairing_dialog_get_type())
-#define BLUETOOTH_PAIRING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
-                               BLUETOOTH_TYPE_PAIRING_DIALOG, BluetoothPairingDialog))
-#define BLUETOOTH_PAIRING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
-                               BLUETOOTH_TYPE_PAIRING_DIALOG, BluetoothPairingDialogClass))
-#define BLUETOOTH_IS_PAIRING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
-                                               BLUETOOTH_TYPE_PAIRING_DIALOG))
-#define BLUETOOTH_IS_PAIRING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
-                                               BLUETOOTH_TYPE_PAIRING_DIALOG))
-#define BLUETOOTH_GET_PAIRING_DIALOG_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
-                               BLUETOOTH_TYPE_PAIRING_DIALOG, BluetoothPairingDialogClass))
-
-/**
- * BluetoothPairingDialog:
- *
- * The <structname>BluetoothPairingDialog</structname> struct contains
- * only private fields and should not be directly accessed.
- */
-typedef struct _BluetoothPairingDialog BluetoothPairingDialog;
-typedef struct _BluetoothPairingDialogClass BluetoothPairingDialogClass;
 
-struct _BluetoothPairingDialog {
-       GtkDialog parent;
-};
+#define BLUETOOTH_TYPE_PAIRING_DIALOG (bluetooth_pairing_dialog_get_type())
+G_DECLARE_DERIVABLE_TYPE (BluetoothPairingDialog, bluetooth_pairing_dialog, BLUETOOTH, PAIRING_DIALOG, 
GtkDialog)
 
-struct _BluetoothPairingDialogClass {
-       GtkDialogClass parent_class;
+struct _BluetoothPairingDialogClass
+{
+  GObjectClass parent_class;
 };
 
 typedef enum {


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