mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 11:02:05 +00:00
2007-01-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-feature.c: Use clutter_vblank_method() to get the VBlank method name from the environment variable OR the command line switch. (clutter_feature_do_init): Move the check on the features state here, to avoid an expensive function call, and inline the function. * clutter/clutter-fixed.c: Fix gtk-doc. * clutter/clutter-main.c: Add a --clutter-vblank command line switch controlling the VBlank method to be used: it overrides the CLUTTER_VBLANK environment variable. (pre_parse_hook), (clutter_init), (clutter_init_with_args): Move thread initialisation before type init, to avoid the warning that comes with newer GLib versions. * clutter/clutter-group.h: * clutter/clutter-group.c: Mark clutter_group_show_all() and clutter_group_hide_all() as deprecated.
This commit is contained in:
parent
c0aa013758
commit
4e765d1a34
25
ChangeLog
25
ChangeLog
@ -1,3 +1,28 @@
|
||||
2007-01-16 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-feature.c: Use clutter_vblank_method() to
|
||||
get the VBlank method name from the environment variable OR
|
||||
the command line switch.
|
||||
|
||||
(clutter_feature_do_init): Move the check on the features
|
||||
state here, to avoid an expensive function call, and inline
|
||||
the function.
|
||||
|
||||
* clutter/clutter-fixed.c: Fix gtk-doc.
|
||||
|
||||
* clutter/clutter-main.c: Add a --clutter-vblank command line
|
||||
switch controlling the VBlank method to be used: it overrides
|
||||
the CLUTTER_VBLANK environment variable.
|
||||
|
||||
(pre_parse_hook), (clutter_init),
|
||||
(clutter_init_with_args): Move thread initialisation before
|
||||
type init, to avoid the warning that comes with newer GLib
|
||||
versions.
|
||||
|
||||
* clutter/clutter-group.h:
|
||||
* clutter/clutter-group.c: Mark clutter_group_show_all() and
|
||||
clutter_group_hide_all() as deprecated.
|
||||
|
||||
2007-01-16 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* NEWS:
|
||||
|
1
NEWS
1
NEWS
@ -28,6 +28,7 @@ Clutter 0.2 ()
|
||||
o Redo Clutter Label widget, using the new Pango renderer.
|
||||
o Clutter Textures do not store local pixbuf copy (of texture).
|
||||
o Redo group and actor scale/sizing API and functionality.
|
||||
o Add memory management API for ClutterColor, and string parsing.
|
||||
* List of bug fixed
|
||||
o #156 - clutter_actor_set_position not using the absolute size
|
||||
o #155 - Don't test for XInitThreads [Bastien Nocera]
|
||||
|
@ -445,6 +445,9 @@ clutter_color_parse (const gchar *color,
|
||||
* hex digits representing the red, green, blue and alpha components
|
||||
* respectively.
|
||||
*
|
||||
* Note: the returned string cannot be used to get the color back with
|
||||
* clutter_color_parse().
|
||||
*
|
||||
* Return value: a newly-allocated text string
|
||||
*
|
||||
* Since: 0.2
|
||||
|
@ -196,7 +196,10 @@ check_vblank_env (const char *name)
|
||||
{
|
||||
const char *val;
|
||||
|
||||
#if 0
|
||||
val = getenv("CLUTTER_VBLANK");
|
||||
#endif
|
||||
val = clutter_vblank_method ();
|
||||
|
||||
if (val && !strcasecmp(val, name))
|
||||
return TRUE;
|
||||
@ -310,12 +313,16 @@ clutter_feature_init (void)
|
||||
__features->features_set = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
clutter_feature_do_init (void)
|
||||
{
|
||||
G_LOCK (__features);
|
||||
clutter_feature_init ();
|
||||
G_UNLOCK (__features);
|
||||
if (G_UNLIKELY (__features == NULL) ||
|
||||
G_UNLIKELY (__features->features_set == FALSE))
|
||||
{
|
||||
G_LOCK (__features);
|
||||
clutter_feature_init ();
|
||||
G_UNLOCK (__features);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,6 +89,7 @@ static ClutterFixed sin_tbl [] =
|
||||
* @angle: a #ClutterFixed angle in radians
|
||||
*
|
||||
* Fixed point implementation of sine function
|
||||
*
|
||||
* Return value: sine value (as fixed point).
|
||||
*
|
||||
* Since: 0.2
|
||||
|
@ -84,7 +84,7 @@ typedef gint32 ClutterAngle; /* angle such that 1024 == 2*PI */
|
||||
#define CFX_DIV CLUTTER_FIXED_DIV
|
||||
|
||||
/* Fixed point math routines */
|
||||
ClutterFixed clutter_fixed_sin (ClutterFixed anx);
|
||||
ClutterFixed clutter_fixed_sin (ClutterFixed angle);
|
||||
ClutterFixed clutter_angle_sin (ClutterAngle angle);
|
||||
|
||||
/* convenience macros for the cos functions */
|
||||
|
@ -281,7 +281,7 @@ clutter_group_get_n_children (ClutterGroup *self)
|
||||
*
|
||||
* Since: 0.2
|
||||
**/
|
||||
ClutterActor*
|
||||
ClutterActor *
|
||||
clutter_group_get_nth_child (ClutterGroup *self,
|
||||
gint index)
|
||||
{
|
||||
@ -326,40 +326,32 @@ clutter_group_foreach (ClutterGroup *self,
|
||||
* clutter_group_show_all:
|
||||
* @self: A #ClutterGroup
|
||||
*
|
||||
* Show all child actors of the group.
|
||||
* Note, does not recurse: use clutter_actor_show_all() for
|
||||
* a recursive show.
|
||||
* Show all child actors of the group, like clutter_actor_show_all().
|
||||
*
|
||||
* @Deprecated: Use clutter_actor_show_all() instead.
|
||||
*/
|
||||
void
|
||||
clutter_group_show_all (ClutterGroup *self)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_GROUP (self));
|
||||
|
||||
clutter_actor_show (CLUTTER_ACTOR (self));
|
||||
|
||||
g_list_foreach (self->priv->children,
|
||||
(GFunc) clutter_actor_show,
|
||||
NULL);
|
||||
clutter_actor_show_all (CLUTTER_ACTOR (self));
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_group_hide_all:
|
||||
* @self: A #ClutterGroup
|
||||
*
|
||||
* Hide all child actors of the group.
|
||||
* Note, does not recurse: use clutter_actor_hide_all() for
|
||||
* a recursive hide.
|
||||
* Hide all child actors of the group, like clutter_actor_hide_all().
|
||||
*
|
||||
* @Deprecated: Use clutter_actor_hide_all() instead
|
||||
*/
|
||||
void
|
||||
clutter_group_hide_all (ClutterGroup *self)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_GROUP (self));
|
||||
|
||||
clutter_actor_hide(CLUTTER_ACTOR(self));
|
||||
|
||||
g_list_foreach (self->priv->children,
|
||||
(GFunc) clutter_actor_hide,
|
||||
NULL);
|
||||
clutter_actor_hide_all (CLUTTER_ACTOR (self));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,8 +100,11 @@ void clutter_group_add_many (ClutterGroup *self,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void clutter_group_remove (ClutterGroup *self,
|
||||
ClutterActor *actor);
|
||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||
void clutter_group_show_all (ClutterGroup *self);
|
||||
void clutter_group_hide_all (ClutterGroup *self);
|
||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||
|
||||
ClutterActor *clutter_group_find_child_by_id (ClutterGroup *self,
|
||||
guint id);
|
||||
void clutter_group_raise (ClutterGroup *self,
|
||||
|
@ -47,6 +47,7 @@ static gboolean clutter_is_initialized = FALSE;
|
||||
static gboolean clutter_show_fps = FALSE;
|
||||
static gboolean clutter_fatal_warnings = FALSE;
|
||||
static gchar *clutter_display_name = NULL;
|
||||
static gchar *clutter_vblank_name = NULL;
|
||||
static int clutter_screen = 0;
|
||||
|
||||
guint clutter_debug_flags = 0; /* global clutter debug flag */
|
||||
@ -274,6 +275,12 @@ clutter_want_fps (void)
|
||||
return clutter_show_fps;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
clutter_vblank_method (void)
|
||||
{
|
||||
return clutter_vblank_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_redraw:
|
||||
*
|
||||
@ -571,6 +578,8 @@ static GOptionEntry clutter_args[] = {
|
||||
"X screen to use", "SCREEN" },
|
||||
{ "clutter-show-fps", 0, 0, G_OPTION_ARG_NONE, &clutter_show_fps,
|
||||
"Show frames per second", NULL },
|
||||
{ "clutter-vblank", 0, 0, G_OPTION_ARG_STRING, &clutter_vblank_name,
|
||||
"VBlank method to be used (none, dri or glx)", "METHOD" },
|
||||
{ "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &clutter_fatal_warnings,
|
||||
"Make all warnings fatal", NULL },
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
@ -597,10 +606,19 @@ pre_parse_hook (GOptionContext *context,
|
||||
if (clutter_is_initialized)
|
||||
return TRUE;
|
||||
|
||||
g_type_init ();
|
||||
|
||||
#if 0
|
||||
/* XXX - this shows a warning with newer releases of GLib,
|
||||
* as we use GOption in order to get here, and GOption uses
|
||||
* the slice allocator and other GLib stuff. so, either we
|
||||
* move the thread init inside clutter_init() directly or
|
||||
* we remove this call altogether, and let the applications
|
||||
* deal with threading, as they are supposed to do anyway.
|
||||
*/
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
g_type_init ();
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
env_string = g_getenv ("CLUTTER_DEBUG");
|
||||
@ -614,13 +632,23 @@ pre_parse_hook (GOptionContext *context,
|
||||
}
|
||||
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||
|
||||
env_string = g_getenv ("CLUTTER_VBLANK");
|
||||
if (env_string)
|
||||
{
|
||||
clutter_vblank_name = g_strdup (env_string);
|
||||
env_string = NULL;
|
||||
}
|
||||
|
||||
env_string = g_getenv ("CLUTTER_SHOW_FPS");
|
||||
if (env_string)
|
||||
clutter_show_fps = TRUE;
|
||||
|
||||
env_string = g_getenv ("DISPLAY");
|
||||
if (env_string)
|
||||
clutter_display_name = g_strdup (env_string);
|
||||
{
|
||||
clutter_display_name = g_strdup (env_string);
|
||||
env_string = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -824,6 +852,9 @@ clutter_init_with_args (int *argc,
|
||||
if (clutter_is_initialized)
|
||||
return CLUTTER_INIT_SUCCESS;
|
||||
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
|
||||
if (!XInitThreads())
|
||||
{
|
||||
g_set_error (error, clutter_init_error_quark (),
|
||||
@ -903,6 +934,9 @@ clutter_init (int *argc,
|
||||
if (clutter_is_initialized)
|
||||
return CLUTTER_INIT_SUCCESS;
|
||||
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
|
||||
if (!XInitThreads())
|
||||
return CLUTTER_INIT_ERROR_THREADS;
|
||||
|
||||
|
@ -70,6 +70,7 @@ struct _ClutterMainContext
|
||||
#define CLUTTER_CONTEXT() (clutter_context_get_default ())
|
||||
ClutterMainContext *clutter_context_get_default (void);
|
||||
|
||||
const gchar *clutter_vblank_method (void);
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_ACTOR_UNUSED_FLAG = 0,
|
||||
|
@ -1,3 +1,9 @@
|
||||
2007-01-16 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter-sections.txt: Update.
|
||||
|
||||
* tmpl/*.sgml: Update templates.
|
||||
|
||||
2006-12-13 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter-sections.txt: Update; add clutter_color_equal().
|
||||
|
@ -30,6 +30,7 @@ ClutterLabel
|
||||
ClutterLabelClass
|
||||
clutter_label_new
|
||||
clutter_label_new_with_text
|
||||
clutter_label_new_full
|
||||
clutter_label_set_text
|
||||
clutter_label_get_text
|
||||
clutter_label_set_font_name
|
||||
@ -71,6 +72,8 @@ clutter_behaviour_remove
|
||||
ClutterBehaviourForeachFunc
|
||||
clutter_behaviour_actors_foreach
|
||||
clutter_behaviour_get_actors
|
||||
clutter_behaviour_get_n_actors
|
||||
clutter_behaviour_get_nth_actor
|
||||
clutter_behaviour_get_alpha
|
||||
clutter_behaviour_set_alpha
|
||||
<SUBSECTION Standard>
|
||||
@ -226,7 +229,9 @@ clutter_actor_set_size
|
||||
clutter_actor_get_size
|
||||
clutter_actor_set_position
|
||||
clutter_actor_get_abs_position
|
||||
clutter_actor_set_width
|
||||
clutter_actor_get_width
|
||||
clutter_actor_set_height
|
||||
clutter_actor_get_height
|
||||
clutter_actor_get_x
|
||||
clutter_actor_get_y
|
||||
@ -451,6 +456,21 @@ CFX_Q
|
||||
CFX_ONE
|
||||
CFX_MAX
|
||||
CFX_MIN
|
||||
ClutterAngle
|
||||
CFX_PI
|
||||
CFX_2PI
|
||||
CFX_PI_2
|
||||
CFX_PI_4
|
||||
CFX_PI8192
|
||||
CFX_120
|
||||
CFX_180
|
||||
CFX_240
|
||||
CFX_360
|
||||
CFX_60
|
||||
CFX_DIV
|
||||
CFX_INT
|
||||
CFX_MUL
|
||||
clutter_color_shadex
|
||||
CLUTTER_FIXED_TO_FLOAT
|
||||
CLUTTER_FIXED_TO_DOUBLE
|
||||
CLUTTER_FLOAT_TO_FIXED
|
||||
@ -461,6 +481,10 @@ CLUTTER_FIXED_FLOOR
|
||||
CLUTTER_FIXED_CEIL
|
||||
CLUTTER_FIXED_MUL
|
||||
CLUTTER_FIXED_DIV
|
||||
clutter_fixed_cos
|
||||
clutter_fixed_sin
|
||||
clutter_angle_cos
|
||||
clutter_angle_sin
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -477,6 +501,7 @@ clutter_color_equal
|
||||
clutter_color_lighten
|
||||
clutter_color_darken
|
||||
clutter_color_shade
|
||||
clutter_color_shadex
|
||||
clutter_color_to_hls
|
||||
clutter_color_to_pixel
|
||||
clutter_color_to_string
|
||||
@ -531,6 +556,7 @@ clutter_root_xwindow
|
||||
clutter_want_debug
|
||||
clutter_threads_enter
|
||||
clutter_threads_leave
|
||||
clutter_vblank_method
|
||||
<SUBSECTION Private>
|
||||
clutter_init_error_quark
|
||||
</SECTION>
|
||||
|
@ -375,6 +375,15 @@ Base class for #ClutterActor
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_actor_set_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@self:
|
||||
@width:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_actor_get_width ##### -->
|
||||
<para>
|
||||
|
||||
@ -384,6 +393,15 @@ Base class for #ClutterActor
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_actor_set_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@self:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_actor_get_height ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -94,6 +94,25 @@ applies.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_behaviour_get_n_actors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@behave:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_behaviour_get_nth_actor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@behave:
|
||||
@num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_behaviour_get_alpha ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -132,6 +132,16 @@ clutter-color
|
||||
@shade:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_color_shadex ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@shade:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_color_to_hls ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -55,6 +55,113 @@ floating-to-fixed conversion.
|
||||
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF ClutterAngle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_PI ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_2PI ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_PI_2 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_PI_4 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_PI8192 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_120 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_180 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_240 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_360 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_60 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_DIV ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_INT ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO CFX_MUL ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_color_shadex ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@shade:
|
||||
|
||||
|
||||
<!-- ##### MACRO CLUTTER_FIXED_TO_FLOAT ##### -->
|
||||
<para>
|
||||
|
||||
@ -137,3 +244,37 @@ floating-to-fixed conversion.
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### MACRO clutter_fixed_cos ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@x:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_fixed_sin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@angle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO clutter_angle_cos ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@x:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_angle_sin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@angle:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@ -92,6 +92,17 @@ ClutterLabel
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_label_new_full ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_name:
|
||||
@text:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION clutter_label_set_text ##### -->
|
||||
<para>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user