Commit e4396139 authored by Kalev Lember's avatar Kalev Lember

Support g_autoptr() for all libgnome-desktop object types

... and bump glib dep to 2.44.0 for the cleanup macro support.

This allows using e.g. g_autoptr(GnomeBG) in other programs, but does
not make libgnome-desktop itself use g_autoptr.
parent 4c35a820
......@@ -115,7 +115,7 @@ dnl it too, or it will never make it into the spec file!
GDK_PIXBUF_REQUIRED=2.21.3
GTK_REQUIRED=3.3.6
GLIB_REQUIRED=2.38.0
GLIB_REQUIRED=2.44.0
XRANDR_REQUIRED=1.3
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=3.5.91
XEXT_REQUIRED=1.1
......
......@@ -58,6 +58,8 @@ struct _GnomeBGCrossfadeClass
void (* finished) (GnomeBGCrossfade *fade, GdkWindow *window);
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeBGCrossfade, g_object_unref)
GType gnome_bg_crossfade_get_type (void);
GnomeBGCrossfade *gnome_bg_crossfade_new (int width, int height);
gboolean gnome_bg_crossfade_set_start_surface (GnomeBGCrossfade *fade,
......
......@@ -56,6 +56,8 @@ struct _GnomeBGSlideShowClass
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeBGSlideShow, g_object_unref)
GType gnome_bg_slide_show_get_type (void);
GnomeBGSlideShow *gnome_bg_slide_show_new (const char *filename);
gboolean gnome_bg_slide_show_load (GnomeBGSlideShow *self,
......
......@@ -48,6 +48,8 @@ G_BEGIN_DECLS
typedef struct _GnomeBG GnomeBG;
typedef struct _GnomeBGClass GnomeBGClass;
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeBG, g_object_unref)
GType gnome_bg_get_type (void);
GnomeBG * gnome_bg_new (void);
void gnome_bg_load_from_preferences (GnomeBG *bg,
......
......@@ -62,6 +62,8 @@ struct _GnomeDesktopThumbnailFactoryClass {
GObjectClass parent;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeDesktopThumbnailFactory, g_object_unref)
GType gnome_desktop_thumbnail_factory_get_type (void);
GnomeDesktopThumbnailFactory *gnome_desktop_thumbnail_factory_new (GnomeDesktopThumbnailSize size);
......
......@@ -54,6 +54,8 @@ struct _GnomeIdleMonitorClass
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeIdleMonitor, g_object_unref)
typedef void (*GnomeIdleMonitorWatchFunc) (GnomeIdleMonitor *monitor,
guint id,
gpointer user_data);
......
......@@ -47,6 +47,8 @@ struct _GnomePnpIdsClass
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomePnpIds, g_object_unref)
GType gnome_pnp_ids_get_type (void);
GnomePnpIds *gnome_pnp_ids_new (void);
gchar *gnome_pnp_ids_get_pnp_id (GnomePnpIds *pnp_ids,
......
......@@ -58,6 +58,8 @@ struct _GnomeRROutputInfoClass
#define GNOME_IS_RR_OUTPUT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_RR_OUTPUT_INFO))
#define GNOME_RR_OUTPUT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_RR_OUTPUT_INFO, GnomeRROutputInfoClass))
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeRROutputInfo, g_object_unref)
GType gnome_rr_output_info_get_type (void);
char *gnome_rr_output_info_get_name (GnomeRROutputInfo *self);
......@@ -117,6 +119,8 @@ struct _GnomeRRConfigClass
#define GNOME_IS_RR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_RR_CONFIG))
#define GNOME_RR_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_RR_CONFIG, GnomeRRConfigClass))
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeRRConfig, g_object_unref)
GType gnome_rr_config_get_type (void);
GnomeRRConfig *gnome_rr_config_new_current (GnomeRRScreen *screen,
......
......@@ -99,6 +99,8 @@ typedef enum {
#define GNOME_TYPE_RR_MODE (gnome_rr_mode_get_type())
#define GNOME_TYPE_RR_DPMS_MODE (gnome_rr_dpms_mode_get_type())
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeRRScreen, g_object_unref)
GType gnome_rr_screen_get_type (void);
GType gnome_rr_output_get_type (void);
GType gnome_rr_crtc_get_type (void);
......
......@@ -58,6 +58,8 @@ struct _GnomeWallClockClass
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeWallClock, g_object_unref)
GType gnome_wall_clock_get_type (void);
GnomeWallClock * gnome_wall_clock_new (void);
......
......@@ -55,6 +55,8 @@ struct _GnomeXkbInfoClass
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GnomeXkbInfo, g_object_unref)
GType gnome_xkb_info_get_type (void);
GnomeXkbInfo *gnome_xkb_info_new (void);
GList *gnome_xkb_info_get_all_layouts (GnomeXkbInfo *self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment