Commit Graph

866 Commits

Author SHA1 Message Date
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
Elliot Smith
cf18836ca0 docs: Add recipe for animating an actor on a curved path
Show how to animate an actor using a ClutterPathConstraint.

This demonstrates how to get effects similar to
ClutterPathBehaviour with the modern animation APIs.

Includes 3 examples:

1) Simple ClutterPathConstraint used with implicit animations
2) ClutterPathConstraint used to simulate circular animation,
using ClutterAnimator
3) Creating simple curved path animations with non-linear
easing
2011-02-08 14:41:51 +00:00
Emmanuele Bassi
428f64212c build: Fixes to pass distcheck
Try to make the cookbook pass the distcheck phase, so that we can run
distcheck with --enable-docs, and make sure that a tarballed clutter
release can actually build the cookbook.
2011-02-01 14:39:21 +00:00
Emmanuele Bassi
c4d4a5469a build: Dist cb-button.h in the cookbook examples
The header is missing, so we have a build failure if you try to build
Clutter's cookbook from the tarball.
2011-02-01 12:45:52 +00:00
Elliot Smith
6680cebfe1 docs: Add reference to useful GObject tutorial
Add a reference to a GObject tutorial which
is a good introduction to the various macros etc.
and what they're for.
2011-01-31 13:40:10 +00:00
Elliot Smith
885664f725 docs: Explain why destroy() is implemented
As destroy() is Clutter-specific and not generic
GObject code, explain why we implement it
(rather than dispose()).
2011-01-31 13:39:11 +00:00
Elliot Smith
e69d60e8b6 docs: Implement destroy() rather than dispose()
Remove the dispose() implementation and replace
with destroy().

This should be promoted as the standard approach
for implementing a composite actor, as it emits a
signal when instances of the actor subclass are destroyed.
2011-01-31 13:36:37 +00:00
Elliot Smith
f63158c2a2 docs: Don't use clutter_stage_get_default()
clutter_stage_get_new() is the recommended way to
get a stage instance, so use that instead.
2011-01-31 12:18:58 +00:00
Elliot Smith
3f64137a79 docs: Change text on button
Modify the text shown on the button to "hello / world"
rather than "winkle / pickers". Slightly more
sensible.
2011-01-31 11:06:01 +00:00
Elliot Smith
5530c5e2ec docs: Add a note about other state variables
Explain that the private structure would be the
place to store other state variables for the instance.
2011-01-31 11:05:27 +00:00
Elliot Smith
08f5dc08d0 docs: Complete composite actor recipe
Add some extra detail to the Discussion section of the
composite actor recipe, concentrating on the pros and
cons of this approach.

Also explain more about the Clutter parts of the implementation.

Also general tidy up of language and style.
2011-01-31 10:55:07 +00:00
Elliot Smith
238fd52c4b docs: Change order of functions in example to match docs
Moved the functions around in the C code file, to match
the order Clutter uses them, and the order they are explained
in the recipe.
2011-01-31 10:38:15 +00:00
Elliot Smith
6934b36451 docs: Add more comments on how allocate() works
Add some extra description to the allocate() function,
explaining how the allocation has to be adjusted to
coordinates relative to the actor as a whole, before
applying to the single child actor it is composed from.
2011-01-31 10:08:08 +00:00
Elliot Smith
00deb59a9d docs: Include code examples in the recipe
Include all the code examples inline as part of the recipe.

Remove sections around each code example, as these are
unnecessary; leave full discussion for the Discussion section
instead of trying to cram it in around the code example.
2011-01-31 10:08:07 +00:00
Elliot Smith
5f676ce325 docs: Explain enums for properties and signals
Add some more explanatory comments about the PROP_ and
signals enums.
2011-01-31 10:08:07 +00:00
Elliot Smith
18b90f100c docs: Don't set explicit size on button
Rather than set a size on the CbButton instance, let it
size itself automatically, based on the size requisition
functions.
2011-01-31 10:08:07 +00:00
Elliot Smith
951f13bb8d docs: Add example of preferred_height() and preferred_width()
As most actor subclasses will probably want to implement
size requisition, give a simple example of how to do this
on the basis of the composed actor's size, plus some padding.
2011-01-31 10:08:07 +00:00
Elliot Smith
2adc224f0e docs: Add recipe for creating a custom ClutterActor with composition 2011-01-31 10:08:07 +00:00
Elliot Smith
7059be499a docs: Add more comments on code example for composite actor
Add more comments about the specific purpose of functions
and variables in the composite actor example, particularly
around GObject implementation.
2011-01-31 10:08:07 +00:00
Elliot Smith
b3954878c2 docs: Improve example code formatting
Improve code formatting to adhere to Clutter uncrustify rules.
2011-01-31 10:08:07 +00:00
Elliot Smith
7b9eaeeadb docs: Add some gtk-doc annotations to example
As this is a full GObject class implementation, add some
gtk-doc annotations to demonstrate how how custom actor subclasses
should be documented.
2011-01-31 10:08:07 +00:00
Elliot Smith
8a5967f0cc docs: Add custom ClutterActor example which uses composition 2011-01-31 10:08:07 +00:00
Emmanuele Bassi
b3784bd2b4 event: Add a setter for the device field
When synthesizing events coming from input devices it should be
possible to just call a setter function, to avoid a huge switch
on the type of the event.

Clutter should also store the device pointer inside the private
data, for faster access of the pointer in allocated events.

Finally, the get_device_id() and get_device_type() accessors should
just be wrappers around clutter_event_get_device(), to reduce the
amount of code duplication.
2011-01-28 18:19:49 +00:00
Emmanuele Bassi
86c786aaad Merge branch 'xi2'
* xi2: (41 commits)
  test-devices: Actually print the axis data
  device-manager/xi2: Sync the stage of source devices
  event: Clean up clutter_event_copy()
  device: unset the axes array pointer when resetting
  device-manager/xi2: Fix device hotplugging
  glx: Clean up GLX implementation
  device/x11: Store min/max keycode in the XI device class
  x11: Hide all private symbols
  docs: More documentation fixes for InputDevice
  */event: Never manipulate the event queue directly
  win32: Update DeviceManager device creation
  device: Allow enabling/disabling non-master devices
  backend/eglx: Add newly created stages to the translators
  device: Add more doc annotations
  device: Use a double for translate_axis() argument
  test-devices: Clean up and show axes data
  event: Fix up clutter_event_copy()
  device/xi2: Translate the axis data after setting devices
  device: Add more accessors for properties
  docs: Update API reference
  ...
2011-01-21 20:22:32 +00:00
Robert Bragg
326c516304 cogl: rename CoglVertexAttribute CoglAttribute
This is part of a broader cleanup of some of the experimental Cogl API.
One of the reasons for this particular rename is to reduce the verbosity
of using the API. Another reason is that CoglVertexArray is going to be
renamed CoglAttributeBuffer and we want to help emphasize the
relationship between CoglAttributes and CoglAttributeBuffers.
2011-01-21 16:24:14 +00:00
Robert Bragg
c4bafb48b6 docs: Adds bitmap section to cogl reference manual
This adds an include for the cogl-bitmap section to cogl-docs.xml.in
2011-01-21 16:22:40 +00:00
Emmanuele Bassi
89467abae5 docs: More documentation fixes for InputDevice 2011-01-21 10:25:46 +00:00
Emmanuele Bassi
dd5f6ca7e1 device: Add more accessors for properties
Allow using real accessor methods for getting the ClutterInputDevice
properties set on construction.
2011-01-21 10:25:45 +00:00
Emmanuele Bassi
ad06f1b20f docs: Update API reference 2011-01-21 10:25:45 +00:00
Emmanuele Bassi
431200f40d device: Add keys and axes accessors
Allow retrieving the number of keys and axes, since we provide the API
to iterate over them both.
2011-01-21 10:25:44 +00:00
Emmanuele Bassi
a3102a777e docs: Fill out documentation for new symbols 2011-01-21 10:25:44 +00:00
Emmanuele Bassi
ca092477c2 Appease the gods in introspection
Reduce the amount of bogus warnings g-ir-scanner prints out.
2011-01-20 16:35:26 +00:00
Emmanuele Bassi
62a0584f11 docs: Ignore clutter-config.h when scanning headers 2011-01-19 17:54:28 +00:00
Emmanuele Bassi
54d00ebaf0 docs: Add ClutterClickAction.get_state() 2011-01-17 17:31:46 +00:00
Emmanuele Bassi
bbede9fef5 stage: Add :accept-focus property and accessors
Allow the developer to set whether the Stage should receive key focus
when mapped. The implementation is fully backend-dependent. The default
value is TRUE because that's what we've been expecting so far.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
2010-12-30 12:44:13 +00:00
Emmanuele Bassi
b6558c5a18 docs: Fixes for the Cogl API reference 2010-12-22 09:52:35 +00:00
Emmanuele Bassi
533880a1a5 build: Ignore private headers when building the Cogl reference
Otherwise gtk-doc will try to look up private symbols.
2010-12-21 12:03:38 +00:00
Emmanuele Bassi
b9f7ef1110 build: Remove Cogl2 reference from the build scripts
Keeping the Cogl 2.0 API reference in the build is getting far more
troublesome than it's worth.

It's breaking distcheck far too often, and it makes it impossible to
rebuild the build environment from tarballs - which is something that
some distributions (namely: the Debian-based ones, but not limited to
them) do in order to change build scripts using their own rules.
2010-12-18 21:33:37 +00:00
Emmanuele Bassi
987a50be91 build: Fix release-check for cogl2 reference 2010-12-17 15:43:38 +00:00
Elliot Smith
894c0527df cookbook: Proofing for "box layout" recipe
General improvements to readability, formatting, fixing
typos etc.
2010-12-17 14:41:42 +00:00
Elliot Smith
accdd92110 cookbook: Add examples and more text for "box layout" recipe
Added 3 examples for the box layout recipe:
1) Simple box layout demonstrating how to set actor properties
2) Trivial menu implementation using box layout
3) Demonstration app which enables tweaking and testing
   of layout property interactions

Also inlined example 1 in the solution section and added
more explanatory text in the discussion.
2010-12-17 14:41:42 +00:00
Elliot Smith
77aacd185d cookbook: Add initial skeleton for box layout recipe
Created recipe and first draft content for recipe
about ClutterBoxLayout.
2010-12-17 14:41:42 +00:00
Emmanuele Bassi
c444447cd3 timeline: Rename the reverse property to auto-reverse
Other frameworks expose the same functionality as "auto-reverse",
probably to match the cassette tape player. It actually makes sense
for Clutter to follow suit.
2010-12-17 12:07:52 +00:00
Emmanuele Bassi
bc58de4658 docs: Add 1.6 index to the API references 2010-12-09 15:53:26 +00:00
Emmanuele Bassi
24133ddadc Rename the EGLDisplay accessors
The accessor for the EGL display should be namespaced for the correct
backend-specific API.
2010-12-09 15:34:22 +00:00
Emmanuele Bassi
f5b51a2428 docs: Documentation fixes 2010-12-09 15:06:12 +00:00
Emmanuele Bassi
ab0eb0a12b docs: Documentation fixes 2010-12-09 13:59:08 +00:00
Elliot Smith
88f7579a9d cookbook: Remove bold on emphasis inside programlisting
If an <emphasis> element is placed inside a <programlisting> in a cookbook
recipe, the result is bold italic text in the HTML output. This isn't
particularly readable.

Fix is to style emphasis elements inside programlistings
so the font weight is not bold but is still italicised.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2475
2010-12-09 13:39:48 +00:00