Class Efl.Input.Pointer
Event data carried over with any pointer event (mouse, touch, pen, ...)
Syntax
public class Pointer : Object, IEvent, IState, IWrapper, IDisposable
Constructors
Pointer(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected Pointer(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
Pointer(Object)
Initializes a new instance of the Efl.Input.Pointer class.
Declaration
public Pointer(Object parent = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
Pointer(IntPtr, Object)
Initializes a new instance of the Efl.Input.Pointer class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected Pointer(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
Action
The action represented by this event.
Declaration
public Action Action { get; set; }
Property Value
Type | Description |
---|---|
Efl.Pointer.Action | Event action |
Button
The mouse button that triggered the event.
Valid if and only if Efl.Input.Pointer.GetValueHas (object still in beta stage)(button
) is true
.
Declaration
public int Button { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | 1 to 32, 0 if not a button event. |
ButtonFlags
Double or triple click information.
Declaration
public Flags ButtonFlags { get; set; }
Property Value
Type | Description |
---|---|
Efl.Pointer.Flags | Button information flags |
Device
Input device that originated this event.
Declaration
public Device Device { get; set; }
Property Value
Type | Description |
---|---|
Efl.Input.Device | Input device origin |
DoubleClick
true
if Efl.Input.Pointer.ButtonFlags indicates a double click (2nd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public bool DoubleClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EventFlags
Extra flags for this event, may be changed by the user.
Declaration
public Flags EventFlags { get; set; }
Property Value
Type | Description |
---|---|
Efl.Input.Flags | Input event flags |
Fake
true
if the event was fake, not triggered by real hardware.
Declaration
public bool Fake { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Position
Position where the event happened, relative to the window. See Efl.Input.Pointer.PrecisePosition for floating point precision (subpixel location).
Declaration
public Position2D Position { get; set; }
Property Value
Type | Description |
---|---|
Eina.Position2D | The position of the event, in pixels. |
PrecisePosition
Position where the event happened, relative to the window. This position is in floating point values, for more precise coordinates, in subpixels. Note that many input devices are unable to give better precision than a single pixel, so this may be equal to Efl.Input.Pointer.Position.
See also Efl.Input.Pointer.Position.
Declaration
public Vector2 PrecisePosition { get; set; }
Property Value
Type | Description |
---|---|
Eina.Vector2 | The position of the event, in pixels. |
PreviousPosition
Position of the previous event, valid for move events. Relative to the window. May be equal to Efl.Input.Pointer.Position (by default).
This position, in integers, is an approximation of Efl.Input.Pointer.GetValue (object still in beta stage)(previous_x
), Efl.Input.Pointer.GetValue (object still in beta stage)(previous_y
). Use Efl.Input.Pointer.PreviousPosition if you need simple pixel positions, but prefer the generic interface if you need precise coordinates.
Declaration
public Position2D PreviousPosition { get; set; }
Property Value
Type | Description |
---|---|
Eina.Position2D | The position of the event, in pixels. |
Processed
true
if Efl.Input.IEvent.EventFlags indicates the event is on hold.
Declaration
public bool Processed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Scrolling
true
if Efl.Input.IEvent.EventFlags indicates the event happened while scrolling.
Declaration
public bool Scrolling { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Source
The object where this event first originated, in case of propagation or repetition of the event.
Declaration
public Object Source { get; set; }
Property Value
Type | Description |
---|---|
Efl.Object | Source object: Efl.Gfx.IEntity |
Timestamp
The time at which an event was generated. If the event is generated by a server (eg. X.org or Wayland), then the time may be set by the server. Usually this time will be based on the monotonic clock, if available, but this class can not guarantee it.
Declaration
public double Timestamp { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Time in milliseconds when the event happened. |
TouchId
The ID associated with this pointer. In case there are multiple pointers (for example when multiple fingers are touching the screen) this number uniquely identifies each pointer, for as long as it is present. This is, when a finger is lifted its ID can be later reused by another finger touching the screen.
Declaration
public int TouchId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An ID uniquely identifying this pointer among the currently present pointers. |
TripleClick
true
if Efl.Input.Pointer.ButtonFlags indicates a triple click (3rd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public bool TripleClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
WheelDelta
Delta movement of the wheel in discrete steps.
Declaration
public int WheelDelta { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Wheel movement delta |
WheelHorizontal
Direction of the wheel, usually vertical.
Declaration
public bool WheelHorizontal { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If |
Methods
GetAction()
The action represented by this event.
Declaration
public virtual Action GetAction()
Returns
Type | Description |
---|---|
Efl.Pointer.Action | Event action |
GetButton()
The mouse button that triggered the event.
Valid if and only if Efl.Input.Pointer.GetValueHas (object still in beta stage)(button
) is true
.
Declaration
public virtual int GetButton()
Returns
Type | Description |
---|---|
System.Int32 | 1 to 32, 0 if not a button event. |
GetButtonFlags()
Double or triple click information.
Declaration
public virtual Flags GetButtonFlags()
Returns
Type | Description |
---|---|
Efl.Pointer.Flags | Button information flags |
GetButtonPressed(Int32)
Whether a mouse button is pressed at the moment of the event.
Valid if and only if Efl.Input.Pointer.GetValueHas (object still in beta stage)(button_pressed
) is true
.
Declaration
public virtual bool GetButtonPressed(int button)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | button | 1 to 32, 0 if not a button event. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetDevice()
Input device that originated this event.
Declaration
public virtual Device GetDevice()
Returns
Type | Description |
---|---|
Efl.Input.Device | Input device origin |
GetDoubleClick()
true
if Efl.Input.Pointer.ButtonFlags indicates a double click (2nd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public virtual bool GetDoubleClick()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetEventFlags()
Extra flags for this event, may be changed by the user.
Declaration
public virtual Flags GetEventFlags()
Returns
Type | Description |
---|---|
Efl.Input.Flags | Input event flags |
GetFake()
true
if the event was fake, not triggered by real hardware.
Declaration
public virtual bool GetFake()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetPosition()
Position where the event happened, relative to the window. See Efl.Input.Pointer.PrecisePosition for floating point precision (subpixel location).
Declaration
public virtual Position2D GetPosition()
Returns
Type | Description |
---|---|
Eina.Position2D | The position of the event, in pixels. |
GetPrecisePosition()
Position where the event happened, relative to the window. This position is in floating point values, for more precise coordinates, in subpixels. Note that many input devices are unable to give better precision than a single pixel, so this may be equal to Efl.Input.Pointer.Position.
See also Efl.Input.Pointer.Position.
Declaration
public virtual Vector2 GetPrecisePosition()
Returns
Type | Description |
---|---|
Eina.Vector2 | The position of the event, in pixels. |
GetPreviousPosition()
Position of the previous event, valid for move events. Relative to the window. May be equal to Efl.Input.Pointer.Position (by default).
This position, in integers, is an approximation of Efl.Input.Pointer.GetValue (object still in beta stage)(previous_x
), Efl.Input.Pointer.GetValue (object still in beta stage)(previous_y
). Use Efl.Input.Pointer.PreviousPosition if you need simple pixel positions, but prefer the generic interface if you need precise coordinates.
Declaration
public virtual Position2D GetPreviousPosition()
Returns
Type | Description |
---|---|
Eina.Position2D | The position of the event, in pixels. |
GetProcessed()
true
if Efl.Input.IEvent.EventFlags indicates the event is on hold.
Declaration
public virtual bool GetProcessed()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetScrolling()
true
if Efl.Input.IEvent.EventFlags indicates the event happened while scrolling.
Declaration
public virtual bool GetScrolling()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetSource()
The object where this event first originated, in case of propagation or repetition of the event.
Declaration
public virtual Object GetSource()
Returns
Type | Description |
---|---|
Efl.Object | Source object: Efl.Gfx.IEntity |
GetTimestamp()
The time at which an event was generated. If the event is generated by a server (eg. X.org or Wayland), then the time may be set by the server. Usually this time will be based on the monotonic clock, if available, but this class can not guarantee it.
Declaration
public virtual double GetTimestamp()
Returns
Type | Description |
---|---|
System.Double | Time in milliseconds when the event happened. |
GetTouchId()
The ID associated with this pointer. In case there are multiple pointers (for example when multiple fingers are touching the screen) this number uniquely identifies each pointer, for as long as it is present. This is, when a finger is lifted its ID can be later reused by another finger touching the screen.
Declaration
public virtual int GetTouchId()
Returns
Type | Description |
---|---|
System.Int32 | An ID uniquely identifying this pointer among the currently present pointers. |
GetTripleClick()
true
if Efl.Input.Pointer.ButtonFlags indicates a triple click (3rd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public virtual bool GetTripleClick()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetWheelDelta()
Delta movement of the wheel in discrete steps.
Declaration
public virtual int GetWheelDelta()
Returns
Type | Description |
---|---|
System.Int32 | Wheel movement delta |
GetWheelHorizontal()
Direction of the wheel, usually vertical.
Declaration
public virtual bool GetWheelHorizontal()
Returns
Type | Description |
---|---|
System.Boolean | If |
Reset()
Resets the internal data to 0 or default values.
Declaration
public virtual void Reset()
SetAction(Action)
The action represented by this event.
Declaration
public virtual void SetAction(Action act)
Parameters
Type | Name | Description |
---|---|---|
Efl.Pointer.Action | act | Event action |
SetButton(Int32)
The mouse button that triggered the event.
Valid if and only if Efl.Input.Pointer.GetValueHas (object still in beta stage)(button
) is true
.
Declaration
public virtual void SetButton(int but)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | but | 1 to 32, 0 if not a button event. |
SetButtonFlags(Flags)
Double or triple click information.
Declaration
public virtual void SetButtonFlags(Flags flags)
Parameters
Type | Name | Description |
---|---|---|
Efl.Pointer.Flags | flags | Button information flags |
SetButtonPressed(Int32, Boolean)
Whether a mouse button is pressed at the moment of the event.
Valid if and only if Efl.Input.Pointer.GetValueHas (object still in beta stage)(button_pressed
) is true
.
Declaration
public virtual void SetButtonPressed(int button, bool pressed)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | button | 1 to 32, 0 if not a button event. |
System.Boolean | pressed |
|
SetDevice(Device)
Input device that originated this event.
Declaration
public virtual void SetDevice(Device dev)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.Device | dev | Input device origin |
SetDoubleClick(Boolean)
true
if Efl.Input.Pointer.ButtonFlags indicates a double click (2nd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public virtual void SetDoubleClick(bool val)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | val |
|
SetEventFlags(Flags)
Extra flags for this event, may be changed by the user.
Declaration
public virtual void SetEventFlags(Flags flags)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.Flags | flags | Input event flags |
SetPosition(Position2D)
Position where the event happened, relative to the window. See Efl.Input.Pointer.PrecisePosition for floating point precision (subpixel location).
Declaration
public virtual void SetPosition(Position2D pos)
Parameters
Type | Name | Description |
---|---|---|
Eina.Position2D | pos | The position of the event, in pixels. |
SetPrecisePosition(Vector2)
Position where the event happened, relative to the window. This position is in floating point values, for more precise coordinates, in subpixels. Note that many input devices are unable to give better precision than a single pixel, so this may be equal to Efl.Input.Pointer.Position.
See also Efl.Input.Pointer.Position.
Declaration
public virtual void SetPrecisePosition(Vector2 pos)
Parameters
Type | Name | Description |
---|---|---|
Eina.Vector2 | pos | The position of the event, in pixels. |
SetPreviousPosition(Position2D)
Position of the previous event, valid for move events. Relative to the window. May be equal to Efl.Input.Pointer.Position (by default).
This position, in integers, is an approximation of Efl.Input.Pointer.GetValue (object still in beta stage)(previous_x
), Efl.Input.Pointer.GetValue (object still in beta stage)(previous_y
). Use Efl.Input.Pointer.PreviousPosition if you need simple pixel positions, but prefer the generic interface if you need precise coordinates.
Declaration
public virtual void SetPreviousPosition(Position2D pos)
Parameters
Type | Name | Description |
---|---|---|
Eina.Position2D | pos | The position of the event, in pixels. |
SetProcessed(Boolean)
true
if Efl.Input.IEvent.EventFlags indicates the event is on hold.
Declaration
public virtual void SetProcessed(bool val)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | val |
|
SetScrolling(Boolean)
true
if Efl.Input.IEvent.EventFlags indicates the event happened while scrolling.
Declaration
public virtual void SetScrolling(bool val)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | val |
|
SetSource(Object)
The object where this event first originated, in case of propagation or repetition of the event.
Declaration
public virtual void SetSource(Object src)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | src | Source object: Efl.Gfx.IEntity |
SetTimestamp(Double)
Call this when generating events manually.
Declaration
public virtual void SetTimestamp(double ms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | ms | Time in milliseconds when the event happened. |
SetTouchId(Int32)
The ID associated with this pointer. In case there are multiple pointers (for example when multiple fingers are touching the screen) this number uniquely identifies each pointer, for as long as it is present. This is, when a finger is lifted its ID can be later reused by another finger touching the screen.
Declaration
public virtual void SetTouchId(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | An ID uniquely identifying this pointer among the currently present pointers. |
SetTripleClick(Boolean)
true
if Efl.Input.Pointer.ButtonFlags indicates a triple click (3rd press).
This is just a helper function around Efl.Input.Pointer.ButtonFlags.
Declaration
public virtual void SetTripleClick(bool val)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | val |
|
SetWheelDelta(Int32)
Delta movement of the wheel in discrete steps.
Declaration
public virtual void SetWheelDelta(int dist)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dist | Wheel movement delta |
SetWheelHorizontal(Boolean)
Direction of the wheel, usually vertical.
Declaration
public virtual void SetWheelHorizontal(bool horizontal)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | horizontal | If |