SDL_DirectFB_video.h File Reference
`#include "../../SDL_internal.h"`
`#include <directfb.h>`
`#include <directfb_version.h>`
`#include "../SDL_sysvideo.h"`
`#include "SDL_scancode.h"`
`#include "SDL_render.h"`
`#include "SDL_log.h"`
Include dependency graph for SDL_DirectFB_video.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | DFB_KeyboardData
struct | DFB_DeviceData

## Macros

#define | DFB_VERSIONNUM(X, Y, Z) ((X)*1000 + (Y)*100 + (Z))
#define | DFB_COMPILEDVERSION DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION)
#define | DFB_VERSION_ATLEAST(X, Y, Z) (DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z))
#define | USE_MULTI_API (0)
#define | ENABLE_LUT8 (1)
#define | DIRECTFB_DEBUG 1
#define | DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */
#define | DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */
#define | DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */
#define | DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */
#define | DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */
#define | SDL_DFB_RELEASE(x) do { if ( (x) != NULL ) { SDL_DFB_CHECK(x->Release(x)); x = NULL; } } while (0)
#define | SDL_DFB_FREE(x) do { SDL_free((x)); (x) = NULL; } while (0)
#define | SDL_DFB_UNLOCK(x) do { if ( (x) != NULL ) { x->Unlock(x); } } while (0)
#define | SDL_DFB_CONTEXT "SDL_DirectFB"
#define | SDL_DFB_ERR(x...) SDL_LogError(SDL_LOG_CATEGORY_ERROR, x)
#define | SDL_DFB_LOG(x...) SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, x)
#define | SDL_DFB_DEBUG(x...) SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, x)
#define | SDL_DFB_CHECK(x...) do { sdl_dfb_check( x, __FILE__, __LINE__); } while (0)
#define | SDL_DFB_CHECKERR(x...) do { if ( sdl_dfb_check( x, __FILE__, __LINE__) != DFB_OK ) goto error; } while (0)
#define | SDL_DFB_CALLOC(r, n, s)
#define | SDL_DFB_ALLOC_CLEAR(r, s) SDL_DFB_CALLOC(r, 1, s)
#define | SDL_DFB_DEVICEDATA(dev) DFB_DeviceData *devdata = (dev ? (DFB_DeviceData *) ((dev)->driverdata) : NULL)
#define | DFB_MAX_SCREENS 10

## Functions

static SDL_INLINE DFBResult | sdl_dfb_check (DFBResult ret, const char *src_file, int src_line)
Uint32 | DirectFB_DFBToSDLPixelFormat (DFBSurfacePixelFormat pixelformat)
DFBSurfacePixelFormat | DirectFB_SDLToDFBPixelFormat (Uint32 format)
void | DirectFB_SetSupportedPixelFormats (SDL_RendererInfo *ri)

## Macro Definition Documentation

## DFB_COMPILEDVERSION

#define DFB_COMPILEDVERSION DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION)

Definition at line 39 of file SDL_DirectFB_video.h.

## DFB_MAX_SCREENS

#define DFB_MAX_SCREENS 10

Definition at line 128 of file SDL_DirectFB_video.h.

## DFB_VERSION_ATLEAST

#define DFB_VERSION_ATLEAST | ( |  | X,
|  |  | Y,
|  |  | Z
| ) |  | (DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z))

Definition at line 42 of file SDL_DirectFB_video.h.

## DFB_VERSIONNUM

#define DFB_VERSIONNUM | ( |  | X,
|  |  | Y,
|  |  | Z
| ) |  | ((X)*1000 + (Y)*100 + (Z))

Definition at line 36 of file SDL_DirectFB_video.h.

## DFBENV_USE_LINUX_INPUT

#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */

Definition at line 75 of file SDL_DirectFB_video.h.

## DFBENV_USE_WM

#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */

Definition at line 76 of file SDL_DirectFB_video.h.

## DFBENV_USE_X11_CHECK

#define DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */

Definition at line 74 of file SDL_DirectFB_video.h.

## DFBENV_USE_YUV_DIRECT

#define DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */

Definition at line 73 of file SDL_DirectFB_video.h.

## DFBENV_USE_YUV_UNDERLAY

#define DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */

Definition at line 72 of file SDL_DirectFB_video.h.

## DIRECTFB_DEBUG

#define DIRECTFB_DEBUG 1

Definition at line 70 of file SDL_DirectFB_video.h.

## ENABLE_LUT8

#define ENABLE_LUT8 (1)

Definition at line 67 of file SDL_DirectFB_video.h.

## SDL_DFB_ALLOC_CLEAR

#define SDL_DFB_ALLOC_CLEAR | ( |  | r,
|  |  | s
| ) |  | SDL_DFB_CALLOC(r, 1, s)

Definition at line 122 of file SDL_DirectFB_video.h.

## SDL_DFB_CALLOC

#define SDL_DFB_CALLOC | ( |  | r,
|  |  | n,
|  |  | s
| ) |  |

Value:
do { \
r = SDL_calloc (n, s); \
if (!(r)) { \
SDL_DFB_ERR("Out of memory"); \
SDL_OutOfMemory(); \
goto error; \
} \
} while (0)
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
s
GLdouble s
Definition: SDL_opengl.h:2063
SDL_calloc
#define SDL_calloc
Definition: SDL_dynapi_overrides.h:375
n
GLdouble n
Definition: SDL_opengl_glext.h:1952

Definition at line 112 of file SDL_DirectFB_video.h.

## SDL_DFB_CHECK

#define SDL_DFB_CHECK | ( |  | x... | ) | do { sdl_dfb_check( x, __FILE__, __LINE__); } while (0)

Definition at line 99 of file SDL_DirectFB_video.h.

## SDL_DFB_CHECKERR

#define SDL_DFB_CHECKERR | ( |  | x... | ) | do { if ( sdl_dfb_check( x, __FILE__, __LINE__) != DFB_OK ) goto error; } while (0)

Definition at line 100 of file SDL_DirectFB_video.h.

## SDL_DFB_CONTEXT

#define SDL_DFB_CONTEXT "SDL_DirectFB"

Definition at line 82 of file SDL_DirectFB_video.h.

Referenced by sdl_dfb_check().

## SDL_DFB_DEBUG

#define SDL_DFB_DEBUG | ( |  | x... | ) | SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, x)

Definition at line 89 of file SDL_DirectFB_video.h.

## SDL_DFB_DEVICEDATA

#define SDL_DFB_DEVICEDATA | ( |  | dev | ) | DFB_DeviceData *devdata = (dev ? (DFB_DeviceData *) ((dev)->driverdata) : NULL)

Definition at line 126 of file SDL_DirectFB_video.h.

## SDL_DFB_ERR

#define SDL_DFB_ERR | ( |  | x... | ) | SDL_LogError(SDL_LOG_CATEGORY_ERROR, x)

Definition at line 84 of file SDL_DirectFB_video.h.

## SDL_DFB_FREE

#define SDL_DFB_FREE | ( |  | x | ) | do { SDL_free((x)); (x) = NULL; } while (0)

Definition at line 79 of file SDL_DirectFB_video.h.

## SDL_DFB_LOG

#define SDL_DFB_LOG | ( |  | x... | ) | SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, x)

Definition at line 87 of file SDL_DirectFB_video.h.

Referenced by sdl_dfb_check().

## SDL_DFB_RELEASE

#define SDL_DFB_RELEASE | ( |  | x | ) | do { if ( (x) != NULL ) { SDL_DFB_CHECK(x->Release(x)); x = NULL; } } while (0)

Definition at line 78 of file SDL_DirectFB_video.h.

## SDL_DFB_UNLOCK

#define SDL_DFB_UNLOCK | ( |  | x | ) | do { if ( (x) != NULL ) { x->Unlock(x); } } while (0)

Definition at line 80 of file SDL_DirectFB_video.h.

## USE_MULTI_API

#define USE_MULTI_API (0)

Definition at line 57 of file SDL_DirectFB_video.h.

## Function Documentation

## DirectFB_DFBToSDLPixelFormat()

Uint32 DirectFB_DFBToSDLPixelFormat | ( | DFBSurfacePixelFormat | pixelformat | ) |

## DirectFB_SDLToDFBPixelFormat()

DFBSurfacePixelFormat DirectFB_SDLToDFBPixelFormat | ( | Uint32 | format | ) |

## DirectFB_SetSupportedPixelFormats()

void DirectFB_SetSupportedPixelFormats | ( | SDL_RendererInfo * | ri | ) |

## sdl_dfb_check()

static SDL_INLINE DFBResult sdl_dfb_check | ( | DFBResult | ret,
|  | const char * | src_file,
|  | int | src_line
| ) |  |

static

Definition at line 91 of file SDL_DirectFB_video.h.

References SDL_DFB_CONTEXT, SDL_DFB_LOG, and SDL_SetError.

{
if (ret != DFB_OK) {
SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) );
SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) );
}
return ret;
}
SDL_DFB_LOG
#define SDL_DFB_LOG(x...)
Definition: SDL_DirectFB_video.h:87
SDL_DFB_CONTEXT
#define SDL_DFB_CONTEXT
Definition: SDL_DirectFB_video.h:82
SDL_SetError
#define SDL_SetError
Definition: SDL_dynapi_overrides.h:30