Commit Graph

1113 Commits

Author SHA1 Message Date
Debarshi Ray
d154a10fa0 cookbook/examples: Don't mix up height and width while splitting
Fixes: https://bugzilla.gnome.org/675998
2012-05-31 11:50:58 +01:00
Bastian Winkler
7f6b17bc50 layout-manager: Add a new animation API
It's similar to to the implicit animation API of ClutterActor and
compatible to deprecated API of ClutterBoxLayout and
ClutterTableLayout.

It adds :use-animations, :easing-mode, :easing-duration and
:easing-delay properties to control animations when allocation of a
child has changed. Layout manager implementers should call

use_animations = clutter_layout_manager_get_easing_state (manager,
                                                          &mode,
                                                          &duration,
                                                          &delay);

from the allocate() virtual function to access these values.

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:10 +02:00
Emmanuele Bassi
129752e560 event: Add convenience functions for Shift and Ctrl modifiers
Instead of going through clutter_event_get_state() and checking if the
modifier mask is set, we can provide simple convenience functions to do
it for us.
2012-05-25 11:33:57 +01:00
Emmanuele Bassi
e88e7cd414 docs: Disable deprecations when building the object scanner
We know it's going to be using deprecated symbols, since it has to
introspect all the GObject classes we expose.
2012-05-03 11:28:04 +01:00
Emmanuele Bassi
8a8cc20d93 docs: Move ClutterAnimationMode's documentation
Given that ClutterAnimation is going to be deprecated, we should move
the ClutterAnimationMode enumeration to the ClutterTimeline section.
2012-05-02 18:38:20 +01:00
Emmanuele Bassi
53014bd781 docs: Replace unknown <envvar> tag with <varname> 2012-04-30 18:26:06 +01:00
Emmanuele Bassi
155e0eee89 docs: Add missing symbols to the sections file 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
a5630d962f docs: Clean up index
Move CairoTexture to the deprecated section.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
23f3edce61 docs: Add ScrollActor to the API reference 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
0b76ba332d Fixes for the API reference
Typos, missing symbols, and missing documentation.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
076179f20b docs: Clean up the animation section 2012-04-27 12:30:48 +01:00
Emmanuele Bassi
024f6d40d2 keyframe-transition: Add direct accessors for key frames
This should allow modifying key frame details without requiring a full
reset of the KeyframeTransition instance.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
c500fc1844 Add ClutterTransitionGroup
The TransitionGroup class is a logical container for running multiple
transitions.

TransitionGroup is not a Score: it is a Transition that advances each
Transition it contains using the delta between frames, and ensures that
all transitions are in a consistent state; these transitions are not
advanced by the master clock.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
270894342e Add ClutterKeyframeTransition
A simple transition class that interpolates a property between key
frames.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
a9cc06257f docs: Add a reference section for geometric types 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
854c246a2b docs: Add the 1.12 symbols index to the API reference 2012-04-26 13:58:06 +01:00
Emmanuele Bassi
1e639cd0ee docs: Reorganize the API reference index 2012-03-20 13:06:48 +00:00
Emmanuele Bassi
073ec80c05 cookbook/examples: Use real implicit animations
Instead of clutter_actor_animate().
2012-03-19 18:10:26 +00:00
Emmanuele Bassi
28266a59ed docs: Fixes for the API reference 2012-03-19 14:57:46 +00:00
Emmanuele Bassi
82bc728584 Add initializer utilities for ClutterVertex
Similar to what we did for ClutterActorBox.
2012-03-17 16:29:09 +00:00
Emmanuele Bassi
5e9d6f7257 Add some utility initializers to ClutterActorBox 2012-03-17 15:27:26 +00:00
Emmanuele Bassi
a3007b9847 build: Remove maintainer flags from cookbook/examples
The code should be a tad more relaxed.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
8904f7cbe4 paint-nodes: Make part of the API internal
At least for the time being, we only expose the parts of the API that we
want to use internally and for new, out-of-tree Content implementations.

The full PaintNode tree API will be made public in 1.12 once we branch
master.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
74f5bbe5aa docs: Fixes for ClutterImage's API reference 2012-03-16 12:33:39 +00:00
Emmanuele Bassi
0a2ee1709b docs: Fixes for the API reference 2012-03-16 12:33:39 +00:00
Emmanuele Bassi
75e6560160 image: Add set_area() method
This method allows replacing an area inside the texture data used by a
ClutterImage.
2012-03-16 12:33:39 +00:00
Emmanuele Bassi
2be850f441 image: Add get_texture()
Allow retrieving the Cogl texture used by the ClutterImage.
2012-03-16 12:33:39 +00:00
Emmanuele Bassi
b6403b01a1 Documentation fixes 2012-03-16 12:33:38 +00:00
Emmanuele Bassi
07bb35bbe3 Add ClutterCanvas, a drawing content 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
2ee5851970 docs: Update the API reference
Add all the new symbols.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
9e1ec82838 doc: Reference fixes 2012-03-15 17:01:14 +00:00
Emmanuele Bassi
4bd3583dbf actor: Add generic transition support
ClutterActor should be able to hold all transitions, even the ones that
have been explicitly created.

This will allow to add new transitions types in the future, like the
keyframe-based one, or the transition group.
2012-03-15 17:01:14 +00:00
Emmanuele Bassi
388f818f41 timeline: Add more state accessors
It should be possible to ask a timeline what is its duration, taking
into account eventual repeats, and which repeat is the one currently
in progress.

These two functions allow writing animations that depend on the current
state of another timeline.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
1511e588df actor: Add delay to the easing state
It should be possible to set up the delay of a transition, but since
we start the Transition instance before returning control to the caller,
we cannot use clutter_actor_get_transition() to do it without something
extra-awkward, like:

  transition = clutter_actor_get_transition (actor, "width");
  clutter_timeline_stop (transition);
  clutter_timeline_set_delay (transition, 1000);
  clutter_timeline_start (transition);

for each property involved. It's much easier to add a delay to the
easing state of an actor.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
043cf6b284 docs: Update the API reference 2012-03-15 17:01:13 +00:00
Emmanuele Bassi
06314e9ed8 docs: Update reference symbols 2012-03-15 17:00:38 +00:00
Joseph Scheuhammer
32f57595fe Add brightness/contrast effect
The ClutterBrightnessContrastEffect effect class allows changing the
brightness and contrast levels of an actor.

Modified-by: Emmanuele Bassi <ebassi@linux.intel.com>
Modified-by: Neil Roberts <neil@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2012-03-07 14:02:55 +00:00
Emmanuele Bassi
229607464b Improve repaint functions
It is sometimes useful to be able to have better control on when a
repaint function is called. Currently, all repaint functions are called
prior to the stages update phase of the frame processing.

We can introduce flags to represent the point in the frame update
process in which we wish Clutter called the repaint function.

As a bonus, we can also add a flag that causes adding a repaint function
to spin the master clock.
2012-03-06 12:09:00 +00:00
Emmanuele Bassi
a8d8005800 docs: Updates to the API reference 2012-03-05 23:45:40 +00:00
Neil Roberts
13e3f9e5f1 Add an input device function to convert keycodes to evdev codes
This adds a virtual function to ClutterInputDevice to translate a
keycode from the hardware_keycode member of ClutterKeyEvent to an
evdev keycode. The function can fail so that input backends that don't
have a sensible way to translate to evdev keycodes can return FALSE.
There are implementations for evdev, wayland and X. The X
implementation assumes that the X server is using an evdev driver in
which case the hardware keycodes are the evdev codes plus 8.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Emmanuele Bassi
c465881726 docs: Refresh the layout managers example image
Drop the window decoration and pointer; drop the double image for the
FlowLayout class; add an image for the TableLayout class.
2012-02-29 15:20:58 +00:00
Emmanuele Bassi
7713d3bbdc docs: Update the actor example image 2012-02-29 15:20:58 +00:00
Emmanuele Bassi
7d4fa54a4b docs: Add new macros to the sections file 2012-02-27 16:03:09 +00:00
Emmanuele Bassi
e4c948b150 actor: Add a method for computing the default paint volume
Now that ClutterActor has a default paint volume, subclasses may wish
to retrieve it without chaining up to the parent's implementation of
the get_paint_volume() function.

The get_default_paint_volume() returns a ClutterPaintVolume pointer
to the paint volume as computed by the default implementation of the
get_paint_volume() virtual function; it can only be used immediately,
as it's not guaranteed to survive across multiple frames.
2012-02-27 11:59:57 +00:00
Emmanuele Bassi
6a09bf5b52 paint-volume: Add a union method for boxes
Creating PaintVolume instances is not possible, and it's not recommended
anyway. It is, though, necessary to union paint volumes, especially with
2D boxes, in some cases.

Clutter should provide a simple convenience function that allows
unioning volumes to boxes in a moderately efficient way.

https://bugzilla.gnome.org/show_bug.cgi?id=670021
2012-02-27 11:24:08 +00:00
Emmanuele Bassi
618e04e9cc cookbook/examples: Modernize the code
Use new and non-deprecated methods.
2012-02-27 10:59:46 +00:00
Emmanuele Bassi
0099bbf7d9 docs: Fix unused symbols 2012-02-23 11:50:43 +00:00
Emmanuele Bassi
7ec975ed3d timeline: Add progress functions
The whole progress computation should not be done using a separate
class: it should be part of the Timeline class.
2012-02-23 11:23:15 +00:00
Neil Roberts
041ac40056 offscreen-effect: Add clutter_offscreen_effect_get_texture
Sometimes a subclass of ClutterOffscreenEffect wants to paint with a
completely custom material. In that case it is awkward to modify the
material returned owned by ClutterOffscreenEffect so it makes more
sense to just get the texture and manage its own material.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Emmanuele Bassi
3996ae4348 actor: Add destroy_all_children()
There are times when we don't want to remove all children and count of
the reference count to drop to 0 to ensure destruction; there are cases,
such as managed environments, where it's preferable to ensure that the
children of an actor get actually destroyed.
2012-02-13 17:42:07 +00:00
Emmanuele Bassi
d808367fe4 docs: Use ClutterTimeline:repeat-count instead of :loop 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
657e0ce093 cookbook: Use clutter_timeline_set_repeat_count() 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
97feb06a6f timeline: Add repeat-count
Being able to easily set the number of repeats has been a request for
the animation framework for some time now. The usual way to implement
this is: connect to the ::completed signal, use a static counter, and
stop the timeline when the counter hits a specific spot.

In the same light as the :auto-reverse property, we can make it easier
to implement this common functionality by adding a :repeat-count
property that, when set, limits the amount of loops that a Timeline can
perform before stopping itself.

In fact, we can implement the :loop property in terms of the
:repeat-count property just by using a sentinel value mapping to
"infinity", and map loop=FALSE to repeat-count=0, and loop=TRUE to
repeat-count=-1.
2012-02-13 17:30:22 +00:00
Emmanuele Bassi
7ba9774572 text: Add the coords_to_position() method
The reverse of position_to_coords().

While providing documentation on how to implement it using the
PangoLayout API, I realized that the verbosity of it all, plus the usage
of the Pango API, was not worth it, and decided to expose the method we
are using internally.
2012-02-06 18:27:58 +00:00
Emmanuele Bassi
242de47c03 docs: Update the actor invariants
• Clear up what's deprecated.
• Remove mentions of set_parent/unparent, and use add_child/remove_child
  instead.
• Clarify that reparent may not touch the MAPPED state.
2012-02-02 11:07:14 +00:00
Emmanuele Bassi
2475443a87 Clean up the clutter API reference Makefile.am 2012-01-31 17:03:14 +00:00
Emmanuele Bassi
bb2d807d2a docs: Add an image for the XIncluded code 2012-01-31 16:46:03 +00:00
Emmanuele Bassi
59f3488fa9 docs: Add private macro CLUTTER_PRIVATE_FIELD 2012-01-31 16:44:07 +00:00
Kerrick Staley
4360fcccf4 Fix spelling in Clutter Cookbook: ouest -> west 2012-01-27 12:17:08 +00:00
Emmanuele Bassi
58ffcfb10e actor: Add ClutterActorIter
Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
54c9257f28 docs: Update to show the symbolic button names
https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:46:51 +00:00
Emmanuele Bassi
90397bf06c doc/cookbook: Remove dead link 2012-01-27 07:30:02 +00:00
Emmanuele Bassi
b2bf2dbb08 docs: Use symbolic constants for sources and events 2012-01-25 23:20:24 +00:00
Emmanuele Bassi
18ec12a3b7 cookbook: Start migrating to the new API
Drop mentions of deprecated classes and API, and update the inline
example code.

Still some way to go, and the cookbook would probably benefit from
having a recipe on how to use ClutterActor to build a scene.
2012-01-24 15:12:41 +00:00
Emmanuele Bassi
1c01554e6a cookbook: Begin porting examples to the new API
Start dropping the usage of deprecated classes and API.
2012-01-24 15:01:00 +00:00
Emmanuele Bassi
414f8c1a0f docs: Add missing function 2012-01-24 14:20:07 +00:00
Emmanuele Bassi
acf8aff6d5 docs: Add clutter_actor_set_allocation() 2012-01-19 13:14:47 +00:00
Emmanuele Bassi
5085c11bde Add ClutterTextBuffer to the API reference 2012-01-17 14:29:45 +00:00
Emmanuele Bassi
eb489a40de docs: Move deprecated sections to the proper location 2012-01-16 23:37:14 +00:00
Emmanuele Bassi
ad2cfc0150 docs: Fixes for the API reference 2012-01-16 23:37:14 +00:00
Emmanuele Bassi
86152f478d docs: Update the Actor API reference
Given the size and scope of the changes in ClutterActor, we ought to
rewrite the overall description of what an actor is, what it does, and
how are you supposed to use it and subclass it.
2012-01-16 23:37:11 +00:00
Emmanuele Bassi
88aaad9bdf docs: Add event propagation symbolic constants 2012-01-03 14:38:56 +00:00
Emmanuele Bassi
fd1196c7b5 docs/cookbook: Mention the event control macros
Now that we have symbolic names for event propagation values for signal
handlers, we ought to mention them in the cookbook.
2012-01-03 12:10:28 +00:00
Emmanuele Bassi
180eecbce6 docs: Document CLUTTER_ENABLE_DIAGNOSTIC
Add a note in the API reference.
2011-12-28 09:37:57 +00:00
Robert Bragg
16ed7677e0 Adds wayland-surface actor for wayland compositors
This adds a --enable-wayland-compositor configure option which will add
support for a ClutterWaylandSurface actor which can be used to aid in
writing Wayland compositors using Clutter by providing a ClutterActor to
represent Wayland client surfaces.

Notably this configure option isn't tied into any particular backend
since conceptually the compositor support can be used in conjunction
with any clutter backend that has corresponding Cogl support.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Robert Bragg
07c6f96cb4 wayland: Updates client side wayland support
This updates Wayland support in line with upstream changes to the Wayland
API and protocol.

This update means we no longer use the Cogl stub winsys so a lot of code
that had to manually interact with EGL and implement a swap_buffers
mechanism could be removed and instead we now depend on Cogl to handle
those things for us.

This update also adds an input device manager consistent with other
clutter backends.

Note: to use the client side "wayland" clutter backend you need to have
built Cogl with --enable-wayland-egl-platform. If Cogl has been built
with support for multiple winsys backends then you should run
applications with COGL_RENDERER=EGL in the environment.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Emmanuele Bassi
52ea1510a1 docs: Fixes for the API reference 2011-11-22 00:29:08 +00:00
Emmanuele Bassi
f5d011cb67 Merge branch 'deprecate-default-stage'
* deprecate-default-stage:
  evdev: do not associate device with stage
  evdev: don't even process events without a default stage
  docs: Note default stage deprecation in README
  docs: Remove clutter_stage_get_default()
  stage: Deprecate the default stage
  script: Do not use clutter_stage_get_default()
  cally/actor: Do not use the default stage as a fallback
  Try to mop up the default stage mess
  performance/*: Do not use clutter_stage_get_default()
  interactive/*: Do not use clutter_stage_get_default()
  Merge with a11y
  micro-bench/*: Do not use clutter_stage_get_default()
  accessibility/*: Do not use clutter_stage_get_default()
  conform/*: Do not use clutter_stage_get_default()
2011-11-14 11:07:54 +00:00
Rico Tzschichholz
b12a94dc27 docs: fix some headers paths 2011-11-10 19:05:39 +01:00
Emmanuele Bassi
26aa4b5290 docs: Remove clutter_stage_get_default()
A lot of the example code in the cookbook and the API reference still
uses the default stage — sometimes as if it were a non-default one,
which once again demonstrates how the default stage was a flawed concept
that just confused people.
2011-11-10 15:37:51 +00:00
Emmanuele Bassi
683642ba54 docs: Fixes for the API reference build 2011-11-03 16:05:36 +00:00
Emmanuele Bassi
7ab84f981c Remove CLUTTER_DISABLE_DEPRECATED from the build flags
We don't use it any more.
2011-11-03 15:35:01 +00:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
3cc62523e6 docs: Clean up the 'running Clutter apps' chapter 2011-10-17 10:25:20 +01:00
Emmanuele Bassi
31bee53eb7 docs: Fixes to build the API reference 2011-10-11 18:25:14 +01:00
Emmanuele Bassi
6c100e1513 docs: Move deprecated classes out of the way
The deprecated sections should be much more prominently separated from
the current API; we can use a new part inside the main reference index
for this.
2011-10-11 17:58:40 +01:00
Emmanuele Bassi
2d2046f962 docs: Document the settings.ini file
Describe the location, groups, and keys of the settings.ini file used by
Clutter.
2011-10-11 17:52:17 +01:00
Emmanuele Bassi
b1fbbe23b4 Revert "Add lightness, brightness, and contrast effects"
Discussed a bit with Neil, and I might have jumped the gun a little.
We might want a different API for 1.10. See comment 12 on:

https://bugzilla.gnome.org/show_bug.cgi?id=656156

This reverts commit 4829ae1c79.
2011-09-28 15:54:32 +01:00
Joseph Scheuhammer
4829ae1c79 Add lightness, brightness, and contrast effects
Added three classes for new clutter effects:  inverse lightness,
modify brightness, and modify contrast.

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2011-09-28 10:32:15 -04:00
Emmanuele Bassi
a9a104e109 docs: Fixes for cross-references 2011-09-12 13:12:14 +01:00
Emmanuele Bassi
2a56cc799a docs: Remove unused cogl-2.0 directory
The Cogl API reference has long since moved out of the Clutter tree.
2011-09-12 13:05:16 +01:00
Emmanuele Bassi
802b9d463c docs: Update the HACKING file 2011-09-09 12:17:03 +01:00
Emmanuele Bassi
9a78eacb72 build: Fix distcheck in cookbook/examples 2011-09-05 21:16:01 +01:00
Emmanuele Bassi
9c9926654c docs: Remove the 1.8 index for Cally
No new API has been added in during the 1.7 development cycle.
2011-09-02 14:53:56 +01:00
Emmanuele Bassi
4b7552f001 docs: Add missing clutter_backend_get_cogl_context symbol 2011-09-02 14:53:55 +01:00
Emmanuele Bassi
72caef0de0 cookbooks/examples: Use g_signal_handlers_disconnect_by_func()
The disconnect_matched() function is a bit too complicated, and its
simpler wrapper disconnect_by_func() is functionally equivalent in the
cases used by the cookbook examples.
2011-09-02 12:19:30 +01:00
Emmanuele Bassi
2557370445 docs/cookbook: Update the introduction
Clean up some wording.
2011-09-01 16:06:04 +01:00
Emmanuele Bassi
b0f868edfd build: Install the cookbook examples code
Use $(datadir)/clutter-1.0/cookbook/examples as the target directory.
2011-09-01 13:51:20 +01:00
Emmanuele Bassi
e03fb1e872 docs/cookbook: Update copyright 2011-08-31 12:27:30 +01:00
Emmanuele Bassi
3bdd49dc19 docs/cookbook: Add script->state connection recipe
Script definitions can connect a signal to a State transition; this is a
useful thing to document with a recipe in the cookbook.
2011-08-31 12:25:01 +01:00
Emmanuele Bassi
a661191b4b docs/cookbook: Point out that Cogl does not do AA drawing 2011-08-22 13:15:42 +01:00
Emmanuele Bassi
010fc072f9 docs/cookbook: Update the link to the GObject reference 2011-08-22 12:33:20 +01:00
Emmanuele Bassi
8ea6b7912e docs: Fix up the unused symbols warning 2011-08-15 14:08:57 +01:00
Emmanuele Bassi
aaa000acbf docs: Fix up warnings in Cally's reference API 2011-08-15 14:08:28 +01:00
Emmanuele Bassi
fe66575a2c docs: Update with the newly added Animatable symbol 2011-07-29 11:53:16 +01:00
Emmanuele Bassi
7f8838d7cc cairo-texture: Add the :auto-resize property
Keeping the backing Cairo surface of a CairoTexture canvas in sync with
the actor's allocation is tedious and prone to mistakes. We can
definitely do better by simply exposing a property that does the surface
resize and invalidation automagically on ::allocate.
2011-07-26 14:55:19 +01:00
Emmanuele Bassi
2f445682b1 cairo-texture: Use signal-based drawing
The current "create context/draw/destroy context" pattern presents
various problems. The first issue is that it defers memory management to
the caller of the create() or create_region() methods, which makes
bookkeeping of the cairo_t* harder for language bindings and third party
libraries. The second issue is that, while it's easier for
draw-and-forget texturs, this API is needlessly complicated for contents
that have to change programmatically - and it introduces constraints
like calling the drawing code explicitly after a surface resize (e.g.
inside an allocate() implementation).

By using a signal-based approach we can make the CairoTexture actor
behave like other actors, and like other libraries using Cairo as their
2D drawing API.

The semantics of the newly-introduced ::draw signal are the same as the
one used by GTK+:

  - the signal is emitted on invalidation;
  - the cairo_t* context is owned by the actor;
  - it is safe to have multiple callbacks attached to the same
    signal, to allow composition;
  - the cairo_t* is already clipped to the invalidated area, so
    that Cairo can discard geometry immediately before we upload
    the texture data.

There are possible future improvements, like coalescing multiple
invalidations inside regions, and performing clipped draws during
the paint cycle; we could even perform clipped redraws if we know the
extent of the invalidated area.
2011-07-26 12:40:52 +01:00
Emmanuele Bassi
c89de4324e docs: Remove manual/
The programmers manual never materialized, and its role has been taken
by both the cookbook and the API reference.
2011-07-20 11:32:15 +01:00
Emmanuele Bassi
5cc5e566e6 docs: Add fixed size and constraints to the size negotiation docs 2011-07-19 14:11:11 +01:00
Emmanuele Bassi
48a2b3a654 docs: Rename the invariants documentation 2011-07-19 14:02:59 +01:00
Emmanuele Bassi
c1951ab17a docs: Add a simple description of the size negotiation mechanism
Describe (with an example) the ordering and meaning of flags for the
size negotiation in ClutterActor.
2011-07-19 14:01:30 +01:00
Neil Roberts
a72237b876 clutter-stage: Add clutter_stage_get_redraw_clip_bounds
This adds a public function to get the bounds of the current clipped
redraw on a stage. This should only be called while the stage is being
painted. The function diverts to a virtual function on the
ClutterStageWindow implementation. If the function isn't implemented
or it returns FALSE then the entire stage is reported. The clip bounds
are in integer pixel coordinates in the stage's coordinate space.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2421
2011-07-13 13:54:50 +01:00
Neil Roberts
0a83e03afb doc/RELEASING: Fix the check for diffs from origin/master
The recommended command to check for differences from master to the
remote master was using git log with a range from the local master to
the remote master but this wouldn't work if the local master is ahead
of the remote master because the range is backwards. This patch
changes it to recommend git diff --stat instead because then the
command would work even if the two branches have diverged.
2011-06-29 16:16:25 +01:00
Emmanuele Bassi
0788c85df1 docs: Remove the in-tree cogl fixxref option
Cogl has been moved out of tree.
2011-06-21 10:52:44 +01:00
Emmanuele Bassi
459e1e7fc9 docs: Fix the GLX section
The whole thing should just go away.
2011-06-20 19:45:14 +01:00
Emmanuele Bassi
34cbc0e94c docs: Fix up labels in the constraint example image 2011-06-20 19:44:33 +01:00
Emmanuele Bassi
f971c2cb11 docs: Add the (now deprecated) GLX texture-pixmap
It was missing from the API reference.
2011-06-20 18:48:49 +01:00
Emmanuele Bassi
948461b8f2 docs: Fix duplicate symbol in the sections list 2011-06-20 18:40:31 +01:00
Emmanuele Bassi
e5641dabf8 docs: Document ClutterDropAction
And add it to the API reference.

https://bugzilla.gnome.org/show_bug.cgi?id=652842
2011-06-20 15:25:54 +01:00
Emmanuele Bassi
e4756fd764 docs: Fix up the API reference 2011-06-20 14:26:57 +01:00
Emmanuele Bassi
3861a1c3ba build: Update the API reference build
Add the Cogl prefix to the fix-cross-references script options, and
update the location of the extra headers.
2011-06-20 13:56:46 +01:00
Emmanuele Bassi
5ded02cd08 docs: Add symbols index for 1.8 2011-06-14 01:02:09 +01:00
Emmanuele Bassi
86d96dbcc1 build: Put back ChangeLog.pre-git-import to unbreak distcheck 2011-06-13 23:15:17 +01:00
Philippe Normand
494629d4b9 clutter-text: new clutter_text_get_layout_offsets API
This new function can be used to retrieve the coordinates where the
ClutterText will draw the PangoLayout representing the text.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2553
2011-06-13 16:15:22 +01:00
Emmanuele Bassi
165b2f9599 docs: Fix Clutter API reference 2011-06-13 15:36:07 +01:00
Emmanuele Bassi
cd2b36ed91 Merge branch 'swipe-action'
* swipe-action:
  test-swipe-action: Clean up the test code
  docs: Add the new actions to the API reference
  gesture-action: Remove the multi-device entry points
  swipe-action: Remove the required devices call
  swipe-action: Clean up
  gesture-action: Clean up
  Add ClutterSwipeAction and ClutterGestureAction
2011-06-13 14:39:03 +01:00
Emmanuele Bassi
4f0769d69d docs: Update missing documentation 2011-06-13 13:47:09 +01:00
Emmanuele Bassi
9b4ad40f04 docs: Add the new actions to the API reference
http://bugzilla.clutter-project.org/show_bug.cgi?id=2585
2011-06-10 15:15:15 +01:00
Emmanuele Bassi
7d1d1acbbb docs: Update the releasing checklist 2011-06-09 15:58:34 +01:00
Emmanuele Bassi
4944a5e7d1 Move some old doc files under doc/
ChangeLog.pre-git-import is useless since the Git log contains the
pre-Git history anyway.

AUTHORS is not really useful, as many more people have been committing
to Clutter for a while now.
2011-06-09 15:53:29 +01:00
Emmanuele Bassi
9636a4f125 docs: Fix up new symbols for the API reference 2011-06-09 15:40:57 +01:00
Emmanuele Bassi
2b81d90dd7 Eliminate G_CONST_RETURN
The G_CONST_RETURN define in GLib is, and has always been, a bit fuzzy.

We always used it to conform to the platform, at least for public-facing
API.

At first I assumed it has something to do with brain-damaged compilers
or with weird platforms where const was not really supported; sadly,
it's something much, much worse: it's a define that can be toggled at
compile-time to remove const from the signature of public API. This is a
truly terrifying feature that I assume was added in the past century,
and whose inception clearly had something to do with massive doses of
absynthe and opium — because any other explanation would make the
existence of such a feature even worse than assuming drugs had anything
to do with it.

Anyway, and pleasing the gods, this dubious feature is being
removed/deprecated in GLib; see bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=644611

Before deprecation, though, we should just remove its usage from the
whole API. We should especially remove its usage from Cally's internals,
since there it never made sense in the first place.
2011-06-07 16:06:24 +01:00
Neil Roberts
7d233241f1 Fix include location for cogl-pango.h
In Cogl, cogl-pango.h has moved to <cogl-pango/cogl-pango.h>. When
using the experimental 2.0 API (which Clutter does) it is no longer
possible to include it under the old name of <cogl/cogl-pango.h> so we
need to update the include location.
2011-05-16 16:04:27 +01:00
Neil Roberts
701440efd8 clutter-actor: Add a 'has_overlaps' virtual
This adds a virtual to ClutterActor so that an actor subclass can
report whether it has overlapping primitives. ClutterActor uses this
to determine whether it needs to use ClutterFlattenEffect to implement
the opacity property. The default implementation of the virtual
returns TRUE which means that most actors will end up being redirected
offscreen when the opacity != 255. ClutterTexture and ClutterRectangle
override this to return FALSE because they should never need to be
redirected. ClutterClone overrides it to divert to the source.

The values for the ClutterOffscreenRedirect enum have changed to:

AUTOMATIC_FOR_OPACITY

 The actor will only be redirected if has_overlaps returns TRUE and
 the opacity is < 255

ALWAYS_FOR_OPACITY

 The actor will always be redirected if the opacity < 255 regardless
 of the return value of has_overlaps

ALWAYS

 The actor will always be redirected offscreen.

This means that the property can't be used to prevent the actor from
being redirected but only to increase the likelihood that it will be
redirected.

ClutterActor now adds and removes the flatten effect depending on
whether flattening is needed directly in clutter_actor_paint(). There
are new internal versions of add/remove_effect that don't queue a
redraw. This means that ClutterFlattenEffect is now just a no-op
subclass of ClutterOffscreen. It is only needed because
ClutterOffscreen is abstract. Removing the effect also makes it so
that the cached image will be freed as soon as an actor is repainted
without being flattened.
2011-05-13 01:46:32 +01:00
Neil Roberts
7f78237ee5 clutter-actor: Add an 'offscreen-redirect' property
This adds a property which can be used to redirect the actor through
an FBO before painting so that it becomes flattened in an image. The
image can be used as a cache to avoid having to repaint the actor if
something unrelated in the scene changes. It can also be used to
implement correct opacity even if the actor has overlapping
primitives. The property is an enum that takes three values:

CLUTTER_OFFSCREEN_REDIRECT_NEVER: The default behaviour which is to
  never flatten the actor.

CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: The actor is always redirected
  through an FBO.

CLUTTER_OFFSCREEN_REDIRECT_ONLY_FOR_OPACITY: The actor is only
  redirected through an FBO if the paint opacity is not 255. This
  value would be used if the actor wants correct opacity. It will
  avoid the overhead of using an FBO whenever the actor is fully
  opaque.

The property is implemented by installing a ClutterFlattenEffect.
ClutterFlattenEffect is a new internal class which subclasses
ClutterOffscreen to redirect the painting to an FBO. When
ClutterOffscreen paints, the effect sets an opacity override on the
actor so that the image will always contain the actor at full
opacity. The opacity is then applied to the resulting image before
painting it to the stage. This means the actor does not need to be
redrawn while the opacity is being animated.

The effect has a high internal priority so that it will always occur
before any other effects and it gets hidden from the application.
2011-05-13 01:46:32 +01:00
Neil Roberts
00b733a85a clutter-effect: Add clutter_effect_queue_rerun
This adds a new public function to queue a rerun of an effect. If
nothing else queues a redraw then when the effect's actor is painted
the effect will be run without the CLUTTER_EFFECT_RUN_ACTOR_DIRTY
flag. This allows parametrised offscreen effects to report that they
need to redraw the image without having to redraw the underlying
actor. This will be used to implement the 'transparency' effect of
ClutterActor.

If multiple redraws are queued with different effects then redrawing
is started from the one that occurs last in the list of effects.

Internally the function is a wrapper around the new function
_clutter_actor_queue_redraw_full. This is intended to be the sole
point of code for queuing redraws on an actor. It has parameters for
the clip and the effect. The other two existing functions to queue a
redraw (one with a clip and one without) now wrap around this function
by passing a NULL effect.
2011-05-13 01:46:32 +01:00
Neil Roberts
c3aa4d24bf clutter-effect: Add a 'run' virtual
This adds a new virtual to ClutterEffect which is intended to be a
more flexible replacement for the pre and post_paint functions. The
implementation of a run virtual would look something like this:

void
effect_run (ClutterEffect *effect,
            ClutterEffectRunFlags flags)
{
  /* Set up state */
  /* ... */

  /* Chain to the next item in the paint sequence */
  clutter_actor_continue_paint (priv->actor);

  /* Clean up state */
  /* ... */
}

ClutterActor now just calls this virtual instead of the pre_paint and
post_paint functions. It keeps track of the next effect in the list so
that it knows what to do when clutter_actor_continue_paint is
called. clutter_actor_continue_paint is a new function added just for
implementing effects.

The default implementation of the run virtual just calls pre_paint and
post_paint so that existing effects will continue to work.

An effect is allowed to conditionally skip calling
clutter_actor_continue_paint(). This is useful to implement effects
that cache the image of an actor. The flags parameter can be used to
determine if the actor is dirty since the last paint. ClutterActor
sets this flag whenever propagated_one_redraw is TRUE which means that
a redraw for this actor or one of its children was queued.
2011-05-13 01:46:31 +01:00
Robert Bragg
223e14811c Removes Cogl from the repository
Cogl has now been split out into a standalone project with a separate
repository at git://git.gnome.org/cogl. From now on the Clutter build
will now simply look for a cogl-1.0 pkg-config file to find a suitable
Cogl library to link against at build time.
2011-05-06 15:44:08 +01:00
Robert Bragg
af366ad750 backend: remove untested fruity backend
This backend hasn't been used for years now and so because it is
untested code and almost certainly doesn't work any more it would be a
burdon to continue trying to maintain it. Considering that we are now
looking at moving OpenGL window system integration code down from
Clutter backends into Cogl that will be easier if we don't have to
consider this backend.
2011-04-11 17:54:36 +01:00
Elliot Smith
57a5f2296a docs: Remove checks for whether an effect is disabled
pre_paint() and post_paint() implementations don't need
to check whether an effect is disabled: Clutter will
not apply an effect unless it is enabled.

So remove code which checks whether the effect is
enabled or disabled from the example applications and the
documentation.
2011-03-17 15:56:55 +00:00
Elliot Smith
b5af8fbfac docs: Add recipe about implementing a ClutterEffect
Add a recipe showing how to implement two simple
effects, based on ClutterEffect: an always gray background,
and a border with configurable width and color.

Also explains the necessity to queue a redraw on
the associated actor if the effect's properties change,
and shows how to implement that.

The example gives the GObject code for both effects,
as well as an example application showing how to use them.
The example also demonstrates how to disable/enable an effect,
making the border round an actor togglable.
2011-03-17 15:56:55 +00:00
Elliot Smith
5732b1184f docs: Add example of setting background color with ClutterEffect
Add example of a simple background color effect applied via
pre_paint() implementation in a ClutterEffect subclass.

This is a simple effect with an incomplete GObject
implementation (no properties, setters or getters)
to make it as easy to follow as possible.
2011-03-17 15:56:55 +00:00
Elliot Smith
a81dbcf483 docs: Add example of a border added through ClutterEffect
Add a basic example showing how to implement a ClutterEffect
post_paint() function to overlay a highlight border over a
rectangular actor.
2011-03-17 15:56:55 +00:00
Emmanuele Bassi
6910be9b23 docs: Update RELEASING 2011-03-16 13:09:41 +00:00
Emmanuele Bassi
0c83e6a59a offscreen-effect: Add public accessor for target size
The OffscreenEffect class needs to expose a way for sub-classes to
track the size of FBO it creates, in case it has to do some geometry
deformations like the DeformEffect sub-classes.

Let's move the private symbol we used internally in 1.6 to fix
DeformEffect to the list of public symbols of OffscreenEffect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2570
2011-02-28 14:34:36 +00:00
Emmanuele Bassi
d3a7b7502e event: Add setters for ClutterEvent members
Creating a synthetic event requires direct access to the ClutterEvent
union members; this access does not map in bindings to high-level
languages, especially run-time bindings using GObject-Introspection.
It's also midly annoying from C, as it unnecessarily exposes the guts of
ClutterEvent - something we might want to fix in the future.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2575
2011-02-28 14:16:23 +00:00
nobled
aece642adb doc: fix clutter_init() usage in examples
Make sure users get the idea that clutter_init()
has a return value that needs to be checked.

These were fixed via sed magic:

sed -i -s -e "s/clutter_init (.*)/\
if (& != CLUTTER_INIT_SUCCESS)\n    return 1/"\
 doc/*/*/*.{c,xml} doc/*/*.xml

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
2011-02-28 14:10:05 +00:00
Elliot Smith
74de3cfdf3 docs: Add effects chapter, with introduction and first recipe
Add an effects chapter which gives a broad overview of
the abstract classes in the effects API, plus a short
example of how to apply one of the stock Clutter
effects (ClutterColorizeEffect).

The recipe explains how to create a custom ClutterDeformEffect
to produce a page fold (code based on ClutterPageTurnEffect).

The example code includes the effect class plus a small
application to apply it to a texture.
2011-02-21 16:44:09 +00:00
Emmanuele Bassi
5f9022b593 Merge remote-tracking branch 'elliot/cookbook-animations-path'
* elliot/cookbook-animations-path:
  docs: Add recipe for animating an actor on a curved path
2011-02-11 15:03:22 +00:00
Emmanuele Bassi
e9fa986ccc docs: Update the HACKING.backends documentation 2011-02-09 13:29:30 +00:00