vitasdk
Documentation of the vitasdk
touch.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_TOUCH_H_
8 #define _PSP2_TOUCH_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
18 typedef enum SceTouchErrorCode {
21  SCE_TOUCH_ERROR_FATAL = 0x803500FF
23 
24 #define SCE_TOUCH_MAX_REPORT 8
25 
32 typedef enum SceTouchPortType {
37 
43 typedef enum SceTouchSamplingState {
47 
53 typedef enum SceTouchReportInfo {
56 
57 typedef struct SceTouchPanelInfo {
71 
72 typedef struct SceTouchReport {
81 
82 typedef struct SceTouchData {
87 } SceTouchData;
89 
97 
107 int sceTouchRead(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs);
108 
118 int sceTouchPeek(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs);
119 
127 
135 
142 
149 
150 #ifdef __cplusplus
151 }
152 #endif
153 
154 #endif /* _PSP2_TOUCH_H_ */
155 
SceUInt8 reserved[30]
Reserved.
Definition: touch.h:68
SceInt16 minDispY
Min display Y origin (top left)
Definition: touch.h:63
SceInt16 maxAaY
Max active area Y position.
Definition: touch.h:61
int sceTouchRead(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs)
Get touch data (Blocking)
SceInt16 maxAaX
Max active area X position.
Definition: touch.h:60
SceInt16 minAaY
Min active area Y position.
Definition: touch.h:59
SceInt16 maxDispY
Max display Y origin (bottom right)
Definition: touch.h:65
SceTouchErrorCode
Touch error codes.
Definition: touch.h:18
int sceTouchPeek(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs)
Get touch data (Polling)
SceUInt8 reserved[8]
Reserved.
Definition: touch.h:77
int sceTouchGetSamplingState(SceUInt32 port, SceTouchSamplingState *pState)
Get sampling state of touch panel.
#define SCE_TOUCH_MAX_REPORT
FIXME 6 on front | 4 on back.
Definition: touch.h:24
SceInt16 y
Y position.
Definition: touch.h:76
SceTouchReport report[SCE_TOUCH_MAX_REPORT]
Touch reports.
Definition: touch.h:86
int sceTouchSetSamplingState(SceUInt32 port, SceTouchSamplingState state)
Set sampling state of touch panel.
SceUInt8 id
Touch ID.
Definition: touch.h:73
SceUInt32 reportNum
Number of touch reports.
Definition: touch.h:85
int sceTouchEnableTouchForce(SceUInt32 port)
Enable touch force output.
SceUInt8 minForce
Min touch force value.
Definition: touch.h:66
SceUInt8 maxForce
Max touch force value.
Definition: touch.h:67
SceTouchReportInfo
Info field of SceTouchReport structure.
Definition: touch.h:53
SceUInt16 info
Information of this touch.
Definition: touch.h:78
SceUInt32 status
Unused.
Definition: touch.h:84
SceInt16 minAaX
Min active area X position.
Definition: touch.h:58
SceUInt64 timeStamp
Data timestamp.
Definition: touch.h:83
int sceTouchDisableTouchForce(SceUInt32 port)
Disable touch force output.
SceTouchPortType
Port numbers of touch panels.
Definition: touch.h:32
SceTouchSamplingState
Sampling port setting of the touch panel.
Definition: touch.h:43
SceInt16 maxDispX
Max display X origin (bottom right)
Definition: touch.h:64
int sceTouchGetPanelInfo(SceUInt32 port, SceTouchPanelInfo *pPanelInfo)
Get Touch Panel information.
SceUInt8 force
Touch force.
Definition: touch.h:74
SceInt16 x
X position.
Definition: touch.h:75
SceInt16 minDispX
Min display X origin (top left)
Definition: touch.h:62
VITASDK_BUILD_ASSERT_EQ(0x30, SceTouchPanelInfo)
@ SCE_TOUCH_ERROR_INVALID_ARG
Definition: touch.h:19
@ SCE_TOUCH_ERROR_PRIV_REQUIRED
Definition: touch.h:20
@ SCE_TOUCH_ERROR_FATAL
Definition: touch.h:21
@ SCE_TOUCH_REPORT_INFO_HIDE_UPPER_LAYER
Definition: touch.h:54
@ SCE_TOUCH_PORT_FRONT
Front touch panel id.
Definition: touch.h:33
@ SCE_TOUCH_PORT_BACK
Back touch panel id.
Definition: touch.h:34
@ SCE_TOUCH_PORT_MAX_NUM
Number of touch panels.
Definition: touch.h:35
@ SCE_TOUCH_SAMPLING_STATE_STOP
Definition: touch.h:44
@ SCE_TOUCH_SAMPLING_STATE_START
Definition: touch.h:45
Definition: touch.h:82
Definition: touch.h:57
Definition: touch.h:72
int16_t SceInt16
Definition: types.h:41
uint16_t SceUInt16
Definition: types.h:42
uint64_t SceUInt64
Definition: types.h:51
uint32_t SceUInt32
Definition: types.h:45
uint8_t SceUInt8
Definition: types.h:36