vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/touch.h>


Link the library to the executable:

SceTouch_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x30, SceTouchPanelInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceTouchReport)
 
 VITASDK_BUILD_ASSERT_EQ (0x90, SceTouchData)
 
int sceTouchGetPanelInfo (SceUInt32 port, SceTouchPanelInfo *pPanelInfo)
 Get Touch Panel information. More...
 
int sceTouchRead (SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs)
 Get touch data (Blocking) More...
 
int sceTouchPeek (SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs)
 Get touch data (Polling) More...
 
int sceTouchSetSamplingState (SceUInt32 port, SceTouchSamplingState state)
 Set sampling state of touch panel. More...
 
int sceTouchGetSamplingState (SceUInt32 port, SceTouchSamplingState *pState)
 Get sampling state of touch panel. More...
 
int sceTouchEnableTouchForce (SceUInt32 port)
 Enable touch force output. More...
 
int sceTouchDisableTouchForce (SceUInt32 port)
 Disable touch force output. More...
 

Macros

#define SCE_TOUCH_MAX_REPORT   8
 FIXME 6 on front | 4 on back. More...
 

Data Structure Documentation

◆ SceTouchPanelInfo

struct SceTouchPanelInfo
Data Fields
SceInt16 minAaX Min active area X position.
SceInt16 minAaY Min active area Y position.
SceInt16 maxAaX Max active area X position.
SceInt16 maxAaY Max active area Y position.
SceInt16 minDispX Min display X origin (top left)
SceInt16 minDispY Min display Y origin (top left)
SceInt16 maxDispX Max display X origin (bottom right)
SceInt16 maxDispY Max display Y origin (bottom right)
SceUInt8 minForce Min touch force value.
SceUInt8 maxForce Max touch force value.
SceUInt8 reserved[30] Reserved.

◆ SceTouchReport

struct SceTouchReport
Data Fields
SceUInt8 id Touch ID.
SceUInt8 force Touch force.
SceInt16 x X position.
SceInt16 y Y position.
SceUInt8 reserved[8] Reserved.
SceUInt16 info Information of this touch.

◆ SceTouchData

struct SceTouchData
Data Fields
SceUInt64 timeStamp Data timestamp.
SceUInt32 status Unused.
SceUInt32 reportNum Number of touch reports.
SceTouchReport report[SCE_TOUCH_MAX_REPORT] Touch reports.

Macro Definition Documentation

◆ SCE_TOUCH_MAX_REPORT

#define SCE_TOUCH_MAX_REPORT   8

FIXME 6 on front | 4 on back.

Enumeration Type Documentation

◆ SceTouchErrorCode

Touch error codes.

Enumerator
SCE_TOUCH_ERROR_INVALID_ARG 
SCE_TOUCH_ERROR_PRIV_REQUIRED 
SCE_TOUCH_ERROR_FATAL 

◆ SceTouchPortType

Port numbers of touch panels.

See also
sceTouchRead
sceTouchPeek
Enumerator
SCE_TOUCH_PORT_FRONT 

Front touch panel id.

SCE_TOUCH_PORT_BACK 

Back touch panel id.

SCE_TOUCH_PORT_MAX_NUM 

Number of touch panels.

◆ SceTouchSamplingState

Sampling port setting of the touch panel.

See also
sceTouchSetSamplingState
Enumerator
SCE_TOUCH_SAMPLING_STATE_STOP 
SCE_TOUCH_SAMPLING_STATE_START 

◆ SceTouchReportInfo

Info field of SceTouchReport structure.

See also
SceTouchReport
Enumerator
SCE_TOUCH_REPORT_INFO_HIDE_UPPER_LAYER 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( 0x30  ,
SceTouchPanelInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceTouchReport   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( 0x90  ,
SceTouchData   
)

◆ sceTouchGetPanelInfo()

int sceTouchGetPanelInfo ( SceUInt32  port,
SceTouchPanelInfo pPanelInfo 
)

Get Touch Panel information.

Parameters
[in]portPort number.
[out]pPanelInfoThe buffer to get the Touch Panel information.

◆ sceTouchRead()

int sceTouchRead ( SceUInt32  port,
SceTouchData pData,
SceUInt32  nBufs 
)

Get touch data (Blocking)

Parameters
[in]portPort Number.
[out]pDataBuffer to receive touch data.
[in]nBufsNumber of buffers to receive touch data.
Returns
Buffers count, between 1 and 'nBufs'. <0 on error.

◆ sceTouchPeek()

int sceTouchPeek ( SceUInt32  port,
SceTouchData pData,
SceUInt32  nBufs 
)

Get touch data (Polling)

Parameters
[in]portport number.
[out]pDataBuffer to receive touch data.
[in]nBufsNumber of buffers to receive touch data.
Returns
Buffers count, between 1 and 'nBufs'. <0 on error.

◆ sceTouchSetSamplingState()

int sceTouchSetSamplingState ( SceUInt32  port,
SceTouchSamplingState  state 
)

Set sampling state of touch panel.

Parameters
[in]portPort number.
[in]stateSampling state.

◆ sceTouchGetSamplingState()

int sceTouchGetSamplingState ( SceUInt32  port,
SceTouchSamplingState pState 
)

Get sampling state of touch panel.

Parameters
[in]portPort number.
[out]pStateThe buffer to receive sampling state.

◆ sceTouchEnableTouchForce()

int sceTouchEnableTouchForce ( SceUInt32  port)

Enable touch force output.

Parameters
[in]portPort number.

◆ sceTouchDisableTouchForce()

int sceTouchDisableTouchForce ( SceUInt32  port)

Disable touch force output.

Parameters
[in]portPort number.