comparison src/video/directfb/SDL_DirectFB_window.h @ 5202:164f20ba08eb

Updated the DirectFB support, from Couriersud attached is a working directfb driver diff which works with the current changes. There are a number of changes around it as well, e.g. configure.in. The directfb renderdriver right now still depends on a some "includes" from src/video/directfb. That's why it is not yet moved to the new render folder.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Feb 2011 16:07:10 -0800
parents b196d2758026
children b530ef003506
comparison
equal deleted inserted replaced
5201:7c3422025c35 5202:164f20ba08eb
16 License along with this library; if not, write to the Free Software 16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21
22 SDL1.3 DirectFB driver by couriersud@arcor.de
23
21 */ 24 */
22 #include "SDL_config.h"
23 25
24 #ifndef _SDL_directfb_window_h 26 #ifndef _SDL_directfb_window_h
25 #define _SDL_directfb_window_h 27 #define _SDL_directfb_window_h
26 28
29 #include "SDL_DirectFB_video.h"
27 #include "SDL_DirectFB_WM.h" 30 #include "SDL_DirectFB_WM.h"
28 31
29 #define SDL_DFB_WINDOWDATA(win) DFB_WindowData *windata = ((win) ? (DFB_WindowData *) ((win)->driverdata) : NULL) 32 #define SDL_DFB_WINDOWDATA(win) DFB_WindowData *windata = ((win) ? (DFB_WindowData *) ((win)->driverdata) : NULL)
30 33
31 typedef struct _DFB_WindowData DFB_WindowData; 34 typedef struct _DFB_WindowData DFB_WindowData;
32 struct _DFB_WindowData 35 struct _DFB_WindowData
33 { 36 {
34 IDirectFBSurface *surface; 37 IDirectFBSurface *window_surface; /* window surface */
35 IDirectFBSurface *window_surface; /* only used with has_own_wm */ 38 IDirectFBSurface *surface; /* client drawing surface */
36 IDirectFBWindow *window; 39 IDirectFBWindow *dfbwin;
37 IDirectFBEventBuffer *eventbuffer; 40 IDirectFBEventBuffer *eventbuffer;
38 SDL_Window *sdl_window; 41 //SDL_Window *sdlwin;
39 DFB_WindowData *next; 42 SDL_Window *next;
40 Uint8 opacity; 43 Uint8 opacity;
41 DFBRectangle client; 44 DFBRectangle client;
42 DFBDimension size; 45 DFBDimension size;
46 DFBRectangle restore;
47
43 /* WM extras */ 48 /* WM extras */
44 DFBRectangle restore; 49 int is_managed;
45 int is_managed; 50 int wm_needs_redraw;
46 int wm_needs_redraw; 51 IDirectFBSurface *icon;
47 IDirectFBSurface *icon; 52 IDirectFBFont *font;
48 IDirectFBFont *font; 53 DFB_Theme theme;
49 DFB_Theme theme; 54
55 /* WM moving and sizing */
56 int wm_grab;
57 int wm_lastx;
58 int wm_lasty;
50 }; 59 };
51 60
52 extern int DirectFB_CreateWindow(_THIS, SDL_Window * window); 61 extern int DirectFB_CreateWindow(_THIS, SDL_Window * window);
53 extern int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, 62 extern int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window,
54 const void *data); 63 const void *data);
67 extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window); 76 extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window);
68 extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window); 77 extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window);
69 extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, 78 extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
70 struct SDL_SysWMinfo *info); 79 struct SDL_SysWMinfo *info);
71 80
72 //extern void DirectFB_AdjustWindowSurface(_THIS, SDL_Window * window); 81 extern void DirectFB_AdjustWindowSurface(SDL_Window * window);
73 82
74 #endif /* _SDL_directfb_window_h */ 83 #endif /* _SDL_directfb_window_h */
75 84
76 /* vi: set ts=4 sw=4 expandtab: */ 85 /* vi: set ts=4 sw=4 expandtab: */