src/video/directfb/SDL_DirectFB_modes.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 14 Mar 2011 23:13:33 -0700
changeset 5488 c20436fd5627
parent 5262 b530ef003506
child 5535 96594ac5fd1a
permissions -rw-r--r--
DirectFB driver update

Couriersud to Sam

the attached patch brings the DirectFB driver back in line with recent
SDL 1.3 developments.
slouken@2737
     1
/*
slouken@2737
     2
    SDL - Simple DirectMedia Layer
slouken@5262
     3
    Copyright (C) 1997-2011 Sam Lantinga
slouken@2737
     4
slouken@2737
     5
    This library is free software; you can redistribute it and/or
slouken@2737
     6
    modify it under the terms of the GNU Lesser General Public
slouken@2737
     7
    License as published by the Free Software Foundation; either
slouken@2737
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@2737
     9
slouken@2737
    10
    This library is distributed in the hope that it will be useful,
slouken@2737
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@2737
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@2737
    13
    Lesser General Public License for more details.
slouken@2737
    14
slouken@2737
    15
    You should have received a copy of the GNU Lesser General Public
slouken@2737
    16
    License along with this library; if not, write to the Free Software
slouken@2737
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@2737
    18
slouken@2737
    19
    Sam Lantinga
slouken@2737
    20
    slouken@libsdl.org
slouken@5199
    21
slouken@5199
    22
    SDL1.3 DirectFB driver by couriersud@arcor.de
slouken@5199
    23
	
slouken@2737
    24
*/
slouken@2737
    25
slouken@2737
    26
#ifndef _SDL_directfb_modes_h
slouken@2737
    27
#define _SDL_directfb_modes_h
slouken@2737
    28
slouken@5199
    29
#include <directfb.h>
slouken@2737
    30
slouken@5199
    31
#include "../SDL_sysvideo.h"
slouken@5199
    32
slouken@5488
    33
#define SDL_DFB_DISPLAYDATA(win)  DFB_DisplayData *dispdata = ((win) ? (DFB_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata : NULL)
slouken@2737
    34
slouken@2737
    35
typedef struct _DFB_DisplayData DFB_DisplayData;
slouken@2737
    36
struct _DFB_DisplayData
slouken@2737
    37
{
slouken@5199
    38
    IDirectFBDisplayLayer 	*layer;
slouken@5199
    39
    DFBSurfacePixelFormat 	pixelformat;
slouken@2737
    40
    /* FIXME: support for multiple video layer. 
slouken@2737
    41
     * However, I do not know any card supporting 
slouken@2737
    42
     * more than one
slouken@2737
    43
     */
slouken@5199
    44
    DFBDisplayLayerID 		vidID;
slouken@5199
    45
    IDirectFBDisplayLayer 	*vidlayer;
slouken@2737
    46
slouken@5199
    47
    int 					vidIDinuse;
slouken@2737
    48
slouken@5199
    49
    int 					cw;
slouken@5199
    50
    int 					ch;
slouken@2737
    51
};
slouken@2737
    52
slouken@2737
    53
slouken@2737
    54
extern void DirectFB_InitModes(_THIS);
slouken@3500
    55
extern void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
slouken@3500
    56
extern int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@2737
    57
extern void DirectFB_QuitModes(_THIS);
slouken@2737
    58
slouken@5199
    59
extern void DirectFB_SetContext(_THIS, SDL_Window *window);
slouken@5199
    60
slouken@2737
    61
#endif /* _SDL_directfb_modes_h */
slouken@2737
    62
slouken@2737
    63
/* vi: set ts=4 sw=4 expandtab: */