fix and clean up

This commit is contained in:
Emmanuele Bassi 2006-12-05 05:42:47 +00:00
parent bceae43706
commit 2484917339
2 changed files with 41 additions and 70 deletions

View File

@ -220,11 +220,12 @@ check_vblank_env (const char *name)
* without explicitely calling clutter_feature_init() inside clutter_init()
* and we also need to have an open X display when we test for the features.
* __features is dynamically allocated, and applications tend to badly
* crash when trying to access __features; so when can't use a NULL check
* to know whether we already invoked clutter_feature_init() once; hence,
* we must allocate it anyway, and have a flag to let us know when the
* features have been set - that is when clutter_feature_init() has been
* successfully completed with an open X display.
* crash when trying to access __features components if we did not allocate
* it; so when can't use a NULL check to know whether we already invoked
* clutter_feature_init() once; hence, we must allocate it anyway, and have
* a flag to let us know when the features have been set - that is when
* clutter_feature_init() has been successfully completed with an open
* X display.
*/
static void
clutter_feature_init (void)

View File

@ -26,17 +26,14 @@
#ifndef _HAVE_CLUTTER_LABEL_H
#define _HAVE_CLUTTER_LABEL_H
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <clutter/clutter-texture.h>
#include <clutter/clutter-actor.h>
#include <clutter/clutter-color.h>
#include <pango/pango.h>
G_BEGIN_DECLS
#define CLUTTER_TYPE_LABEL clutter_label_get_type()
#define CLUTTER_TYPE_LABEL (clutter_label_get_type ())
#define CLUTTER_LABEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
@ -83,66 +80,39 @@ struct _ClutterLabelClass
GType clutter_label_get_type (void) G_GNUC_CONST;
ClutterActor *clutter_label_new (void);
ClutterActor *clutter_label_new_with_text (const gchar *font_name,
const gchar *text);
void clutter_label_set_text (ClutterLabel *label,
const gchar *text);
G_CONST_RETURN gchar *clutter_label_get_text (ClutterLabel *label);
void clutter_label_set_font_name (ClutterLabel *label,
const gchar *font_name);
G_CONST_RETURN gchar *clutter_label_get_font_name (ClutterLabel *label);
void clutter_label_set_color (ClutterLabel *label,
const ClutterColor *color);
void clutter_label_get_color (ClutterLabel *label,
ClutterColor *color);
void
clutter_label_set_ellipsize (ClutterLabel *label,
PangoEllipsizeMode mode);
PangoEllipsizeMode
clutter_label_get_ellipsize (ClutterLabel *label);
void
clutter_label_set_line_wrap (ClutterLabel *label,
gboolean wrap);
gboolean
clutter_label_get_line_wrap (ClutterLabel *label);
void
clutter_label_set_line_wrap_mode (ClutterLabel *label,
PangoWrapMode wrap_mode);
PangoWrapMode
clutter_label_get_line_wrap_mode (ClutterLabel *label);
PangoLayout*
clutter_label_get_layout (ClutterLabel *label);
void
clutter_label_set_attributes (ClutterLabel *label,
PangoAttrList *attrs);
PangoAttrList*
clutter_label_get_attributes (ClutterLabel *label);
void
clutter_label_set_use_markup (ClutterLabel *label,
gboolean setting);
gboolean
clutter_label_get_use_markup (ClutterLabel *label);
void
clutter_label_set_alignment (ClutterLabel *label,
PangoAlignment alignment);
gboolean
clutter_label_get_alignment (ClutterLabel *label);
ClutterActor * clutter_label_new (void);
ClutterActor * clutter_label_new_with_text (const gchar *font_name,
const gchar *text);
void clutter_label_set_text (ClutterLabel *label,
const gchar *text);
G_CONST_RETURN gchar *clutter_label_get_text (ClutterLabel *label);
void clutter_label_set_font_name (ClutterLabel *label,
const gchar *font_name);
G_CONST_RETURN gchar *clutter_label_get_font_name (ClutterLabel *label);
void clutter_label_set_color (ClutterLabel *label,
const ClutterColor *color);
void clutter_label_get_color (ClutterLabel *label,
ClutterColor *color);
void clutter_label_set_ellipsize (ClutterLabel *label,
PangoEllipsizeMode mode);
PangoEllipsizeMode clutter_label_get_ellipsize (ClutterLabel *label);
void clutter_label_set_line_wrap (ClutterLabel *label,
gboolean wrap);
gboolean clutter_label_get_line_wrap (ClutterLabel *label);
void clutter_label_set_line_wrap_mode (ClutterLabel *label,
PangoWrapMode wrap_mode);
PangoWrapMode clutter_label_get_line_wrap_mode (ClutterLabel *label);
PangoLayout * clutter_label_get_layout (ClutterLabel *label);
void clutter_label_set_attributes (ClutterLabel *label,
PangoAttrList *attrs);
PangoAttrList * clutter_label_get_attributes (ClutterLabel *label);
void clutter_label_set_use_markup (ClutterLabel *label,
gboolean setting);
gboolean clutter_label_get_use_markup (ClutterLabel *label);
void clutter_label_set_alignment (ClutterLabel *label,
PangoAlignment alignment);
gboolean clutter_label_get_alignment (ClutterLabel *label);
G_END_DECLS
#endif
#endif /* _HAVE_CLUTTER_LABEL_H */