2 #include "window_private.h"
3 #include "cocoadisplay.h"
4 #include "cocoawindow.h"
6 #include "display_private.h"
11 void Window::platform_init()
13 CocoaDisplay *dpy = display.get_private().display;
14 priv->window = create_window(dpy, options.width, options.height, options.fullscreen, options.resizable);
17 void Window::platform_cleanup()
19 destroy_window(priv->window);
22 void Window::set_title(const std::string &title)
24 set_window_title(priv->window, title.c_str());
27 void Window::platform_reconfigure(bool /*fullscreen_changed*/)
29 set_window_size(priv->window, options.width, options.height);
32 void Window::show_cursor(bool)
36 void Window::warp_pointer(int, int)
40 void Window::platform_set_touch_input()
44 void Window::platform_show()
46 show_window(priv->window);
49 void Window::platform_hide()
51 hide_window(priv->window);
54 bool Window::event(const Event &ev)
56 switch(ev.cevent.type)
60 case RIGHT_MOUSE_DOWN:
64 case OTHER_MOUSE_DOWN:
66 signal_got_focus.emit();
67 signal_input_event.emit(ev);
70 if(ev.cevent.motion.x>=0 && ev.cevent.motion.x<options.width && ev.cevent.motion.y>=0 && ev.cevent.motion.y<options.height)
71 signal_input_event.emit(ev);
83 } // namespace Graphics