Lines Matching refs:fullscreen
47 struct fullscreen { struct
54 int fullscreen; argument
65 struct fullscreen *fullscreen = data; in fullscreen_handler() local
67 fullscreen->fullscreen ^= 1; in fullscreen_handler()
68 window_set_fullscreen(window, fullscreen->fullscreen); in fullscreen_handler()
119 struct fullscreen *fullscreen = data; in redraw_handler() local
127 surface = window_get_surface(fullscreen->window); in redraw_handler()
134 widget_get_allocation(fullscreen->widget, &allocation); in redraw_handler()
151 if (fullscreen->fshell) { in redraw_handler()
159 fullscreen->width, fullscreen->height, in redraw_handler()
160 window_get_buffer_scale (fullscreen->window), in redraw_handler()
161 window_get_buffer_transform (fullscreen->window), in redraw_handler()
162 fullscreen->pointer_x, fullscreen->pointer_y, in redraw_handler()
163 method_name[fullscreen->present_method], in redraw_handler()
164 fullscreen->current_output ? output_get_model(fullscreen->current_output->output): "null"); in redraw_handler()
172 fullscreen->width, fullscreen->height, in redraw_handler()
173 window_get_buffer_scale (fullscreen->window), in redraw_handler()
174 window_get_buffer_transform (fullscreen->window), in redraw_handler()
175 fullscreen->pointer_x, fullscreen->pointer_y, in redraw_handler()
176 fullscreen->fullscreen); in redraw_handler()
181 while (y + 60 < fullscreen->height) { in redraw_handler()
186 while (x + 70 < fullscreen->width) { in redraw_handler()
187 if (window_has_focus(fullscreen->window) && in redraw_handler()
188 fullscreen->pointer_x >= x && fullscreen->pointer_x < x + 50 && in redraw_handler()
189 fullscreen->pointer_y >= y && fullscreen->pointer_y < y + 40) { in redraw_handler()
207 if (window_has_focus(fullscreen->window) && fullscreen->draw_cursor) { in redraw_handler()
211 fullscreen->pointer_x - 12, in redraw_handler()
212 fullscreen->pointer_y - 12); in redraw_handler()
214 fullscreen->pointer_x + 12, in redraw_handler()
215 fullscreen->pointer_y + 12); in redraw_handler()
219 fullscreen->pointer_x + 12, in redraw_handler()
220 fullscreen->pointer_y - 12); in redraw_handler()
222 fullscreen->pointer_x - 12, in redraw_handler()
223 fullscreen->pointer_y + 12); in redraw_handler()
229 fullscreen->pointer_x - 10, in redraw_handler()
230 fullscreen->pointer_y - 10); in redraw_handler()
232 fullscreen->pointer_x + 10, in redraw_handler()
233 fullscreen->pointer_y + 10); in redraw_handler()
237 fullscreen->pointer_x + 10, in redraw_handler()
238 fullscreen->pointer_y - 10); in redraw_handler()
240 fullscreen->pointer_x - 10, in redraw_handler()
241 fullscreen->pointer_y + 10); in redraw_handler()
253 struct fullscreen *fullscreen = data; in key_handler() local
283 if (fullscreen->fullscreen) in key_handler()
287 fullscreen->width = widths[current_size]; in key_handler()
288 fullscreen->height = heights[current_size]; in key_handler()
289 window_schedule_resize(fullscreen->window, in key_handler()
290 fullscreen->width, fullscreen->height); in key_handler()
294 if (!fullscreen->fshell) in key_handler()
298 if (fullscreen->current_output) in key_handler()
299 wl_output = output_get_wl_output(fullscreen->current_output->output); in key_handler()
300 fullscreen->present_method = (fullscreen->present_method + 1) % 5; in key_handler()
301 zwp_fullscreen_shell_v1_present_surface(fullscreen->fshell, in key_handler()
302 window_get_wl_surface(fullscreen->window), in key_handler()
303 fullscreen->present_method, in key_handler()
309 if (!fullscreen->fshell) in key_handler()
312 fsout = fullscreen->current_output; in key_handler()
316 zwp_fullscreen_shell_v1_present_surface(fullscreen->fshell, NULL, in key_handler()
319 if (fullscreen->current_output) { in key_handler()
320 if (fullscreen->current_output->link.next == &fullscreen->output_list) in key_handler()
323 fsout = wl_container_of(fullscreen->current_output->link.next, in key_handler()
326 fsout = wl_container_of(fullscreen->output_list.next, in key_handler()
330 fullscreen->current_output = fsout; in key_handler()
332 zwp_fullscreen_shell_v1_present_surface(fullscreen->fshell, in key_handler()
333 window_get_wl_surface(fullscreen->window), in key_handler()
334 fullscreen->present_method, in key_handler()
340 if (!fullscreen->fshell || !fullscreen->current_output) in key_handler()
344 if (fullscreen->current_output) in key_handler()
345 wl_output = output_get_wl_output(fullscreen->current_output->output); in key_handler()
347 zwp_fullscreen_shell_v1_present_surface_for_mode(fullscreen->fshell, in key_handler()
348 window_get_wl_surface(fullscreen->window), in key_handler()
354 if (fullscreen->fshell) in key_handler()
356 fullscreen->fullscreen ^= 1; in key_handler()
357 window_set_fullscreen(window, fullscreen->fullscreen); in key_handler()
373 struct fullscreen *fullscreen = data; in motion_handler() local
375 fullscreen->pointer_x = x; in motion_handler()
376 fullscreen->pointer_y = y; in motion_handler()
380 return fullscreen->draw_cursor ? CURSOR_BLANK : CURSOR_LEFT_PTR; in motion_handler()
388 struct fullscreen *fullscreen = data; in enter_handler() local
390 fullscreen->pointer_x = x; in enter_handler()
391 fullscreen->pointer_y = y; in enter_handler()
395 return fullscreen->draw_cursor ? CURSOR_BLANK : CURSOR_LEFT_PTR; in enter_handler()
403 struct fullscreen *fullscreen = data; in button_handler() local
408 window_move(fullscreen->window, input, in button_handler()
409 display_get_serial(fullscreen->display)); in button_handler()
413 window_show_frame_menu(fullscreen->window, input, time); in button_handler()
423 struct fullscreen *fullscreen = data; in touch_handler() local
424 window_move(fullscreen->window, input, display_get_serial(fullscreen->display)); in touch_handler()
431 struct fullscreen *fullscreen = data; in fshell_capability_handler() local
435 fullscreen->draw_cursor = 0; in fshell_capability_handler()
460 struct fullscreen *fullscreen = data; in output_handler() local
464 wl_list_for_each(fsout, &fullscreen->output_list, link) in output_handler()
474 wl_list_insert(&fullscreen->output_list, &fsout->link); in output_handler()
481 struct fullscreen *fullscreen = data; in global_handler() local
484 fullscreen->fshell = display_bind(display, id, in global_handler()
487 zwp_fullscreen_shell_v1_add_listener(fullscreen->fshell, in global_handler()
489 fullscreen); in global_handler()
495 struct fullscreen fullscreen; in main() local
499 fullscreen.width = 640; in main()
500 fullscreen.height = 480; in main()
501 fullscreen.fullscreen = 0; in main()
502 fullscreen.present_method = ZWP_FULLSCREEN_SHELL_V1_PRESENT_METHOD_DEFAULT; in main()
503 wl_list_init(&fullscreen.output_list); in main()
504 fullscreen.current_output = NULL; in main()
511 fullscreen.width = atol(argv[i]); in main()
516 fullscreen.height = atol(argv[i]); in main()
530 fullscreen.display = d; in main()
531 fullscreen.fshell = NULL; in main()
532 display_set_user_data(fullscreen.display, &fullscreen); in main()
533 display_set_global_handler(fullscreen.display, global_handler); in main()
534 display_set_output_configure_handler(fullscreen.display, output_handler); in main()
536 if (fullscreen.fshell) { in main()
537 fullscreen.window = window_create_custom(d); in main()
538 zwp_fullscreen_shell_v1_present_surface(fullscreen.fshell, in main()
539 window_get_wl_surface(fullscreen.window), in main()
540 fullscreen.present_method, in main()
543 fullscreen.draw_cursor = 1; in main()
545 fullscreen.window = window_create(d); in main()
546 fullscreen.draw_cursor = 0; in main()
549 fullscreen.widget = in main()
550 window_add_widget(fullscreen.window, &fullscreen); in main()
552 window_set_title(fullscreen.window, "Fullscreen"); in main()
554 widget_set_transparent(fullscreen.widget, 0); in main()
556 widget_set_default_cursor(fullscreen.widget, CURSOR_LEFT_PTR); in main()
557 widget_set_redraw_handler(fullscreen.widget, redraw_handler); in main()
558 widget_set_button_handler(fullscreen.widget, button_handler); in main()
559 widget_set_motion_handler(fullscreen.widget, motion_handler); in main()
560 widget_set_enter_handler(fullscreen.widget, enter_handler); in main()
562 widget_set_touch_down_handler(fullscreen.widget, touch_handler); in main()
564 window_set_key_handler(fullscreen.window, key_handler); in main()
565 window_set_fullscreen_handler(fullscreen.window, fullscreen_handler); in main()
567 window_set_user_data(fullscreen.window, &fullscreen); in main()
569 window_schedule_resize(fullscreen.window, in main()
571 window_schedule_resize(fullscreen.window, in main()
572 fullscreen.width, fullscreen.height); in main()
576 widget_destroy(fullscreen.widget); in main()
577 window_destroy(fullscreen.window); in main()