Commit Graph

19 Commits

Author SHA1 Message Date
Lionel Landwerlin
5c035f2107 click-action: disconnect signals and gsources on dispose
https://bugzilla.gnome.org/show_bug.cgi?id=707774
2013-09-10 21:48:42 +01:00
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Emanuele Aina
e6fcdb0644 click-action: add touch event support
Allow for touch events to trigger the "clicked" event on
ClickAction without introducing API changes.

https://bugzilla.gnome.org/show_bug.cgi?id=683936
2012-09-13 11:59:08 +02:00
Emmanuele Bassi
20e63532a4 click-action: Use the new symbolic event propagation macros 2012-01-12 10:27:17 +00:00
Emmanuele Bassi
dbf3b607bf click-action: Be resilient against NULL pointers
Do not try to disconnect signal handlers from NULL pointers.
2012-01-12 10:26:47 +00:00
Emmanuele Bassi
23a9980c72 click-action: Add support for long press detection
A long press is a special form of click action; the default
implementation uses a single signal with multiple states: query, action
and cancel. On click we use the "query" state to check whether the
ClutterClickAction supports long presses; if the callback returns TRUE
then we install a timeout and we either emit the "activate" state when
the timeout expires or we emit the "cancel" state if the pointer leaves
the actor, or if the pointer moves outside a certain threshold. If the
long press reached the "activate" state then we skip the clicked signal
emission.
2011-06-09 15:12:41 +01:00
Jasper St. Pierre
0c576c0c33 Remove private helper #define's
Finish off the second half of 09a830d294.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2596
2011-03-03 11:47:49 +00:00
Lucas Rocha
6af7b76cb5 click-action: add API to get modifier type
This is to allow implementing modified click such as ctrl+click,
shift+click, and so on.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2520
2011-01-17 17:31:46 +00:00
Lucas Rocha
03a713e18e click-action: don't use pointer grabs
The same behavior can be achieved by capturing events on stage while
button is pressed. This fixes a problem when using click and drag
actions on the same actor as there no grabs involved.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2409
2010-11-11 23:18:20 +00:00
Emmanuele Bassi
050e775da2 Move more classes to install_properties() 2010-10-18 11:26:45 +01:00
Emmanuele Bassi
36d45b660f click-action: Add get_button()
Allow retrieving the pointer button that caused the ::clicked signal to
be emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2287
2010-08-26 16:39:39 +01:00
Emmanuele Bassi
550d5ab621 click-action: Fix the release() method name
Documented and declared as release(), it's implemented as
force_release().

http://bugzilla.clutter-project.org/show_bug.cgi?id=2286
2010-08-26 16:39:39 +01:00
Emmanuele Bassi
459a6bb24c click-action: Add a method to force a release
It can be useful to be able to forcibly break the grab set up by the
ClickAction. The newly added release() method provides a mechanism to
release the grab and unset the :held state of the ClickAction.
2010-08-19 12:10:43 +01:00
Neil Roberts
8d51617979 Conditionally use g_object_notify_by_pspec
This adds a wrapper macro to clutter-private that will use
g_object_notify_by_pspec if it's compiled against a version of GLib
that is sufficiently new. Otherwise it will notify by the property
name as before by extracting the name from the pspec. The objects can
then store a static array of GParamSpecs and notify using those as
suggested in the documentation for g_object_notify_by_pspec.

Note that the name of the variable used for storing the array of
GParamSpecs is obj_props instead of properties as used in the
documentation because some places in Clutter uses 'properties' as the
name of a local variable.

Mose of the classes in Clutter have been converted using the script in
the bug report. Some classes have not been modified even though the
script picked them up as described here:

json-generator:

 We probably don't want to modify the internal copy of JSON

behaviour-depth:
rectangle:
score:
stage-manager:

 These aren't using the separate GParamSpec* variable style.

blur-effect:
win32/device-manager:

 Don't actually define any properties even though it has the enum.

box-layout:
flow-layout:

  Have some per-child properties that don't work automatically with
  the script.

clutter-model:

  The script gets confused with ClutterModelIter

stage:

  Script gets confused because PROP_USER_RESIZE doesn't match
  "user-resizable"

test-layout:

  Don't really want to modify the tests

http://bugzilla.clutter-project.org/show_bug.cgi?id=2150
2010-08-10 17:12:06 +01:00
Emmanuele Bassi
fd27ca7398 Mark property strings for translation
Both the nick and the blurb fields should be translatable, for UI
builders and other introspection-based tools.
2010-07-15 14:07:07 +01:00
Emmanuele Bassi
b2c905ff50 Hide the marshallers
The marshallers we use for the signals are declared in a private header,
and it stands to reason that they should also be hidden in the shared
object by using the common '_' prefix. We are also using some direct
g_cclosure_marshal_* symbol from GLib, instead of consistently use the
clutter_marshal_* symbol.
2010-06-11 16:09:36 +01:00
Emmanuele Bassi
e00ed20805 click-action: Use clutter_actor_contains()
Instead of an internal copy.
2010-06-11 15:23:46 +01:00
Emmanuele Bassi
e2bbf7f362 click-action: Handle the event
In case we did handle the event, we should return TRUE from the ::event
signal handler.
2010-05-25 13:27:29 +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