SDL_syswm.h
Estructura SDL_syswm.h
Estructura que contiene información dependiente del sistema sobre una ventana.
struct SDL_SysWMinfo { SDL_version version; SDL_SYSWM_TYPE subsystem; union { #if defined(SDL_VIDEO_DRIVER_WINDOWS) struct { HWND window; /**< The window handle */ HDC hdc; /**< The window device context */ HINSTANCE hinstance; /**< The instance handle */ } win; #endif #if defined(SDL_VIDEO_DRIVER_WINRT) struct { IInspectable * window; /**< The WinRT CoreWindow */ } winrt; #endif #if defined(SDL_VIDEO_DRIVER_X11) struct { Display *display; /**< The X11 display */ Window window; /**< The X11 window */ } x11; #endif #if defined(SDL_VIDEO_DRIVER_DIRECTFB) struct { IDirectFB *dfb; /**< The directfb main interface */ IDirectFBWindow *window; /**< The directfb window handle */ IDirectFBSurface *surface; /**< The directfb client surface */ } dfb; #endif #if defined(SDL_VIDEO_DRIVER_COCOA) struct { #if defined(__OBJC__) && defined(__has_feature) #if __has_feature(objc_arc) NSWindow __unsafe_unretained *window; /**< The Cocoa window */ #else NSWindow *window; /**< The Cocoa window */ #endif #else NSWindow *window; /**< The Cocoa window */ #endif } cocoa; #endif #if defined(SDL_VIDEO_DRIVER_UIKIT) struct { #if defined(__OBJC__) && defined(__has_feature) #if __has_feature(objc_arc) UIWindow __unsafe_unretained *window; /**< The UIKit window */ #else UIWindow *window; /**< The UIKit window */ #endif #else UIWindow *window; /**< The UIKit window */ #endif GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */ GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */ GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */ } uikit; #endif #if defined(SDL_VIDEO_DRIVER_WAYLAND) struct { struct wl_display *display; /**< Wayland display */ struct wl_surface *surface; /**< Wayland surface */ void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */ struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */ struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */ struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */ struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */ struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */ } wl; #endif #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */ struct { void *connection; /**< Mir display server connection */ void *surface; /**< Mir surface */ } mir; #endif #if defined(SDL_VIDEO_DRIVER_ANDROID) struct { ANativeWindow *window; EGLSurface surface; } android; #endif #if defined(SDL_VIDEO_DRIVER_OS2) struct { HWND hwnd; /**< The window handle */ HWND hwndFrame; /**< The frame window handle */ } os2; #endif #if defined(SDL_VIDEO_DRIVER_VIVANTE) struct { EGLNativeDisplayType display; EGLNativeWindowType window; } vivante; #endif #if defined(SDL_VIDEO_DRIVER_KMSDRM) struct { int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */ int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */ struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */ } kmsdrm; #endif /* Make sure this union is always 64 bytes (8 64-bit pointers). */ /* Be careful not to overflow this if you add a new target! */ Uint8 dummy[64]; } info; }; #endif /* SDL_PROTOTYPES_ONLY */ typedef struct SDL_SysWMinfo SDL_SysWMinfo;
Miembros
Todos los Subsystemas
- version
- Una estructura SDL_version que contiene la versión actual de SDL.
- subsystem
- El tipo de sistema de ventanas.
- dummy
- No utilizado (para ayudar a los compiladores cuando no se dispone de un sistema específico).
SDL_SYSWM_WINDOWS
- win.window
- El manipulador de ventana.
- win.hdc
- El contexto de dispositivo de la ventana (>= SDL 2.0.4).
- win.hinstance
- La instancia de la ventana (>= SDL 2.0.6).
SDL_SYSWM_WINRT (>= SDL 2.0.3)
- winrt.window
- El WinRT CoreWindow.
SDL_SYSWM_X11
- x11.display
- El display X11.
- x11.window
- La ventana X11.
SDL_SYSWM_DIRECTFB
- dfb.dfb
- La interfaz principal de DirectFB.
- dfb.window
- El manipulador de ventana DirectFB.
- dfb.surface
- La superficie de cliente DirectFB.
SDL_SYSWM_COCOA
- cocoa.window
- La ventana Cocoa.
SDL_SYSWM_UIKIT
- uikit.window
- La ventana UIKit.
- uikit.framebuffer
- Objeto Framebuffer de la vista GL; debe estar vinculado cuando se renderiza a la pantalla utilizando GL (>= SDL 2.0.4)
- uikit.colorbuffer
- El objeto Renderbuffer de color de la vista GL; debe estar vinculado cuando se llama a SDL_GL_SwapWindow() (>= SDL 2.0.4)
- uikit.resolveFramebuffer
- El objeto Framebuffer que contiene el Renderbuffer de resolución de color, cuando se utiliza MSAA (>= SDL 2.0.4)
SDL_SYSWM_WAYLAND (>= SDL 2.0.2)
- wl.display
- El display Wayland
- wl.surface
- La superficie Wayland
- wl.shell_surface
- El shell_surface de Wayland (manejador del gestor de ventanas)
SDL_SYSWM_MIR (>= SDL 2.0.2)
- mir.connection
- La conexión del servidor de visualización Mir
- mir.surface
- La superficie Mir
SDL_SYSWM_ANDROID (>= SDL 2.0.4)
- android.window
- La ventana Android nativa
- android.surface
- La superficie Android EGL
SDL_SYSWM_VIVANTE (>= SDL 2.0.5)
- vivante.display
- El tipo de display Vivante
- vivante.window
- El tipo de ventana Vivante EGL
Observaciones
Esta estructura es rellenada por SDL_GetWindowWMInfo().
Esta estructura contiene información de bajo nivel sobre la ventana y el subsistema se establece en el sistema de ventanas en uso.