[clutter/clutter-1.99: 3/14] [2.0] Remove deprecated ClutterBackend API
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.99: 3/14] [2.0] Remove deprecated ClutterBackend API
- Date: Thu, 14 Jul 2011 15:04:59 +0000 (UTC)
commit 58ca2d909ce268161fdfa11333563d8c6789a84f
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Jun 16 15:48:09 2011 +0100
[2.0] Remove deprecated ClutterBackend API
clutter/clutter-backend.c | 184 ---------------------------------------------
clutter/clutter-backend.h | 14 ----
2 files changed, 0 insertions(+), 198 deletions(-)
---
diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
index 73eddcb..fa9588a 100644
--- a/clutter/clutter-backend.c
+++ b/clutter/clutter-backend.c
@@ -65,8 +65,6 @@ struct _ClutterBackendPrivate
{
cairo_font_options_t *font_options;
- gchar *font_name;
-
gfloat units_per_em;
gint32 units_serial;
@@ -107,7 +105,6 @@ clutter_backend_finalize (GObject *gobject)
{
ClutterBackend *backend = CLUTTER_BACKEND (gobject);
- g_free (backend->priv->font_name);
clutter_backend_set_font_options (backend, NULL);
G_OBJECT_CLASS (clutter_backend_parent_class)->finalize (gobject);
@@ -635,129 +632,6 @@ clutter_get_default_backend (void)
}
/**
- * clutter_backend_set_double_click_time:
- * @backend: a #ClutterBackend
- * @msec: milliseconds between two button press events
- *
- * Sets the maximum time between two button press events, used to
- * verify whether it's a double click event or not.
- *
- * Since: 0.4
- *
- * Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
- */
-void
-clutter_backend_set_double_click_time (ClutterBackend *backend,
- guint msec)
-{
- ClutterSettings *settings = clutter_settings_get_default ();
-
- g_object_set (settings, "double-click-time", msec, NULL);
-}
-
-/**
- * clutter_backend_get_double_click_time:
- * @backend: a #ClutterBackend
- *
- * Gets the maximum time between two button press events, as set
- * by clutter_backend_set_double_click_time().
- *
- * Return value: a time in milliseconds
- *
- * Since: 0.4
- *
- * Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
- */
-guint
-clutter_backend_get_double_click_time (ClutterBackend *backend)
-{
- ClutterSettings *settings = clutter_settings_get_default ();
- gint retval;
-
- g_object_get (settings, "double-click-time", &retval, NULL);
-
- return retval;
-}
-
-/**
- * clutter_backend_set_double_click_distance:
- * @backend: a #ClutterBackend
- * @distance: a distance, in pixels
- *
- * Sets the maximum distance used to verify a double click event.
- *
- * Since: 0.4
- *
- * Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
- */
-void
-clutter_backend_set_double_click_distance (ClutterBackend *backend,
- guint distance)
-{
- ClutterSettings *settings = clutter_settings_get_default ();
-
- g_object_set (settings, "double-click-distance", distance, NULL);
-}
-
-/**
- * clutter_backend_get_double_click_distance:
- * @backend: a #ClutterBackend
- *
- * Retrieves the distance used to verify a double click event
- *
- * Return value: a distance, in pixels.
- *
- * Since: 0.4
- *
- * Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
- */
-guint
-clutter_backend_get_double_click_distance (ClutterBackend *backend)
-{
- ClutterSettings *settings = clutter_settings_get_default ();
- gint retval;
-
- g_object_get (settings, "double-click-distance", &retval, NULL);
-
- return retval;
-}
-
-/**
- * clutter_backend_set_resolution:
- * @backend: a #ClutterBackend
- * @dpi: the resolution in "dots per inch" (Physical inches aren't
- * actually involved; the terminology is conventional).
- *
- * Sets the resolution for font handling on the screen. This is a
- * scale factor between points specified in a #PangoFontDescription
- * and cairo units. The default value is 96, meaning that a 10 point
- * font will be 13 units high. (10 * 96. / 72. = 13.3).
- *
- * Applications should never need to call this function.
- *
- * Since: 0.4
- *
- * Deprecated: Use #ClutterSettings:font-dpi instead
- */
-void
-clutter_backend_set_resolution (ClutterBackend *backend,
- gdouble dpi)
-{
- ClutterSettings *settings;
- gint resolution;
-
- g_return_if_fail (CLUTTER_IS_BACKEND (backend));
-
- if (dpi < 0)
- resolution = -1;
- else
- resolution = dpi * 1024;
-
- settings = clutter_settings_get_default ();
- g_object_set (settings, "font-dpi", resolution, NULL);
-}
-
-/**
* clutter_backend_get_resolution:
* @backend: a #ClutterBackend
*
@@ -870,64 +744,6 @@ clutter_backend_get_font_options (ClutterBackend *backend)
return priv->font_options;
}
-/**
- * clutter_backend_set_font_name:
- * @backend: a #ClutterBackend
- * @font_name: the name of the font
- *
- * Sets the default font to be used by Clutter. The @font_name string
- * must either be %NULL, which means that the font name from the
- * default #ClutterBackend will be used; or be something that can
- * be parsed by the pango_font_description_from_string() function.
- *
- * Since: 1.0
- *
- * Deprecated: 1.4: Use #ClutterSettings:font-name instead
- */
-void
-clutter_backend_set_font_name (ClutterBackend *backend,
- const gchar *font_name)
-{
- ClutterSettings *settings = clutter_settings_get_default ();
-
- g_object_set (settings, "font-name", font_name, NULL);
-}
-
-/**
- * clutter_backend_get_font_name:
- * @backend: a #ClutterBackend
- *
- * Retrieves the default font name as set by
- * clutter_backend_set_font_name().
- *
- * Return value: the font name for the backend. The returned string is
- * owned by the #ClutterBackend and should never be modified or freed
- *
- * Since: 1.0
- *
- * Deprecated: 1.4: Use #ClutterSettings:font-name instead
- */
-const gchar *
-clutter_backend_get_font_name (ClutterBackend *backend)
-{
- ClutterBackendPrivate *priv;
- ClutterSettings *settings;
-
- g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
-
- priv = backend->priv;
-
- settings = clutter_settings_get_default ();
-
- /* XXX yuck. but we return a const pointer, so we need to
- * store it in the backend
- */
- g_free (priv->font_name);
- g_object_get (settings, "font-name", &priv->font_name, NULL);
-
- return priv->font_name;
-}
-
gint32
_clutter_backend_get_units_serial (ClutterBackend *backend)
{
diff --git a/clutter/clutter-backend.h b/clutter/clutter-backend.h
index df8f2cc..3c82419 100644
--- a/clutter/clutter-backend.h
+++ b/clutter/clutter-backend.h
@@ -60,20 +60,6 @@ GType clutter_backend_get_type (void) G_GNUC_CONST;
ClutterBackend *clutter_get_default_backend (void);
-#ifndef CLUTTER_DISABLE_DEPRECATED
-void clutter_backend_set_resolution (ClutterBackend *backend,
- gdouble dpi);
-void clutter_backend_set_double_click_time (ClutterBackend *backend,
- guint msec);
-guint clutter_backend_get_double_click_time (ClutterBackend *backend);
-void clutter_backend_set_double_click_distance (ClutterBackend *backend,
- guint distance);
-guint clutter_backend_get_double_click_distance (ClutterBackend *backend);
-void clutter_backend_set_font_name (ClutterBackend *backend,
- const gchar *font_name);
-const gchar * clutter_backend_get_font_name (ClutterBackend *backend);
-#endif /* CLUTTER_DISABLE_DEPRECATED */
-
gdouble clutter_backend_get_resolution (ClutterBackend *backend);
void clutter_backend_set_font_options (ClutterBackend *backend,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]