Bug #960 - PangoContext creation code should not be duplicated
* clutter/clutter-private.h:
* clutter/clutter-main.c:
(_clutter_context_create_pango_context): Abstract the creation
of the PangoContext inside its own function, to avoid code and
bugs duplication. (Tommi Komulainen)
* clutter/clutter-entry.c (clutter_entry_init): Use the newly
added PangoContext creation function.
* clutter/clutter-label.c (clutter_label_init): Ditto as above.
* clutter/clutter-label.c (clutter_label_allocate): Keep the
layout if the size of the allocation is the same as the last
allocation received by the label.
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
Bug #955 - ClutterLabel is missing fallback resolution handling
* clutter/clutter-label.c (clutter_label_init): Handle
clutter_backend_get_resolution() return value -1 similar to
ClutterEntry (falling back to 96.0). (#955, Tommi Komulainen)
Bug #919 - Replacement pango renderer (Neil Roberts)
* clutter/clutter-backend.h:
* clutter/clutter-backend.c:
(clutter_backend_set_font_options),
(clutter_backend_get_font_options): Add the ability to set
the cairo_font_options_t* for the backend at construction
time, so that backend implementations can have their own
options.
* clutter/clutter-color.c: Include pango/pango-attributes.h
for the pango_color_parse() function.
* clutter/clutter-label.c:
(clutter_label_ensure_layout),
(clutter_label_init), (clutter_label_set_text),
(clutter_label_set_font_name), (clutter_label_set_ellipsize),
(clutter_label_set_use_markup): Ensure that the cache is
always primed when the Label changes; this makes sure that
the cache is rebuilt outside the paint run, which should
make the painting perform better especially on embedded
devices.
* clutter/clutter-entry.c:
(clutter_entry_ensure_layout),
(clutter_entry_init), (clutter_entry_set_text),
(clutter_entry_set_font_name): Ditto as above.
* clutter/clutter-private.h:
* clutter/clutter-main.[ch]: Create the font-map inside the
main context; add two new functions:
clutter_clear_glyph_cache()
clutter_set_use_mipmapped_text()
that control the glyphs cache.
* clutter/pango/Makefile.am:
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter-private.h:
* clutter/pango/pangoclutter-render.c:
* clutter/pango/pangoclutter.h: Rewrite the Pango renderer
using a PangoCairo context and saving the glyphs inside a
more efficient cache.
* configure.ac: Depend on pangocairo instead of pangoft2.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_get_abs_opacity): Add function that does what
get_opacity() does now...
(clutter_actor_get_opacity): ... and make get_opacity() do what
it's supposed to be doing. The original get_opacity() returned
a composited value, and there's no way to actually extract the
real opacity value set with set_opacity().
* clutter/clutter-clone-texture.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-texture.c: Update to use get_abs_opacity().
* clutter/clutter-entry.c:
* clutter/clutter-label.c: Ditto. Also, never change the stored
alpha value. (#804)
* tests/Makefile.am:
* tests/test-opacity.c: Test suite for the get_opacity() and
get_abs_opacity() API, and correct opacity handling.
* README: Add note about the change in get_opacity().
* clutter/clutter-label.c (clutter_label_query_coords): Check
if the layout logical rectangle size is bigger than the bounding
box; this usually means that the bounding box changed in one
point and the label private allocation needs to be
updated. (#724)
* clutter/clutter-label.c:
(clutter_label_ensure_layout): Avoid rounding errors in the layout
computing when switching between Clutter units and Pango units.
* clutter/clutter-label.c:
(clutter_label_query_coords): Return the bounding box set inside
request_coords(), if any; otherwise, return the natural allocation
of the label. (#678, reported by Gwenole Beauchesne)
* tests/test-rotate.c: Align the label
* 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.
Remove the layout containers: they will be moved to a
high-level library.
* clutter/clutter.h:
* clutter/Makefile.am: Remove layout and boxes from the
build.
* clutter/clutter-layout.[ch]: Remove the ClutterLayout
interface.
* clutter/clutter-box.[ch]:
* clutter/clutter-hbox.[ch]:
* clutter/clutter-vbox.[ch]: Remove ClutterBox and its
subclasses.
* clutter/clutter-label.c: Remove ClutterLayout implementation
* clutter/clutter-script-private.h:
* clutter/clutter-script-parser.c:
* clutter/clutter-script.c:
(clutter_script_parse_node): Remove special parsing for
ClutterMargin and ClutterPadding.
* clutter/clutter-types.h: Remove ClutterPadding and ClutterMargin.
* tests/Makefile.am:
* tests/test-boxes.c: Remove the boxes test case.
* 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-label.c (clutter_label_new_full): Set the
terminating NULL which was removed when applying patch for
fixing #606. (#645, Gwenole Beauchesne)
* 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/clutter-label.[ch]: Fix ClutterLabel size allocation when
no bounding box has been provided, and store the box set by the
user so that it can be reused when recomputing the layout. (#600)
(clutter_label_class_init),
(clutter_label_init): Set the :wrap property default to FALSE.
* clutter/clutter-units.h: Add ClutterUnit-to-PangoUnit conversion
macro.
* tests/test-rotate.c: Fix string.
* clutter/eglnative/clutter-backend-egl.c:
* clutter/eglx/clutter-backend-egl.c:
* clutter/sdl/clutter-backend-sdl.c: Set the default resolution
as 96.0 dpi for every backend (we already were under this
assumption anyway, and this makes it easier to change this
setting per-backend).
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter.h: Allow setting the resolution
for the PangoClutterFontMap object and provide the implementation
for the PangoFcFontMap::get_resolution() virtual function. This
allows to set the resolution of the PangoContext when retrieving
it.
* clutter/clutter-label.c (clutter_label_init): Set the
resolution of the font map with the one the backend gives us.
* clutter/clutter-entry.c (clutter_entry_init): Ditto.
* clutter/clutter-container.[ch]: Add a generic actor container
interface, for actors to implement without subclassing ClutterGroup.
* clutter/clutter-group.[ch]: Make ClutterGroup implement the
ClutterContainer interface, and deprecate the colliding methods.
* clutter/clutter-layout.[ch]: Add extended layout interface.
Actors and containers requiring or honouring complex layout
management should implement this interface and provide at least
one of the available layout types: width for height, height for
width, natural size, iterative size request.
* clutter/clutter-label.c: A ClutterLabel requires height for
width layout management, so it implements the ClutterLayout
interface.
* clutter/Makefile.am: Add new files to the build.
* tests/*.c:
* examples/*.c: Update tests and examples code to use the
new ClutterContainer API instead of ClutterGroup.
* clutter/clutter-label.c:
Simple doc fix.
* clutter/clutter-texture.c: (clutter_texture_get_pixbuf):
Backport of fix to get_pixbuf on non alpha textures from 0_2 branch.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
Add new set_width/height API calls.
Tweak scaling by reseting matrix.
Make set_opactiy() take parent opacity into account.
Fix clipping.
* clutter/clutter-alpha.c:
Add more sine functionality.
* clutter/clutter-behaviour-opacity.c:
Dont make a copy of all applied actors but use a foreach()
* clutter/clutter-behaviour-scale.c:
Give correct limits to propertys.
Tweak gravity a little more.
Update docs.
:
* clutter/clutter-behaviour.c: (clutter_behaviour_remove):
Minor warning text change.
* clutter/clutter-feature.c: (clutter_feature_wait_for_vblank):
Minor dri ioctl tweak.
* clutter/clutter-label.c:
* clutter/clutter-label.h:
Add new label_full api call.
* clutter/clutter-label.c: Remove some gtk-isms; always take
a reference before calling g_object_notify(), as the object
might get disposed while calling the closures inside the
notify queue; notify the changes of the ellipsize property.
* clutter/clutter-private.h: Add our own READABLE,
WRITABLE and READWRITE paramspec flags, declaring the
string components of the properties GParamSpec as static;
this should shave off some bytes in the memory footprint
and avoid relocations.
* clutter/clutter-actor.c:
* clutter/clutter-behaviour.c:
* clutter/clutter-behaviour-opacity.c:
* clutter/clutter-behaviour-path.c:
* clutter/clutter-behavuour-scale.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-label.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-stage.c:
* clutter/clutter-texture.c:
* clutter/clutter-timeline.c: Use the CLUTTER_PARAM_*
macros we just added.
* clutter/clutter-behaviour-scale.c: Add properties for
the scale begin, scale end and gravity parameters.
* clutter/clutter-behaviour-path.h: Mark the ClutterKnot
memory management functions as public (for the bindings),
since we use the slice allocator for copying knots around;
add a clutter_knot_equal() function.
* clutter/clutter-behaviour-path.c:
(node_distance): Use clutter_knot_equal() as a fast path
to avoid the sqrt() in case the nodes we are using are
at the same position.
(path_total_length): Additional check on the existence
of the next node.
* examples/behave.c: Do not leak the ClutterBehaviour
objects around.
* clutter/clutter-actor.c:
* clutter/clutter-alpha.c:
* clutter/clutter-behaviour-opacity.c:
* clutter/clutter-behaviour-scale.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-feature.c:
* clutter/clutter-label.c:
* clutter/clutter-main.c:
* clutter/clutter-stage.c:
* clutter/clutter-texture.c
* clutter/clutter-timeline.c:
* clutter/clutter-debug.h:
Make CLUTTER_NOTE() just take a string rather than a func.
Add more default context to output.
* configure.ac:
Fix flag and add more help docs for --ebable-debug option.
* configure.ac: Enable debug messages also when
--enable-debug is set to "minimum".
* clutter/Makefile.am:
* clutter/clutter-debug.h: Move all debugging macros inside
this private header; make all debug macros depend on the
CLUTTER_ENABLE_DEBUG compile time define, controlled by
the --enable-debug configure switch; add G_LOG_DOMAIN define.
* clutter/clutter-main.c: Clean up the debug stuff; add
command line argument parsing using GOption; the debug
messages now are triggered like this:
CLUTTER_DEBUG=section:section:... clutter-app
or like this:
clutter-app --clutter-debug=section:section:...
where "section" is one of the sections listed in clutter-main.c,
or "all", for all sections; each section is bound to a flag,
which can be used to define a domain when adding a debug note
using the CLUTTER_NOTE() macro; the old CLUTTER_DBG() macro is
just a wrapper around that, under the CLUTTER_DEBUG_MISC domain;
CLUTTER_NOTE() is used like this:
CLUTTER_NOTE (DOMAIN, log-function);
where log function is g_printerr(), g_message(), g_warning(),
g_critical() or directly g_log() - for instance:
CLUTTER_NOTE (PANGO, g_warning ("Cache miss: %d", glyph));
will print the warning only if the "pango" flag has been
set to the CLUTTER_DEBUG envvar or passed to the --clutter-debug
command line argument.
similar to CLUTTER_SHOW_FPS, there's also the --clutter-show-fps
command line switch; also, the --display and --screen command
line switches have been added: the first overrides the DISPLAY
envvar and the second controls the X screen used by Clutter to
get the root window on the display.
* clutter/clutter-main.h:
* clutter/clutter-main.c: Add extended support for GOption
in Clutter; use clutter_init_with_args() to let Clutter
parse your own command line arguments; use instead
clutter_get_option_group() to get the GOptionGroup used by
Clutter if you want to do the parsing yourself with
g_option_context_parse(). The init sequence has been verified,
updated and moved into common functions where possible.
* clutter/pango/pangoclutter-render.c:
* clutter/*.c: Include "clutter-debug.h" where needed; use
CLUTTER_NOTE() instead of CLUTTER_DBG().
* examples/super-oh.c: Use the new clutter_init_with_args()
function, and add a --num-hands command line switch to
the SuperOH example code controlling the number of hands at
runtime.
* TODO:
Update.
* clutter/clutter-group.c:
Attempt better group sizing code.
* clutter/clutter-label.c:
Minor tweaks.
* clutter/clutter-texture.c:
More debug info, make sure texture is realised for base_size()
* clutter/clutter-video-texture.c:
Seeking fixes
* examples/test.c: (main):
Populate with more randomness.
* clutter/clutter-main.c:
* clutter/clutter-private.h:
* clutter/clutter-stage.c:
Rework and fix offscreen rendering, also rejig GLX
context handling, moving mostly into stage.
Require at least OpenGL 1.2 ( CLAMP_TO_EDGE )
* clutter/clutter-texture.c:
Explicity set props on _init() as to avoid nasty can_create
bug failing miserably in certain situations.
Switch to CLAMP_TO_EDGE for textures to avoid tile seams.
Add some more GL error checks.
* clutter/clutter-label.c:
Extra debug info
* configure.ac:
Require gdk-pixbuf-xlib-2.0
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.