[gnome-desktop] Revert "Add support for GObjectIntrospection"
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Revert "Add support for GObjectIntrospection"
- Date: Tue, 9 Nov 2010 21:54:56 +0000 (UTC)
commit 9d20ddbc5ba6b51292f38c9dc5dbc7e99aff9da8
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Nov 9 22:54:29 2010 +0100
Revert "Add support for GObjectIntrospection"
This reverts commit cad94246fb5be76482212407a380cd75f9e7b932.
configure.ac | 1 -
libgnome-desktop/Makefile.am | 56 +++--------
libgnome-desktop/gnome-bg.c | 18 +---
libgnome-desktop/gnome-desktop-thumbnail.c | 5 +-
libgnome-desktop/gnome-rr-config.c | 14 +--
libgnome-desktop/gnome-rr-config.h | 5 -
libgnome-desktop/gnome-rr.c | 127 +++--------------------
libgnome-desktop/gnome-rr.h | 3 -
libgnome-desktop/gnome-thumbnail-pixbuf-utils.c | 4 +-
9 files changed, 40 insertions(+), 193 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 576823a..9d401b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,7 +204,6 @@ AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
-GOBJECT_INTROSPECTION_CHECK([0.9.7])
dnl Don't use AC_PROG_AWK since we need the full pathname.
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
diff --git a/libgnome-desktop/Makefile.am b/libgnome-desktop/Makefile.am
index 3e51f06..e3c7a0a 100644
--- a/libgnome-desktop/Makefile.am
+++ b/libgnome-desktop/Makefile.am
@@ -1,5 +1,3 @@
-CLEANFILES =
-
lib_LTLIBRARIES = libgnome-desktop-3.la
AM_CPPFLAGS = \
@@ -13,22 +11,19 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(WARN_CFLAGS)
-introspection_sources = \
- gnome-desktop-utils.c \
- gnome-desktop-thumbnail.c \
- gnome-thumbnail-pixbuf-utils.c \
- gnome-bg.c \
- gnome-bg-crossfade.c \
- display-name.c \
- gnome-rr.c \
- gnome-rr-config.c \
- gnome-rr-labeler.c \
- edid-parse.c
-
-libgnome_desktop_3_la_SOURCES = \
- $(introspection_sources) \
- gnome-rr-private.h \
- edid.h \
+libgnome_desktop_3_la_SOURCES = \
+ gnome-desktop-utils.c \
+ gnome-desktop-thumbnail.c \
+ gnome-thumbnail-pixbuf-utils.c \
+ gnome-bg.c \
+ gnome-bg-crossfade.c \
+ display-name.c \
+ gnome-rr.c \
+ gnome-rr-config.c \
+ gnome-rr-labeler.c \
+ gnome-rr-private.h \
+ edid-parse.c \
+ edid.h \
private.h
libgnome_desktop_3_la_LIBADD = \
@@ -61,31 +56,6 @@ pnpdata_DATA_dist = pnp.ids
check:
test -s $(top_srcdir)/libgnome-desktop/pnp.ids
--include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-
-if HAVE_INTROSPECTION
-
-GnomeDesktop-3.0.gir: libgnome-desktop-3.la
-GnomeDesktop_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GConf-2.0
-GnomeDesktop_3_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0 gconf-2.0
-GnomeDesktop_3_0_gir_CFLAGS = -DGNOME_DESKTOP_USE_UNSTABLE_API -I$(top_srcdir)
-GnomeDesktop_3_0_gir_LIBS = libgnome-desktop-3.la
-GnomeDesktop_3_0_gir_FILES = $(introspection_sources) $(libgnome_desktop_HEADERS)
-GnomeDesktop_3_0_gir_SCANNERFLAGS = --identifier-prefix=Gnome --symbol-prefix=gnome_
-INTROSPECTION_GIRS += GnomeDesktop-3.0.gir
-
-girdir = $(datadir)/gir-1.0
-gir_DATA = $(INTROSPECTION_GIRS)
-
-typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-
-CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif
-
EXTRA_DIST = \
gnome-desktop-3.0.pc.in \
gnome-desktop-3.0-uninstalled.pc.in \
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index beabdd5..9ad616b 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -1135,11 +1135,6 @@ fit_factor (int from_width, int from_height,
return MIN (to_width / (double) from_width, to_height / (double) from_height);
}
-/**
- * gnome_bg_create_thumbnail:
- *
- * Returns: (transfer full): a #GdkPixbuf showing the background as a thumbnail
- */
GdkPixbuf *
gnome_bg_create_thumbnail (GnomeBG *bg,
GnomeDesktopThumbnailFactory *factory,
@@ -1361,13 +1356,14 @@ gnome_bg_set_surface_as_root (GdkScreen *screen, cairo_surface_t *surface)
* gnome_bg_set_surface_as_root_with_crossfade:
* @screen: the #GdkScreen to change root background on
* @surface: the cairo xlib surface to set root background from
+ * @context: a #GMainContext or %NULL
*
* Set the root pixmap, and properties pointing to it.
* This function differs from gnome_bg_set_surface_as_root()
* in that it adds a subtle crossfade animation from the
* current root pixmap to the new one.
*
- * Return value: (transfer full): a #GnomeBGCrossfade object
+ * Return value: a #GnomeBGCrossfade object
**/
GnomeBGCrossfade *
gnome_bg_set_surface_as_root_with_crossfade (GdkScreen *screen,
@@ -2830,15 +2826,9 @@ gnome_bg_changes_with_time (GnomeBG *bg)
return FALSE;
}
-/**
- * gnome_bg_create_frame_thumbnail:
- *
- * Creates a thumbnail for a certain frame, where 'frame' is somewhat
+/* Creates a thumbnail for a certain frame, where 'frame' is somewhat
* vaguely defined as 'suitable point to show while single-stepping
- * through the slideshow'.
- *
- * Returns: (transfer full): the newly created thumbnail or
- * or NULL if frame_num is out of bounds.
+ * through the slideshow'. Returns NULL if frame_num is out of bounds.
*/
GdkPixbuf *
gnome_bg_create_frame_thumbnail (GnomeBG *bg,
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 82816ef..71871df 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -779,7 +779,7 @@ expand_thumbnailing_script (const char *script,
*
* Usage of this function is threadsafe.
*
- * Return value: (transfer full): thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise.
+ * Return value: thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise.
*
* Since: 2.2
**/
@@ -1187,7 +1187,8 @@ gnome_desktop_thumbnail_factory_create_failed_thumbnail (GnomeDesktopThumbnailFa
* Return value: A string with the MD5 digest of the uri string.
*
* Since: 2.2
- * Deprecated: 2.22: Use #GChecksum instead
+ *
+ * @Deprecated: 2.22: Use #GChecksum instead
**/
char *
gnome_desktop_thumbnail_md5 (const char *uri)
diff --git a/libgnome-desktop/gnome-rr-config.c b/libgnome-desktop/gnome-rr-config.c
index 2a8a84f..d9e7555 100644
--- a/libgnome-desktop/gnome-rr-config.c
+++ b/libgnome-desktop/gnome-rr-config.c
@@ -84,11 +84,7 @@ static CrtcAssignment *crtc_assignment_new (GnomeRRScreen *screen,
GError **error);
static void crtc_assignment_free (CrtcAssignment *assign);
static void output_free (GnomeOutputInfo *output);
-static GnomeOutputInfo *output_copy (const GnomeOutputInfo *output);
-static GnomeRRConfig * gnome_rr_config_copy (const GnomeRRConfig *config);
-
-G_DEFINE_BOXED_TYPE (GnomeOutputInfo, gnome_rr_output_info, output_copy, output_free)
-G_DEFINE_BOXED_TYPE (GnomeRRConfig, gnome_rr_config, gnome_rr_config_copy, gnome_rr_config_free)
+static GnomeOutputInfo *output_copy (GnomeOutputInfo *output);
typedef struct Parser Parser;
@@ -626,7 +622,7 @@ output_free (GnomeOutputInfo *output)
}
static GnomeOutputInfo *
-output_copy (const GnomeOutputInfo *output)
+output_copy (GnomeOutputInfo *output)
{
GnomeOutputInfo *copy = g_new0 (GnomeOutputInfo, 1);
@@ -1116,7 +1112,7 @@ gnome_rr_config_save (GnomeRRConfig *configuration, GError **error)
}
static GnomeRRConfig *
-gnome_rr_config_copy (const GnomeRRConfig *config)
+gnome_rr_config_copy (GnomeRRConfig *config)
{
GnomeRRConfig *copy = g_new0 (GnomeRRConfig, 1);
int i;
@@ -1236,8 +1232,8 @@ gnome_rr_config_apply_with_time (GnomeRRConfig *config,
* See the documentation for gnome_rr_config_apply_from_filename(). This
* function simply calls that other function with a filename of
* gnome_rr_config_get_intended_filename().
- *
- * Deprecated: 2.26: Use gnome_rr_config_apply_from_filename() instead and pass it
+
+ * @Deprecated: 2.26: Use gnome_rr_config_apply_from_filename() instead and pass it
* the filename from gnome_rr_config_get_intended_filename().
*/
gboolean
diff --git a/libgnome-desktop/gnome-rr-config.h b/libgnome-desktop/gnome-rr-config.h
index cdd537e..6c3aa22 100644
--- a/libgnome-desktop/gnome-rr-config.h
+++ b/libgnome-desktop/gnome-rr-config.h
@@ -66,11 +66,6 @@ struct GnomeOutputInfo
gpointer user_data;
};
-#define GNOME_RR_TYPE_OUTPUT_INFO (gnome_rr_output_info_get_type())
-#define GNOME_RR_TYPE_CONFIG (gnome_rr_config_get_type())
-GType gnome_rr_output_info_get_type (void);
-GType gnome_rr_config_get_type (void);
-
struct GnomeRRConfig
{
/* "clone" means that at least two outputs are at (0, 0) offset and they
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 568acd3..3d4784f 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -87,7 +87,6 @@ struct GnomeRROutput
GnomeRRMode ** modes;
int n_preferred;
guint8 * edid_data;
- int edid_size;
char * connector_type;
};
@@ -125,7 +124,6 @@ struct GnomeRRMode
/* GnomeRRCrtc */
static GnomeRRCrtc * crtc_new (ScreenInfo *info,
RRCrtc id);
-static GnomeRRCrtc * crtc_copy (const GnomeRRCrtc *from);
static void crtc_free (GnomeRRCrtc *crtc);
#ifdef HAVE_RANDR
@@ -144,7 +142,6 @@ static gboolean output_initialize (GnomeRROutput *output,
GError **error);
#endif
-static GnomeRROutput *output_copy (const GnomeRROutput *from);
static void output_free (GnomeRROutput *output);
/* GnomeRRMode */
@@ -156,7 +153,6 @@ static void mode_initialize (GnomeRRMode *mode,
XRRModeInfo *info);
#endif
-static GnomeRRMode * mode_copy (const GnomeRRMode *from);
static void mode_free (GnomeRRMode *mode);
static void gnome_rr_screen_finalize (GObject*);
@@ -166,10 +162,6 @@ static void gnome_rr_screen_initable_iface_init (GInitableIface *iface);
G_DEFINE_TYPE_WITH_CODE (GnomeRRScreen, gnome_rr_screen, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, gnome_rr_screen_initable_iface_init))
-G_DEFINE_BOXED_TYPE (GnomeRRCrtc, gnome_rr_crtc, crtc_copy, crtc_free)
-G_DEFINE_BOXED_TYPE (GnomeRROutput, gnome_rr_output, output_copy, output_free)
-G_DEFINE_BOXED_TYPE (GnomeRRMode, gnome_rr_mode, mode_copy, mode_free)
-
/* Errors */
/**
@@ -773,7 +765,7 @@ gnome_rr_screen_class_init (GnomeRRScreenClass *klass)
"GDK Screen",
"The GDK Screen represented by this GnomeRRScreen",
GDK_TYPE_SCREEN,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB
+ G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB
)
);
@@ -1110,7 +1102,7 @@ gnome_rr_screen_get_output_by_id (GnomeRRScreen *screen,
static GnomeRROutput *
output_new (ScreenInfo *info, RROutput id)
{
- GnomeRROutput *output = g_slice_new0 (GnomeRROutput);
+ GnomeRROutput *output = g_new0 (GnomeRROutput, 1);
output->id = id;
output->info = info;
@@ -1157,25 +1149,26 @@ get_property (Display *dpy,
}
static guint8 *
-read_edid_data (GnomeRROutput *output, int *len)
+read_edid_data (GnomeRROutput *output)
{
Atom edid_atom;
guint8 *result;
+ int len;
edid_atom = XInternAtom (DISPLAY (output), "EDID", FALSE);
result = get_property (DISPLAY (output),
- output->id, edid_atom, len);
+ output->id, edid_atom, &len);
if (!result)
{
edid_atom = XInternAtom (DISPLAY (output), "EDID_DATA", FALSE);
result = get_property (DISPLAY (output),
- output->id, edid_atom, len);
+ output->id, edid_atom, &len);
}
if (result)
{
- if (*len % 128 == 0)
+ if (len % 128 == 0)
return result;
else
g_free (result);
@@ -1296,7 +1289,7 @@ output_initialize (GnomeRROutput *output, XRRScreenResources *res, GError **erro
output->n_preferred = info->npreferred;
/* Edid data */
- output->edid_data = read_edid_data (output, &output->edid_size);
+ output->edid_data = read_edid_data (output);
XRRFreeOutputInfo (info);
@@ -1304,52 +1297,6 @@ output_initialize (GnomeRROutput *output, XRRScreenResources *res, GError **erro
}
#endif /* HAVE_RANDR */
-static GnomeRROutput*
-output_copy (const GnomeRROutput *from)
-{
- GPtrArray *array;
- GnomeRRCrtc **p_crtc;
- GnomeRROutput **p_output;
- GnomeRRMode **p_mode;
- GnomeRROutput *output = g_slice_new0 (GnomeRROutput);
-
- output->id = from->id;
- output->info = from->info;
- output->name = g_strdup (from->name);
- output->current_crtc = from->current_crtc;
- output->width_mm = from->width_mm;
- output->height_mm = from->height_mm;
- output->connected = from->connected;
- output->n_preferred = from->n_preferred;
- output->connector_type = g_strdup (from->connector_type);
-
- array = g_ptr_array_new ();
- for (p_crtc = from->possible_crtcs; *p_crtc != NULL; p_crtc++)
- {
- g_ptr_array_add (array, *p_crtc);
- }
- output->possible_crtcs = (GnomeRRCrtc**) g_ptr_array_free (array, FALSE);
-
- array = g_ptr_array_new ();
- for (p_output = from->clones; *p_output != NULL; p_output++)
- {
- g_ptr_array_add (array, *p_output);
- }
- output->clones = (GnomeRROutput**) g_ptr_array_free (array, FALSE);
-
- array = g_ptr_array_new ();
- for (p_mode = from->modes; *p_mode != NULL; p_mode++)
- {
- g_ptr_array_add (array, *p_mode);
- }
- output->modes = (GnomeRRMode**) g_ptr_array_free (array, FALSE);
-
- output->edid_size = from->edid_size;
- output->edid_data = g_memdup (from->edid_data, from->edid_size);
-
- return output;
-}
-
static void
output_free (GnomeRROutput *output)
{
@@ -1359,7 +1306,7 @@ output_free (GnomeRROutput *output)
g_free (output->edid_data);
g_free (output->name);
g_free (output->connector_type);
- g_slice_free (GnomeRROutput, output);
+ g_free (output);
}
guint32
@@ -1803,7 +1750,7 @@ gnome_rr_crtc_supports_rotation (GnomeRRCrtc * crtc,
static GnomeRRCrtc *
crtc_new (ScreenInfo *info, RROutput id)
{
- GnomeRRCrtc *crtc = g_slice_new0 (GnomeRRCrtc);
+ GnomeRRCrtc *crtc = g_new0 (GnomeRRCrtc, 1);
crtc->id = id;
crtc->info = info;
@@ -1811,39 +1758,6 @@ crtc_new (ScreenInfo *info, RROutput id)
return crtc;
}
-static GnomeRRCrtc *
-crtc_copy (const GnomeRRCrtc *from)
-{
- GnomeRROutput **p_output;
- GPtrArray *array;
- GnomeRRCrtc *to = g_slice_new0 (GnomeRRCrtc);
-
- to->info = from->info;
- to->id = from->id;
- to->current_mode = from->current_mode;
- to->x = from->x;
- to->y = from->y;
- to->current_rotation = from->current_rotation;
- to->rotations = from->rotations;
- to->gamma_size = from->gamma_size;
-
- array = g_ptr_array_new ();
- for (p_output = from->current_outputs; *p_output != NULL; p_output++)
- {
- g_ptr_array_add (array, *p_output);
- }
- to->current_outputs = (GnomeRROutput**) g_ptr_array_free (array, FALSE);
-
- array = g_ptr_array_new ();
- for (p_output = from->possible_outputs; *p_output != NULL; p_output++)
- {
- g_ptr_array_add (array, *p_output);
- }
- to->possible_outputs = (GnomeRROutput**) g_ptr_array_free (array, FALSE);
-
- return to;
-}
-
#ifdef HAVE_RANDR
static gboolean
crtc_initialize (GnomeRRCrtc *crtc,
@@ -1920,14 +1834,14 @@ crtc_free (GnomeRRCrtc *crtc)
{
g_free (crtc->current_outputs);
g_free (crtc->possible_outputs);
- g_slice_free (GnomeRRCrtc, crtc);
+ g_free (crtc);
}
/* GnomeRRMode */
static GnomeRRMode *
mode_new (ScreenInfo *info, RRMode id)
{
- GnomeRRMode *mode = g_slice_new0 (GnomeRRMode);
+ GnomeRRMode *mode = g_new0 (GnomeRRMode, 1);
mode->id = id;
mode->info = info;
@@ -1977,26 +1891,11 @@ mode_initialize (GnomeRRMode *mode, XRRModeInfo *info)
}
#endif /* HAVE_RANDR */
-static GnomeRRMode *
-mode_copy (const GnomeRRMode *from)
-{
- GnomeRRMode *to = g_slice_new0 (GnomeRRMode);
-
- to->id = from->id;
- to->info = from->info;
- to->name = g_strdup (from->name);
- to->width = from->width;
- to->height = from->height;
- to->freq = from->freq;
-
- return to;
-}
-
static void
mode_free (GnomeRRMode *mode)
{
g_free (mode->name);
- g_slice_free (GnomeRRMode, mode);
+ g_free (mode);
}
void
diff --git a/libgnome-desktop/gnome-rr.h b/libgnome-desktop/gnome-rr.h
index e305921..1b73617 100644
--- a/libgnome-desktop/gnome-rr.h
+++ b/libgnome-desktop/gnome-rr.h
@@ -88,9 +88,6 @@ typedef enum {
#define GNOME_RR_TYPE_MODE (gnome_rr_mode_get_type())
GType gnome_rr_screen_get_type (void);
-GType gnome_rr_output_get_type (void);
-GType gnome_rr_crtc_get_type (void);
-GType gnome_rr_mode_get_type (void);
/* GnomeRRScreen */
GnomeRRScreen * gnome_rr_screen_new (GdkScreen *screen,
diff --git a/libgnome-desktop/gnome-thumbnail-pixbuf-utils.c b/libgnome-desktop/gnome-thumbnail-pixbuf-utils.c
index e6b0a9c..833242a 100644
--- a/libgnome-desktop/gnome-thumbnail-pixbuf-utils.c
+++ b/libgnome-desktop/gnome-thumbnail-pixbuf-utils.c
@@ -35,7 +35,7 @@
#define LOAD_BUFFER_SIZE 65536
/**
- * gnome_desktop_thumbnail_scale_down_pixbuf:
+ * gnome_thumbnail_scale_down_pixbuf:
* @pixbuf: a #GdkPixbuf
* @dest_width: the desired new width
* @dest_height: the desired new height
@@ -44,7 +44,7 @@
* is a lot faster than gdk-pixbuf when scaling down by
* large amounts.
*
- * Return value: (transfer full): a scaled pixbuf
+ * Return value: a scaled pixbuf
*
* Since: 2.2
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]