2024-05-11 23:24:13 +02:00
|
|
|
package hid
|
|
|
|
|
|
|
|
|
|
import "core:c"
|
|
|
|
|
import sce "../common"
|
|
|
|
|
|
|
|
|
|
foreign import hid "system:SceHid_stub"
|
|
|
|
|
|
|
|
|
|
foreign hid {
|
|
|
|
|
/**
|
|
|
|
|
* Enumerate hid keyboards.
|
|
|
|
|
*
|
|
|
|
|
* @param[out] handle Buffer to receive keyboard hid handles.
|
|
|
|
|
* @param[int] count Number of keyboards to enumerate
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
sceHidKeyboardEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int ---
|
2024-05-11 23:24:13 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get hid keyboard reports (blocking).
|
|
|
|
|
*
|
|
|
|
|
* @param[in] handle Hid handle.
|
|
|
|
|
* @param[in] reports Buffer to receive reports.
|
|
|
|
|
* @param[in] nReports Number of reports to receive.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
sceHidKeyboardRead :: proc(handle: sce.UInt32, reports: []^SceHidKeyboardReport, nReports: c.int) -> c.int ---
|
2024-05-11 23:24:13 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get hid keyboard reports (non-blocking).
|
|
|
|
|
*
|
|
|
|
|
* @param[in] handle Hid handle.
|
|
|
|
|
* @param[in] reports Buffer to receive reports.
|
|
|
|
|
* @param[in] nReports Number of reports to receive.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
sceHidKeyboardPeek :: proc(handle: sce.UInt32, reports: [^]SceHidKeyboardReport, nReports: c.int) -> c.int ---
|
2024-05-11 23:24:13 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enumerate hid mice.
|
|
|
|
|
*
|
|
|
|
|
* @param[out] handle Buffer to receive mouse hid handles.
|
|
|
|
|
* @param[int] count Number of mice to enumerate
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
sceHidMouseEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int ---
|
2024-05-11 23:24:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get hid mouse reports.
|
|
|
|
|
*
|
|
|
|
|
* @param[in] handle Hid handle.
|
|
|
|
|
* @param[in] reports Buffer to receive reports.
|
|
|
|
|
* @param[in] nReports Number of reports to receive.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
sceHidMouseRead :: proc(handle: sce.UInt32, reports: []^SceHidMouseReport, nReports: c.int) -> c.int ---
|
2024-05-11 23:24:13 +02:00
|
|
|
}
|