SDL  2.0
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 40 of file SDL_DirectFB_video.h.

◆ DFB_MAX_SCREENS

#define DFB_MAX_SCREENS   10

Definition at line 129 of file SDL_DirectFB_video.h.

◆ DFB_VERSION_ATLEAST

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

Definition at line 43 of file SDL_DirectFB_video.h.

◆ DFB_VERSIONNUM

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

Definition at line 37 of file SDL_DirectFB_video.h.

◆ DFBENV_USE_LINUX_INPUT

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

Definition at line 76 of file SDL_DirectFB_video.h.

◆ DFBENV_USE_WM

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

Definition at line 77 of file SDL_DirectFB_video.h.

◆ DFBENV_USE_X11_CHECK

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

Definition at line 75 of file SDL_DirectFB_video.h.

◆ DFBENV_USE_YUV_DIRECT

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

Definition at line 74 of file SDL_DirectFB_video.h.

◆ DFBENV_USE_YUV_UNDERLAY

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

Definition at line 73 of file SDL_DirectFB_video.h.

◆ DIRECTFB_DEBUG

#define DIRECTFB_DEBUG   1

Definition at line 71 of file SDL_DirectFB_video.h.

◆ ENABLE_LUT8

#define ENABLE_LUT8   (1)

Definition at line 68 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 123 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)

Definition at line 113 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 100 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 101 of file SDL_DirectFB_video.h.

◆ SDL_DFB_CONTEXT

#define SDL_DFB_CONTEXT   "SDL_DirectFB"

Definition at line 83 of file SDL_DirectFB_video.h.

◆ SDL_DFB_DEBUG

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

Definition at line 90 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 127 of file SDL_DirectFB_video.h.

◆ SDL_DFB_ERR

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

Definition at line 85 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 80 of file SDL_DirectFB_video.h.

◆ SDL_DFB_LOG

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

Definition at line 88 of file SDL_DirectFB_video.h.

◆ 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 79 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 81 of file SDL_DirectFB_video.h.

◆ USE_MULTI_API

#define USE_MULTI_API   (0)

Definition at line 58 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.

91  {
92  if (ret != DFB_OK) {
93  SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) );
94  SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) );
95  }
96  return ret;
97 }

References SDL_DFB_CONTEXT, SDL_DFB_LOG, and SDL_SetError.

SDL_DFB_LOG
#define SDL_DFB_LOG(x...)
Definition: SDL_DirectFB_video.h:87
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
n
GLdouble n
Definition: SDL_opengl_glext.h:1955
SDL_calloc
#define SDL_calloc
Definition: SDL_dynapi_overrides.h:375
SDL_DFB_CONTEXT
#define SDL_DFB_CONTEXT
Definition: SDL_DirectFB_video.h:82
SDL_SetError
#define SDL_SetError
Definition: SDL_dynapi_overrides.h:30
s
GLdouble s
Definition: SDL_opengl.h:2063