[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:
parent
d0ad5a8abb
commit
515350a77f
@ -417,8 +417,8 @@ enum
|
||||
HIDE,
|
||||
DESTROY,
|
||||
PARENT_SET,
|
||||
FOCUS_IN,
|
||||
FOCUS_OUT,
|
||||
KEY_FOCUS_IN,
|
||||
KEY_FOCUS_OUT,
|
||||
PAINT,
|
||||
PICK,
|
||||
REALIZE,
|
||||
@ -3886,35 +3886,35 @@ clutter_actor_class_init (ClutterActorClass *klass)
|
||||
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||
|
||||
/**
|
||||
* ClutterActor::focus-in:
|
||||
* ClutterActor::key-focus-in:
|
||||
* @actor: the actor which now has key focus
|
||||
*
|
||||
* The ::focus-in signal is emitted when @actor recieves key focus.
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
actor_signals[FOCUS_IN] =
|
||||
g_signal_new (I_("focus-in"),
|
||||
actor_signals[KEY_FOCUS_IN] =
|
||||
g_signal_new (I_("key-focus-in"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterActorClass, focus_in),
|
||||
G_STRUCT_OFFSET (ClutterActorClass, key_focus_in),
|
||||
NULL, NULL,
|
||||
clutter_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* ClutterActor::focus-out:
|
||||
* ClutterActor::key-focus-out:
|
||||
* @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
|
||||
*/
|
||||
actor_signals[FOCUS_OUT] =
|
||||
g_signal_new (I_("focus-out"),
|
||||
actor_signals[KEY_FOCUS_OUT] =
|
||||
g_signal_new (I_("key-focus-out"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterActorClass, focus_out),
|
||||
G_STRUCT_OFFSET (ClutterActorClass, key_focus_out),
|
||||
NULL, NULL,
|
||||
clutter_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
@ -206,8 +206,8 @@ struct _ClutterActor
|
||||
* @enter_event: signal class closure for #ClutterActor::enter-event
|
||||
* @leave_event: signal class closure for #ClutterActor::leave-event
|
||||
* @captured_event: signal class closure for #ClutterActor::captured-event
|
||||
* @focus_in: signal class closure for #ClutterActor::focus-in
|
||||
* @focus_out: signal class closure for #ClutterActor::focus-out
|
||||
* @key_focus_in: signal class closure for #ClutterActor::focus-in
|
||||
* @key_focus_out: signal class closure for #ClutterActor::focus-out
|
||||
*
|
||||
* Base class for actors.
|
||||
*/
|
||||
@ -269,8 +269,8 @@ struct _ClutterActorClass
|
||||
ClutterCrossingEvent *event);
|
||||
gboolean (* captured_event) (ClutterActor *actor,
|
||||
ClutterEvent *event);
|
||||
void (* focus_in) (ClutterActor *actor);
|
||||
void (* focus_out) (ClutterActor *actor);
|
||||
void (* key_focus_in) (ClutterActor *actor);
|
||||
void (* key_focus_out) (ClutterActor *actor);
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
|
@ -1472,7 +1472,7 @@ clutter_stage_set_key_focus (ClutterStage *stage,
|
||||
priv->key_focused_actor = NULL;
|
||||
}
|
||||
else
|
||||
g_signal_emit_by_name (stage, "focus-out");
|
||||
g_signal_emit_by_name (stage, "key-focus-out");
|
||||
|
||||
if (actor)
|
||||
{
|
||||
@ -1481,10 +1481,10 @@ clutter_stage_set_key_focus (ClutterStage *stage,
|
||||
g_object_weak_ref (G_OBJECT (actor),
|
||||
on_key_focused_weak_notify,
|
||||
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
|
||||
g_signal_emit_by_name (stage, "focus-in");
|
||||
g_signal_emit_by_name (stage, "key-focus-in");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user