src/video/directfb/SDL_DirectFB_modes.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 31 Aug 2008 16:04:32 +0000
changeset 2737 140a7edcf2bd
child 2859 99210400e8b9
permissions -rw-r--r--
Date: Sun, 31 Aug 2008 17:53:59 +0200
From: Couriersud
Subject: Re: Updated DirectFB driver for SDL1.3

attached is a patch which brings the directfb driver in line with
current svn. In addition:

* driver now is in line with the structure of the X11 driver.
This adds a couple of files.
* driver now supports relative mouse movements
slouken@2737
     1
/*
slouken@2737
     2
    SDL - Simple DirectMedia Layer
slouken@2737
     3
    Copyright (C) 1997-2006 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@2737
    51
extern void DirectFB_GetDisplayModes(_THIS);
slouken@2737
    52
extern int DirectFB_SetDisplayMode(_THIS, 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: */