[cluttermm] Deprecate several general methods in main.[h|cc].



commit 4d8f5d8832d912431328fc451bc146d3a16ee0b9
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 9 19:58:03 2014 +0200

    Deprecate several general methods in main.[h|cc].

 clutter/cluttermm/main.cc |    8 ++++++++
 clutter/cluttermm/main.h  |   38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/clutter/cluttermm/main.cc b/clutter/cluttermm/main.cc
index 69a26ba..9e1c8f8 100644
--- a/clutter/cluttermm/main.cc
+++ b/clutter/cluttermm/main.cc
@@ -17,6 +17,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+
 #include <cluttermm/main.h>
 #include <clutter/clutter.h>
 
@@ -38,6 +40,7 @@ int main_level()
   return clutter_main_level();
 }
 
+#ifndef CLUTTERMM_DISABLE_DEPRECATED
 bool get_debug_enabled()
 {
   return clutter_get_debug_enabled();
@@ -92,6 +95,8 @@ FontFlags get_font_flags()
 {
   return (FontFlags)clutter_get_font_flags();
 }
+#endif //CLUTTERMM_DISABLE_DEPRECATED
+
 
 Glib::RefPtr<Pango::FontMap> get_font_map()
 {
@@ -128,6 +133,7 @@ void ungrab_pointer()
   clutter_ungrab_pointer();
 }
 
+#ifndef CLUTTERMM_DISABLE_DEPRECATED
 void grab_pointer_for_device(const Glib::RefPtr<Actor>& actor, int id)
 {
   clutter_grab_pointer_for_device(actor->gobj(), id);
@@ -137,5 +143,7 @@ void ungrab_pointer_for_device(int id)
 {
   clutter_ungrab_pointer_for_device(id);
 }
+#endif //CLUTTERMM_DISABLE_DEPRECATED
+
 
 } //namespace Clutter
diff --git a/clutter/cluttermm/main.h b/clutter/cluttermm/main.h
index d71c4ff..5a92dea 100644
--- a/clutter/cluttermm/main.h
+++ b/clutter/cluttermm/main.h
@@ -38,8 +38,11 @@ void main_quit();
  */
 int main_level();
 
+#ifndef CLUTTERMM_DISABLE_DEPRECATED
 /** Check if clutter has debugging turned on.
  * @return true if debugging is turned on, false otherwise.
+ *
+ * @deprecated
  */
 bool get_debug_enabled();
 
@@ -48,25 +51,34 @@ bool get_debug_enabled();
  * environment variable or passing the --clutter-show-fps command line
  * argument.
  * @return true if Clutter should show the FPS.
+ *
+ * @deprecated Use the environment variable or the configuration file to determine whether Clutter should 
print out the FPS counter on the console.
  */
 bool get_show_fps();
 
 /** Returns the approximate number of microseconds passed since clutter was
  * intialised.
  * @return Number of microseconds since clutter_init() was called.
+ *
+ * @deprecated Use Glib::Timer or g_get_monotonic_time() for a proper timing source.
  */
 gulong get_timestamp();
 
 /** Retrieves the Actor with id.
  * @param id an Actor ID.
  * @return the actor with the passed id or a NULL RefPtr.
+ *
+ * @deprecated The id is not used any longer.
  */
 Glib::RefPtr<Actor> get_actor_by_gid(guint32 id);
 
 /** Sets the default frame rate to be used when creating Timeline objects.
- * @param frames_per_sec the new default frame rate
+ * @param frames_per_sec the new default frame rate.
+ *
+ * @deprecated This function does not do anything any more.
  */
 void set_default_frame_rate(guint frames_per_sec);
+#endif //CLUTTERMM_DISABLE_DEPRECATED
 
 /** Retrieves the default frame rate used when creating ClutterTimelines.
  *
@@ -75,6 +87,7 @@ void set_default_frame_rate(guint frames_per_sec);
  */
 guint get_default_frame_rate();
 
+#ifndef CLUTTERMM_DISABLE_DEPRECATED
 /** Sets whether per-actor motion events should be enabled or not
  * (the default is to enable them).
  *
@@ -86,26 +99,39 @@ guint get_default_frame_rate();
  *  <li>ClutterActor::leave-event</li>
  * </ul>
  *
- * @param enable true to enable per-actor motion events
+ * @param enable true to enable per-actor motion events.
+ *
+ * @deprecated Use Stage::set_motion_events_enabled() instead.
  */
 void set_motion_events_enabled(bool enable);
 
 /** Gets whether the per-actor motion events are enabled.
- * @return true if the motion events are enabled
+ * @return true if the motion events are enabled.
+ *
+ * @deprecated Use Stage::get_motion_events_enabled() instead.
  */
 bool get_motion_events_enabled();
 
 /** Clears the internal cache of glyphs used by the Pango renderer. This will
  * free up some memory and GL texture resources. The cache will be
  * automatically refilled as more text is drawn.
+ *
+ * @deprecated Use get_font_map() and cogl_pango_font_map_clear_glyph_cache() instead.
  */
 void clear_glyph_cache();
 
 //TODO: Documentation:
 
+/**
+ * @deprecated Use Backend::set_font_options() and the cairo_font_option_t API.
+ */
 void set_font_flags(FontFlags flags);
 
+/**
+ * @deprecated Use Backend::get_font_options() and the cairo_font_option_t API.
+ */
 FontFlags get_font_flags();
+#endif //CLUTTERMM_DISABLE_DEPRECATED
 
 Glib::RefPtr<Pango::FontMap> get_font_map();
 
@@ -148,20 +174,26 @@ void ungrab_keyboard();
  */
 void ungrab_pointer();
 
+#ifndef CLUTTERMM_DISABLE_DEPRECATED
 /** Grabs all the pointer events coming from the device id for actor.
  *
  * If id is -1 then this function is equivalent to grab_pointer().
  *
  * @param actor An Actor.
  * @param id a device id, or -1
+ *
+ * @deprecated Use InputDevice::grab() instead.
  */
 void grab_pointer_for_device(const Glib::RefPtr<Actor>& actor, int id);
 
 /** Removes an existing grab of the pointer events for device id.
  *
  * @param a device id
+ *
+ * @deprecated Use InputDevice::ungrab() instead.
  */
 void ungrab_pointer_for_device(int id);
+#endif //CLUTTERMM_DISABLE_DEPRECATED
 
 #if 0
 // As this function should never be used by applications, we don't wrap it


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]