mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 11:30:45 -05:00
click-action: Add get_button()
Allow retrieving the pointer button that caused the ::clicked signal to be emitted. http://bugzilla.clutter-project.org/show_bug.cgi?id=2287
This commit is contained in:
parent
550d5ab621
commit
36d45b660f
@ -332,3 +332,21 @@ clutter_click_action_release (ClutterClickAction *action)
|
||||
|
||||
click_action_set_pressed (action, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_click_action_get_button:
|
||||
* @action: a #ClutterClickAction
|
||||
*
|
||||
* Retrieves the button that was pressed.
|
||||
*
|
||||
* Return value: the button value
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
guint
|
||||
clutter_click_action_get_button (ClutterClickAction *action)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_CLICK_ACTION (action), 0);
|
||||
|
||||
return action->priv->press_button;
|
||||
}
|
||||
|
@ -94,6 +94,8 @@ struct _ClutterClickActionClass
|
||||
GType clutter_click_action_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterAction *clutter_click_action_new (void);
|
||||
|
||||
guint clutter_click_action_get_button (ClutterClickAction *action);
|
||||
void clutter_click_action_release (ClutterClickAction *action);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -2346,6 +2346,7 @@ ClutterStatePrivate
|
||||
ClutterClickAction
|
||||
ClutterClickActionClass
|
||||
clutter_click_action_new
|
||||
clutter_click_action_get_button
|
||||
clutter_click_action_release
|
||||
|
||||
<SUBSECTION Standard>
|
||||
|
Loading…
Reference in New Issue
Block a user