Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_window.h @ 3023:d72a0dd80e8b
DirectFB cleanups & simple window manager
- use SDL_getenv, not getenv ...
- no more support for 0.9.25 - not even mentioned any longer on directfb.org
- fix fullscreen issues
- add a simple window manager unless the directfb team comes up with a working wm.
The driver has support for a very, very basic window manager you may
want to use when runnning with "wm=default". Use
export SDL_DIRECTFB_WM=1
to enable basic window borders including icon support. In order to have the window title rendered,
you need to have the following font installed:
/usr/share/fonts/truetype/freefont/FreeSans.ttf
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Sun, 11 Jan 2009 23:49:23 +0000 |
parents | 99210400e8b9 |
children | 64ce267332c6 |
comparison
equal
deleted
inserted
replaced
3022:db20dde98dd3 | 3023:d72a0dd80e8b |
---|---|
22 #include "SDL_config.h" | 22 #include "SDL_config.h" |
23 | 23 |
24 #ifndef _SDL_directfb_window_h | 24 #ifndef _SDL_directfb_window_h |
25 #define _SDL_directfb_window_h | 25 #define _SDL_directfb_window_h |
26 | 26 |
27 #include "SDL_DirectFB_WM.h" | |
28 | |
27 #define SDL_DFB_WINDOWDATA(win) DFB_WindowData *windata = ((win) ? (DFB_WindowData *) ((win)->driverdata) : NULL) | 29 #define SDL_DFB_WINDOWDATA(win) DFB_WindowData *windata = ((win) ? (DFB_WindowData *) ((win)->driverdata) : NULL) |
28 | 30 |
29 typedef struct _DFB_WindowData DFB_WindowData; | 31 typedef struct _DFB_WindowData DFB_WindowData; |
30 struct _DFB_WindowData | 32 struct _DFB_WindowData |
31 { | 33 { |
32 IDirectFBSurface *surface; | 34 IDirectFBSurface *surface; |
35 IDirectFBSurface *window_surface; /* only used with has_own_wm */ | |
33 IDirectFBWindow *window; | 36 IDirectFBWindow *window; |
34 DirectFB_GLContext *gl_context; | 37 DirectFB_GLContext *gl_context; |
35 IDirectFBEventBuffer *eventbuffer; | 38 IDirectFBEventBuffer *eventbuffer; |
36 DFBWindowID windowID; | 39 SDL_WindowID sdl_id; |
37 DFB_WindowData *next; | 40 DFB_WindowData *next; |
38 Uint8 opacity; | 41 Uint8 opacity; |
39 SDL_WindowID id; | 42 DFBRectangle client; |
43 DFBDimension size; | |
44 /* WM extras */ | |
45 DFBRectangle restore; | |
46 int is_managed; | |
47 int wm_needs_redraw; | |
48 IDirectFBSurface *icon; | |
49 DFB_Theme theme; | |
40 }; | 50 }; |
41 | 51 |
42 extern int DirectFB_CreateWindow(_THIS, SDL_Window * window); | 52 extern int DirectFB_CreateWindow(_THIS, SDL_Window * window); |
43 extern int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, | 53 extern int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, |
44 const void *data); | 54 const void *data); |
45 extern void DirectFB_SetWindowTitle(_THIS, SDL_Window * window); | 55 extern void DirectFB_SetWindowTitle(_THIS, SDL_Window * window); |
56 extern void DirectFB_SetWindowIcon(_THIS, SDL_Window * window, | |
57 SDL_Surface * icon); | |
58 | |
46 extern void DirectFB_SetWindowPosition(_THIS, SDL_Window * window); | 59 extern void DirectFB_SetWindowPosition(_THIS, SDL_Window * window); |
47 extern void DirectFB_SetWindowSize(_THIS, SDL_Window * window); | 60 extern void DirectFB_SetWindowSize(_THIS, SDL_Window * window); |
48 extern void DirectFB_ShowWindow(_THIS, SDL_Window * window); | 61 extern void DirectFB_ShowWindow(_THIS, SDL_Window * window); |
49 extern void DirectFB_HideWindow(_THIS, SDL_Window * window); | 62 extern void DirectFB_HideWindow(_THIS, SDL_Window * window); |
50 extern void DirectFB_RaiseWindow(_THIS, SDL_Window * window); | 63 extern void DirectFB_RaiseWindow(_THIS, SDL_Window * window); |
54 extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window); | 67 extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window); |
55 extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window); | 68 extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window); |
56 extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, | 69 extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, |
57 struct SDL_SysWMinfo *info); | 70 struct SDL_SysWMinfo *info); |
58 | 71 |
72 extern void DirectFB_AdjustWindowSurface(SDL_Window * window); | |
73 | |
59 #endif /* _SDL_directfb_window_h */ | 74 #endif /* _SDL_directfb_window_h */ |
60 | 75 |
61 /* vi: set ts=4 sw=4 expandtab: */ | 76 /* vi: set ts=4 sw=4 expandtab: */ |