src/video/directfb/SDL_DirectFB_modes.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 02 Jan 2016 10:10:34 -0800
changeset 9998 f67cf37e9cd4
parent 9619 b94b6d0bff0f
child 10737 3406a0f8b041
permissions -rw-r--r--
Updated copyright to 2016
slouken@2737
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
slouken@2737
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@2737
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@2737
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@2737
    20
*/
slouken@2737
    21
slouken@2737
    22
#ifndef _SDL_directfb_modes_h
slouken@2737
    23
#define _SDL_directfb_modes_h
slouken@2737
    24
slouken@5199
    25
#include <directfb.h>
slouken@2737
    26
slouken@5199
    27
#include "../SDL_sysvideo.h"
slouken@5199
    28
slouken@5488
    29
#define SDL_DFB_DISPLAYDATA(win)  DFB_DisplayData *dispdata = ((win) ? (DFB_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata : NULL)
slouken@2737
    30
slouken@2737
    31
typedef struct _DFB_DisplayData DFB_DisplayData;
slouken@2737
    32
struct _DFB_DisplayData
slouken@2737
    33
{
slouken@7191
    34
    IDirectFBDisplayLayer   *layer;
slouken@7191
    35
    DFBSurfacePixelFormat   pixelformat;
slouken@7191
    36
    /* FIXME: support for multiple video layer.
slouken@7191
    37
     * However, I do not know any card supporting
slouken@2737
    38
     * more than one
slouken@2737
    39
     */
slouken@7191
    40
    DFBDisplayLayerID       vidID;
slouken@7191
    41
    IDirectFBDisplayLayer   *vidlayer;
slouken@2737
    42
slouken@7191
    43
    int                     vidIDinuse;
slouken@2737
    44
slouken@7191
    45
    int                     cw;
slouken@7191
    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@5199
    55
extern void DirectFB_SetContext(_THIS, SDL_Window *window);
slouken@5199
    56
slouken@2737
    57
#endif /* _SDL_directfb_modes_h */
slouken@2737
    58
slouken@2737
    59
/* vi: set ts=4 sw=4 expandtab: */