diff --git a/src/sugar3/event-controller/sugar-rotate-controller.c b/src/sugar3/event-controller/sugar-rotate-controller.c index 34cb893c..c18f3754 100644 --- a/src/sugar3/event-controller/sugar-rotate-controller.c +++ b/src/sugar3/event-controller/sugar-rotate-controller.c @@ -256,6 +256,12 @@ sugar_rotate_controller_class_init (SugarRotateControllerClass *klass) controller_class->get_state = sugar_rotate_controller_get_state; controller_class->reset = sugar_rotate_controller_reset; + /** + * SugarRotateController::angle-changed: + * @controller: the object on which the signal is emitted + * @angle: Current angle + * @angle_delta: Difference with the starting angle + */ signals[ANGLE_CHANGED] = g_signal_new ("angle-changed", SUGAR_TYPE_ROTATE_CONTROLLER, @@ -275,6 +281,17 @@ sugar_rotate_controller_new (void) return g_object_new (SUGAR_TYPE_ROTATE_CONTROLLER, NULL); } +/** + * sugar_rotate_controller_get_angle_delta: + * @controller: a #SugarRotateController + * @delta: (out) (transfer none): angle delta + * + * If @controller is on state %SUGAR_EVENT_CONTROLLER_STATE_RECOGNIZED, + * this function returns %TRUE and fills in @delta with the angle difference + * since the gesture was first recognized. + * + * Returns: %TRUE if @controller is recognizing a rotate gesture + **/ gboolean sugar_rotate_controller_get_angle_delta (SugarRotateController *controller, gdouble *delta) diff --git a/src/sugar3/event-controller/sugar-zoom-controller.c b/src/sugar3/event-controller/sugar-zoom-controller.c index 48211478..be51c943 100644 --- a/src/sugar3/event-controller/sugar-zoom-controller.c +++ b/src/sugar3/event-controller/sugar-zoom-controller.c @@ -252,6 +252,11 @@ sugar_zoom_controller_class_init (SugarZoomControllerClass *klass) controller_class->get_state = sugar_zoom_controller_get_state; controller_class->reset = sugar_zoom_controller_reset; + /** + * SugarZoomController::zoom-changed: + * @controller: the object on which the signal is emitted + * @delta: Difference with the starting zooming state + */ signals[ZOOM_CHANGED] = g_signal_new ("zoom-changed", SUGAR_TYPE_ZOOM_CONTROLLER, @@ -271,6 +276,18 @@ sugar_zoom_controller_new (void) return g_object_new (SUGAR_TYPE_ZOOM_CONTROLLER, NULL); } +/** + * sugar_zoom_controller_get_zoom_delta: + * @controller: a #SugarZoomController + * @delta: (out) (transfer none): zoom delta + * + * If @controller is on state %SUGAR_EVENT_CONTROLLER_STATE_RECOGNIZED, + * this function returns %TRUE and fills in @delta with the zooming + * difference since the gesture was recognized (hence the starting point + * is considered 1x). + * + * Returns: %TRUE if @controller is recognizing a zoom gesture + **/ gboolean sugar_zoom_controller_get_zoom_delta (SugarZoomController *controller, gdouble *delta)