diff --git a/ChangeLog b/ChangeLog index 860f8e2b9..9d4ca0b80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,16 @@ * clutter/clutter-event.c: Pop and peek the event queue from the tail - it's a queue, not a stack. + * clutter/clutter-private.h: + * clutter/clutter-main.c: Add a boolean signal accumulator. + + * clutter/clutter-stage.[ch]: Add an event argument to + the 'delete-event' signal; rename the 'input-event' signal + to 'event'; add the static scope flag to all the stage + events. + + * examples/*.c: Update. + 2007-03-22 Emmanuele Bassi * clutter.pc.in: Require gobject-2.0 too. diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 34aec5448..6e7895636 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -72,7 +72,7 @@ enum enum { - INPUT_EVENT, + EVENT, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, SCROLL_EVENT, @@ -226,7 +226,23 @@ clutter_stage_class_init (ClutterStageClass *klass) "The color of the main stage", CLUTTER_TYPE_COLOR, CLUTTER_PARAM_READWRITE)); - + /** + * ClutterStage::event: + * @stage: the actor which received the event + * @event: a #ClutterEvent + * + * The ::event signal is emitted each time and event is received + * by the @stage. + */ + stage_signals[EVENT] = + g_signal_new ("event", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ClutterStageClass, event), + NULL, NULL, + clutter_marshal_VOID__BOXED, + G_TYPE_NONE, 1, + CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * ClutterStage::button-press-event: * @stage: the actor which received the event diff --git a/clutter/clutter-stage.h b/clutter/clutter-stage.h index 8b75fb5a4..b73b06ad1 100644 --- a/clutter/clutter-stage.h +++ b/clutter/clutter-stage.h @@ -96,24 +96,24 @@ struct _ClutterStageClass void (* flush) (ClutterStage *stage); /* signals */ - void (* event) (ClutterStage *stage, - ClutterEvent *event); - void (* button_press_event) (ClutterStage *stage, - ClutterButtonEvent *event); - void (* button_release_event) (ClutterStage *stage, - ClutterButtonEvent *event); - void (* scroll_event) (ClutterStage *stage, - ClutterScrollEvent *event); - void (* key_press_event) (ClutterStage *stage, - ClutterKeyEvent *event); - void (* key_release_event) (ClutterStage *stage, - ClutterKeyEvent *event); - void (* motion_event) (ClutterStage *stage, - ClutterMotionEvent *event); - void (* stage_state_event) (ClutterStage *stage, - ClutterStageStateEvent *event); - void (* delete_event) (ClutterStage *stage, - ClutterAnyEvent *event); + void (* event) (ClutterStage *stage, + ClutterEvent *event); + void (* button_press_event) (ClutterStage *stage, + ClutterButtonEvent *event); + void (* button_release_event) (ClutterStage *stage, + ClutterButtonEvent *event); + void (* scroll_event) (ClutterStage *stage, + ClutterScrollEvent *event); + void (* key_press_event) (ClutterStage *stage, + ClutterKeyEvent *event); + void (* key_release_event) (ClutterStage *stage, + ClutterKeyEvent *event); + void (* motion_event) (ClutterStage *stage, + ClutterMotionEvent *event); + void (* stage_state_event) (ClutterStage *stage, + ClutterStageStateEvent *event); + gboolean (* delete_event) (ClutterStage *stage, + ClutterAnyEvent *event); /* padding for future expansion */ void (*_clutter_stage1) (void); diff --git a/doc/reference/clutter-sections.txt b/doc/reference/clutter-sections.txt index d6e8cc233..88b21671d 100644 --- a/doc/reference/clutter-sections.txt +++ b/doc/reference/clutter-sections.txt @@ -468,8 +468,6 @@ clutter_backend_post_parse
clutter-util -clutter_util_trap_x_errors -clutter_util_untrap_x_errors clutter_util_next_p2
@@ -560,7 +558,7 @@ ClutterAnyEvent ClutterButtonEvent ClutterKeyEvent ClutterMotionEvent -ClutterScollEvent +ClutterScrollEvent ClutterStageStateEvent ClutterInputDevice clutter_event_new diff --git a/doc/reference/tmpl/clutter-event.sgml b/doc/reference/tmpl/clutter-event.sgml index 34b0bb5f8..6de6181b6 100644 --- a/doc/reference/tmpl/clutter-event.sgml +++ b/doc/reference/tmpl/clutter-event.sgml @@ -151,6 +151,20 @@ Windowing events handled by Clutter. @axes: @device: + + + + + +@type: +@time: +@x: +@y: +@direction: +@modifier_state: +@axes: +@device: + diff --git a/doc/reference/tmpl/clutter-stage.sgml b/doc/reference/tmpl/clutter-stage.sgml index b4ebeb90e..5f7f5dc98 100644 --- a/doc/reference/tmpl/clutter-stage.sgml +++ b/doc/reference/tmpl/clutter-stage.sgml @@ -62,6 +62,14 @@ Macro evaluating to the height of the #ClutterStage @Param2: @Returns: + + + + + +@clutterstage: the object which received the signal. +@arg1: +