From 437f96982e5754f25630570818d4a5173bd9a8ce Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@linux.intel.com>
Date: Thu, 11 Dec 2008 11:20:14 +0000
Subject: [PATCH] Expose the Text accessors as public API

Fix up the header to expose ClutterText accessors for the main
properties, matching ClutterLabel.
---
 clutter/clutter-text.c |  8 -------
 clutter/clutter-text.h | 47 +++++++++++++++++++++---------------------
 2 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 34ee928e0..87a5b855d 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -83,14 +83,6 @@ static void     clutter_text_get_property       (GObject         *gobject,
                                               GParamSpec      *pspec);
 static void     clutter_text_finalize           (GObject         *gobject);
 
-G_CONST_RETURN gchar *clutter_text_get_text (ClutterText *text);
-void clutter_text_set_text (ClutterText *text, const gchar *str);
-PangoLayout *clutter_text_get_layout (ClutterText *text);
-void clutter_text_set_color (ClutterText *text, const ClutterColor *color);
-void clutter_text_get_color (ClutterText *text, ClutterColor *color);
-void clutter_text_set_font_name (ClutterText *text, const gchar *font_name);
-G_CONST_RETURN gchar *clutter_text_get_font_name (ClutterText *text);
-
 static void init_commands (ClutterText *ttext);
 static void init_mappings (ClutterText *ttext);
 
diff --git a/clutter/clutter-text.h b/clutter/clutter-text.h
index 908275cc2..cd901bffa 100644
--- a/clutter/clutter-text.h
+++ b/clutter/clutter-text.h
@@ -18,11 +18,13 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
+#error "Only <clutter/clutter.h> can be included directly."
+#endif
+
 #ifndef __CLUTTER_TEXT_H__
 #define __CLUTTER_TEXT_H__
 
@@ -31,27 +33,12 @@
 
 G_BEGIN_DECLS
 
-#define CLUTTER_TYPE_TEXT (clutter_text_get_type ())
-
-#define CLUTTER_TEXT(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-  CLUTTER_TYPE_TEXT, ClutterText))
-
-#define CLUTTER_TEXT_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), \
-  CLUTTER_TYPE_TEXT, ClutterTextClass))
-
-#define CLUTTER_IS_TEXT(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-  CLUTTER_TYPE_TEXT))
-
-#define CLUTTER_IS_TEXT_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-  CLUTTER_TYPE_TEXT))
-
-#define CLUTTER_TEXT_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-  CLUTTER_TYPE_TEXT, ClutterTextClass))
+#define CLUTTER_TYPE_TEXT               (clutter_text_get_type ())
+#define CLUTTER_TEXT(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TEXT, ClutterText))
+#define CLUTTER_TEXT_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_TEXT, ClutterTextClass))
+#define CLUTTER_IS_TEXT(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_TEXT))
+#define CLUTTER_IS_TEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_TEXT))
+#define CLUTTER_TEXT_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_TEXT, ClutterTextClass))
 
 typedef struct _ClutterText        ClutterText;
 typedef struct _ClutterTextPrivate ClutterTextPrivate;
@@ -83,6 +70,18 @@ ClutterActor *clutter_text_new_full            (const gchar        *font_name,
 ClutterActor *clutter_text_new_with_text       (const gchar        *font_name,
                                              const gchar        *text);
 
+G_CONST_RETURN gchar *clutter_text_get_text      (ClutterText *text);
+void                  clutter_text_set_text      (ClutterText *text,
+                                                  const gchar *str);
+PangoLayout *         clutter_text_get_layout    (ClutterText *text);
+void                  clutter_text_set_color     (ClutterText *text,
+                                                  const ClutterColor *color);
+void                  clutter_text_get_color     (ClutterText *text,
+                                                  ClutterColor *color);
+void                  clutter_text_set_font_name (ClutterText *text,
+                                                  const gchar *font_name);
+G_CONST_RETURN gchar *clutter_text_get_font_name (ClutterText *text);
+
 void          clutter_text_set_editable        (ClutterText           *label,
                                              gboolean            editable);
 gboolean      clutter_text_get_editable        (ClutterText           *label);