Package org.lwjgl.system.windows
Class TOUCHINPUT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.TOUCHINPUT
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class TOUCHINPUT extends Struct implements NativeResource
Encapsulates data for touch input.Member documentation
x
– the x-coordinate (horizontal point) of the touch input. This member is indicated in hundredths of a pixel of physical screen coordinates.y
– the y-coordinate (vertical point) of the touch input. This member is indicated in hundredths of a pixel of physical screen coordinates.hSource
– a device handle for the source input device. Each device is given a unique provider at run time by the touch input provider.dwID
– a touch point identifier that distinguishes a particular touch input. This value stays consistent in a touch contact sequence from the point a contact comes down until it comes back up. An ID may be reused later for subsequent contacts.dwFlags
– a set of bit flags that specify various aspects of touch point press, release, and motion. The bits in this member can be any reasonable combination of the values in the Remarks section.dwMask
– a set of bit flags that specify which of the optional fields in the structure contain valid values. The availability of valid information in the optional fields is device-specific. Applications should use an optional field value only when the corresponding bit is set indwMask
. This field may contain a combination of thedwMask
flags mentioned in the Remarks section.dwTime
– the time stamp for the event, in milliseconds. The consuming application should note that the system performs no validation on this field; when theUser32.TOUCHINPUTMASKF_TIMEFROMSYSTEM
flag is not set, the accuracy and sequencing of values in this field are completely dependent on the touch input provider.dwExtraInfo
– an additional value associated with the touch event.cxContact
– the width of the touch contact area in hundredths of a pixel in physical screen coordinates. This value is only valid if thedwMask
member has theUser32.TOUCHINPUTMASKF_CONTACTAREA
flag set.cyContact
– the height of the touch contact area in hundredths of a pixel in physical screen coordinates. This value is only valid if thedwMask
member has theUser32.TOUCHINPUTMASKF_CONTACTAREA
flag set.
Layout
struct TOUCHINPUT { LONG x; LONG y; HANDLE hSource; DWORD dwID; DWORD dwFlags; DWORD dwMask; DWORD dwTime; ULONG_PTR dwExtraInfo; DWORD cxContact; DWORD cyContact; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
TOUCHINPUT.Buffer
An array ofTOUCHINPUT
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description TOUCHINPUT(java.nio.ByteBuffer container)
Creates aTOUCHINPUT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static TOUCHINPUT
calloc()
Returns a newTOUCHINPUT
instance allocated withmemCalloc
.static TOUCHINPUT.Buffer
calloc(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withmemCalloc
.static TOUCHINPUT
callocStack()
Returns a newTOUCHINPUT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static TOUCHINPUT.Buffer
callocStack(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static TOUCHINPUT.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newTOUCHINPUT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static TOUCHINPUT
callocStack(MemoryStack stack)
Returns a newTOUCHINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static TOUCHINPUT
create()
Returns a newTOUCHINPUT
instance allocated withBufferUtils
.static TOUCHINPUT.Buffer
create(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withBufferUtils
.static TOUCHINPUT
create(long address)
static TOUCHINPUT.Buffer
create(long address, int capacity)
Create aTOUCHINPUT.Buffer
instance at the specified memory.int
cxContact()
Returns the value of thecxContact
field.int
cyContact()
Returns the value of thecyContact
field.long
dwExtraInfo()
Returns the value of thedwExtraInfo
field.int
dwFlags()
Returns the value of thedwFlags
field.int
dwID()
Returns the value of thedwID
field.int
dwMask()
Returns the value of thedwMask
field.int
dwTime()
Returns the value of thedwTime
field.long
hSource()
Returns the value of thehSource
field.static TOUCHINPUT
malloc()
Returns a newTOUCHINPUT
instance allocated withmemAlloc
.static TOUCHINPUT.Buffer
malloc(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withmemAlloc
.static TOUCHINPUT
mallocStack()
Returns a newTOUCHINPUT
instance allocated on the thread-localMemoryStack
.static TOUCHINPUT.Buffer
mallocStack(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated on the thread-localMemoryStack
.static TOUCHINPUT.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newTOUCHINPUT.Buffer
instance allocated on the specifiedMemoryStack
.static TOUCHINPUT
mallocStack(MemoryStack stack)
Returns a newTOUCHINPUT
instance allocated on the specifiedMemoryStack
.int
sizeof()
Returnssizeof(struct)
.int
x()
Returns the value of thex
field.int
y()
Returns the value of they
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
-
-
-
Constructor Detail
-
TOUCHINPUT
public TOUCHINPUT(java.nio.ByteBuffer container)
Creates aTOUCHINPUT
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returnssizeof(struct)
.
-
x
public int x()
Returns the value of thex
field.
-
y
public int y()
Returns the value of they
field.
-
hSource
public long hSource()
Returns the value of thehSource
field.
-
dwID
public int dwID()
Returns the value of thedwID
field.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlags
field.
-
dwMask
public int dwMask()
Returns the value of thedwMask
field.
-
dwTime
public int dwTime()
Returns the value of thedwTime
field.
-
dwExtraInfo
public long dwExtraInfo()
Returns the value of thedwExtraInfo
field.
-
cxContact
public int cxContact()
Returns the value of thecxContact
field.
-
cyContact
public int cyContact()
Returns the value of thecyContact
field.
-
malloc
public static TOUCHINPUT malloc()
Returns a newTOUCHINPUT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static TOUCHINPUT calloc()
Returns a newTOUCHINPUT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static TOUCHINPUT create()
Returns a newTOUCHINPUT
instance allocated withBufferUtils
.
-
create
public static TOUCHINPUT create(long address)
-
malloc
public static TOUCHINPUT.Buffer malloc(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static TOUCHINPUT.Buffer calloc(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static TOUCHINPUT.Buffer create(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static TOUCHINPUT.Buffer create(long address, int capacity)
Create aTOUCHINPUT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static TOUCHINPUT mallocStack()
Returns a newTOUCHINPUT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static TOUCHINPUT callocStack()
Returns a newTOUCHINPUT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static TOUCHINPUT mallocStack(MemoryStack stack)
Returns a newTOUCHINPUT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static TOUCHINPUT callocStack(MemoryStack stack)
Returns a newTOUCHINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static TOUCHINPUT.Buffer mallocStack(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static TOUCHINPUT.Buffer callocStack(int capacity)
Returns a newTOUCHINPUT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static TOUCHINPUT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newTOUCHINPUT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static TOUCHINPUT.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newTOUCHINPUT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-