Commit Graph

61 Commits

Author SHA1 Message Date
Jasper St. Pierre
5aca3c4992 cally-util: Don't free a NULL pointer
The only place key_event can not be NULL is in this branch.
Spotted by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:53 -05:00
Emmanuele Bassi
b20e9b78e5 actor: Add :z-position and deprecate :depth
The ClutterActor:depth property has always been a bit of a misnomer:
actors are 2D flat surfaces, so they cannot have "depth"; the property
defines the position on the Z axis.

Another side effect of the :depth property is that it decides the
default paint and allocation order on insertion, and that setting it
will call the ClutterContainer.sort_depth_order() method. This has
proven to be a fairly bad design decision that we strung along from the
0.x days, as it gives a false impression of being able to change the
paint and allocation order simply by changing the position on the Z
axis — something that, in reality, requires depth testing to be enabled
during the paint sequence of an actor's parent.

For 2.0 we need a clean break from the side effects, and a better
defined interface.

ClutterActor:z-position is essentially what ClutterActor:depth is, but
doesn't call into ClutterContainer, and has a more apt name.

https://bugzilla.gnome.org/show_bug.cgi?id=679465
2012-07-11 13:22:19 +01:00
Alejandro Piñeiro
a8c829019f a11y: remove implementation for [add/remove]_global_event_listener
Since release 2.5.3, ATK provides an implementation for those
methods, so toolkits doesn't need to implement them.
2012-06-27 14:40:56 +02:00
Alejandro Piñeiro
dd7c1ed64a a11y: implementation for atk_text_get_text_[before/at/after]_offset
Copy and paste of the implementation done at Gtk+ based on pango. This
should be moved to a common library, like the old GailTextUtil. Ideally
on pango itself.

https://bugzilla.gnome.org/show_bug.cgi?id=677221
2012-06-22 18:06:06 +02:00
Alejandro Piñeiro
0d4d467dd5 a11y: Remove key event listener hash table if no longer required
https://bugzilla.gnome.org/show_bug.cgi?id=675183
2012-06-18 12:44:59 +02:00
Alejandro Piñeiro
cafcf14e0e a11y: atk_add_key_event_listener listener_id should not return 0 as a valid value
cally_util_add_key_event_listener first id returned was 0, but as
the documentation says, this is a reserved value for a wrong id

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=675183
2012-06-18 12:44:55 +02:00
Emmanuele Bassi
fcd341d23e cally: Disable deprecation warnings
For ClutterGroup and ClutterRectangle.
2012-05-03 11:34:57 +01:00
Alejandro Piñeiro
9428aaa3cb a11y: stop to use text as the default accessible-name for ClutterText
https://bugzilla.gnome.org/show_bug.cgi?id=672994
2012-04-26 20:01:28 +02:00
Emmanuele Bassi
340775d09b cally: Fix the pkg-config file
Drop a bunch of variables that are not meant to be used by Cally; also,
drop the wrong library name from the Libs key: Clutter has a single
shared library, now.

https://bugzilla.gnome.org/show_bug.cgi?id=674105
2012-04-21 13:46:00 +01:00
Emmanuele Bassi
41f06138b4 cally/text: Constify string members 2012-03-07 12:59:25 +00:00
Emmanuele Bassi
266ea8a3d9 cally: Fix redundant declarations 2012-03-07 12:36:43 +00:00
Alejandro Piñeiro
6e78ebca95 a11y: Not compute extents for actors without an stage
This solves a crash on GNOME Shell, as compute the extents
for some StWidgets could lead to call st_widget_get_theme_node,
and it is a fatal error to call this on a widget that it not
beed added to a stage.
2012-02-29 15:52:49 +01:00
Alejandro Piñeiro
dde5da1dd8 a11y: Stop to use ClutterActor::name as default accessible-name
ClutterActor::name is mostly used for debugging purposes
2012-02-29 15:52:49 +01:00
Alejandro Piñeiro
493461e798 a11y: remove Container explanation
That explanation is outdated after the last changes on clutter
2012-02-15 19:10:24 +01:00
Alejandro Piñeiro
c1d43b70c5 a11y: proper ATK role for ClutterStage
ATK_ROLE_CANVAS is not a suitable role, as the user (in general) can't
draw on the Stage. CallyStage implements AtkWindow, so the proper role
is ATK_ROLE_WINDOW
2012-02-15 19:10:24 +01:00
Alejandro Piñeiro
cc126f55eb a11y: redoing focus stuff
Removing atkcomponent, focus_tracker, etc. Emitting focus state change
from the stage. Now things are more simple, and stop to use some
of the soon-to-be-deprecated signals on ATK.
2012-02-15 19:09:44 +01:00
Emmanuele Bassi
1979faee00 cally: Use Actor.get_children()
Instead of the Container method, given that the new get_children() gives
us more actors by default.
2012-01-16 23:37:12 +00:00
Emmanuele Bassi
4d75e7a0f4 cally: Use the Actor API instead of ClutterContainer
Cally is doing a bunch of list traversals through the list returned by
ClutterContainer.get_children(); this means a traversal already, plus
a bunch of allocations. We can do better than that, now that we have
a proper graph iteration API inside ClutterActor.
2012-01-16 23:37:10 +00:00
Emmanuele Bassi
a6df0b6a53 cally: Do not use Group API
Avoids a deprecation warning.
2012-01-16 23:35:16 +00:00
Emmanuele Bassi
b1ccd262b1 cally/actor: Do not use the default stage as a fallback
Using the default stage as a fallback is wrong in all circumstances.

In this specific case, if an actor is not associated to a stage then it
cannot possibly be the key focus.
2011-11-10 15:37:51 +00:00
Matthias Clasen
d596401a3c cally: Use the proper role for password entries
https://bugzilla.gnome.org/show_bug.cgi?id=663332
2011-11-10 12:57:34 +00:00
Matthias Clasen
5781beb22d cally: Fix up event listener registration minimally
For god-knows-what reason, at-spi is trying various formats
of strings when registering listeners, triggering an ugly

(gnome-shell:4411): Clutter-WARNING **: invalid object type create

warning in .xsession-errors. Stop doing that.

Also don't leak temporary string arrays that are a side-effect
of passing parameters around as formatted strings.

https://bugzilla.gnome.org/show_bug.cgi?id=658721
2011-09-11 10:57:25 -04:00
Alejandro Piñeiro
7635cb6f17 a11y: We don't need to explicitly manage window events 2011-08-23 17:22:17 +02:00
Alejandro Piñeiro
a9690a4a5e a11y: Using AtkWindow on cally-stage 2011-08-23 17:22:11 +02:00
Alejo Pacin
694649e50c a11y: Notify ATK_STATE_SHOWING state change
https://bugzilla.gnome.org/show_bug.cgi?id=648633
2011-08-04 12:59:50 +02:00
Alejandro Piñeiro
468f121f59 a11y: Use existing clutter_actor_get_paint_visibility
Cally was initially created with Clutter 0.6 in mind. To check
recursively the visibility of a actor a custom method was added.
Since 0.8.4 clutter_actor_get_pain_visibility provides
the same functionality.

Also removed a dummy method. Lets add methods that provide a real
functionality.
2011-07-26 16:24:49 +02:00
Philippe Normand
eb28d16300 a11y: cally-text get_offset_at_point implementation
See http://bugzilla.clutter-project.org/show_bug.cgi?id=1733
2011-07-06 17:05:49 +02:00
Philippe Normand
7565fcaab0 a11y: cally-text get_character_extents implementation
See http://bugzilla.clutter-project.org/show_bug.cgi?id=1733
2011-07-06 16:56:30 +02:00
Philippe Normand
61ea64c8c1 a11y: expose _cally_actor_get_top_level_origin in cally-actor-private
As this function is needed for atktext get_character_extents and
get_offset_at_point implementations.
2011-07-06 16:55:55 +02:00
Philippe Normand
ae0aa9e4cf a11y: get_default_attributes implementation on cally-text
See http://bugzilla.clutter-project.org/show_bug.cgi?id=1733
2011-07-06 16:51:49 +02:00
Philippe Normand
11efaf8297 a11y: use actor color if no fgcolor found in pango attributes 2011-07-06 16:44:40 +02:00
Philippe Normand
49d4317420 a11y: factor some PangoAttributes->AtkTextAttributes mappings
That code can then be used by get_run_attributes and
get_default_attributes implementations.
2011-07-06 16:34:36 +02:00
Alejandro Piñeiro
7e9ee85c7d [a11y] Exposing via ATK the proper toolkit name and version 2011-07-06 14:25:02 +02: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
Alejandro Piñeiro
46aadb745b [cally] Removed default actions on CallyActor 2011-05-21 00:55:01 +02:00
Alejandro Piñeiro
d007155ac4 [cally] CallyRoot is the parent of any CallyStage object
http://bugzilla.clutter-project.org/show_bug.cgi?id=2597
2011-05-20 14:18:09 +02:00
Alejandro Piñeiro
58adcb4022 [cally] Added old cally Changelog (pre clutter-cally merge)
http://bugzilla.clutter-project.org/show_bug.cgi?id=2484
2011-05-20 14:13:14 +02:00
Alejandro Piñeiro
153532297c [cally] Removing default name and description
Those were added on the old "just for automatic testing" times. That was
somewhat silly on that moment. Now is just silly (ie: having the stage
returning as default name "Stage").

The real description should be set by the app, or provided by the
context of a specific actor feature (like the tooltip on StWidget).

The current information provided by the default description can be
mostly obtained from the ATK_ROLE, and the indirect debugging
advantage of having always a meaningful description is just not enough
to justify them, and you can solve that by proper debug logging.

Fixes: http://bugzilla.clutter-project.org/show_bug.cgi?id=2482
2011-05-20 14:07:47 +02:00
Emmanuele Bassi
fd3462170f cally: Remove unused variables 2011-02-19 16:47:20 +00:00
Emmanuele Bassi
615c200707 build: Fix the Cally pkg-config file
Do not use ${winsys}: use ${soname_infix} instead.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2549
2011-02-07 15:40:50 +00:00
Emmanuele Bassi
6f1e5010d9 docs: Switch a 'Since' annotation in CallyActor
Since doesn't like it when it's not the last annotation.
2011-02-01 14:39:21 +00:00
Emmanuele Bassi
52442414d9 cally: Allow memory management for actions
Adding an action should allow passing a user data pointer, and have a
notification action that gets called when removing the action. This
allows introspection and language bindings to attach custom data to the
action - for instance, the real callable object that should be invoked.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2479
2010-12-14 10:07:32 +00:00
Emmanuele Bassi
ab0eb0a12b docs: Documentation fixes 2010-12-09 13:59:08 +00:00
Neil Roberts
f1752ff3ba Avoid mixing declarations and code
Mixing declarations and code causes problems for MSVC as it is a C99
feature so we should try to avoid it.
2010-10-25 13:18:25 +01:00
Alejandro Piñeiro
f5aeabadd5 Fixing cally.pc.in and moving include headers to previous directory
After commit 8dd8fbdb some errors appear if you try work directly
against cally:

 * cally.pc.in removed some elements. After install clutter, doing
   pkg-config --cflags cally-1.0
   fails due missing winsys

 * cally headers were moved from clutter-1.0/cally to
   clutter-1.0/clutter/cally.  Applications using it (yes I know,
   nobody is officially using it) would require to:
    * Change their include.
    * Add directly a dependency to cally, in order to use the cally.pc
      file with the correct directory include.

Note: Take into account that accessibility support still works (ie:
clutter_get_accessibility_enabled). This bug only prevents
applications to work directly against cally (ie: create a CallyActor
subclass)

http://bugzilla.clutter-project.org/show_bug.cgi?id=2353

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-10-04 13:05:02 +01:00
Emmanuele Bassi
8dd8fbdbdf build: Start moving to a non-recursive layout
*** WARNING: THIS COMMIT CHANGES THE BUILD ***

Do not recurse into the backend directories to build private, internal
libraries.

We only recurse from clutter/ into the cogl sub-directory; from there,
we don't recurse any further. All the backend-specific code in Cogl and
Clutter is compiled conditionally depending on the macros defined by the
configure script.

We still recurse from the top-level directory into doc, clutter and
tests, because gtk-doc and tests do not deal nicely with non-recursive
layouts.

This change makes Clutter compile slightly faster, and cleans up the
build system, especially when dealing with introspection data.

Ideally, we also want to make Cogl part of the top-level build, so that
we can finally drop the sed trick to change the shared library from the
GIR before compiling it.

Currently disabled:

  ‣ OSX backend
  ‣ Fruity backend

Currently enabled but untested:

  ‣ EGL backend
  ‣ Windows backend
2010-09-29 14:40:15 +01:00
Emmanuele Bassi
27aebb5c9d cally: Do not use deprecated functions
The function g_strcasecmp() has been deprecated since GLib 2.2.
2010-09-29 14:13:51 +01:00
Alejandro Piñeiro
209bef6f8a cally: fixing public headers
Cally headers were including specific clutter object headers.

This caused a problem including cally.h on a external program.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2234
2010-09-13 12:19:54 +01:00
Emmanuele Bassi
f87e4037a8 build: Distcheck fixes after the Cally merge 2010-07-07 16:30:31 +01:00
Emmanuele Bassi
a3c69dc27c cally: Add introspection generation
Toolkits and applications not written in C might still need access to
the Cally API to write accessibility extensions based on it for their
own native elements.
2010-07-07 15:57:43 +01:00