bool Window_mac::HandleWindowEvent(const SDL_Event& event) {
    Window_mac* win = gWindowMap.find(event.window.windowID);
    if (win && win->handleEvent(event)) {
        return true;
    }

    return false;
}
Window* Window::CreateNativeWindow(void*) {
    Window_mac* window = new Window_mac();
    if (!window->initWindow()) {
        delete window;
        return nullptr;
    }

    return window;
}
Exemple #3
0
Window* Window::CreateNativeWindow(void* platformData) {
#if 0
    // TODO: platform-specific window creation
    Display* display = (Display*)platformData;

    Window_mac* window = new Window_mac();
    if (!window->initWindow(display, nullptr)) {
        delete window;
        return nullptr;
    }

    return window;
#else
    return nullptr;
#endif
}