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
This commit is contained in:
Guido Günther 2018-05-29 15:30:00 +02:00
parent 3167b97d88
commit 0c180d044f
5 changed files with 13 additions and 21 deletions

View file

@ -44,15 +44,15 @@ G_BEGIN_DECLS
typedef struct _UpClientPrivate UpClientPrivate; typedef struct _UpClientPrivate UpClientPrivate;
typedef struct typedef struct {
{
GObject parent; GObject parent;
UpClientPrivate *priv; UpClientPrivate *priv;
} UpClient; } UpClient;
typedef struct typedef struct {
{ /*< private >*/
GObjectClass parent_class; GObjectClass parent_class;
/*< public >*/
void (*device_added) (UpClient *client, void (*device_added) (UpClient *client,
UpDevice *device); UpDevice *device);
void (*device_removed) (UpClient *client, void (*device_removed) (UpClient *client,

View file

@ -44,16 +44,14 @@ G_BEGIN_DECLS
typedef struct _UpDevicePrivate UpDevicePrivate; typedef struct _UpDevicePrivate UpDevicePrivate;
typedef struct typedef struct {
{
GObject parent; GObject parent;
UpDevicePrivate *priv; UpDevicePrivate *priv;
} UpDevice; } UpDevice;
typedef struct typedef struct {
{
GObjectClass parent_class;
/*< private >*/ /*< private >*/
GObjectClass parent_class;
/* Padding for future expansion */ /* Padding for future expansion */
void (*_up_device_reserved1) (void); void (*_up_device_reserved1) (void);
void (*_up_device_reserved2) (void); void (*_up_device_reserved2) (void);

View file

@ -40,14 +40,12 @@ G_BEGIN_DECLS
typedef struct UpHistoryItemPrivate UpHistoryItemPrivate; typedef struct UpHistoryItemPrivate UpHistoryItemPrivate;
typedef struct typedef struct {
{
GObject parent; GObject parent;
UpHistoryItemPrivate *priv; UpHistoryItemPrivate *priv;
} UpHistoryItem; } UpHistoryItem;
typedef struct typedef struct {
{
GObjectClass parent_class; GObjectClass parent_class;
} UpHistoryItemClass; } UpHistoryItemClass;

View file

@ -39,14 +39,12 @@ G_BEGIN_DECLS
typedef struct UpStatsItemPrivate UpStatsItemPrivate; typedef struct UpStatsItemPrivate UpStatsItemPrivate;
typedef struct typedef struct {
{
GObject parent; GObject parent;
UpStatsItemPrivate *priv; UpStatsItemPrivate *priv;
} UpStatsItem; } UpStatsItem;
typedef struct typedef struct {
{
GObjectClass parent_class; GObjectClass parent_class;
} UpStatsItemClass; } UpStatsItemClass;

View file

@ -40,14 +40,12 @@ G_BEGIN_DECLS
typedef struct UpWakeupItemPrivate UpWakeupItemPrivate; typedef struct UpWakeupItemPrivate UpWakeupItemPrivate;
typedef struct typedef struct {
{
GObject parent; GObject parent;
UpWakeupItemPrivate *priv; UpWakeupItemPrivate *priv;
} UpWakeupItem; } UpWakeupItem;
typedef struct typedef struct {
{
GObjectClass parent_class; GObjectClass parent_class;
} UpWakeupItemClass; } UpWakeupItemClass;