The marshallers we use for the signals are declared in a private header,
and it stands to reason that they should also be hidden in the shared
object by using the common '_' prefix. We are also using some direct
g_cclosure_marshal_* symbol from GLib, instead of consistently use the
clutter_marshal_* symbol.
The introduction of the StageManager in 0.8 implied that the first Stage
instance to be created was automatically assigned the status of "default
stage". This was all well and good, since the default stage was created
behind the curtains by the initialization sequence.
Now that the initialization sequence does not create a default stage any
longer, it means that the first stage created using clutter_stage_new()
gets to be the default, and all special and warm and fuzzy - which also
means that the first stage created by clutter_stage_new() cannot be
destroyed or handled as any other stage. Whoopsie.
Let's go back to the old semantics: the stage created by the first
invocation of clutter_stage_get_default() is the default stage, and
nothing else can be set as default. One day we'll be able to break the
API and the whole default stage business will be a thing of the past.
• Fix list_stages() and peek_stages() documentation
• Fix clutter_text_set_preedit_string() arguments in the header
to match source and documentation
• Add clutter_units_cm() to the private section for Units
• Rename the LayoutManager section
• Add FlowLayout:homogeneous accessors
The set_default_stage() method of StageManager should not be used
by application code; technically, nothing in Clutter uses it, and
StageManager's API is not considered public anyway.
Add annotations such as (transfer-none) (out) (element-type ClutterActor),
and so forth to the doc comments as appropriate.
The annotations added here are a combination of the annotations previously
in gir-repository for Clutter and annotations found in a review of all
return values with that were being parsed with a transfer of "full".
http://bugzilla.openedhand.com/show_bug.cgi?id=1452
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-stage.c (clutter_stage_get_default): Don't grab
the floating reference when creating the default stage. The stage
manager will take a reference to it so it will behave as any other
stage.
(clutter_stage_new): Don't take the floating reference to the new
stage but let the stage manager keep it instead.
* clutter/clutter-stage-manager.c
(_clutter_stage_manager_add_stage): Take a reference to the stage
when it is added to the list.
(_clutter_stage_manager_remove_stage): Unref the stage when it is
removed from the list.
(clutter_stage_manager_dispose): Keep track of the 'next' pointer
as a separate variable so we can cope when the stage being
destroyed removes itself from the list as the list is being
iterated.
* clutter/clutter-actor.c (clutter_actor_destroy): Take a
reference at the beginning of the function even if there is no
parent container so that overall the reference count is not
changed when the actor is unref'd again at the bottom of the
function. Previously it would have a net effect of leaving the
reference count alone unless it is a top level actor in which case
it would unref it.
Bug #864 - Allow instantiating and subclassing of ClutterStage
* clutter/Makefile.am: Add clutter-stage-window.[ch]
* clutter/clutter-stage-manager.c:
(_clutter_stage_manager_remove_stage): Do not warn if removing
a stage we don't manage, as we might be invoked multiple times
during a ClutterState dispose sequence.
* clutter/clutter-actor.c:
* clutter/clutter-backend.[ch]:
* clutter/clutter-main.c:
* clutter/clutter-private.h:
* clutter/clutter-stage.[ch]: Make ClutterStage a proxy actor,
with a private actor implementing the ClutterStageWindow
interface for handling the per-backend realization, painting
and unrealization, plus all the windowing system abstraction.
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-stage-x11.[ch]: Port the X11 backend
to the new backend and stage API and semantics.
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-stage-glx.c: Port the GLX backend to
the new backend and stage API and semantics.
* clutter/eglx/clutter-backend-egl.[ch]:
* clutter/eglx/clutter-stage-egl.[ch]: Port the EGLX backend
to the new backend and stage API and semantics (untested).
* tests/test-multistage.c (on_button_press): Rename
clutter_stage_create_new() to clutter_stage_new().
* README:
Add notes on new multistage feature.
* clutter/clutter-stage-manager.c:
Dont ref contained stages.
* clutter/clutter-stage.c:
Automatically remove stage from stage manager on finalisation.
Cleans up warnings when a stage is destroyed.
* clutter/clutter-backend.h:
* clutter/glx/clutter-backend-glx.c:
Minor formatting cleanups.
* clutter/glx/clutter-stage-glx.c:
* configure.ac:
* clutter/clutter-version.h.in:
Add a general CLUTTER_STAGE_TYPE define, should be useful for
evntual stage subclassing and creating with g_object_new()