Recognizes tablet stylus input.
The provided signals just relay the basic information of the stylus events.
type Cb_GObject_Gdouble_Gdouble_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
X : Gdouble;
Y : Gdouble);
type Cb_Gtk_Gesture_Stylus_Gdouble_Gdouble_Void is not null access procedure
(Self : access Gtk_Gesture_Stylus_Record'Class;
X : Gdouble;
Y : Gdouble);
function Get_Axes
(Self : not null access Gtk_Gesture_Stylus_Record;
Axes : Gdk_Axis_Use_Array;
Values : out Gdouble_Array) return Boolean
Returns the current values for the requested Axes. This function must be called from the handler of one of the [signalGtk.GestureStylus::down], [signalGtk.GestureStylus::motion], [signalGtk.GestureStylus::up] or [signalGtk.GestureStylus::proximity] signals.
array of requested axes, terminated with Gdk.Enums.Gdk_Axis_Ignore
return location for the axis values
True if there is a current value for the axes
function Get_Axis
(Self : not null access Gtk_Gesture_Stylus_Record;
Axis : Gdk.Enums.Gdk_Axis_Use;
Value : out Gdouble) return Boolean
Returns the current value for the requested Axis. This function must be called from the handler of one of the [signalGtk.GestureStylus::down], [signalGtk.GestureStylus::motion], [signalGtk.GestureStylus::up] or [signalGtk.GestureStylus::proximity] signals.
requested device axis
return location for the axis value
True if there is a current value for the axis
function Get_Backlog
(Self : not null access Gtk_Gesture_Stylus_Record;
Backlog : out Gdk.Device.Gdk_Time_Coord_Array_Access)
return Boolean
Returns the accumulated backlog of tracking information. By default, GTK will limit rate of input events. On stylus input where accuracy of strokes is paramount, this function returns the accumulated coordinate/timing state before the emission of the current [Gtk.GestureStylus::motion] signal. This function may only be called within a [signalGtk.GestureStylus::motion] signal handler, the state given in this signal and obtainable through [methodGtk.GestureStylus.get_axis] express the latest (most up-to-date) state in motion history. The Backlog is provided in chronological order.
coordinates and times for the backlog events. Should be freed by caller.
True if there is a backlog to unfold in the current state.
function Get_Device_Tool
(Self : not null access Gtk_Gesture_Stylus_Record)
return Gdk.Device_Tool.Gdk_Device_Tool
Returns the GdkDeviceTool currently driving input through this gesture. This function must be called from the handler of one of the [signalGtk.GestureStylus::down], [signalGtk.GestureStylus::motion], [signalGtk.GestureStylus::up] or [signalGtk.GestureStylus::proximity] signals.
The current stylus tool. Has transfer-ownership='none'.
function Get_Stylus_Only
(Self : not null access Gtk_Gesture_Stylus_Record) return Boolean
Checks whether the gesture is for styluses only. Stylus-only gestures will signal events exclusively from stylus input devices. Since: gtk+ 4.10
True if the gesture is only for stylus events
function Get_Type return Glib.GType
type Gtk_Gesture_Stylus is access all Gtk_Gesture_Stylus_Record'Class;
function Gtk_Gesture_Stylus_New return Gtk_Gesture_Stylus
Creates a new GtkGestureStylus.
type Gtk_Gesture_Stylus_Record is new Gtk_Gesture_Single_Record with null record;
procedure Gtk_New (Self : out Gtk_Gesture_Stylus)
Creates a new GtkGestureStylus. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Initialize
(Self : not null access Gtk_Gesture_Stylus_Record'Class)
Creates a new GtkGestureStylus. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure On_Down
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the stylus touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Down
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_Gtk_Gesture_Stylus_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the stylus touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Motion
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the stylus moves while touching the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Motion
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_Gtk_Gesture_Stylus_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the stylus moves while touching the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Proximity
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the stylus is in proximity of the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Proximity
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_Gtk_Gesture_Stylus_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the stylus is in proximity of the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Up
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the stylus no longer touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure On_Up
(Self : not null access Gtk_Gesture_Stylus_Record;
Call : Cb_Gtk_Gesture_Stylus_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the stylus no longer touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
procedure Set_Stylus_Only
(Self : not null access Gtk_Gesture_Stylus_Record;
Stylus_Only : Boolean)
Sets the state of stylus-only If true, the gesture will exclusively handle events from stylus input devices, otherwise it'll handle events from any pointing device. Since: gtk+ 4.10
whether the gesture is used exclusively for stylus events
Signal_Down : constant Glib.Signal_Name := "down";
Emitted when the stylus touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
Signal_Motion : constant Glib.Signal_Name := "motion";
Emitted when the stylus moves while touching the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
Signal_Proximity : constant Glib.Signal_Name := "proximity";
Emitted when the stylus is in proximity of the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
Signal_Up : constant Glib.Signal_Name := "up";
Emitted when the stylus no longer touches the device.
Callback parameters: -- @param X the X coordinate of the stylus event -- @param Y the Y coordinate of the stylus event
Stylus_Only_Property : constant Glib.Properties.Property_Boolean;
If this gesture should exclusively react to stylus input devices.