CtkGestureStylus

CtkGestureStylus — Gesture for stylus input

Functions

Signals

void down Run Last
void motion Run Last
void proximity Run Last
void up Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── CtkEventController
        ╰── CtkGesture
            ╰── CtkGestureSingle
                ╰── CtkGestureStylus

Includes

#include <ctk/ctk.h>

Description

CtkGestureStylus is a CtkGesture implementation specific to stylus input. The provided signals just provide the basic information

Functions

ctk_gesture_stylus_new ()

CtkGesture *
ctk_gesture_stylus_new (CtkWidget *widget);

Creates a new CtkGestureStylus.

Parameters

widget

a CtkWidget

 

Returns

a newly created stylus gesture

Since: 3.24


ctk_gesture_stylus_get_axis ()

gboolean
ctk_gesture_stylus_get_axis (CtkGestureStylus *gesture,
                             CdkAxisUse axis,
                             gdouble *value);

Returns the current value for the requested axis . This function must be called from either the “down”, “motion”, “up” or “proximity” signals.

Parameters

gesture

a CtkGestureStylus

 

axis

requested device axis

 

value

return location for the axis value.

[out]

Returns

TRUE if there is a current value for the axis

Since: 3.24


ctk_gesture_stylus_get_axes ()

gboolean
ctk_gesture_stylus_get_axes (CtkGestureStylus *gesture,
                             CdkAxisUse axes[],
                             gdouble **values);

Returns the current values for the requested axes . This function must be called from either the “down”, “motion”, “up” or “proximity” signals.

Parameters

gesture

a CtkGestureStylus

 

axes

array of requested axes, terminated with CDK_AXIS_IGNORE.

[array]

values

return location for the axis values.

[out][array]

Returns

TRUE if there is a current value for the axes

Since: 3.24


ctk_gesture_stylus_get_device_tool ()

CdkDeviceTool *
ctk_gesture_stylus_get_device_tool (CtkGestureStylus *gesture);

Returns the CdkDeviceTool currently driving input through this gesture. This function must be called from either the “down”, “motion”, “up” or “proximity” signal handlers.

Parameters

gesture

a CtkGestureStylus

 

Returns

The current stylus tool.

[nullable][transfer none]

Since: 3.24

Types and Values

CtkGestureStylus

typedef struct _CtkGestureStylus CtkGestureStylus;

Signal Details

The “down” signal

void
user_function (CtkGestureStylus *ctkgesturestylus,
               double            arg1,
               double            arg2,
               gpointer          user_data)

Flags: Run Last


The “motion” signal

void
user_function (CtkGestureStylus *ctkgesturestylus,
               double            arg1,
               double            arg2,
               gpointer          user_data)

Flags: Run Last


The “proximity” signal

void
user_function (CtkGestureStylus *ctkgesturestylus,
               double            arg1,
               double            arg2,
               gpointer          user_data)

Flags: Run Last


The “up” signal

void
user_function (CtkGestureStylus *ctkgesturestylus,
               double            arg1,
               double            arg2,
               gpointer          user_data)

Flags: Run Last

See Also

CtkGesture, CtkGestureSingle