src/video/directfb/SDL_DirectFB_modes.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 01 Dec 2009 05:57:15 +0000
changeset 3500 4b594623401b
parent 2859 99210400e8b9
child 3697 f7b03b6838cb
permissions -rw-r--r--
Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height. It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.
slouken@2737
     1
/*
slouken@2737
     2
    SDL - Simple DirectMedia Layer
slouken@2859
     3
    Copyright (C) 1997-2009 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@2737
    21
*/
slouken@2737
    22
#include "SDL_config.h"
slouken@2737
    23
slouken@2737
    24
#ifndef _SDL_directfb_modes_h
slouken@2737
    25
#define _SDL_directfb_modes_h
slouken@2737
    26
slouken@2737
    27
#include "SDL_DirectFB_video.h"
slouken@2737
    28
slouken@2737
    29
#define SDL_DFB_DISPLAYDATA(dev, win)  DFB_DisplayData *dispdata = ((win && dev) ? (DFB_DisplayData *) (dev)->displays[(win)->display].driverdata : NULL)
slouken@2737
    30
slouken@2737
    31
typedef struct _DFB_DisplayData DFB_DisplayData;
slouken@2737
    32
struct _DFB_DisplayData
slouken@2737
    33
{
slouken@2737
    34
    IDirectFBDisplayLayer *layer;
slouken@2737
    35
    DFBSurfacePixelFormat pixelformat;
slouken@2737
    36
    /* FIXME: support for multiple video layer. 
slouken@2737
    37
     * However, I do not know any card supporting 
slouken@2737
    38
     * more than one
slouken@2737
    39
     */
slouken@2737
    40
    DFBDisplayLayerID vidID;
slouken@2737
    41
    IDirectFBDisplayLayer *vidlayer;
slouken@2737
    42
slouken@2737
    43
    int vidIDinuse;
slouken@2737
    44
slouken@2737
    45
    int cw;
slouken@2737
    46
    int ch;
slouken@2737
    47
};
slouken@2737
    48
slouken@2737
    49
slouken@2737
    50
extern void DirectFB_InitModes(_THIS);
slouken@3500
    51
extern void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
slouken@3500
    52
extern int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@2737
    53
extern void DirectFB_QuitModes(_THIS);
slouken@2737
    54
slouken@2737
    55
#endif /* _SDL_directfb_modes_h */
slouken@2737
    56
slouken@2737
    57
/* vi: set ts=4 sw=4 expandtab: */