#pragma once /* generic structures */ typedef struct { char *name, *value; } backend_setting_str; typedef struct { char *name; int64_t value; } backend_setting_int; typedef enum { ws_keycomb_ctrlaltdel_press, ws_keycomb_alttab_press, ws_keycomb_alttab_release, ws_keycomb_unused } ws_input_keycomb; /* user input structures */ typedef struct __attribute__((__packed__)) { uint32_t x, y, flags; } ws_input_mouse; typedef struct __attribute__((__packed__)) { uint32_t code; bool down; } ws_input_kupdown; typedef struct __attribute__((__packed__)) { uint32_t code, shiftstate; } ws_input_kpress; typedef struct __attribute__((__packed__)) { const uint32_t *input; size_t length; } ws_input_unicode; /* display output structures */ typedef struct __attribute__((__packed__)) { uint32_t x; /* Destination X */ uint32_t y; /* Destination Y */ uint32_t width; /* Width */ uint32_t height; /* Height */ uint32_t dest_width; /* Destination Width */ uint32_t dest_height; /* Destination Height */ uint32_t bpp; /* Bits per Pixel */ uint32_t compressed; /* Flag: Compressed */ uint32_t size; /* DataSize */ } wrdp_core_display_bmp; typedef struct __attribute__((__packed__)) { int32_t left; int32_t top; int32_t right; int32_t bottom; } wrdp_core_display_bounds; typedef struct __attribute__((__packed__)) { int32_t nLeftRect; int32_t nTopRect; int32_t nWidth; int32_t nHeight; uint32_t color; } wrdp_core_display_opaque_rect_order; typedef struct __attribute__((__packed__)) { int32_t x; int32_t y; int32_t w; int32_t h; uint32_t fg; uint32_t rop; } wrdp_core_display_patblt_order; typedef struct __attribute__((__packed__)) { int32_t left; int32_t top; int32_t width; int32_t height; } wrdp_core_display_delta_rect; typedef struct __attribute__((__packed__)) { uint32_t color; uint32_t num_rect; wrdp_core_display_delta_rect *rects; } wrdp_core_display_m_opaque_rect; typedef struct __attribute__((__packed__)) { uint32_t rop; int32_t x; int32_t y; int32_t w; int32_t h; int32_t sx; int32_t sy; } wrdp_core_display_scr_blt; typedef struct __attribute__((__packed__)) { uint8_t resL; /* 2 bytes reserved must always be 0 */ uint8_t resH; uint8_t imgTypeL; /* 2 bytes image type. 1 = ICO, 2 = CUR */ uint8_t imgTypeH; uint8_t nbImgL; /* 2 bytes number of images */ uint8_t nbImgH; uint8_t width; /* 1 byte image width in pixels */ uint8_t height; /* 1 byte image height in pixels */ uint8_t nbColors; /* 1 bytenumber of colors. 0 if not using a color pallete */ uint8_t res; /* 1 byte reserved, should be 0 */ uint8_t xPosL; /* 2 bytes of hot spot x (for ICO, color planes, 0 or 1) */ uint8_t xPosH; uint8_t yPosL; /* 2 bytes of hot spot y (for ICO bits per pixel) */ uint8_t yPosH; uint8_t sizeLL; /* 4 bytes of image size */ uint8_t sizeLH; uint8_t sizeHL; uint8_t sizeHH; uint8_t offsetLL; /* 4 bytes of offset of the data */ uint8_t offsetLH; uint8_t offsetHL; uint8_t offsetHH; uint8_t *data; } wrdp_core_display_cursor; typedef struct { uint32_t id; uint32_t hx; uint32_t hy; uint32_t data_size; wrdp_core_display_cursor *cur; } wrdp_core_display_cursor_info; /* clipboard structures */ typedef enum { clip_format_unsupported = -1, clip_format_raw, clip_format_text, clip_format_unicode, clip_format_file_list } wrdp_enum_clip_format; typedef struct __attribute__((__packed__)) { /* DRAFT! */ wrdp_enum_clip_format format; } wrdp_backend_clipbrd_data_request; typedef struct __attribute__((__packed__)) { /* DRAFT! */ uint8_t count, *formats; } wrdp_backend_clipbrd_fmts; typedef struct __attribute__((__packed__)) { /* DRAFT! */ /* TODO: */ uint32_t size; uint8_t *data; } wrdp_backend_clipbrd_data; /* filetransfer structures */ typedef struct __attribute__((__packed__)) { uint16_t filename_len; uint32_t file_id; uint64_t file_size; } wrdp_backend_ft_list_entry; typedef struct __attribute__((__packed__)) { uint32_t file_id; uint64_t req_size; uint64_t file_offset; } wrdp_backend_ft_file_request; typedef enum { ft_status_success = 0, ft_status_failure, ft_status_already_runing } wrdp_backend_enum_ft_init_status; typedef struct __attribute__((__packed__)) { /* DRAFT! */ /* TODO: */ uint32_t file_id, transfer_id; uint8_t status; } wrdp_backend_ft_status; typedef struct __attribute__((__packed__)) { /* DRAFT! */ /* TODO: */ uint32_t transfer_id; uint32_t size; } wrdp_backend_ft_chunk;