1
0
Fork 0
Commit graph

852 commits

Author SHA1 Message Date
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
Emmanuele Bassi
e1f48b15ee docs: Use :reverse in the Behaviour migration guide
Instead of the ::completed signal flip.
2010-12-09 12:00:29 +00:00
Emmanuele Bassi
b16ea09988 Merge remote branch 'elliot/cookbook-animations-looping-new-api'
* elliot/cookbook-animations-looping-new-api:
  cookbook: Use new API to reverse timeline
2010-12-09 11:58:10 +00:00
Robert Bragg
62b051951c docs: don't dist cogl-2.0 manual if not built
If not configured with --enable-cogl2-reference then don't try and dist
the doc/references/cogl-2.0 manual. Although this means a tarball built
this way will not be able to build the experimental cogl-2.0 manual this
isn't considered a big problem since anyone interested in this would
hopefully be tracking git for now or we can simply be careful to
configure with --enable-cogl2-reference for our tarball releases.
2010-12-07 12:16:51 +00:00
Robert Bragg
ef02cb7ff2 matrix gtype: registers a boxed type for CoglMatrix
To allow us to have gobject properties that accept a CoglMatrix value we
need to register a GType. This adds a cogl_gtype_matrix_get_type function
that will register a static boxed type called "CoglMatrix".

This adds a new section to the reference manual for GType integration
functions.
2010-12-07 12:16:50 +00:00
Elliot Smith
50849ac1fd cookbook: Use new API to reverse timeline
clutter_timeline_set_reverse() can be used to
automatically reverse a timeline's direction each time
it completes, so use that in looping animation recipe and
examples.
2010-12-02 10:56:06 +00:00
Emmanuele Bassi
038fe708f8 Merge remote branch 'elliot/cookbook-animations-scaling'
* elliot/cookbook-animations-scaling:
  cookbook: Add recipe for animated scaling of an actor
  cookbook: Add example of scaling a texture
  cookbook: Added "animated scaling" recipe skeleton
  cookbook: Added animated scaling example
2010-11-29 11:56:36 +00:00
Alexandre Quessy
01b93537ab Fixed "the the" repetitions in some doc strings
http://bugzilla.clutter-project.org/show_bug.cgi?id=2450
2010-11-25 18:18:51 +00:00
Chris Lord
f687ec6a22 docs: Update documentation to reflect automatic map/unmap/etc.
Update the ClutterActor documentation to reflect the new automatic
map/unmap/realize/unrealize implementations.
2010-11-24 16:51:59 +00:00
Elliot Smith
c9d0f8b26e cookbook: Add recipe for animated scaling of an actor
Recipe explains how to animate scaling a single actor.

Also covers scaling vs. resizing, scale center, and
scaling within layouts and containers.

The first example shows how animations around each scale
gravity look, as well as tracking the transformed position
and size of the actor and displaying those.

The second example is a simple image viewer with zoom in/out
using scaling.
2010-11-24 12:45:12 +00:00
Elliot Smith
ee9a4d02bb cookbook: Add example of scaling a texture
Added a simple application for scaling a
texture while keeping the mouse pointer over
the same coordinates on its surface.
2010-11-24 12:45:12 +00:00
Elliot Smith
c8f112876e cookbook: Added "animated scaling" recipe skeleton 2010-11-24 12:45:12 +00:00
Elliot Smith
b47b2f4749 cookbook: Added animated scaling example
Added an example showing scaling of an actor on
each of the scaling gravity settings (NORTH_WEST, NORTH etc.),
with a mark indicating the center being used.

Displays the transformed size and position, updated
on each paint of the actor.
2010-11-24 12:45:12 +00:00
Robert Bragg
2dba3e8cbf matrix: Adds experimental cogl_matrix_{transform,project}_points
This add two new function that allows us to transform or project an
array of points instead of only transforming one point at a time. Recent
benchmarking has shown cogl_matrix_transform_point to be a bottleneck
sometimes, so this should allow us to reduce the overhead when
transforming lots of vertices at the same time, and also reduce the cost
of 3 component, non-projective transforms.

For now they are marked as experimental (you have to define
COGL_ENABLE_EXPERIMENTAL_API) because there is some concern that it
introduces some inconsistent naming. cogl_matrix_transform_point would
have to be renamed cogl_matrix_project_point to be consistent, but that
would be an API break.
2010-11-23 12:50:29 +00:00
Emmanuele Bassi
3055cd1f4a docs: Include the Behaviour migration guide
I forgot to add the xinclude directive in the main document.
2010-11-20 13:05:51 +00:00