2007-11-07 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-actor.[ch]: Fix the declaration of the
	class handlers for the ::captured-event, ::enter-event and
	::leave-event signals; the function signatures were missing
	the return value the signals marshallers were expecting, and
	their names weren't respecting the convention for event-related
	signals.
This commit is contained in:
Emmanuele Bassi 2007-11-07 16:40:30 +00:00
parent 3b07be19ba
commit 72ce4487f8
3 changed files with 39 additions and 29 deletions

View File

@ -1,3 +1,12 @@
2007-11-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Fix the declaration of the
class handlers for the ::captured-event, ::enter-event and
::leave-event signals; the function signatures were missing
the return value the signals marshallers were expecting, and
their names weren't respecting the convention for event-related
signals.
2007-11-06 Tomas Frydrych <tf@o-hand.com> 2007-11-06 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-fixed.h: * clutter/clutter-fixed.h:

View File

@ -129,19 +129,20 @@ enum
HIDE, HIDE,
DESTROY, DESTROY,
PARENT_SET, PARENT_SET,
FOCUS_IN,
FOCUS_OUT,
EVENT, EVENT,
EVENT_CAPTURED, CAPTURED_EVENT,
BUTTON_PRESS_EVENT, BUTTON_PRESS_EVENT,
BUTTON_RELEASE_EVENT, BUTTON_RELEASE_EVENT,
SCROLL_EVENT, SCROLL_EVENT,
KEY_PRESS_EVENT, KEY_PRESS_EVENT,
KEY_RELEASE_EVENT, KEY_RELEASE_EVENT,
MOTION_EVENT, MOTION_EVENT,
FOCUS_IN,
FOCUS_OUT,
ENTER_EVENT, ENTER_EVENT,
LEAVE_EVENT, LEAVE_EVENT,
LAST_SIGNAL LAST_SIGNAL
}; };
@ -1538,7 +1539,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_signal_new ("enter-event", g_signal_new ("enter-event",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, enter), G_STRUCT_OFFSET (ClutterActorClass, enter_event),
_clutter_boolean_handled_accumulator, NULL, _clutter_boolean_handled_accumulator, NULL,
clutter_marshal_BOOLEAN__BOXED, clutter_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN, 1,
@ -1556,7 +1557,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_signal_new ("leave-event", g_signal_new ("leave-event",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, leave), G_STRUCT_OFFSET (ClutterActorClass, leave_event),
_clutter_boolean_handled_accumulator, NULL, _clutter_boolean_handled_accumulator, NULL,
clutter_marshal_BOOLEAN__BOXED, clutter_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN, 1,
@ -1571,11 +1572,11 @@ clutter_actor_class_init (ClutterActorClass *klass)
* *
* Since: 0.6 * Since: 0.6
*/ */
actor_signals[EVENT_CAPTURED] = actor_signals[CAPTURED_EVENT] =
g_signal_new ("captured-event", g_signal_new ("captured-event",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, captured), G_STRUCT_OFFSET (ClutterActorClass, captured_event),
_clutter_boolean_handled_accumulator, NULL, _clutter_boolean_handled_accumulator, NULL,
clutter_marshal_BOOLEAN__BOXED, clutter_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN, 1,
@ -3122,7 +3123,7 @@ clutter_actor_event (ClutterActor *actor,
if (capture) if (capture)
{ {
g_signal_emit (actor, actor_signals[EVENT_CAPTURED], 0, g_signal_emit (actor, actor_signals[CAPTURED_EVENT], 0,
event, event,
&retval); &retval);
goto out; goto out;

View File

@ -193,28 +193,28 @@ struct _ClutterActorClass
const ClutterColor *color); const ClutterColor *color);
/* event signals */ /* event signals */
gboolean (* event) (ClutterActor *actor, gboolean (* event) (ClutterActor *actor,
ClutterEvent *event);
gboolean (* button_press_event) (ClutterActor *actor,
ClutterButtonEvent *event);
gboolean (* button_release_event) (ClutterActor *actor,
ClutterButtonEvent *event);
gboolean (* scroll_event) (ClutterActor *actor,
ClutterScrollEvent *event);
gboolean (* key_press_event) (ClutterActor *actor,
ClutterKeyEvent *event);
gboolean (* key_release_event) (ClutterActor *actor,
ClutterKeyEvent *event);
gboolean (* motion_event) (ClutterActor *actor,
ClutterMotionEvent *event);
void (* enter) (ClutterActor *actor,
ClutterCrossingEvent *event);
void (* leave) (ClutterActor *actor,
ClutterCrossingEvent *event);
void (* captured) (ClutterActor *actor,
ClutterEvent *event); ClutterEvent *event);
void (* focus_in) (ClutterActor *actor); gboolean (* button_press_event) (ClutterActor *actor,
void (* focus_out) (ClutterActor *actor); ClutterButtonEvent *event);
gboolean (* button_release_event) (ClutterActor *actor,
ClutterButtonEvent *event);
gboolean (* scroll_event) (ClutterActor *actor,
ClutterScrollEvent *event);
gboolean (* key_press_event) (ClutterActor *actor,
ClutterKeyEvent *event);
gboolean (* key_release_event) (ClutterActor *actor,
ClutterKeyEvent *event);
gboolean (* motion_event) (ClutterActor *actor,
ClutterMotionEvent *event);
gboolean (* enter_event) (ClutterActor *actor,
ClutterCrossingEvent *event);
gboolean (* leave_event) (ClutterActor *actor,
ClutterCrossingEvent *event);
gboolean (* captured_event) (ClutterActor *actor,
ClutterEvent *event);
void (* focus_in) (ClutterActor *actor);
void (* focus_out) (ClutterActor *actor);
/*< private >*/ /*< private >*/
/* padding for future expansion */ /* padding for future expansion */