diff options
author | Richard Hughes <richard@hughsie.com> | 2022-08-14 16:15:20 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-09-05 08:13:17 +0100 |
commit | b82f6acf0c6c1d2f4b1afdbd2c240061344e14c7 (patch) | |
tree | 71b03b71188e63af44d3aa395ee40f84a37f4bd6 /gusb/gusb-device-list.h | |
parent | 6eb6e9d8bb45042b1e5d0acc058169d2eaf2deeb (diff) | |
download | gusb-b82f6acf0c6c1d2f4b1afdbd2c240061344e14c7.tar.gz |
Use G_DECLARE_DERIVABLE_TYPE to reduce boilerplate
Diffstat (limited to 'gusb/gusb-device-list.h')
-rw-r--r-- | gusb/gusb-device-list.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gusb/gusb-device-list.h b/gusb/gusb-device-list.h index d0297e9..95c4423 100644 --- a/gusb/gusb-device-list.h +++ b/gusb/gusb-device-list.h @@ -13,18 +13,8 @@ G_BEGIN_DECLS #define G_USB_TYPE_DEVICE_LIST (g_usb_device_list_get_type()) -#define G_USB_DEVICE_LIST(o) \ - (G_TYPE_CHECK_INSTANCE_CAST((o), G_USB_TYPE_DEVICE_LIST, GUsbDeviceList)) -#define G_USB_IS_DEVICE_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), G_USB_TYPE_DEVICE_LIST)) -typedef struct _GUsbDeviceListPrivate GUsbDeviceListPrivate; -typedef struct _GUsbDeviceList GUsbDeviceList; -typedef struct _GUsbDeviceListClass GUsbDeviceListClass; - -struct _GUsbDeviceList { - GObject parent; - GUsbDeviceListPrivate *priv; -}; +G_DECLARE_DERIVABLE_TYPE(GUsbDeviceList, g_usb_device_list, G_USB, DEVICE_LIST, GObject) struct _GUsbDeviceListClass { GObjectClass parent_class; @@ -39,9 +29,6 @@ struct _GUsbDeviceListClass { gchar _gusb_reserved[64]; }; -GType -g_usb_device_list_get_type(void); - G_DEPRECATED_FOR(g_usb_context_new) GUsbDeviceList * g_usb_device_list_new(GUsbContext *context); |