Clutter.DropAction

g Clutter.Action Clutter.Action Clutter.DropAction Clutter.DropAction Clutter.Action->Clutter.DropAction Clutter.ActorMeta Clutter.ActorMeta Clutter.ActorMeta->Clutter.Action GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.ActorMeta GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.ActorMeta (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

Clutter.ActorMeta (1), GObject.Object (7)

do_can_drop (actor, event_x, event_y)

do_drop (actor, event_x, event_y)

do_over_in (actor)

do_over_out (actor)

Properties

Inherited:

Clutter.ActorMeta (3)

Signals

Inherited:

GObject.Object (1)

Name

Short Description

can-drop

The ::can-drop signal is emitted when the dragged actor is dropped on actor.

drop

The ::drop signal is emitted when the dragged actor is dropped on actor.

drop-cancel

The ::drop-cancel signal is emitted when the drop is refused by an emission of the Clutter.DropAction ::can-drop signal.

over-in

The ::over-in signal is emitted when the dragged actor crosses into actor.

over-out

The ::over-out signal is emitted when the dragged actor crosses outside actor.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Clutter.Action

r

Class Details

class Clutter.DropAction(**kwargs)
Bases:

Clutter.Action

Abstract:

No

Structure:

Clutter.DropActionClass

The Clutter.DropAction structure contains only private data and should be accessed using the provided API.

New in version 1.8.

classmethod new()
Returns:

the newly created Clutter.DropAction

Return type:

Clutter.Action

Creates a new Clutter.DropAction.

Use Clutter.Actor.add_action() to add the action to a Clutter.Actor.

New in version 1.8.

do_can_drop(actor, event_x, event_y) virtual
Parameters:
Return type:

bool

do_drop(actor, event_x, event_y) virtual
Parameters:
do_over_in(actor) virtual
Parameters:

actor (Clutter.Actor) –

do_over_out(actor) virtual
Parameters:

actor (Clutter.Actor) –

Signal Details

Clutter.DropAction.signals.can_drop(drop_action, actor, event_x, event_y)
Signal Name:

can-drop

Flags:

RUN_LAST

Parameters:
  • drop_action (Clutter.DropAction) – The object which received the signal

  • actor (Clutter.Actor) – the Clutter.Actor attached to the action

  • event_x (float) – the X coordinate (in stage space) of the drop event

  • event_y (float) – the Y coordinate (in stage space) of the drop event

Returns:

True if the drop is accepted, and False otherwise

Return type:

bool

The ::can-drop signal is emitted when the dragged actor is dropped on actor. The return value of the ::can-drop signal will determine whether or not the Clutter.DropAction ::drop signal is going to be emitted on action.

The default implementation of Clutter.DropAction returns True for this signal.

New in version 1.8.

Clutter.DropAction.signals.drop(drop_action, actor, event_x, event_y)
Signal Name:

drop

Flags:

RUN_LAST

Parameters:
  • drop_action (Clutter.DropAction) – The object which received the signal

  • actor (Clutter.Actor) – the Clutter.Actor attached to the action

  • event_x (float) – the X coordinate (in stage space) of the drop event

  • event_y (float) – the Y coordinate (in stage space) of the drop event

The ::drop signal is emitted when the dragged actor is dropped on actor. This signal is only emitted if at least an handler of Clutter.DropAction ::can-drop returns True.

New in version 1.8.

Clutter.DropAction.signals.drop_cancel(drop_action, actor, event_x, event_y)
Signal Name:

drop-cancel

Flags:

RUN_LAST

Parameters:
  • drop_action (Clutter.DropAction) – The object which received the signal

  • actor (Clutter.Actor) – the Clutter.Actor attached to the action

  • event_x (float) – the X coordinate (in stage space) of the drop event

  • event_y (float) – the Y coordinate (in stage space) of the drop event

The ::drop-cancel signal is emitted when the drop is refused by an emission of the Clutter.DropAction ::can-drop signal.

After the ::drop-cancel signal is fired the active drag is terminated.

New in version 1.12.

Clutter.DropAction.signals.over_in(drop_action, actor)
Signal Name:

over-in

Flags:

RUN_LAST

Parameters:

The ::over-in signal is emitted when the dragged actor crosses into actor.

New in version 1.8.

Clutter.DropAction.signals.over_out(drop_action, actor)
Signal Name:

over-out

Flags:

RUN_LAST

Parameters:

The ::over-out signal is emitted when the dragged actor crosses outside actor.

New in version 1.8.