1 #ifndef __TEST_DISPLAY_BASE_H__
2 #define __TEST_DISPLAY_BASE_H__
7 #include "basic_event_loop.h"
10 typedef struct TextAttributes
{
16 unsigned int invers
:1;
17 unsigned int unvisible
:1;
20 #define COUNT(x) ((sizeof(x)/sizeof(x[0])))
22 typedef struct Test Test
;
24 #define COMMANDS_SIZE 1024
26 #define MAX_HEIGHT 2048
27 #define MAX_WIDTH 2048
30 SpiceCoreInterface
*core
;
33 QXLInstance qxl_instance
;
34 QXLWorker
*qxl_worker
;
36 SpiceKbdInstance keyboard_sin
;
38 uint8_t primary_surface
[MAX_HEIGHT
* MAX_WIDTH
* 4];
42 SpiceTimer
*conn_timeout_timer
;
43 SpiceWatch
*mwatch
; /* watch master pty */
47 // Current mode (set by create_primary)
54 GMutex
* command_mutex
;
58 struct QXLCommandExt
* commands
[COMMANDS_SIZE
];
61 void (*on_client_connected
)(Test
*test
);
62 void (*on_client_disconnected
)(Test
*test
);
65 void test_add_display_interface(Test
*test
);
66 void test_add_agent_interface(SpiceServer
*server
); // TODO - Test *test
67 void test_add_keyboard_interface(Test
*test
);
68 Test
* test_new(SpiceCoreInterface
* core
);
70 void test_draw_update_char(Test
*test
, int x
, int y
, gunichar ch
, TextAttributes attrib
);
71 void test_spice_scroll(Test
*test
, int x1
, int y1
, int x2
, int y2
, int src_x
, int src_y
);
72 void test_spice_clear(Test
*test
, int x1
, int y1
, int x2
, int y2
);
75 uint32_t test_get_width(void);
76 uint32_t test_get_height(void);
78 void spice_test_config_parse_args(int argc
, char **argv
);
80 #endif /* __TEST_DISPLAY_BASE_H__ */