| Mx Toolkit Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Properties | Signals | ||||
enum MxDragAxis; MxDraggable; struct MxDraggableIface; void mx_draggable_set_axis (MxDraggable *draggable,MxDragAxis axis); MxDragAxis mx_draggable_get_axis (MxDraggable *draggable); void mx_draggable_set_drag_threshold (MxDraggable *draggable,guint threshold); guint mx_draggable_get_drag_threshold (MxDraggable *draggable); void mx_draggable_set_containment_type (MxDraggable *draggable,MxDragContainment containment); MxDragContainment mx_draggable_get_containment_type (MxDraggable *draggable); void mx_draggable_set_containment_area (MxDraggable *draggable,gfloat x_1,gfloat y_1,gfloat x_2,gfloat y_2); void mx_draggable_get_containment_area (MxDraggable *draggable,gfloat *x_1,gfloat *y_1,gfloat *x_2,gfloat *y_2); void mx_draggable_set_drag_actor (MxDraggable *draggable,ClutterActor *actor); ClutterActor * mx_draggable_get_drag_actor (MxDraggable *draggable); void mx_draggable_disable (MxDraggable *draggable); void mx_draggable_enable (MxDraggable *draggable); gboolean mx_draggable_is_enabled (MxDraggable *draggable);
"axis" MxDragAxis : Read / Write "drag-actor" ClutterActor* : Read / Write "drag-enabled" gboolean : Read / Write "drag-threshold" guint : Read / Write
typedef struct _MxDraggable MxDraggable;
This is an opaque structure whose members cannot be directly accessed.
struct MxDraggableIface {
/* vfuncs, not signals */
void (* enable) (MxDraggable *draggable);
void (* disable) (MxDraggable *draggable);
/* signals */
void (* drag_begin) (MxDraggable *draggable,
gfloat event_x,
gfloat event_y,
gint event_button,
ClutterModifierType modifiers);
void (* drag_motion) (MxDraggable *draggable,
gfloat delta_x,
gfloat delta_y);
void (* drag_end) (MxDraggable *draggable,
gfloat event_x,
gfloat event_y);
};
Interface for draggable ClutterActors.
| virtual function called when enabling a MxDraggable; MX already provides a default implementation | |
| virtual function called when disabling a MxDraggable; MX already provides a default implementation | |
| class handler for the "drag-begin" signal | |
| class handler for the "drag-motion" signal | |
| class handler for the "drag-end" signal |
void mx_draggable_set_drag_threshold (MxDraggable *draggable,guint threshold);
void mx_draggable_set_containment_type (MxDraggable *draggable,MxDragContainment containment);
MxDragContainment mx_draggable_get_containment_type (MxDraggable *draggable);
void mx_draggable_set_containment_area (MxDraggable *draggable,gfloat x_1,gfloat y_1,gfloat x_2,gfloat y_2);
void mx_draggable_get_containment_area (MxDraggable *draggable,gfloat *x_1,gfloat *y_1,gfloat *x_2,gfloat *y_2);
void mx_draggable_set_drag_actor (MxDraggable *draggable,ClutterActor *actor);
ClutterActor * mx_draggable_get_drag_actor (MxDraggable *draggable);
FIXME
|
a MxDraggable |
Returns : |
a ClutterActor, or NULL. [transfer none]
|
"axis" property"axis" MxDragAxis : Read / Write
The axis along which the dragging should be performed.
Default value: MX_DRAG_AXIS_NONE
"drag-actor" property"drag-actor" ClutterActor* : Read / Write
An actor to use in place of the draggable while dragging.
"drag-enabled" property"drag-enabled" gboolean : Read / Write
Whether the Draggable is enabled.
Default value: TRUE
"drag-threshold" property"drag-threshold" guint : Read / Write
The amount of pixels required to start dragging.
Default value: 0
"drag-begin" signalvoid user_function (MxDraggable *mxdraggable,
gfloat arg1,
gfloat arg2,
gint arg3,
ClutterModifierType arg4,
gpointer user_data) : Run First
"drag-end" signalvoid user_function (MxDraggable *mxdraggable,
gfloat arg1,
gfloat arg2,
gpointer user_data) : Run First
"drag-motion" signalvoid user_function (MxDraggable *mxdraggable,
gfloat arg1,
gfloat arg2,
gpointer user_data) : Run First