diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-05-29 15:30:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-09-30 19:18:35 +0200 |
commit | 0c180d044f05895eeff746e6aaf3227df7ac2f3c (patch) | |
tree | 24921feaf93fe338dff795759c8cb12827077b02 | |
parent | 3167b97d8848e4f64065f3486ecdb3783eb7e7bf (diff) | |
download | upower-0c180d044f05895eeff746e6aaf3227df7ac2f3c.tar.gz |
lib: Work-around to fix gtk-doc's type detection
Without the braces on the same line gtk-doc adds function pointers as
functions to the documentation and fails to detect the types as
GObjects. This fixes object names in the index and cross refs.
See the examples in
https://developer.gnome.org/gtk-doc-manual/stable/documenting_symbols.html.en
-rw-r--r-- | libupower-glib/up-client.h | 8 | ||||
-rw-r--r-- | libupower-glib/up-device.h | 8 | ||||
-rw-r--r-- | libupower-glib/up-history-item.h | 6 | ||||
-rw-r--r-- | libupower-glib/up-stats-item.h | 6 | ||||
-rw-r--r-- | libupower-glib/up-wakeup-item.h | 6 |
5 files changed, 13 insertions, 21 deletions
diff --git a/libupower-glib/up-client.h b/libupower-glib/up-client.h index 2342a48..0180dd4 100644 --- a/libupower-glib/up-client.h +++ b/libupower-glib/up-client.h @@ -44,15 +44,15 @@ G_BEGIN_DECLS typedef struct _UpClientPrivate UpClientPrivate; -typedef struct -{ +typedef struct { GObject parent; UpClientPrivate *priv; } UpClient; -typedef struct -{ +typedef struct { + /*< private >*/ GObjectClass parent_class; + /*< public >*/ void (*device_added) (UpClient *client, UpDevice *device); void (*device_removed) (UpClient *client, diff --git a/libupower-glib/up-device.h b/libupower-glib/up-device.h index 5186796..22d168a 100644 --- a/libupower-glib/up-device.h +++ b/libupower-glib/up-device.h @@ -44,16 +44,14 @@ G_BEGIN_DECLS typedef struct _UpDevicePrivate UpDevicePrivate; -typedef struct -{ +typedef struct { GObject parent; UpDevicePrivate *priv; } UpDevice; -typedef struct -{ - GObjectClass parent_class; +typedef struct { /*< private >*/ + GObjectClass parent_class; /* Padding for future expansion */ void (*_up_device_reserved1) (void); void (*_up_device_reserved2) (void); diff --git a/libupower-glib/up-history-item.h b/libupower-glib/up-history-item.h index 8378060..0175cdf 100644 --- a/libupower-glib/up-history-item.h +++ b/libupower-glib/up-history-item.h @@ -40,14 +40,12 @@ G_BEGIN_DECLS typedef struct UpHistoryItemPrivate UpHistoryItemPrivate; -typedef struct -{ +typedef struct { GObject parent; UpHistoryItemPrivate *priv; } UpHistoryItem; -typedef struct -{ +typedef struct { GObjectClass parent_class; } UpHistoryItemClass; diff --git a/libupower-glib/up-stats-item.h b/libupower-glib/up-stats-item.h index 85b8a6d..ee6c33c 100644 --- a/libupower-glib/up-stats-item.h +++ b/libupower-glib/up-stats-item.h @@ -39,14 +39,12 @@ G_BEGIN_DECLS typedef struct UpStatsItemPrivate UpStatsItemPrivate; -typedef struct -{ +typedef struct { GObject parent; UpStatsItemPrivate *priv; } UpStatsItem; -typedef struct -{ +typedef struct { GObjectClass parent_class; } UpStatsItemClass; diff --git a/libupower-glib/up-wakeup-item.h b/libupower-glib/up-wakeup-item.h index 3e32559..e0dd6b3 100644 --- a/libupower-glib/up-wakeup-item.h +++ b/libupower-glib/up-wakeup-item.h @@ -40,14 +40,12 @@ G_BEGIN_DECLS typedef struct UpWakeupItemPrivate UpWakeupItemPrivate; -typedef struct -{ +typedef struct { GObject parent; UpWakeupItemPrivate *priv; } UpWakeupItem; -typedef struct -{ +typedef struct { GObjectClass parent_class; } UpWakeupItemClass; |