[actor] Rename focus-in and focus-out signals

For consistency, and since those signals are key-related, the
::focus-in signal is not ::key-focus-in and the ::focus-out
signal is now ::key-focus-out.
This commit is contained in:
Emmanuele Bassi 2009-05-06 17:56:40 +01:00
parent d0ad5a8abb
commit 515350a77f
3 changed files with 18 additions and 18 deletions

View File

@ -417,8 +417,8 @@ enum
HIDE, HIDE,
DESTROY, DESTROY,
PARENT_SET, PARENT_SET,
FOCUS_IN, KEY_FOCUS_IN,
FOCUS_OUT, KEY_FOCUS_OUT,
PAINT, PAINT,
PICK, PICK,
REALIZE, REALIZE,
@ -3886,35 +3886,35 @@ clutter_actor_class_init (ClutterActorClass *klass)
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
/** /**
* ClutterActor::focus-in: * ClutterActor::key-focus-in:
* @actor: the actor which now has key focus * @actor: the actor which now has key focus
* *
* The ::focus-in signal is emitted when @actor recieves key focus. * The ::focus-in signal is emitted when @actor recieves key focus.
* *
* Since: 0.6 * Since: 0.6
*/ */
actor_signals[FOCUS_IN] = actor_signals[KEY_FOCUS_IN] =
g_signal_new (I_("focus-in"), g_signal_new (I_("key-focus-in"),
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, focus_in), G_STRUCT_OFFSET (ClutterActorClass, key_focus_in),
NULL, NULL, NULL, NULL,
clutter_marshal_VOID__VOID, clutter_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
/** /**
* ClutterActor::focus-out: * ClutterActor::key-focus-out:
* @actor: the actor which now has key focus * @actor: the actor which now has key focus
* *
* The ::focus-out signal is emitted when @actor loses key focus. * The ::key-focus-out signal is emitted when @actor loses key focus.
* *
* Since: 0.6 * Since: 0.6
*/ */
actor_signals[FOCUS_OUT] = actor_signals[KEY_FOCUS_OUT] =
g_signal_new (I_("focus-out"), g_signal_new (I_("key-focus-out"),
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, focus_out), G_STRUCT_OFFSET (ClutterActorClass, key_focus_out),
NULL, NULL, NULL, NULL,
clutter_marshal_VOID__VOID, clutter_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);

View File

@ -206,8 +206,8 @@ struct _ClutterActor
* @enter_event: signal class closure for #ClutterActor::enter-event * @enter_event: signal class closure for #ClutterActor::enter-event
* @leave_event: signal class closure for #ClutterActor::leave-event * @leave_event: signal class closure for #ClutterActor::leave-event
* @captured_event: signal class closure for #ClutterActor::captured-event * @captured_event: signal class closure for #ClutterActor::captured-event
* @focus_in: signal class closure for #ClutterActor::focus-in * @key_focus_in: signal class closure for #ClutterActor::focus-in
* @focus_out: signal class closure for #ClutterActor::focus-out * @key_focus_out: signal class closure for #ClutterActor::focus-out
* *
* Base class for actors. * Base class for actors.
*/ */
@ -269,8 +269,8 @@ struct _ClutterActorClass
ClutterCrossingEvent *event); ClutterCrossingEvent *event);
gboolean (* captured_event) (ClutterActor *actor, gboolean (* captured_event) (ClutterActor *actor,
ClutterEvent *event); ClutterEvent *event);
void (* focus_in) (ClutterActor *actor); void (* key_focus_in) (ClutterActor *actor);
void (* focus_out) (ClutterActor *actor); void (* key_focus_out) (ClutterActor *actor);
/*< private >*/ /*< private >*/
/* padding for future expansion */ /* padding for future expansion */

View File

@ -1472,7 +1472,7 @@ clutter_stage_set_key_focus (ClutterStage *stage,
priv->key_focused_actor = NULL; priv->key_focused_actor = NULL;
} }
else else
g_signal_emit_by_name (stage, "focus-out"); g_signal_emit_by_name (stage, "key-focus-out");
if (actor) if (actor)
{ {
@ -1481,10 +1481,10 @@ clutter_stage_set_key_focus (ClutterStage *stage,
g_object_weak_ref (G_OBJECT (actor), g_object_weak_ref (G_OBJECT (actor),
on_key_focused_weak_notify, on_key_focused_weak_notify,
stage); stage);
g_signal_emit_by_name (priv->key_focused_actor, "focus-in"); g_signal_emit_by_name (priv->key_focused_actor, "key-focus-in");
} }
else else
g_signal_emit_by_name (stage, "focus-in"); g_signal_emit_by_name (stage, "key-focus-in");
} }
/** /**