forked from enlightenment/efl
94 lines
2.6 KiB
Plaintext
94 lines
2.6 KiB
Plaintext
enum Efl.Input.Device.Type
|
|
{
|
|
[[General type of input device.
|
|
|
|
Legacy support since 1.8 as $Evas_Device_Class.
|
|
]]
|
|
none, [[Not a device.]]
|
|
seat, [[The user/seat (the user themselves).]]
|
|
keyboard, [[A regular keyboard, numberpad or attached buttons.]]
|
|
mouse, [[A mouse, trackball or touchpad relative motion device.]]
|
|
touch, [[A touchscreen with fingers or stylus.]]
|
|
pen, [[A special pen device.]]
|
|
wand, [[A laser pointer, wii-style or "minority report" pointing device.]]
|
|
gamepad, [[A gamepad controller or joystick.]]
|
|
}
|
|
|
|
/* TODO: Add canvas property. Current problem is we need to return
|
|
Efl.Ui.Win and not Evas:
|
|
@property canvas { values { canvas: Efl.Canvas; } }
|
|
*/
|
|
|
|
class Efl.Input.Device (Efl.Object)
|
|
{
|
|
[[Represents a pointing device, such as a touch finger, a pen or a mouse.
|
|
|
|
@since 1.18
|
|
]]
|
|
methods {
|
|
@property device_type {
|
|
[[Device type property]]
|
|
values {
|
|
klass: Efl.Input.Device.Type; [[Input device class]]
|
|
}
|
|
}
|
|
@property source {
|
|
[[Device source property]]
|
|
values {
|
|
src: Efl.Input.Device; [[Input device]]
|
|
}
|
|
}
|
|
@property seat {
|
|
[[Get the @Efl.Input.Device that represents a seat.
|
|
|
|
This method will find the seat the device belongs to.
|
|
|
|
For this, it walk through device's parents looking for a device
|
|
with @Efl.Input.Device.Type.seat. It may be
|
|
the device itself.
|
|
|
|
In case no seat is found, $null is returned.
|
|
]]
|
|
get {}
|
|
values {
|
|
seat: Efl.Input.Device; [[The seat this device belongs to.]]
|
|
}
|
|
}
|
|
@property seat_id {
|
|
[[Seat id number
|
|
|
|
@since 1.20
|
|
]]
|
|
values {
|
|
id: uint; [[The id of the seat]]
|
|
}
|
|
}
|
|
children_iterate {
|
|
[[Lists the children attached to this device.
|
|
|
|
This is only meaningful with seat devices, as they are groups of
|
|
real input devices.
|
|
|
|
@since 1.20
|
|
]]
|
|
return: iterator<const(Efl.Input.Device)> @owned; [[List of device children]]
|
|
}
|
|
has_pointer_caps {
|
|
[[Determine whether a device has pointer capabilities.
|
|
|
|
Returns 1 for Mouse, Touch, Pen, Pointer, and Wand type devices.
|
|
|
|
If a seat device is passed, returns the number of pointer devices in the seat.
|
|
|
|
@since 1.20
|
|
]]
|
|
return: uint; [[Pointer caps]]
|
|
}
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.destructor;
|
|
Efl.Object.parent { set; }
|
|
}
|
|
}
|