* clutter/clutter-actor.c:
(clutter_actor_get_property): Use clutter_actor_get_reactive()
instead of the IS_REACTIVE() macro.
(clutter_actor_set_reactive): Emit the notify signal for the
reactive property.
* clutter/clutter-timeline.c:
(timeline_timeout_func),
(clutter_timeline_get_delta): Coding style fixes.
* clutter/clutter-actor.c:
(clutter_actor_transform_vertices):
Call clutter_actor_query_coords() instead of accessing the actor
box, so that actors that calculate their bounding box on the fly
(like ClutterGroup) work.
* (_clutter_actor_apply_modelview_transform_recursive):
Made to work for parentless actors.
* clutter/clutter-actor.c (clutter_actor_init): Explicitly
memset() to 0 the clip container, so if you get the clip without
having set it, you won't get garbage.
2008-01-31 Rob Bradford <rob@openedhand.com>
* clutter.symbols: Add clutter_actor_move_byu()
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_move_by),
(clutter_actor_move_byu): Add a units-based variant of the
clutter_actor_move_by() function
reviewed by: <delete if not using a buddy>
* clutter/clutter-actor.c:
(parse_rotation_array): Inline, and get the JsonArray as a parameter
(parse_rotation): Update
* clutter/clutter-script.c:
(warn_missing_attribute): Fix for emacs-style warnings
(clutter_script_parse_node): Remove an ifdeffed out section
(clutter_script_construct_parameters),
(clutter_script_construct_object): Rename get_parameters, so
it's obvious what it does
* clutter.symbols: Add clutter_actor_set_clipu() and
clutter_actor_get_clipu()
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_set_clipu), (clutter_actor_get_clipu): Add the
new units-based versions of the clip accessors
(clutter_actor_set_clip), (clutter_actor_get_clip): Reimplement
the pixels-based clip accessors as proxies for the units-based
ones
* clutter/cogl/cogl.h: Update cogl_clip_set() to accept the
clip components as ClutterFixed values
* clutter/cogl/gl/cogl.c (cogl_clip_set): Update the GL implementation
of cogl_clip_set()
* clutter/cogl/gles/cogl.c:
(cogl_rectangle_internal): Provide an internal, inlined rectangle
drawing function using fixed point values, to be shared by
cogl_clip_set() and cogl_rectangle()
(cogl_clip_set), (cogl_rectangle): Update the GLES implementation
of cogl_clip_set() and cogl_rectangle() to use the new internal
rectangle drawing function
* clutter/clutter-actor.c: Make the clip an array of ClutterUnit
values instead of pixel-based; this allows higher precision and
device independence
(_clutter_actor_apply_modelview_transform): Pass the clip
components converting from units to fixed point values, using
the new cogl_clip_set() signature
(clutter_actor_get_property), (clutter_actor_set_clip),
(clutter_actor_get_clip): Update the accessors of the clip
property
* clutter/clutter-actor.c:
(clutter_actor_should_pick_paint),
(clutter_actor_apply_transform_to_point): Fix the whitespace.
(clutter_actor_set_rotation): Clarify that the coordinates of
the centre of rotation are relative to the anchor point or,
if not set, to the upper left corner of the bounding box.
* clutter/clutter-actor.c: Clarify the set_clip() method
documentation, pointing out that the clip area origin is
always the top-left corner of an actor.
* clutter/clutter-actor.c: (clutter_actor_paint),
(clutter_actor_apply_shader): queue a redraw of actor when shader is
set.
* clutter/clutter-actor.h: indentation.
* clutter/clutter-shader.[ch]: made the fragment and vertex shader
sources properties. Report error through GError when binding shaders.
* tests/test-shader.c: modified to use newer API.
* clutter/clutter-actor.c:
(clutter_actor_set_property),
(clutter_actor_get_property),
(clutter_actor_class_init): Add the rotation-* properties,
controlling the rotation angle and center on each axis. (#614)
(parse_rotation_array), (parse_rotation),
(clutter_actor_parse_custom_node),
(clutter_actor_set_custom_property),
(clutter_scriptable_iface_init): Add a new "rotation" custom
property for expressing the rotation along each axis in a
compact way:
"rotation" : [
{ "x-axis" : [ <angle>, [ <y>, <z> ] ] },
{ "y-axis" : [ <angle>, [ <x>, <z> ] ] },
{ "z-axis" : [ <angle>, [ <x>, <y> ] ] }
]
(clutter_geometry_get_type),(clutter_vertex_get_type),
(clutter_actor_box_get_type): Use the I_() macro instead of
directly calling g_intern_static_string().
* clutter/clutter-entry.c (clutter_entry_request_coords):
* clutter/clutter-label.c (clutter_label_ensure_layout),
(clutter_label_request_coords): Use CLUTTER_UNITS_FROM_DEVICE()
instead of CLUTTER_UNITS_FROM_INT(), as "device" means "pixels".
* clutter/clutter-private.h: Add the I_() macro for intern
static strings.
* tests/test-script.json: Test the newly added "rotation"
custom property.
* clutter/clutter-actor.c:
(_clutter_actor_apply_modelview_transform):
Moved offset translation after rotation so that rotation coords
are also relative to the offset point.
* clutter/clutter-actor.c: Document the values for full
transparency and full opacity in the set_opacity()
method. (#662)
* clutter/clutter-behaviour-ellipse.c: Improve consistency
in the apidoc.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_get_sizeu),
(clutter_actor_get_positionu): Add unit-based accessors to
the size and position.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
* tests/Makefile.am:
* tests/test-unproject:
(clutter_actor_transform_stage_point):
Added new function for translating stage coordinates into local
actor coordinates.
* clutter/clutter-actor.c (parse_units),
(clutter_actor_parse_custom_node): Do not allow using percentages
of the stage on the stage itself, as it makes little to no
sense.
* clutter/clutter-script.c:
(clutter_script_construct_object): Rearrange code.
* tests/test-script.json: Do not set the size of the stage, to
test for the stage size percentage.
* clutter/clutter-actor.c (parse_units),
(clutter_actor_parse_custom_node),
(clutter_scriptable_iface_init): Override the parsing code
for the x, y, width and height properties of ClutterActor,
to allow strings with modifiers when defining the position
and/or the dimensions of an actor. Bare integers are assumed
as pixels; floating point values in the [0, 1] interval are
assumed as percentages; strings can have these modifiers:
- px - pixels
- mm - millimeters
- pt - points (at the current resolution)
- % - percentage of the stage
* clutter/clutter-units.h: Fix the conversion macros
* tests/test-script.json: Test the new values.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
Converted depth and rotation offsets to ClutterUnit.
(clutter_actor_set_depthu):
(clutter_actor_get_depthu):
Additional ClutterUnit API.
(_clutter_actor_apply_modelview_transform):
Use cogl_translatex() in place of cogl_translate().
* clutter/NEWS:
Started 0.6.0 section with comment on actor anchor point.
* clutter/clutter/clutter-actor.c:
* clutter/clutter/clutter-actor.h:
* clutter/clutter/clutter-behaviour-scale.c:
* clutter/clutter/clutter-deprecated.h:
(clutter_actor_set_anchor_point):
(clutter_actor_set_anchor_pointu):
(clutter_actor_get_anchor_point):
(clutter_actor_get_anchor_pointu):
(clutter_actor_set_anchor_point_from_gravity):
New anchor point API deprecating old gravity scaling, added
comments on modelview matrix construction to ClutterActor
documentation.
(clutter_actor_set_scale_with_gravity):
(clutter_actor_set_scale_with_gravityx):
Deprecated; use clutter_actor_set_anchor_point_from_gravity() instead.
* clutter/clutter-actor.c (clutter_actor_destroy): Remove the
reference we hold on the actor, as it was preventing the finalization
of every child on the stage.
* clutter/clutter-actor.c:
(clutter_actor_real_show),
(clutter_actor_real_hide): Do not set the MAPPED flag on the actor
if it is a top-level one (like ClutterStage); the backends are
responsible for setting that flag, as it might be the result of an
asynchronous operation (e.g. on X11).
* clutter/eglnative/clutter-stage-egl.c:
(clutter_stage_egl_show),
(clutter_stage_egl_hide): Set/unset the CLUTTER_ACTOR_MAPPED flag
on show and hide respectively.
* clutter/osx/clutter-stage-osx.c:
(clutter_stage_osx_show),
(clutter_stage_osx_hide): Ditto as above.
* clutter/sdl/clutter-stage-sdl.c:
(clutter_stage_sdl_show),
(clutter_stage_sdl_hide): Ditto as above, plus chain up to the
parent class show/hide virtual functions.
* clutter/x11/clutter-event-x11.c (event_translate): Use the MapNotify
and UnmapNotify events to call the X11 stage map/unmap functions.
* clutter/x11/clutter-stage-x11.[ch]:
(clutter_stage_x11_set_fullscreen): Set the fullscreen_on_map flag
with the fullscreen value.
(clutter_stage_x11_map), (clutter_stage_x11_unmap): Set the MAPPED
flag on the stage actor and redraw; also, if the fullscreen_on_map
flag was set, call clutter_stage_fullscreen() as well. (#648)
* tests/Makefile.am:
* tests/test-fullscreen.c: Add a fullscreen test case for checking
whether fullscreen works on every backend/platform.
* clutter/clutter-actor.c:
(clutter_actor_real_request_coords),
(clutter_actor_request_coords),
(clutter_actor_class_init): Provide a default ::request_coords()
implementation in ClutterActor and use it to store the bounding
box passed to clutter_actor_request_coords(). This makes the code
more reliable and clean, and avoids a call to the subclass
request_coords() method if the bounding box did not change. Now,
every class overriding ClutterActor::request_coords() *must* chain
up to the parent class method or the bounding box will not be
saved inside the ClutterActor structure.
* clutter/clutter-entry.c:
* clutter/clutter-group.c:
* clutter/clutter-hbox.c:
* clutter/clutter-label.c:
* clutter/clutter-texture.c:
* clutter/clutter-vbox.c: Chain up to the parent class
request_coords() method.
* clutter/clutter-actor.c (clutter_actor_destroy): Bail out
if clutter_actor_destroy() was called on the stage: the stage
is not for the user to destroy.
* clutter/x11/clutter-backend-x11.c:
* clutter/eglnative/clutter-backend-egl.c:
* clutter/sdl/clutter-backend-sdl.c:
* clutter/osx/clutter-backend-osx.c: Unset the top-level private
flag on the stage when disposing it, so the backends can safely
call clutter_actor_destroy().
* clutter/clutter-private.h: Tweak the private flags accessors,
to avoid the typecheck.
* clutter/clutter-actor.c::
* clutter/clutter-behaviour-opacity.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-effect.c:
* clutter/clutter-label.c: Remove the usage of G_PARAM_CONSTRUCT
without an override for the ::construct virtual function; using
G_PARAM_CONSTRUCT to set the default value of a property is not
the recommended approach; default values are set inside the
instance init function.
(clutter_actor_set_rotation): swapped axis and angle around,
the new argument order is: (axis, angle, x, y, z). Also removed
deprecated rotation functions from header.
Updated use of clutter_actor_set_rotation? in the following files:
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-effect.c:
* tests/test-actors.c:
* tests/test-project.c:
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
* clutter/clutter-group.c:
* clutter/clutter-main.c:
* clutter/clutter-stage.c:
* tests/test-events.c:
Parent Actors no longer need to be set reactive for reactive
children to get events. Also makes groups now pickable.
(#597, #423)
* clutter/clutter-texture.c:
Handle case when 1x1 tiled texture is created,
falling 'back' to being non tiled. (#596)
* clutter/eglx/clutter-backend-egl.c:
Call EglTerminate on backend shutdown.
* clutter.symbols: Update exported symbols.
* clutter/clutter-actor.[ch]: Remove clutter_actor_rotate_*
and clutter_actor_get_rx* and provide a simpler rotation API:
clutter_actor_set_rotation() and clutter_actor_get_rotation().
* clutter/clutter-deprecated.h: Deprecate the old rotation API.
* clutter/clutter-behaviour-bspline.c:
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-effect.c: Update internal usage of the
rotation API.
* tests/test-project.c: Ditto as above.
* clutter/clutter-actor.[ch]: Massive API clean-ups. Initial
fixes for bugs #614 and #628.
* clutter/clutter-main.c:
* clutter/clutter-stage.c: Update internal usage of the actor
API.
* tests/test-events.c: Update test suite.
* clutter/clutter-actor.[ch]: Rename clutter_actor_get_id() to
clutter_actor_get_gid().
(clutter_actor_set_parent): Use GUINT_TO_POINTER().
* clutter/clutter-deprecated.h: Add a replacement warning for
clutter_actor_get_id().
* clutter/clutter-texture.c (texture_upload_data): Use
clutter_actor_get_gid(), and don't leak the filename string.
* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name
to ::set_id and ::get_id, to avoid potential confusion with the
ClutterActor:name property.
* clutter/clutter-script.h:
* clutter/clutter-script.c (clutter_script_construct_object): Use
clutter_scriptable_set_id().
(clutter_get_script_id): Add a public function to retrieve the ID
used in the UI definition files from an object.
* clutter/clutter-actor.c: Do not set the name of the actor with
the ID set in the UI definition files.
* tests/test-script.c: Test clutter_get_script_id().
* clutter.symbols: Update with the new symbols.
* clutter/clutter-actor.[ch]: Fix the declaration of the
class handlers for the ::captured-event, ::enter-event and
::leave-event signals; the function signatures were missing
the return value the signals marshallers were expecting, and
their names weren't respecting the convention for event-related
signals.
* clutter/clutter-actor.c: Implement part of the ClutterScriptable
interface, using the ClutterActor API to set and get the name
of an actor.
(clutter_geometry_copy), (clutter_geometry_free): Use
the slice allocator to avoid fragmentation when setting
properties and emitting signals (that is: when packing
boxed types into GValues).
(clutter_actor_box_copy), (clutter_actor_box_free),
(clutter_vertex_copy), (clutter_vertex_free): Ditto.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_push_transform_child),
(clutter_actor_pop_transfomr_child): Simple wrappers around
COGL API, which avoid including clutter/cogl.h when writing
container actors outside Clutter.
* clutter/clutter-actor.c:
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Add the :reactive property, to
control reactiveness using the UI definition files.
(clutter_actor_reparent): Do not assume the parent is a
ClutterContainer, and call the container API only if needed.
(clutter_actor_destroy): Remove from the parent if needed,
just like the documentation says.
* clutter/clutter-actor.c:
More events documentation.
* clutter/clutter-event.c:
* clutter/clutter-event.h:
Add synthetic flag and make put_event use it
(via modded patch from pippin)
* clutter/clutter-main.c: (clutter_do_event):
dont use put event anymore when pushing enter/leave events.
* clutter/clutter-actor.c: Remove the ::event-after signal:
three event layers to connect to seems a bit overkill.
(clutter_actor_event): Return FALSE, not TRUE by default,
as g_signal_emit() will change the return value if no
handlers are connected
* clutter/clutter-stage.c: Emit ::notify when we change
the fullscreen property.
* clutter/clutter-script.c: Add more documentation for the
definition format and keywords.
(translate_property): Collapse the G_TYPE_ENUM and G_TYPE_FLAGS
cases into one, to simplify the code.
* tests/test-script.c: Test enumeration conversion by using
a value different from the default.