Atlas - SDL_qnx.h
Home / ext / SDL / src / video / qnx Lines: 1 | Size: 3042 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 2026 BlackBerry Limited 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#ifndef __SDL_QNX_H__ 23#define __SDL_QNX_H__ 24 25#include "../SDL_sysvideo.h" 26#include <screen/screen.h> 27#include <EGL/egl.h> 28 29typedef struct SDL_DisplayData 30{ 31 screen_display_t screen_display; 32} SDL_DisplayData; 33 34typedef struct SDL_DisplayModeData 35{ 36 int screen_format; 37 screen_display_mode_t screen_display_mode; 38} SDL_DisplayModeData; 39 40typedef struct SDL_WindowData 41{ 42 screen_window_t window; 43 EGLSurface surface; 44 EGLConfig conf; 45 SDL_GLContext context; 46 int resize; 47 bool has_focus; 48} SDL_WindowData; 49 50typedef struct SDL_CursorData 51{ 52 screen_session_t session; 53 int realized_shape; 54 bool is_visible; 55} SDL_CursorData; 56 57typedef struct SDL_MouseData 58{ 59 int x_prev; 60 int y_prev; 61} SDL_MouseData; 62 63extern screen_context_t * getContext(); 64extern screen_event_t * getEvent(); 65 66extern void handleKeyboardEvent(screen_event_t event); 67extern void handlePointerEvent(screen_event_t event); 68 69extern bool glInitConfig(SDL_WindowData *impl, int *pformat); 70extern bool glLoadLibrary(SDL_VideoDevice *_this, const char *name); 71extern SDL_FunctionPointer glGetProcAddress(SDL_VideoDevice *_this, const char *proc); 72extern SDL_GLContext glCreateContext(SDL_VideoDevice *_this, SDL_Window *window); 73extern bool glSetSwapInterval(SDL_VideoDevice *_this, int interval); 74extern bool glSwapWindow(SDL_VideoDevice *_this, SDL_Window *window); 75extern bool glMakeCurrent(SDL_VideoDevice *_this, SDL_Window * window, SDL_GLContext context); 76extern bool glDeleteContext(SDL_VideoDevice *_this, SDL_GLContext context); 77extern void glUnloadLibrary(SDL_VideoDevice *_this); 78 79extern SDL_PixelFormat screenToPixelFormat(int screen_format); 80extern bool getDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display); 81extern bool setDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_DisplayMode *mode); 82extern bool getDisplayBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect); 83 84extern void initMouse(SDL_VideoDevice *_this); 85extern void quitMouse(SDL_VideoDevice *_this); 86 87#endif 88[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.