minput-hop
Tiny client library for Synergy KVM and derivatives.
Loading...
Searching...
No Matches
osio.h
Go to the documentation of this file.
1
2#ifndef OSIO_H
3#define OSIO_H
4
5#include "minput.h"
6
12#define OSIO_MOUSE_LEFT 0x01
13#define OSIO_MOUSE_RIGHT 0x03
14
15#ifndef OSIO_PRINTF_BUFFER_SZ
16# define OSIO_PRINTF_BUFFER_SZ 512
17#endif /* !OSIO_PRINTF_BUFFER_SZ */
18
19#ifndef OSIO_PRINTF_PREFIX_SZ
20# define OSIO_PRINTF_PREFIX_SZ 128
21#endif /* !OSIO_PRINTF_BUFFER_SZ */
22
23#ifndef OSIO_NUM_BUFFER_SZ
24# define OSIO_NUM_BUFFER_SZ 50
25#endif /* OSIO_NUM_BUFFER_SZ */
26
27void osio_parse_args( int argc, char* argv[], struct NETIO_CFG* config );
28
29int osio_ui_setup();
30
31void osio_ui_cleanup();
32
33int osio_loop( struct NETIO_CFG* config );
34
35void osio_printf(
36 const char* file, int line, int status, const char* fmt, ... );
37
43uint32_t osio_get_time();
44
48void osio_screen_get_w_h( uint16_t* screen_w_p, uint16_t* screen_h_p );
49
50void osio_mouse_move( uint16_t mouse_x, uint16_t mouse_y );
51
52void osio_mouse_down( uint16_t mouse_x, uint16_t mouse_y, uint16_t mouse_btn );
53
54void osio_mouse_up( uint16_t mouse_x, uint16_t mouse_y, uint16_t mouse_btn );
55
56void osio_key_down( uint16_t key_id, uint16_t key_mod, uint16_t key_btn );
57
58void osio_key_up( uint16_t key_id, uint16_t key_mod, uint16_t key_btn );
59
60void osio_key_rpt( uint16_t key_id, uint16_t key_mod, uint16_t key_btn );
61
62void osio_set_clipboard( const char* buffer, size_t buffer_sz );
63
64void osio_logging_setup();
65
66void osio_logging_cleanup();
67
68int minput_main( struct NETIO_CFG* config );
69
70#ifdef MINPUT_OS_WIN16
71
72#define MAKEWORD( p1, p2 ) \
73 ((WORD)((BYTE)(uint32_t*)(p1) & 0xFF) | \
74 ((WORD)((BYTE)(uint32_t*)(p2) & 0xFF) << 8))
75
76
77#endif /* MINPUT_OS_WIN16 */
78
79#endif /* !OSIO_H */
80
uint32_t osio_get_time()
Get the current system time in milliseconds.
void osio_screen_get_w_h(uint16_t *screen_w_p, uint16_t *screen_h_p)
Get the system screen width/height in pixels.