1
0
Fork 0
Commit graph

9 commits

Author SHA1 Message Date
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
Emmanuele Bassi
d032b9b2bf conform: Start cleaning up the conformance test suite
Re-order the units into a sensible list, with basic tests at the
beginning, and per-class tests at the end - with Cogl last.

Also, start renaming the unit functions from test_<foo> to <foo>,
so that the executable wrappers and the reports have sensible names.
2010-10-12 17:42:18 +01:00
Emmanuele Bassi
4ee05f8e21 keysyms: Update the macros to CLUTTER_KEY_*
The keysyms defines in clutter-keysyms.h are generated from the X11 key
symbols headers by doing the equivalent of a pass of sed from XK_* to
CLUTTER_*. This might lead to namespace collisions, down the road.
Instead, we should use the CLUTTER_KEY_* namespace.

This commit includes the script, taken from GDK, that parses the X11
key symbols and generates two headers:

  - clutter-keysyms.h: the default included header, with CLUTTER_KEY_*
  - clutter-keysyms-compat.h: the compatibility header, with CLUTTER_*

The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is
not defined - essentially deprecating all the old key symbols.

This does not change any ABI and, assuming that an application or
library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source
compatibility is still guaranteed.
2010-09-10 17:54:52 +01:00
Emmanuele Bassi
87ab64d291 [tests] Add unit for the ClutterText:password-char property
Check that the contents of the Text actor are unaffected by the
:password-char property; that the accessors are correct; and finally
that the initial value for a newly constructed Text actor is valid.
2009-01-06 15:30:31 +00:00
Emmanuele Bassi
b021f518c1 Use "" as the default value for the :text property
This follows the convention of GtkLabel/GtkEntry in GTK+ and the old
ClutterEntry.

It makes it easier to use strlen/strcmp etc on the output, since we can
assume that it is always a string.

This commit also updates the test unit for ClutterText to verify that
the clutter_text_get_text() function also returns an empty string when
a ClutterText actor has been created.
2008-12-22 13:43:41 +00:00
Emmanuele Bassi
b1c366a143 Add Text::get_chars() implementation and tests
The clutter_text_get_chars() function returns a section of the
contents of the Text actor, delimited by a start and an end position.

This commit adds the implementation for that function and a test
unit that guarantees the offset-to-bytes computations are correct.
2008-12-11 11:59:50 +00:00
Emmanuele Bassi
e93a7e243c Add comments in the test suite
Comment why we need to enable the editability of the Text actor
inside the test suite.

This should clarify commit ea508ea528d61ae478d8bc4c88f54a89304f18e8
2008-12-11 11:56:44 +00:00
Emmanuele Bassi
191d1aebff Update the ClutterText test unit
Whenever we are sending specially crafted KeyEvents to a ClutterText
we also need to set it editable, since the event handling code depends
on the editability setting.
2008-12-11 11:51:28 +00:00
Emmanuele Bassi
94789e3cc3 Add a separate test unit for ClutterText
Instead of changing the unit for ClutterEntry, we add a new
test unit specifically for ClutterText so that we can later tweak
it specifically for the behaviour changes needed to make ClutterText
work better.
2008-12-11 11:45:37 +00:00