2015-08-06 14:24:14 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <wlc/wlc.h>
|
|
|
|
#include "layout.h"
|
|
|
|
#include "handlers.h"
|
|
|
|
|
|
|
|
bool handle_output_created(wlc_handle output) {
|
2015-08-06 14:40:16 +02:00
|
|
|
add_output(output);
|
2015-08-06 14:24:14 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_output_destroyed(wlc_handle output) {
|
2015-08-06 14:40:41 +02:00
|
|
|
destroy_output(output);
|
2015-08-06 14:24:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) {
|
|
|
|
}
|
|
|
|
|
|
|
|
bool handle_view_created(wlc_handle view) {
|
2015-08-08 23:01:22 +02:00
|
|
|
add_view(view);
|
2015-08-06 14:24:14 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_view_destroyed(wlc_handle view) {
|
2015-08-08 23:01:22 +02:00
|
|
|
destroy_view(view);
|
2015-08-06 14:24:14 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_view_focus(wlc_handle view, bool focus) {
|
2015-08-08 23:01:22 +02:00
|
|
|
printf("View focused\n");
|
2015-08-06 14:24:14 +02:00
|
|
|
wlc_view_set_state(view, WLC_BIT_ACTIVATED, focus);
|
2015-08-08 23:01:22 +02:00
|
|
|
focused_view = view;
|
2015-08-06 14:24:14 +02:00
|
|
|
}
|