23 #if SDL_VIDEO_DRIVER_DIRECTFB
30 #if SDL_DIRECTFB_OPENGL
36 #include "../SDL_pixels_c.h"
44 DFBWindowOptions wopts;
45 DFBWindowDescription desc;
50 SDL_memset(&desc, 0,
sizeof(DFBWindowDescription));
58 DLSCL_ADMINISTRATIVE));
61 if (window->
x == -1000 && window->
y == -1000)
73 DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_SURFACE_CAPS;
76 desc.flags |= DWDESC_CAPS;
77 desc.caps |= DWCAPS_ALPHACHANNEL;
81 desc.flags |= DWDESC_PIXELFORMAT;
85 desc.caps |= DWCAPS_NODECORATION;
89 desc.width = windata->
size.w;
90 desc.height = windata->
size.h;
91 desc.pixelformat = dispdata->pixelformat;
92 desc.surface_caps = DSCAPS_PREMULTIPLIED;
93 #if DIRECTFB_MAJOR_VERSION == 1 && DIRECTFB_MINOR_VERSION >= 4
95 desc.surface_caps |= DSCAPS_GL;
109 wopts &= ~DWOP_KEEP_SIZE;
112 wopts |= DWOP_KEEP_SIZE;
116 wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_STACKING | DWOP_KEEP_SIZE;
121 wopts |= DWOP_SHAPED | DWOP_ALPHACHANNEL;
122 wopts &= ~DWOP_OPAQUE_REGION;
129 (
_this, window, &window->
w, &window->
h));
148 EnableEvents(windata->
dfbwin, DWET_ALL));
162 windata->
next = devdata->firstwin;
164 devdata->firstwin = window;
204 DFBSurfaceDescription dsc;
216 DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS;
217 dsc.caps = DSCAPS_VIDEOONLY;
218 dsc.width = surface->
w;
219 dsc.height = surface->
h;
220 dsc.pixelformat = DSPF_ARGB;
226 (
void *) &dest, &pitch));
229 for (i = 0; i < surface->
h; i++)
230 memcpy((
char *) dest + i * pitch,
231 (
char *) p + i * surface->
pitch, 4 * surface->
w);
275 if (cw != window->
w || ch != window->
h) {
284 (
_this, window, &window->
w, &window->
h));
329 DFBWindowOptions wopts;
344 wopts |= DWOP_KEEP_SIZE | DWOP_KEEP_POSITION;
360 DFBWindowOptions wopts;
364 wopts &= ~(DWOP_KEEP_SIZE | DWOP_KEEP_POSITION);
376 wopts |= DWOP_KEEP_SIZE;
379 wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_SIZE;
393 if (gwindata !=
NULL)
400 devdata->grabbed_window = window;
404 devdata->grabbed_window =
NULL;
419 #if SDL_DIRECTFB_OPENGL
420 DirectFB_GL_DestroyWindowContexts(
_this, window);
445 p = devdata->firstwin->driverdata;
447 while (p && p->
next != window)
452 devdata->firstwin = windata->
next;
467 info->
info.dfb.dfb = devdata->dfb;
472 SDL_SetError(
"Application not compiled with SDL %d.%d\n",
490 if (cw != windata->
size.w || ch != windata->
size.h) {
495 #if SDL_DIRECTFB_OPENGL
499 #if (DFB_VERSION_ATLEAST(1,2,1))
508 DFBWindowOptions opts;
514 if (opts & DWOP_SCALE)
524 #if SDL_DIRECTFB_OPENGL
void DirectFB_ShowWindow(_THIS, SDL_Window *window)
#define SDL_MINOR_VERSION
DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface *surface)
int DirectFB_CreateWindow(_THIS, SDL_Window *window)
SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
#define SDL_MAJOR_VERSION
A collection of pixels used in software blitting.
DECLSPEC void SDLCALL SDL_free(void *mem)
void DirectFB_RaiseWindow(_THIS, SDL_Window *window)
void DirectFB_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
void DirectFB_WM_AdjustWindowLayout(SDL_Window *window, int flags, int w, int h)
IDirectFBSurface * surface
int DirectFB_CreateWindowFrom(_THIS, SDL_Window *window, const void *data)
#define SDL_DFB_RELEASE(x)
static SDL_VideoDevice * _this
void DirectFB_AdjustWindowSurface(SDL_Window *window)
uint32_t Uint32
An unsigned 32-bit integer type.
DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window)
Return whether the given window is a shaped window.
#define SDL_DFB_DEVICEDATA(dev)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
DFBResult DirectFB_WM_GetClientSize(_THIS, SDL_Window *window, int *cw, int *ch)
SDL_WindowShaper * shaper
IDirectFBSurface * window_surface
SDL_DisplayMode current_mode
DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len)
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum format
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface(SDL_Surface *src, const SDL_PixelFormat *fmt, Uint32 flags)
IDirectFBEventBuffer * eventbuffer
union SDL_SysWMinfo::@78 info
int SDL_InitFormat(SDL_PixelFormat *format, Uint32 pixel_format)
EGLSurface EGLint EGLint y
#define SDL_DFB_ALLOC_CLEAR(r, s)
#define SDL_DFB_CHECKERR(x...)
int DirectFB_ResizeWindowShape(SDL_Window *window)
#define SDL_DFB_WINDOWDATA(win)
#define SDL_DFB_DISPLAYDATA(win)
SDL_VideoDisplay * SDL_GetDisplayForWindow(SDL_Window *window)
void DirectFB_WM_RedrawLayout(_THIS, SDL_Window *window)
#define SDL_DFB_CHECK(x...)
void DirectFB_SetWindowTitle(_THIS, SDL_Window *window)
void DirectFB_MaximizeWindow(_THIS, SDL_Window *window)
SDL_VideoDevice * SDL_GetVideoDevice(void)
void DirectFB_SetWindowSize(_THIS, SDL_Window *window)
void DirectFB_MinimizeWindow(_THIS, SDL_Window *window)
void DirectFB_DestroyWindow(_THIS, SDL_Window *window)
IDirectFBSurface * surface
void DirectFB_SetWindowPosition(_THIS, SDL_Window *window)
#define SDL_Unsupported()
void DirectFB_HideWindow(_THIS, SDL_Window *window)
void DirectFB_RestoreWindow(_THIS, SDL_Window *window)
void DirectFB_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon)