2015-11-12 14:31:47 +01:00
|
|
|
#include <stdio.h>
|
2015-11-13 01:04:01 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <wayland-client.h>
|
|
|
|
#include "client.h"
|
|
|
|
#include "log.h"
|
|
|
|
|
|
|
|
struct client_state *state;
|
|
|
|
|
|
|
|
void sway_terminate(void) {
|
|
|
|
client_teardown(state);
|
|
|
|
exit(1);
|
|
|
|
}
|
2015-11-12 14:31:47 +01:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
2015-11-13 01:04:01 +01:00
|
|
|
init_log(L_INFO);
|
|
|
|
state = client_setup();
|
|
|
|
|
|
|
|
do {
|
|
|
|
if (!client_prerender(state)) continue;
|
|
|
|
cairo_set_source_rgb(state->cairo, 255, 0, 0);
|
|
|
|
cairo_rectangle(state->cairo, 0, 0, 100, 100);
|
|
|
|
cairo_fill(state->cairo);
|
|
|
|
} while (client_render(state));
|
|
|
|
|
|
|
|
client_teardown(state);
|
2015-11-12 14:31:47 +01:00
|
|
|
return 0;
|
|
|
|
}
|