aboutsummaryrefslogtreecommitdiff
path: root/SDL2_vnc.h
diff options
context:
space:
mode:
authorTom Harley2021-11-04 11:23:12 +0000
committerTom Harley2021-11-04 11:23:12 +0000
commitc9110cd30d6efd42de07b357ff144d5ccacb2541 (patch)
treea8280c9cbe6861cbb074c3773431965794b63426 /SDL2_vnc.h
parentInitial commit (diff)
downloadsdl2_vnc-c9110cd30d6efd42de07b357ff144d5ccacb2541.tar.gz
sdl2_vnc-c9110cd30d6efd42de07b357ff144d5ccacb2541.zip

Have library control window creation

This allows for the library to create a window of the correct size, and will also allow for future updates that have the client automatically resize the window (perhaps when receiving a desktop-size pseudoencoding).

Diffstat (limited to 'SDL2_vnc.h')
-rw-r--r--SDL2_vnc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/SDL2_vnc.h b/SDL2_vnc.h
index c6d4234..df9574a 100644
--- a/SDL2_vnc.h
+++ b/SDL2_vnc.h
@@ -55,6 +55,7 @@ typedef struct {
SDL_Thread *thread;
unsigned int fps;
vnc_colour_map colour_map;
+ SDL_Window *window;
} SDL_vnc;
typedef enum {
@@ -74,6 +75,9 @@ SDL_vnc_result init_vnc_connection(SDL_vnc *vnc, char *host, unsigned int port,
int wait_on_vnc_connection(SDL_vnc *vnc);
+SDL_Window *create_window_for_connection(SDL_vnc *vnc, char *title, int x,
+ int y, Uint32 flags);
+
int key_event(SDL_vnc *vnc, bool pressed, SDL_Keysym key);
int pointer_event(SDL_vnc *vnc, uint32_t button_mask, uint16_t x, uint16_t y,
int32_t mw_x, int32_t mw_y);