1
0
Fork 0
Commit graph

126 commits

Author SHA1 Message Date
Emmanuele Bassi
c3ab32ae68 effect: Add OffscreenEffect
The OffscreenEffect class is meant to be used to implement Effect
sub-classes that create an offscreen framebuffer and redirect the
actor's paint sequence there. The OffscreenEffect is useful for
effects using fragment shaders.

Any shader-based effect being applied to an actor through an offscreen
buffer should be used before painting the resulting target material and
not for every actor. This means that doing:

       pre_paint: cogl_program_use(program)
                  set up offscreen buffer
           paint: [ actors ] → offscreen buffer → target material
      post_paint: paint target material
                  cogl_program_use(null)

Is not correct. Unfortunately, we cannot really do:

      post_paint: cogl_program_use(program)
                  paint target material
                  cogl_program_use(null)

Because the OffscreenEffect::post_paint() implementation also pops the
offscreen buffer and re-instates the previous framebuffer:

      post_paint: cogl_program_use(program)
                  change frame buffer ← ouch!
                  paint target material
                  cogl_program_use(null)

One way to fix it is to allow using the shader right before painting
the target material - which means adding a new virtual inside the
OffscreenEffect class vtable in additions to the ones defined by the
parent Effect class.

The newly-added paint_target() virtual allows the correct sequence of
actions by adding an entry point for sub-classes to wrap the "paint
target material" operation with custom code, in order to implement the
case above correctly as:

      post_paint: change frame buffer
                  cogl_program_use(program)
                  paint target material
                  cogl_program_use(null)

The added upside is that sub-classes of OffscreenEffect involving
shaders really just need to override the prepare() and paint_target()
virtuals, since the pre_paint() and post_paint() do all that's needed.
2010-06-03 14:10:55 +01:00
Emmanuele Bassi
a86f1b45bb Add the ClutterEffect abstract class
ClutterEffect is an abstract class that should be used to apply effects
on generic actors.

The ClutterEffect class just defines what an effect should implement; it
could be defined as an interface, but we might want to add some default
behavior dependent on the internal state at a later point.

The effect API applies to any actor, so we need to provide a way to
assign an effect to an actor, and let ClutterActor call the Effect
methods during the paint sequence.

Once an effect is attached to an actor we will perform the paint in this
order:

  • Effect::pre_paint()
  • Actor::paint signal emission
  • Effect::post_paint()

Since an effect might collide with the Shader class, we either allow a
shader or an effect for the time being.
2010-06-03 14:10:55 +01:00
Emmanuele Bassi
f6fce05ee9 action: Add ClickAction
ClickAction adds "clickable" semantics to an actor. It provides all
the business logic to emit a high-level "clicked" signal from the
various low-level signals inside ClutterActor.
2010-05-25 11:13:03 +01:00
Emmanuele Bassi
382bd394b9 Merge branch 'wip/state-machine'
* wip/state-machine:
  Do not use wildcards in test-state
  script: Implement State deserialization
  state: added a "target-state" property
  state: documented data structures
  Add State interactive tests to the ignore file
  state: Documentation and introspection annotation fixes
  state: Minor coding style fixes
  state: Clean up the header's documentation
  state: Constify StateKey accessors
  Do not include clutter.h from a Clutter header file
  state-machine: made clutter_state_change take a boolean animate argument
  state-machine: use clutter_timeline_get_progress
  state-machine: add completed signal
  state machine: added state machine

Conflicts:
	.gitignore
2010-05-24 10:42:03 +01:00
Øyvind Kolås
fcdc3a8989 state machine: added state machine 2010-05-20 16:24:29 +01:00
Emmanuele Bassi
f857457b9d constraints: Add AlignConstraint
AlignConstraint is a simple constraint that keeps an actor's position
aligned to the width or height of another actor, multiplied by an
alignment factor.
2010-05-19 13:02:43 +01:00
Emmanuele Bassi
769e964424 constraint: Add BindConstraint
The BindConstraint object is a constraint that binds the current
position of an actor on a given axis to the actor that has the
constraint applied.
2010-05-19 12:28:35 +01:00
Emmanuele Bassi
b842f0ad8e constraint: Add ClutterConstraint base class
The Constraint base, abstract class should be used to implement Actor
modifiers that affect the way an actor is sized or positioned inside a
fixed layout manager.
2010-05-19 12:28:30 +01:00
Emmanuele Bassi
4fd74e71e6 action: Add DragAction, an action implementing drag capabilities
DragAction is an Action sub-class that provides dragging capabilities to
any actor. DragAction has:

  • drag-begin, drag-motion and drag-end signals, relaying the event
    information like coordinates, button and modifiers to user code;

  • drag-threshold property, for delaying the drag start by a given
    amount of pixels;

  • drag-handle property, to allow using other actors as the drag
    handle.

  • drag-axis property, to allow constraining the dragging to a specific
    axis.

An interactive test demonstrating the various features is also provided.
2010-05-17 16:42:11 +01:00
Emmanuele Bassi
0e0db0d624 action: Add ClutterAction
ClutterAction is an abstract class that should be used as the ancestor
for objects that change how an actor behaves when dealing with events
coming from user input.
2010-05-17 16:42:10 +01:00
Emmanuele Bassi
c075d26fb2 actor: Add ActorMeta, a base class for actor modifiers
ClutterActorMeta is a base, abstract class that can be used to derive
classes that are attached to a ClutterActor instance in order to modify
the way an actor is painted, sized/positioned or responds to events.

A typed container for ActorMeta instances is also provided to the
sub-classes can be attached to an Actor.
2010-05-17 16:42:10 +01:00
Emmanuele Bassi
79acb088e7 Remove mentions of the FSF address
Since using addresses that might change is something that finally
the FSF acknowledge as a plausible scenario (after changing address
twice), the license blurb in the source files should use the URI
for getting the license in case the library did not come with it.

Not that URIs cannot possibly change, but at least it's easier to
set up a redirection at the same place.

As a side note: this commit closes the oldes bug in Clutter's bug
report tool.

http://bugzilla.openedhand.com/show_bug.cgi?id=521
2010-03-01 12:56:10 +00:00
Øyvind Kolås
4cc269a468 Add ClutterAnimator
ClutterAnimator is a class for managing the animation of multiple
properties of multiple actors over time with keyframing of values.

The Animator class is meant to be used to effectively describe
animations using the ClutterScript definition format, and to construct
complex implicit animations from the ground up.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-02-07 18:25:19 +00:00
Emmanuele Bassi
d23dd9af6b device: Make InputDevice an object and subclass it for X11
ClutterInputDevice should be a type that we can subclass per-backend
to add functionality.
2010-01-20 00:38:08 +00:00
Emmanuele Bassi
d34f1aa775 Add ClutterDeviceManager
The ClutterDeviceManager is a singleton object that behaves like the
StageManager: it holds all input devices and notifies on addition and
removal.
2010-01-20 00:38:07 +00:00
Emmanuele Bassi
b526b76593 layout: Add BoxLayout, a single line layout manager
The BoxLayout layout manager implements a layout policy for arranging
children on a single line, either alongside the X axis or alongside the
Y axis.
2009-10-14 11:31:48 +01:00
Emmanuele Bassi
5737cf869f [layout] Initial implementation of FlowLayout
FlowLayout is a layout manager that arranges its children in a
reflowing line; the orientation controls the major axis for the
layout: horizontal, for reflow on the Y axis, and vertical, for
reflow on the X axis.
2009-10-14 11:31:30 +01:00
Emmanuele Bassi
a2086f1178 [layout] Add LayoutMeta
Instead of overloading ClutterChildMeta with both container and layout
metadata and delegate to every LayoutManager implementation to keep a
backpointer to the layout manager instance, we can simply subclass
ChildMeta into LayoutMeta and presto! everything works out pretty well
for everyone.
2009-10-14 11:31:26 +01:00
Emmanuele Bassi
1061ebeac9 [layout] Add BinLayout
A BinLayout is a simple layout manager that allocates a single cell,
providing alignment on both the horizontal and vertical axis.

If the container associated to the BinLayout has more than one child,
the preferred size returned by the layout manager will be as big as
the maximum of the children preferred sizes; the allocation will be
applied to all children - but it will still depend on each child
preferred size and the BinLayout horizontal and vertical alignment
properties.

The supported alignment properties are:

  * center: align the child by centering it
  * start: align the child at the top or left border of the layout
  * end: align the child at the bottom or right border of the layout
  * fill: expand the child to fill the size of the layout
  * fixed: let the child position itself
2009-10-14 11:27:19 +01:00
Emmanuele Bassi
6d4cc13f7c [layout] Add Fixed layout manager
The FixedLayout layout manager object implements the same layout
policy of ClutterGroup.
2009-10-14 11:27:18 +01:00
Emmanuele Bassi
0340f65634 [box] Add ClutterBox
ClutterBox is an actor with no layout management. It relies on
a ClutterLayoutManager to perform size requisition and allocation
of its children.
2009-10-14 11:27:18 +01:00
Emmanuele Bassi
d6183e95e5 [layout] Add initial implementation of LayoutManager
The LayoutManager class is an abstract proxy for the size requesition
and size allocation process in ClutterActor.

A ClutterLayoutManager sub-class must implement get_preferred_width(),
get_preferred_height() and allocate(); a ClutterContainer using the
LayoutManager API will then proxy the corresponding Actor virtual
functions to the LayoutManager instance. This allows having a generic
"blank" ClutterActor sub-class, implementing the ClutterContainer
interface, which leaves only the layout management implementation to
the application developers.
2009-10-14 11:27:18 +01:00
Emmanuele Bassi
6988744db7 [stage] Rework the Stage implementation class
Instead of using ClutterActor for the base class of the Stage
implementation we should extend the StageWindow interface with
the required bits (geometry, realization) and use a simple object
class.

This require a wee bit of changes across Backend, Stage and
StageWindow, even though it's mostly re-shuffling.

First of all, StageWindow should get new virtual functions:

  * geometry:
    - resize()
    - get_geometry()

  * realization
    - realize()
    - unrealize()

This covers all the bits that we use from ClutterActor currently
inside the stage implementations.

The ClutterBackend::create_stage() virtual function should create
a StageWindow, and not an Actor (it should always have been; the
fact that it returned an Actor was a leak of the black magic going
on underneath). Since we never guaranteed ABI compatibility for
the Backend class, this is not a problem.

Internally to ClutterStage we can finally drop the shenanigans of
setting/unsetting actor flags on the implementation: if the realization
succeeds, for instance, we set the REALIZED flag on the Stage and
we're done.

As an initial proof of concept, the X11 and GLX stage implementations
have been ported to the New World Order(tm) and show no regressions.
2009-09-08 10:52:58 +01:00
Emmanuele Bassi
ed2fe41b32 Add more deprecation notices
Most of the deprecated API does not have an entry inside
clutter-deprecated.h, thus making porting a tad more difficult.
2009-03-13 14:29:27 +00:00
Emmanuele Bassi
86e95a779a Remove CloneTexture from the API
ClutterClone supercedes ClutterCloneTexture, since it can clone
every kind of actor -- including composite ones.

This is another "brain surgery with a shotgun" kind of commit: it
removes CloneTexture and updates every test case using CloneTexture
to ClutterClone. The API fallout is minimal, luckily for us.
2009-01-27 15:18:45 +00:00
Emmanuele Bassi
9197646d25 Rename ActorClone to Clone/1
Step one of the ActorClone -> Clone renaming: rename the files.
2009-01-26 10:32:53 +00:00
Robert Bragg
df7480090d Implements a generic ClutterActorClone that doesn't need fbos.
Many use cases for clonning an actor don't require running a shader on the
resulting clone image and so requiring FBOs in these cases is overkill and
in-efficient as it requires kicking and synchronizing a render for each clone.

This approach basically just uses the paint function of another actor to
implement the painting for the clone actor with some fiddling of the model-
view matrix to scale according to the different allocation box sizes of
each of the actors.

A simple unit test called test-actors2 was added for testing.
2009-01-19 16:23:49 +00:00
Emmanuele Bassi
41386a5f72 Remove the Effects API
The Effects API and all related symbols have been superceded by
the newly added Animation API and clutter_actor_animate().

This commit removes the Effects implementation, the documentation
and the interactive test/example code.
2009-01-14 16:56:21 +00:00
Emmanuele Bassi
a074106ded Merge branch 'animation-improvements'
* animation-improvements:
  [docs] Add ClutterAnimatable to the API reference
  Add license notice to ClutterAnimation files
  [docs] Update the ClutterAnimation section
  [animation] Extend ClutterAnimation support to all objects
  [animation] Use ClutterAnimatable inside Animation
  [animation] Add ClutterAnimatable
  [animation] Allow registering custom progress function
  [animation] Interval::compute_value should return a boolean
  Animate ClutterColor properties
2009-01-14 15:00:44 +00:00
Emmanuele Bassi
24808e20b3 [animation] Add ClutterAnimatable
The ClutterAnimatable interface is meant to be used by GObject
classes to override the value computation for an animatable
property within the boundaries of an interval.

It is composed of a single virtual function, animate_property();
its implementation will receive the ClutterAnimation used to
animate the object; the property name; the initial and final
interval values; and the progress factor as retrieved by the
Alpha object bound to the Animation instance.
2009-01-08 12:56:46 +00:00
Emmanuele Bassi
c54bd99097 Merge the ClutterText actor
Merge branch 'text-actor'

* text-actor: (108 commits)
  Re-align ClutterText header file
  [text] Fix cursor sizing
  Comments and whitespace fixes to ClutterText
  [docs] Add newly added :single-line-mode accessors
  Update the ignore file
  [tests] Add text field interactive test
  [text] Add single-line-mode to ClutterText
  [text] Fix the deletion actions
  [text] Use cached length when possible
  [tests] Add unit for the ClutterText:password-char property
  [docs] Update the Text section
  [text] Coalesce text visibility and password character
  Allow localizations to change the text direction
  Clean up the update_pango_context() function
  Pass the PangoContext, not the MainContext
  Revert the logic of the PangoContext check
  Remove the binding pool entry from the list
  Remove BindingPool::list_actions()
  Add ClutterActor::create_pango_context()
  Rename the PangoContext creation functions
  ...
2009-01-07 12:06:33 +00:00
Emmanuele Bassi
e934ad03ca Add ClutterCairoTexture
Move the ClutterCairo actor from a separate library to an in-tree
actor.

ClutterCairoTexture is a simple texture subclass that allows you
to retrieve a Cairo context for a private image surface. When the
Cairo context is destroyed it will cause the image surface
contents to be uploaded to a GL texture.

The image surface used is not hardware accelerated.
2008-12-11 15:34:47 +00:00
Emmanuele Bassi
5a1837bc9e Remove ClutterEntry and ClutterLabel from the build
For the time being, just don't include them or compile them; the
files will be removed from the repository as soon as all the
documentation annotations have been ported over to ClutterText.
2008-12-11 13:49:39 +00:00
Emmanuele Bassi
a98720ae19 Initial import of the Text actor from Tidy
The TidyText actor is meant as a replacement for both ClutterLabel
and ClutterText.

Any text-displaying and editing actor should derive from ClutterText
and implement the various visual cues to differentiate the editable
from the non-editable state. Those visual cues usually belong to
a high-level toolkit, especially if themeing is involved.
2008-12-11 11:12:48 +00:00
Emmanuele Bassi
4973b684a6 Resort the main Clutter include file
Just for overall sanity we keep the include file sorted.
2008-12-11 11:11:11 +00:00
Emmanuele Bassi
8a537b6299 2008-12-08 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/Makefile.am:
	* clutter/clutter.h: Add ClutterBindingPool to the build.

	* clutter/clutter-binding-pool.c:
	* clutter/clutter-binding-pool.h: Add ClutterBindingPool, a data
	structure meant to hold (key symbol, modifiers) pairs and associate
	them to a closure. The ClutterBindingPool can be used to install
	key bindings for actors and then execute closures inside the
	key-press-event signal handlers, removing the need for big
	switch() or if() blocks for each key.

	* clutter/clutter-event.c: Consistently use "key symbol" instead
	of "key value".

	* clutter/clutter-event.h: Add more modifier masks.

	* clutter/clutter-marshal.list:

	* tests/conform/Makefile.am:
	* tests/conform/test-binding-pool.c:
	* tests/conform/test-conform-main.c: Add ClutterBindingPool
	conformance test.

	* tests/interactive/Makefile.am:
	* tests/interactive/test-binding-pool.c: Add interactive test (and
	example code) for the ClutterBindingPool usage.
2008-12-08 13:57:10 +00:00
Neil Roberts
1a63414966 Bug 1252 - Merge ClutterBehaviourPath and ClutterBehaviourBspline
* clutter/clutter-path.h:
	* clutter/clutter-path.c: Implementation of new ClutterPath object
	to represent a path combining straight line and bezier curve
	elements.

	* clutter/clutter.h: Include clutter-path.h and remove
	clutter-behaviour-bspline.h

	* tests/interactive/test-threads.c (test_threads_main):
	* tests/interactive/test-script.c:
	* tests/interactive/test-behave.c (test_behave_main): Use new path
	API

	* clutter/clutter-effect.c: Use the new ClutterBehaviourPath API.

	* clutter/clutter-bezier.h:
	* clutter/clutter-bezier.c: Moved bezier curve handling code out
	from clutter-behaviour-bspline.c to a separate file.

	* clutter/clutter-behaviour-path.h:
	* clutter/clutter-behaviour-path.c: Reimplemented to work with a
	ClutterPath

	* clutter/clutter-behaviour-bspline.h:
	* clutter/clutter-behaviour-bspline.c: Removed

	* clutter/Makefile.am: Add clutter-path and clutter-bezier, remove
	clutter-behaviour-bspline.

	* tests/conform/test-path.c: New automatic test for ClutterPath
	consistency

	* tests/conform/test-conform-main.c (main): Add test_path

	* tests/conform/Makefile.am (test_conformance_SOURCES): Add
	test-path.c

	* clutter/clutter-sections.txt: Add ClutterPath docs

	* clutter/clutter.types:
	* clutter/clutter-docs.xml:
	* doc/reference/clutter/clutter-animation-tutorial.xml: Remove
	mention of ClutterBehaviourBspline

	* clutter/clutter-marshal.list: Add VOID:UINT
2008-12-05 13:13:37 +00:00
Emmanuele Bassi
5e9282bd79 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter.h: Add clutter-shader.h and
	clutter-shader-types.h to the global include.
2008-11-18 15:35:20 +00:00
Emmanuele Bassi
62844d5f04 2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1014 - Clutter Animation API Improvements

	* clutter/Makefile.am:
	* clutter/clutter.h: Update the build

	* clutter/clutter-types.h: Add AnimationMode, an enumeration
	for easing functions.

	* clutter/clutter-alpha.[ch]: Add the :mode property to
	control the function bound to an Alpha instance using an
	enumeration value. Also add six new alpha functions:

		- ease-in, ease-out, ease-in-out
		- sine-in, sine-out, sine-in-out

	* clutter/clutter-deprecated.h: Deprecate the #defines for
	the alpha functions. They will be replaced by entries in the
	ClutterAnimationMode.

	* clutter/clutter-interval.[ch]: Add ClutterInterval, an
	object for defining, validating and computing an interval
	between two values.

	* clutter/clutter-animation.[ch]: Add ClutterAnimation, an
	object responsible for animation the properties of a single
	actor along an interval of values. ClutterAnimation memory
	management is automatic. A simple wrapper method for
	ClutterActor is provided:

		clutter_actor_animate()

	which will create, or update, an animation for the passed
	actor.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a new 'animation' debug note.

	* clutter/clutter-script.c: Clean up the alpha functions
	whitelist, and add the new functions.

	* doc/reference/clutter/Makefile.am:
	* doc/reference/clutter/clutter-sections.txt: Update the
	API reference.

	* doc/reference/clutter/clutter-animation.xml: Renamed to
	doc/reference/clutter/clutter-animation-tutorial.xml to
	avoid clashes with the ClutterAnimation section.

	* doc/reference/clutter/clutter-docs.sgml: Renamed to
	doc/reference/clutter/clutter-docs.xml, as it was an XML
	file and not a SGML file.

	* tests/Makefile.am:
	* tests/interactive/Makefile.am:
	* tests/interactive/test-animation.c:
	* tests/interactive/test-easing.c: Add two tests for the
	new simple animation API and the easing functions.

	* tests/interactive/test-actors.c:
	* tests/interactive/test-behave.c:
	* tests/interactive/test-depth.c:
	* tests/interactive/test-effects.c:
	* tests/interactive/test-layout.c:
	* tests/interactive/test-multistage.c:
	* tests/interactive/test-paint-wrapper.c:
	* tests/interactive/test-rotate.c:
	* tests/interactive/test-scale.c:
	* tests/interactive/test-texture-quality.c:
	* tests/interactive/test-threads.c:
	* tests/interactive/test-viewport.c: Update interactive tests
	to the deprecations and new alpha API.
2008-11-18 09:50:03 +00:00
Emmanuele Bassi
a32eca26b6 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1212 - Allow only a single include file for Clutter

	* clutter/*.h: Only allow including clutter.h in third
	party code.

	* clutter/cogl/cogl-color.h:
	* clutter/cogl/cogl-fixed.h:
	* clutter/cogl/cogl.h.in: Only allow including cogl.h in
	third party code.

	* clutter/cogl/common/Makefile.am:
	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/eglnative/Makefile.am:
	* clutter/eglx/Makefile.am:
	* clutter/fruity/Makefile.am:
	* clutter/glx/Makefile.am:
	* clutter/glx/clutter-glx.h:
	* clutter/osx/Makefile.am:
	* clutter/pango/Makefile.am:
	* clutter/sdl/Makefile.am:
	* clutter/win32/Makefile.am:
	* clutter/x11/Makefile.am: Fix build environment.

	* clutter/x11/clutter-x11-texture-pixmap.h:
	* clutter/x11/clutter-x11.h: Fix inclusion rules.

	* tests/test-pixmap.c: Fix inclusion of GdkPixbuf header.

	* README: Update release notes.
2008-10-30 17:04:34 +00:00
Emmanuele Bassi
d3e2b27cff 2008-07-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h: Include missing installed files.
2008-07-14 13:46:31 +00:00
Matthew Allum
cc43d7a30d 2008-07-07 Matthew Allum <mallum@openedhand.com>
Bug 1019 - clutter-frame-source.h not included by clutter.h

        * clutter/clutter.h:
        Add missing header include.
2008-07-07 22:18:27 +00:00
Emmanuele Bassi
f32911c519 2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter.h:
	* clutter/clutter-list-model.[ch]: Complete the ClutterModelDefault
	to ClutterListModel rename by renaming the source files
2008-01-09 14:40:31 +00:00
Emmanuele Bassi
6193beb8be 2007-12-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.c:
	(clutter_knot_get_type): Use the I_() macro.

	* clutter/clutter-model.[ch]: Make ClutterModel and ClutterModelIter
	abstract classes; also, provide more virtual functions inside the
	ClutterModel vtable, to allow subclasses and language bindings to
	override the entire ClutterModel using other/native data types
	to store the rows.
	
	* clutter/clutter-model-default.[ch]: ClutterModelDefault is a
	default implementation of ClutterModel and ClutterModelIter using
	GSequence.

	* clutter/Makefile.am:
	* clutter/clutter.h: Build glue for ClutterModelDefault.

	* tests/test-model.c: Update for constructor changes.

	* tests/test-shader.c: Fix a typo.
2007-12-14 17:25:55 +00:00
Emmanuele Bassi
4976be12ca 2007-11-28 Emmanuele Bassi <ebassi@openedhand.com>
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.
2007-11-28 13:50:24 +00:00
Neil J. Patel
70e09ab9df 2007-11-15 Neil J. Patel <njp@o-hand.com>
* clutter/Makefile.am:
	* clutter/clutter-model.c: 
	* clutter/clutter-model.h:
	* clutter/clutter.h:
	* tests/Makefile.am:
	* tests/test-model.c:
	Merged ClutterModel, which closes #443.
2007-11-15 10:02:25 +00:00
Øyvind Kolås
99370d1e0c * clutter/Makefile.am:
* clutter/clutter.h: include clutter-deprecated.h
* clutter/clutter-deprecated.h: added file containing macros that
provides more meaningful errors when compiling clutter using code that
uses deprecated functions.
2007-11-13 14:06:19 +00:00
Emmanuele Bassi
6c01499abf 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter.h:
	* clutter/clutter-scriptable.[ch]: Add the ClutterScriptable
	interface; by implementing this interface, a class can
	override the UI definition parsing and transform complex data
	types into GObject properties, or allow custom properties.

	* clutter/clutter-script.c:
	* clutter/clutter-script-parser.c:
	* clutter/clutter-script-private.h: Rearrange the code and
	use the ClutterScriptable interface to parse and build the
	custom properties. This cleans up the code and also it makes
	it more reliable (the complex type parsing is now done using
	the target type and not just the name of the property).
2007-10-25 14:34:54 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00
Matthew Allum
5ab0ed5a00 2007-09-27 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        Further event tweaks;
        - Ref the event actor source
        - Protect against off stage events (button releases)
        - Move more into ClutterEventAny
        - Add a click count to button event (as yet unused)
        - Minor cleanups

        * clutter/clutter-actor.c:
        Make scale x/y a property.

        * clutter/clutter-private.h:
        Remove _clutter_actor_apply_modelview*

        * clutter/eglx/clutter-backend-egl.c:
        Warning cleanup

        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/sdl/clutter-stage-sdl.c:
        Avoid setting viewport directly, but set sync flag.

        * clutter/pango/pangoclutter-render.c: (draw_glyph):
        Minor cleanups.

        * clutter/Makefile.am:
        * tests/Makefile.am:
        * tests/test-score.c
        * clutter/clutter.h:
        * clutter/clutter-score.h:
        * clutter/clutter-score.c:
        Add very initial (broken) ClutterScore implementation.
2007-09-27 21:38:38 +00:00
Emmanuele Bassi
b7e063c3ce Add a header for common types to avoid inclusion hell
This patch adds clutter-types.h, a header file containing some common
structures and enums, shared by different objects.
2007-07-26 13:13:23 +00:00
Emmanuele Bassi
b43f0994ca 2007-07-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h: Include clutter-behaviour-depth.h
2007-07-25 10:36:19 +00:00
Emmanuele Bassi
271b13cde3 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h:
	* clutter/Makefile.am: ClutterBackend is marked as public API,
	so install the clutter-backend.h header and include it when
	including clutter.h.
2007-07-04 09:34:24 +00:00
Emmanuele Bassi
a1958da910 2007-06-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-box.[ch]: Base class for layout containers.

	* clutter/clutter-hbox.[ch]: Horizontal box actor.
	
	* clutter/clutter-vbox.[ch]: Vertical box actor.

	* clutter/clutter.h:
	* clutter/Makefile.am: Build glue

	* tests/Makefile.am:
	* tests/test-boxes.c: Test suite for ClutterBox API and
	implementations.
2007-06-14 15:29:52 +00:00
Emmanuele Bassi
a633e922b1 Compilation fixes 2007-06-09 13:20:22 +00:00
Emmanuele Bassi
787ddc3122 Add copyright license and make ClutterTimeoutPool public
ClutterTimeoutPool can be useful for manually animating without using
timelines or behaviours.
2007-06-09 13:20:06 +00:00
Emmanuele Bassi
3c2defee9d 2007-06-07 Emmanuele Bassi <ebassi@openedhand.com>
* 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.
2007-06-07 14:41:35 +00:00
Neil J. Patel
e725b0c7fa Initial import of ClutterEntry, a text-entry actor 2007-05-31 18:33:42 +00:00
Tomas Frydrych
a338a95796 removed ClutterReal; added clutter-units 2007-05-22 09:31:40 +00:00
Matthew Allum
23ac88ac70 2007-05-14 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-path.c:
        Fix bug where last knot position wouldn't get reached.

        * clutter/clutter-group.c:
        Add some docs

        * clutter/clutter-timeline.h:
        * clutter/clutter-timeline.c:
        Add clutter_timeline_copy (needed for ClutterEffect)

        * clutter/clutter-version.h.in:
        Export windowing system / GL backend etc defines.

        * clutter/Makefile.am:
        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        * clutter/clutter.h:

        * clutter/glx/clutter-backend-glx.c:
        Minor clean ups.

        * clutter/clutter-alpha.h:
        Add a fixme.

        * configure.ac:
        Add FPU define.

        * examples/Makefile.am:
        * examples/slider.c:
        Add Robs slider game.
2007-05-14 09:11:23 +00:00
Tomas Frydrych
e61aed2146 cleaned up ClutterBehaviourEllipse api, added documentation 2007-04-30 08:39:20 +00:00
Emmanuele Bassi
90ec410aef Add ClutterBehaviourRotate
Add initial implementation of a rotate behaviour; this behaviour rotates
actors along a chosen axis, with a chosen direction, between two angles.
Missing: API documentation and the implementation for the angle boundaries
setters (double and fixed API).
2007-04-16 10:25:30 +00:00
Tomas Frydrych
43593ab81f bezier spline behaviours 2007-04-12 12:42:07 +00:00
Emmanuele Bassi
89de2fa269 2006-12-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.h:
	* clutter/clutter-color.c: Add clutter_color_to_string(),
	which creates a hex-encoded color string from a ClutterColor.
2006-12-27 18:19:34 +00:00
Emmanuele Bassi
5cc29888af 2006-11-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter.h:
	* clutter/clutter-version.h.in: Auto-generated versioning macros.

	* clutter/clutter-actor.h:
	* clutter/clutter-actor.c: Add a ClutterActor::parent-set signal,
	for notificating changes of an actor's parent; add api-doc for
	the actor's properties; add the ClutterActor "name" property; clean
	up a bit some functions; emit the "parent-set" signal when setting
	te parent and when unparenting; better warnings when lowering
	and raising an actor.

	* configure.ac:
	* clutter/Makefile.am: Add a --enable-debug configure option,
	with three levels of debugging: no, minimum and yes; default
	for development releases (odd minor version) is "yes"; update
	the version m4 defines; update the libtool macros: now just
	changed the clutter_interface_age when releasing will update
	everything else.
2006-11-20 12:02:24 +00:00
Emmanuele Bassi
734f808fbc 2006-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.h:
	* clutter/clutter-alpha.c: Add a data parameter to
	the ClutterAlphaFunc; add a data+destroy parameter
	to clutter_alpha_set_func() and to clutter_alpha_new(),
	and turned the latter into clutter_alpha_new_full();
	add a simple, empty constructor clutter_alpha_new().

	These changes makes writing bindings a tad more easy,
	as bindings require passing their own functions in
	order to call the real alpha function.

	* clutter/clutter-behaviour.h: Clean up the header.

	* clutter/clutter-behaviours.[ch]:
	* clutter/clutter-behaviour-opacity.[ch]:
	* clutter/clutter-behaviour-path.[ch]:
	* clutter/clutter-behaviour-scale.[ch]: Split the
	ClutterBehaviourPath, ClutterBehaviourOpacity and
	ClutterBehaviourScale into their own files as they
	have been growing a bit. Fix ClutterBehaviourPath
	API.

	* clutter/clutter-media.h: Remove the commented
	"metadata_available" signal: gtk-doc chokes up on that.

	* clutter/clutter-timeline.h:
	* clutter/clutter-timeline.c: Remove the useless
	ClutterTimelineAlphaFunc signature; add missing accessor
	methods for the properties; clean up a bit.

	* clutter/clutter-util.h:
	* clutter/clutter-util.c: Remove unneeded function
	clutter_util_can_create_texture().

	* clutter/clutter-feature.h: Sync the name of
	clutter_feature_get_all() with the name declared
	in clutter-feature.h.

	* clutter/Makefile.am:
	* clutter/clutter.h: Update.

	* examples/behave.c: Update to the new ClutterAlpha
	constructor.

	* examples/super-oh.c: Use the right pointer and avoid
	the compiler making a fuss about it.
2006-11-15 23:37:53 +00:00
Emmanuele Bassi
4dea33e123 revert changes 2006-09-08 20:57:31 +00:00
Emmanuele Bassi
ba32170d94 creating a branch for experimenting with the behaviour API 2006-09-08 20:52:38 +00:00
Matthew Allum
2a4865b2b0 2006-09-01 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-media.c:
        * clutter/clutter-media.h:
        * clutter/clutter.h:
        Re-add clutter media.
2006-09-01 17:26:47 +00:00
Jorn Baayen
458b4b47a7 2006-08-30 Jorn Baayen <jorn@openedhand.com>
* README:
	* clutter/Makefile.am:
	* clutter/clutter-audio.c:
	* clutter/clutter-audio.h:
	* clutter/clutter-main.c: (clutter_init):
	* clutter/clutter-media.c:
	* clutter/clutter-media.h:
	* clutter/clutter-video-texture.c:
	* clutter/clutter-video-texture.h:
	* clutter/clutter.h:
	* configure.ac:
	* examples/Makefile.am:
	* examples/README:
	* examples/video-cube.c:
	* examples/video-player.c:
	* gst/Makefile.am:
	* gst/clutterimagesink.:
	* gst/clutterimagesink.c:
	* gst/clutterimagesink.h:
	* gtk/Makefile.am:

	Remove gstreamer bits. There live in clutter-gst now.
2006-08-30 13:48:48 +00:00
Jorn Baayen
f907bcee1e 2006-08-30 Jorn Baayen <jorn@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter-audio.c:
	* clutter/clutter-audio.h:
	* clutter/clutter.h:

	Added ClutterAudio audio playback object.
2006-08-30 09:06:35 +00:00
Jorn Baayen
bc3d914ccd 2006-08-28 Jorn Baayen <jorn@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter-alpha.c:
	* clutter/clutter-alpha.h:
	* clutter/clutter-behaviours.c:
	(clutter_behaviour_opacity_dispose),
	(clutter_behaviour_opacity_init),
	(clutter_behaviour_opacity_frame_foreach),
	(clutter_behaviour_opacity_frame):
	* clutter/clutter-behaviours.h:
	* clutter/clutter-timeline.c: (clutter_timeline_class_init):
	* clutter/clutter-timeline.h:
	* clutter/clutter.h:
	* examples/behave.c: (main):

	Separate alpha calculation into its own class.

	* clutter/clutter-behaviour.c: (clutter_behaviour_set_timelime):

	Correct NULL check.
2006-08-28 17:11:15 +00:00
Matthew Allum
2c41d38fed 2006-08-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour.c:
        * clutter/clutter-behaviour.h:
        * clutter/clutter-behaviours.c:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeline.h:
        * clutter/clutter.h:
        Make basic behaviour infrastructure actually work.

        * examples/Makefile.am:
        * examples/behave.c:
        Add a simple behaviour demo/test

        * clutter/clutter-media.c: (clutter_media_set_volume):
        Actuall set volume rather than position..   (Fixes #141)
2006-08-15 20:28:41 +00:00
Matthew Allum
df92202c5f 2006-06-13 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-clone-texture.c:
        * clutter/clutter-clone-texture.h:
        * clutter/clutter-element.c:
        * clutter/clutter-element.h:
        * clutter/clutter-group.c:
        * clutter/clutter-group.h:
        * clutter/clutter-label.c:
        * clutter/clutter-label.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-rectangle.h:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/clutter-texture.c:
        * clutter/clutter-texture.h:
        * clutter/clutter-video-texture.c:
        * clutter/clutter-video-texture.h:
        * clutter/clutter.h:
        * examples/super-oh.c:
        * examples/test-text.c:
        * examples/test-video.c:
        * examples/test.c:
        * examples/video-cube.c:
        * gtk/gtk-clutter-test.c:
        * gtk/gtk-clutter.c:
        * gtk/gtk-clutter.h:
        Element to Actor Renaming.
2006-06-13 13:17:45 +00:00
Matthew Allum
9afe83e695 2006-06-12 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-media.c:
        * clutter/clutter-media.h:
        * clutter/clutter-video-texture.c:
        * clutter/clutter-video-texture.h:
        * clutter/clutter.h:
        * examples/test-video.c: (main):
        * examples/video-cube.c: (main):
        Add new 'media' interface.
        Drop Totem based video playback code replace with newly
        rewritten supper Jorn based code. Clutter is now fully LGPL.

        * clutter/clutter-texture.c: (tile_dimension):
        Remove uneeded overlap code.
2006-06-12 20:38:57 +00:00
Matthew Allum
342ea125f1 Merge gobject-branch into trunk 2006-05-29 08:59:36 +00:00