X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fwindow.cc;h=880a6ed9c98445f78af89b95f754cc3e23a75eaf;hb=ffd2c0a0f8b898cb4199a0c63aff255a85cc0f11;hp=76c51773ac66fd900a0db1cbe013283ef0bd1320;hpb=8a92836b3af157fd47c657cfe546887e5f5683a8;p=winnie diff --git a/src/window.cc b/src/window.cc index 76c5177..880a6ed 100644 --- a/src/window.cc +++ b/src/window.cc @@ -57,6 +57,8 @@ void Window::invalidate() void Window::draw() { + //TODO + //titlebar, frame callbacks.display(this); dirty = false; } @@ -71,3 +73,43 @@ int Window::get_scanline_width() { return get_screen_size().x; } + +void Window::set_display_callback(DisplayFuncType func) +{ + callbacks.display = func; +} + +void Window::set_keyboard_callback(KeyboardFuncType func) +{ + callbacks.keyboard = func; +} + +void Window::set_mouse_button_callback(MouseButtonFuncType func) +{ + callbacks.button = func; +} + +void Window::set_mouse_motion_callback(MouseMotionFuncType func) +{ + callbacks.motion = func; +} + +const DisplayFuncType Window::get_display_callback() const +{ + return callbacks.display; +} + +const KeyboardFuncType Window::get_keyboard_callback() const +{ + return callbacks.keyboard; +} + +const MouseButtonFuncType Window::get_mouse_button_callback() const +{ + return callbacks.button; +} + +const MouseMotionFuncType Window::get_mouse_motion_callback() const +{ + return callbacks.motion; +}