## MxDraggable MxDraggable |

## Synopsis

    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);

## Object Hierarchy

      GInterface
       +----MxDraggable

## Prerequisites

MxDraggable requires ClutterActor.

## Properties

      "axis"                     MxDragAxis            : Read / Write
      "drag-actor"               ClutterActor*         : Read / Write
      "drag-enabled"             gboolean              : Read / Write
      "drag-threshold"           guint                 : Read / Write

## Signals

      "drag-begin"                                     : Run First
      "drag-end"                                       : Run First
      "drag-motion"                                    : Run First

## Description

## Details

### enum MxDragAxis

    typedef enum {
      MX_DRAG_AXIS_NONE,
      MX_DRAG_AXIS_X,
      MX_DRAG_AXIS_Y
    } MxDragAxis;

### MxDraggable

    typedef struct _MxDraggable MxDraggable;

This is an opaque structure whose members cannot be directly accessed.

### struct MxDraggableIface

    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.

`enable` () | virtual function called when enabling a MxDraggable; MX already provides a default implementation
`disable` () | virtual function called when disabling a MxDraggable; MX already provides a default implementation
`drag_begin` () | class handler for the "drag-begin" signal
`drag_motion` () | class handler for the "drag-motion" signal
`drag_end` () | class handler for the "drag-end" signal

### mx_draggable_set_axis ()

    void                mx_draggable_set_axis               (MxDraggable *draggable,
                                                             MxDragAxis axis);

### mx_draggable_get_axis ()

    MxDragAxis          mx_draggable_get_axis               (MxDraggable *draggable);

### mx_draggable_set_drag_threshold ()

    void                mx_draggable_set_drag_threshold     (MxDraggable *draggable,
                                                             guint threshold);

### mx_draggable_get_drag_threshold ()

    guint               mx_draggable_get_drag_threshold     (MxDraggable *draggable);

### mx_draggable_set_containment_type ()

    void                mx_draggable_set_containment_type   (MxDraggable *draggable,
                                                             MxDragContainment containment);

### mx_draggable_get_containment_type ()

    MxDragContainment   mx_draggable_get_containment_type   (MxDraggable *draggable);

### mx_draggable_set_containment_area ()

    void                mx_draggable_set_containment_area   (MxDraggable *draggable,
                                                             gfloat x_1,
                                                             gfloat y_1,
                                                             gfloat x_2,
                                                             gfloat y_2);

### mx_draggable_get_containment_area ()

    void                mx_draggable_get_containment_area   (MxDraggable *draggable,
                                                             gfloat *x_1,
                                                             gfloat *y_1,
                                                             gfloat *x_2,
                                                             gfloat *y_2);

### mx_draggable_set_drag_actor ()

    void                mx_draggable_set_drag_actor         (MxDraggable *draggable,
                                                             ClutterActor *actor);

### mx_draggable_get_drag_actor ()

    ClutterActor *      mx_draggable_get_drag_actor         (MxDraggable *draggable);

FIXME

`draggable` : | a MxDraggable
Returns : | a ClutterActor, or `NULL`. [transfer none]

### mx_draggable_disable ()

    void                mx_draggable_disable                (MxDraggable *draggable);

### mx_draggable_enable ()

    void                mx_draggable_enable                 (MxDraggable *draggable);

### mx_draggable_is_enabled ()

    gboolean            mx_draggable_is_enabled             (MxDraggable *draggable);

## Property Details

### The `"axis"` property

      "axis"                     MxDragAxis            : Read / Write

The axis along which the dragging should be performed.

Default value: MX_DRAG_AXIS_NONE

### The `"drag-actor"` property

      "drag-actor"               ClutterActor*         : Read / Write

An actor to use in place of the draggable while dragging.

### The `"drag-enabled"` property

      "drag-enabled"             gboolean              : Read / Write

Whether the Draggable is enabled.

Default value: TRUE

### The `"drag-threshold"` property

      "drag-threshold"           guint                 : Read / Write

The amount of pixels required to start dragging.

Default value: 0

## Signal Details

### The `"drag-begin"` signal

    void                user_function                      (MxDraggable        *mxdraggable,
                                                            gfloat              arg1,
                                                            gfloat              arg2,
                                                            gint                arg3,
                                                            ClutterModifierType arg4,
                                                            gpointer            user_data)        : Run First

`mxdraggable` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"drag-end"` signal

    void                user_function                      (MxDraggable *mxdraggable,
                                                            gfloat       arg1,
                                                            gfloat       arg2,
                                                            gpointer     user_data)        : Run First

`mxdraggable` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"drag-motion"` signal

    void                user_function                      (MxDraggable *mxdraggable,
                                                            gfloat       arg1,
                                                            gfloat       arg2,
                                                            gpointer     user_data)        : Run First

`mxdraggable` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.