void test_add_keyboard_interface(Test* test)
{
- g_error("teste");
spice_server_add_interface(test->server, &test->keyboard_sin.base);
}
-void test_set_simple_command_list(Test *test, int *simple_commands, int num_commands)
-{
- int i;
-
- /* FIXME: leaks */
- test->commands = malloc(sizeof(*test->commands) * num_commands);
- memset(test->commands, 0, sizeof(*test->commands) * num_commands);
- test->num_commands = num_commands;
- for (i = 0 ; i < num_commands; ++i) {
- test->commands[i].command = simple_commands[i];
- }
-}
-
-void test_set_command_list(Test *test, Command *commands, int num_commands)
-{
- test->commands = commands;
- test->num_commands = num_commands;
-}
-
-
Test *test_new(SpiceCoreInterface *core)
{
int port = 5912;
int width;
int height;
- // qxl scripted rendering commands and io
- Command *commands;
- int num_commands;
- int cmd_index;
-
int target_surface;
// callbacks
void (*on_client_disconnected)(Test *test);
};
-void test_set_simple_command_list(Test *test, int *command, int num_commands);
-void test_set_command_list(Test *test, Command *command, int num_commands);
void test_add_display_interface(Test *test);
void test_add_agent_interface(SpiceServer *server); // TODO - Test *test
void test_add_keyboard_interface(Test *test);
core->timer_start(ping_timer, ping_ms);
}
-int simple_commands[] = {
- SIMPLE_DRAW,
-};
-
int main(void)
{
Test *test;
test_add_keyboard_interface(test);
- test_set_simple_command_list(test, simple_commands, COUNT(simple_commands));
-
-
//ping_timer = core->timer_add(pinger, NULL);
//core->timer_start(ping_timer, ping_ms);