CtkEventControllerMotion

CtkEventControllerMotion — Event controller for motion events

Functions

Signals

void enter Run First
void leave Run First
void motion Run First

Types and Values

Object Hierarchy

    GObject
    ╰── CtkEventController
        ╰── CtkEventControllerMotion

Includes

#include <ctk/ctk.h>

Description

CtkEventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.

This object was added in 3.24.

Functions

ctk_event_controller_motion_new ()

CtkEventController *
ctk_event_controller_motion_new (CtkWidget *widget);

Creates a new event controller that will handle motion events for the given widget .

Parameters

widget

a CtkWidget

 

Returns

a new CtkEventControllerMotion

Since: 3.24

Types and Values

CtkEventControllerMotion

typedef struct _CtkEventControllerMotion CtkEventControllerMotion;

Signal Details

The “enter” signal

void
user_function (CtkEventControllerMotion *controller,
               double                    x,
               double                    y,
               gpointer                  user_data)

Signals that the pointer has entered the widget.

Parameters

controller

The object that received the signal

 

x

the x coordinate

 

y

the y coordinate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “leave” signal

void
user_function (CtkEventControllerMotion *controller,
               gpointer                  user_data)

Signals that pointer has left the widget.

Parameters

controller

The object that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “motion” signal

void
user_function (CtkEventControllerMotion *controller,
               double                    x,
               double                    y,
               gpointer                  user_data)

Emitted when the pointer moves inside the widget.

Parameters

controller

The object that received the signal

 

x

the x coordinate

 

y

the y coordinate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

See Also

CtkEventController