DirectFB Reference Manual
DirectFB Types


DFBInputDeviceKeyType

DirectFB key types (for advanced mapping)

DIKT_UNICODE
Unicode 3.x character (compatible to Latin-1)

DIKT_SPECIAL
Special key (e.g. EPG)

DIKT_FUNCTION
Function key (F1 - Fn)

DIKT_MODIFIER
Modifier key

DIKT_LOCK
Lock key (e.g. CapsLock)

DIKT_DEAD
Dead key (e.g. dead grave)

DIKT_CUSTOM
Custom key (vendor specific)

DIKT_IDENTIFIER
DirectFB key identifier



DFBInputDeviceModifierKeyIdentifier

DirectFB modifier key identifiers (for advanced mapping)

DIMKI_SHIFT
Shift modifier key

DIMKI_CONTROL
Control modifier key

DIMKI_ALT
Alt modifier key

DIMKI_ALTGR
AltGr modifier key

DIMKI_META
Meta modifier key

DIMKI_SUPER
Super modifier key

DIMKI_HYPER
Hyper modifier key



DFBInputDeviceKeyIdentifier

DirectFB key identifiers (for basic mapping)

DIKI_QUOTE_LEFT
TLDE

DIKI_MINUS_SIGN
AE11

DIKI_EQUALS_SIGN
AE12

DIKI_BRACKET_LEFT
AD11

DIKI_BRACKET_RIGHT
AD12

DIKI_BACKSLASH
BKSL

DIKI_SEMICOLON
AC10

DIKI_QUOTE_RIGHT
AC11

DIKI_COMMA
AB08

DIKI_PERIOD
AB09

DIKI_SLASH
AB10

DIKI_LESS_SIGN
103rd



DFBInputDeviceLockState

Flags specifying the key locks that are currently active.

DILS_SCROLL
scroll-lock active?

DILS_NUM
num-lock active?

DILS_CAPS
caps-lock active?



DFBInputDeviceKeymapSymbolIndex

Groups and levels as an index to the symbol array.

DIKSI_BASE
base group, base level (no modifier pressed)

DIKSI_BASE_SHIFT
base group, shifted level (with Shift pressed)

DIKSI_ALT
alternative group, base level (with AltGr pressed)

DIKSI_ALT_SHIFT
alternative group, shifted level (with AltGr and Shift pressed)



DFBInputDeviceKeymapEntry

  int code; hardware key code
  DFBInputDeviceLockState locks; locks activating shifted level
  DFBInputDeviceKeyIdentifier identifier; basic mapping
  DFBInputDeviceKeySymbol symbols[DIKSI_LAST+1]; advanced key mapping

One entry in the keymap of an input device.



DFBResult

Every interface method returns this result code.
Any other value to be returned adds an argument pointing to a location the value should be written to.

DFB_OK
No error occured.

DFB_FAILURE
A general or unknown error occured.

DFB_INIT
A general initialization error occured.

DFB_BUG
Internal bug or inconsistency has been detected.

DFB_DEAD
Interface has a zero reference counter (after Release, only available in debug mode).

DFB_UNSUPPORTED
The requested operation or an argument is not supported by hardware or software.

DFB_UNIMPLEMENTED
The requested operation is not yet implemented.

DFB_ACCESSDENIED
Access to the resource is denied.

DFB_INVARG
An invalid argument has been specified.

DFB_NOSYSTEMMEMORY
There's not enough system memory.

DFB_NOVIDEOMEMORY
There's not enough video memory.

DFB_LOCKED
The resource is (already) locked.

DFB_BUFFEREMPTY
The buffer is empty.

DFB_FILENOTFOUND
The specified file has not been found.

DFB_IO
A general I/O error occured.

DFB_BUSY
The resource or device is busy.

DFB_NOIMPL
No implementation for the requested interface or specified data has been found.

DFB_MISSINGFONT
No font has been set.

DFB_TIMEOUT
The operation timed out.

DFB_MISSINGIMAGE
No image has been set.

DFB_THIZNULL
'thiz' pointer is NULL.

DFB_IDNOTFOUND
No resource has been found by the specified id.

DFB_INVAREA
An invalid area has been specified or detected.

DFB_DESTROYED
The underlying object (e.g. a window or surface) has been destroyed.

DFB_FUSION
Internal fusion error detected, most likely related to IPC resources.



DFBPoint

  int x; X coordinate of it
  int y; Y coordinate of it

A point specified by x/y coordinates.



DFBDimension

  int w; width of it
  int h; height of it

A dimension specified by width and height.



DFBRectangle

  int x; X coordinate of its top-left point
  int y; Y coordinate of its top-left point
  int w; width of it
  int h; height of it

A rectangle specified by a point and a dimension.



DFBRegion

  int x1; X coordinate of top-left point
  int y1; Y coordinate of top-left point
  int x2; X coordinate of lower-right point
  int y2; Y coordinate of lower-right point

A region specified by two points.

The defined region includes both endpoints.



DFBTriangle

  int x1; X coordinate of first edge
  int y1; Y coordinate of first edge
  int x2; X coordinate of second edge
  int y2; Y coordinate of second edge
  int x3; X coordinate of third edge
  int y3; Y coordinate of third edge

A triangle specified by three points.



DFBColor

  __u8 a; alpha channel
  __u8 r; red channel
  __u8 g; green channel
  __u8 b; blue channel

A color defined by channels with 8bit each.



DFBCooperativeLevel

The cooperative level controls the super interface's behaviour in functions like SetVideoMode or CreateSurface for the primary.

DFSCL_NORMAL
Normal shared access, primary surface will be the buffer of an implicitly created window at the resolution given by SetVideoMode().

DFSCL_FULLSCREEN
Application grabs the primary layer, SetVideoMode automates layer control. Primary surface is the primary layer surface.

DFSCL_EXCLUSIVE
All but the primary layer will be disabled, the application has full control over layers if desired, other applications have no input/output/control. Primary surface is the primary layer surface.



DFBDisplayLayerCapabilities

Capabilities of a display layer.

DLCAPS_SURFACE
The layer has a surface that can be drawn to. This may not be provided by layers that display realtime data, e.g. from an MPEG decoder chip. Playback control may be provided by an external API.

DLCAPS_OPACITY
The layer supports blending with layer(s) below based on a global alpha factor.

DLCAPS_ALPHACHANNEL
The layer supports blending with layer(s) below based on each pixel's alpha value.

DLCAPS_SCREEN_LOCATION
The layer location on the screen can be changed, this includes position and size as normalized values. The default is 0.0f, 0.0f, 1.0f, 1.0f.

DLCAPS_FLICKER_FILTERING
Flicker filtering can be enabled for smooth output on interlaced display devices.

DLCAPS_DEINTERLACING
The layer provides optional deinterlacing for displaying interlaced video data on progressive display devices.

DLCAPS_SRC_COLORKEY
A specific color can be declared as transparent.

DLCAPS_DST_COLORKEY
A specific color of layers below can be specified as the color of the only locations where the layer is visible.

DLCAPS_BRIGHTNESS
Adjustment of brightness is supported.

DLCAPS_CONTRAST
Adjustment of contrast is supported.

DLCAPS_HUE
Adjustment of hue is supported.

DLCAPS_SATURATION
Adjustment of saturation is supported.

DLCAPS_LEVELS
Adjustment of the layer's level (z position) is supported.

DLCAPS_FIELD_PARITY
Field parity can be selected



DFBDisplayLayerOptions

Used to enable some capabilities like flicker filtering or colorkeying.

DLOP_NONE
None of these.

DLOP_ALPHACHANNEL
Make usage of alpha channel for blending on a pixel per pixel basis.

DLOP_FLICKER_FILTERING
Enable flicker filtering.

DLOP_DEINTERLACING
Enable deinterlacing of an interlaced (video) source.

DLOP_SRC_COLORKEY
Enable source color key.

DLOP_DST_COLORKEY
Enable dest. color key.

DLOP_OPACITY
Make usage of the global alpha factor set by SetOpacity.

DLOP_FIELD_PARITY
Set field parity



DFBDisplayLayerBufferMode

Layer Buffer Mode.

DLBM_FRONTONLY
no backbuffer

DLBM_BACKVIDEO
backbuffer in video memory

DLBM_BACKSYSTEM
backbuffer in system memory



DFBSurfaceDescriptionFlags

Flags defining which fields of a DFBSurfaceDescription are valid.

DSDESC_CAPS
caps field is valid

DSDESC_WIDTH
width field is valid

DSDESC_HEIGHT
height field is valid

DSDESC_PIXELFORMAT
pixelformat field is valid

DSDESC_PREALLOCATED
Surface uses data that has been preallocated by the application. The field array 'preallocated' has to be set using the first element for the front buffer and eventually the second one for the back buffer.

DSDESC_PALETTE
Initialize the surfaces palette with the entries specified in the description.



DFBPaletteDescriptionFlags

Flags defining which fields of a DFBPaletteDescription are valid.

DPDESC_CAPS
Specify palette capabilities.

DPDESC_SIZE
Specify number of entries.

DPDESC_ENTRIES
Initialize the palette with the entries specified in the description.



DFBSurfaceCapabilities

The surface capabilities.

DSCAPS_NONE
None of these.

DSCAPS_PRIMARY
It's the primary surface.

DSCAPS_SYSTEMONLY
Surface data is permanently stored in system memory.
There's no video memory allocation/storage.

DSCAPS_VIDEOONLY
Surface data is permanently stored in video memory.
There's no system memory allocation/storage.

DSCAPS_FLIPPING
Surface is double buffered or needs Flip() calls to make updates/changes visible/usable.

DSCAPS_SUBSURFACE
Surface is just a sub area of another one sharing the surface data.

DSCAPS_INTERLACED
Each buffer contains interlaced video (or graphics) data consisting of two fields.
Their lines are stored interleaved. One field's height is a half of the surface's height.

DSCAPS_SEPARATED
For usage with DSCAPS_INTERLACED.
DSCAPS_SEPARATED specifies that the fields are NOT interleaved line by line in the buffer.
The first field is followed by the second one in the buffer.

DSCAPS_STATIC_ALLOC
The amount of video or system memory allocated for the surface is never less than its initial value. This way a surface can be resized (smaller and bigger up to the initial size) without reallocation of the buffers. It's useful for surfaces that need a guaranteed space in video memory after resizing.



DFBPaletteCapabilities

The palette capabilities.

DPCAPS_NONE
None of these.



DFBSurfaceDrawingFlags

Flags controlling drawing commands.

DSDRAW_NOFX
uses none of the effects

DSDRAW_BLEND
uses alpha from color

DSDRAW_DST_COLORKEY
write to destination only if the destination pixel matches the destination color key (not fully implemented yet)

DSDRAW_SRC_PREMULTIPLY
multiplies the color's rgb channels by the alpha channel before drawing

DSDRAW_DST_PREMULTIPLY
modulates the dest. color with the dest. alpha

DSDRAW_DEMULTIPLY
divides the color by the alpha before writing the data to the destination

DSDRAW_XOR
bitwise xor the destination pixels with the specified color after premultiplication



DFBSurfaceBlittingFlags

Flags controlling blitting commands.

DSBLIT_NOFX
uses none of the effects

DSBLIT_BLEND_ALPHACHANNEL
enables blending and uses alphachannel from source

DSBLIT_BLEND_COLORALPHA
enables blending and uses alpha value from color

DSBLIT_COLORIZE
modulates source color with the color's r/g/b values

DSBLIT_SRC_COLORKEY
don't blit pixels matching the source color key

DSBLIT_DST_COLORKEY
write to destination only if the destination pixel matches the destination color key (not fully implemented yet)

DSBLIT_SRC_PREMULTIPLY
modulates the source color with the (modulated) source alpha

DSBLIT_DST_PREMULTIPLY
modulates the dest. color with the dest. alpha

DSBLIT_DEMULTIPLY
divides the color by the alpha before writing the data to the destination

DSBLIT_DEINTERLACE
deinterlaces the source during blitting by reading only one field (every second line of full image) scaling it vertically



DFBAccelerationMask

Mask of accelerated functions.

DFXL_NONE
None of these.

DFXL_FILLRECTANGLE
FillRectangle() is accelerated.

DFXL_DRAWRECTANGLE
DrawRectangle() is accelerated.

DFXL_DRAWLINE
DrawLine() is accelerated.

DFXL_FILLTRIANGLE
FillTriangle() is accelerated.

DFXL_BLIT
Blit() is accelerated.

DFXL_STRETCHBLIT
StretchBlit() is accelerated.

DFXL_ALL
All drawing/blitting functions.



DFBCardCapabilities

  DFBAccelerationMask acceleration_mask; drawing/blitting functions
  DFBSurfaceDrawingFlags drawing_flags; drawing flags
  DFBSurfaceBlittingFlags blitting_flags; blitting flags
  unsigned int video_memory; amount of video memory in bytes

Rough information about hardware capabilities.



DFBDisplayLayerTypeFlags

Type of display layer for basic classification. Values may be or'ed together.

DLTF_NONE
Unclassified, no specific type.

DLTF_GRAPHICS
Can be used for graphics output.

DLTF_VIDEO
Can be used for live video output.

DLTF_STILL_PICTURE
Can be used for single frames.

DLTF_BACKGROUND
Can be used as a background layer.

DLTF_ALL
All type flags set.



DFBInputDeviceTypeFlags

Type of input device for basic classification. Values may be or'ed together.

DIDTF_NONE
Unclassified, no specific type.

DIDTF_KEYBOARD
Can act as a keyboard.

DIDTF_MOUSE
Can be used as a mouse.

DIDTF_JOYSTICK
Can be used as a joystick.

DIDTF_REMOTE
Is a remote control.

DIDTF_VIRTUAL
Is a virtual input device.

DIDTF_ALL
All type flags set.



DFBInputDeviceCapabilities

Basic input device features.

DICAPS_KEYS
device supports key events

DICAPS_AXES
device supports axis events

DICAPS_BUTTONS
device supports button events

DICAPS_ALL
all capabilities



DFBInputDeviceButtonIdentifier

Identifier (index) for e.g. mouse or joystick buttons.

DIBI_LEFT
left mouse button

DIBI_RIGHT
right mouse button

DIBI_MIDDLE
middle mouse button

DIBI_FIRST
other buttons: DIBI_FIRST + zero based index

DIBI_LAST
32 buttons maximum



DFBInputDeviceAxisIdentifier

Axis identifier (index) for e.g. mouse or joystick.

The X, Y and Z axis are predefined. To access other axes, use DIAI_FIRST plus a zero based index, e.g. the 4th axis would be (DIAI_FIRST + 3).

DIAI_X
X axis

DIAI_Y
Y axis

DIAI_Z
Z axis

DIAI_FIRST
other axis: DIAI_FIRST + zero based index

DIAI_LAST
32 axes maximum



DFBWindowDescriptionFlags

Flags defining which fields of a DFBWindowDescription are valid.

DWDESC_CAPS
caps field is valid

DWDESC_WIDTH
width field is valid

DWDESC_HEIGHT
height field is valid

DWDESC_PIXELFORMAT
pixelformat field is valid

DWDESC_POSX
posx field is valid

DWDESC_POSY
posy field is valid

DWDESC_SURFACE_CAPS
Create the window surface with special capabilities.



DFBDataBufferDescriptionFlags

Flags defining which fields of a DFBDataBufferDescription are valid.

DBDESC_FILE
Create a static buffer for the specified filename.

DBDESC_MEMORY
Create a static buffer for the specified memory area.



DFBWindowCapabilities

Capabilities a window can have.

DWCAPS_NONE
None of these.

DWCAPS_ALPHACHANNEL
The window has an alphachannel for pixel-per-pixel blending.

DWCAPS_DOUBLEBUFFER
The window's surface is double buffered. This is very useful to avoid visibility of content that is still in preparation. Normally a window's content can get visible before an update if there is another reason causing a window stack repaint.

DWCAPS_INPUTONLY
The window has no surface. You can not draw to it but it receives events

DWCAPS_ALL
All valid flags.



DFBFontAttributes

Flags describing how to load a font.

These flags describe how a font is loaded and affect how the glyphs are drawn. There is no way to change this after the font has been loaded. If you need to render a font with different attributes, you have to create multiple FontProviders of the same font file.

DFFA_NONE
none of these flags

DFFA_NOKERNING
don't use kerning

DFFA_NOHINTING
don't use hinting

DFFA_MONOCHROME
don't use anti-aliasing

DFFA_NOCHARMAP
no char map, glyph indices are specified directly



DFBFontDescriptionFlags

Flags defining which fields of a DFBFontDescription are valid.

DFDESC_ATTRIBUTES
attributes field is valid

DFDESC_HEIGHT
height is specified

DFDESC_WIDTH
width is specified

DFDESC_INDEX
index is specified

DFDESC_FIXEDADVANCE
specify a fixed advance overriding any character advance of fixed or proportional fonts



DFBFontDescription

  DFBFontDescriptionFlags flags;
  DFBFontAttributes attributes;
  unsigned int height;
  unsigned int width;
  unsigned int index;
  unsigned int fixed_advance;

Description of how to load glyphs from a font file.

The attributes control how the glyphs are rendered. Width and height can be used to specify the desired face size in pixels. If you are loading a non-scalable font, you shouldn't specify a font size. Please note that the height value in the FontDescription doesn't correspond to the height returned by the font's GetHeight() method.

The index field controls which face is loaded from a font file that provides a collection of faces. This is rarely needed.



DFBSurfacePixelFormat

Pixel format of a surface. Contains information about the format (see following definition).

Format constants are encoded in the following way (bit 31 - 0):

-hgg:ffff | eeee:dddc | bbbb:bbbb | aaaa:aaaa

a) pixelformat index
b) effective bits per pixel of format
c) alpha channel present
d) bytes per pixel in a row (1/8 fragment, i.e. bits)
e) bytes per pixel in a row (decimal part, i.e. bytes)
f) multiplier for planes minus one (1/16 fragment)
g) multiplier for planes minus one (decimal part)
h) indexed pixelformat (using a palette)

DSPF_UNKNOWN
no specific format, unusual and unsupported

DSPF_ARGB1555
16bit ARGB (2 bytes, alpha 1@15, red 5@10, green 5@5, blue 5@0)

DSPF_RGB16
16bit RGB (2 bytes, red 5@11, green 6@5, blue 5@0)

DSPF_RGB24
24bit RGB (3 bytes, red 8@16, green 8@8, blue 8@0)

DSPF_RGB32
24bit RGB (4 bytes, nothing@24, red 8@16, green 8@8, blue 8@0)

DSPF_ARGB
32bit ARGB (4 bytes, alpha 8@24, red 8@16, green 8@8, blue 8@0)

DSPF_A8
8bit alpha (1 byte, alpha 8@0 ), e.g. anti-aliased text glyphs

DSPF_YUY2
A macropixel (32bit / 2 pixel) contains YUYV (starting with the LOWEST byte on the LEFT)

DSPF_RGB332
8bit true color (1 byte, red 3@5, green 3@2, blue 2@0

DSPF_UYVY
A macropixel (32bit / 2 pixel) contains UYVY (starting with the LOWEST byte on the LEFT)

DSPF_I420
8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes

DSPF_YV12
8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes

DSPF_LUT8
8 bit lookup table (palette)



palette

  DFBSurfaceDescriptionFlags flags; field validation
  DFBSurfaceCapabilities caps; capabilities
  unsigned int width; pixel width
  unsigned int height; pixel height
  DFBSurfacePixelFormat pixelformat; pixel format
  void *data; data pointer of existing buffer
  int pitch; pitch of buffer
  DFBColor *entries;
  unsigned int size;

Description of the surface that is to be created.



DFBPaletteDescription

  DFBPaletteDescriptionFlags flags; Validation of fields.
  DFBPaletteCapabilities caps; Palette capabilities.
  unsigned int size; Number of entries.
  DFBColor *entries; Preset palette entries.

Description of the palette that is to be created.



DFBDisplayLayerDescription

  DFBDisplayLayerTypeFlags type; Classification of the display layer.
  DFBDisplayLayerCapabilities caps; Capability flags of the display layer.
  char name[DFB_DISPLAY_LAYER_DESC_NAME_LENGTH]; Display layer name.

Description of the display layer capabilities.



DFBInputDeviceDescription

  DFBInputDeviceTypeFlags type; classification of input device
  DFBInputDeviceCapabilities caps; capabilities, validates the following fields
  int min_keycode; minimum hardware keycode or -1 if no differentiation between hardware keys is made
  int max_keycode; maximum hardware keycode or -1 if no differentiation between hardware keys is made
  DFBInputDeviceAxisIdentifier max_axis; highest axis identifier
  DFBInputDeviceButtonIdentifier max_button; highest button identifier
  char name[DFB_INPUT_DEVICE_DESC_NAME_LENGTH]; Device name
  char vendor[DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH]; Device vendor

Description of the input device capabilities.



DFBWindowDescription

  DFBWindowDescriptionFlags flags; field validation
  DFBWindowCapabilities caps; capabilities
  unsigned int width; pixel width
  unsigned int height; pixel height
  DFBSurfacePixelFormat pixelformat; pixel format
  int posx; distance from left layer border
  int posy; distance from upper layer border
  DFBSurfaceCapabilities surface_caps; pixel format

Description of the window that is to be created.



memory

  DFBDataBufferDescriptionFlags flags; field validation
  const char *file; for file based data buffers
  void *data; static data pointer
  unsigned int length; length of buffer

Description of a data buffer that is to be created.



DFBEnumerationResult

Return value of callback function of enumerations.

DFENUM_OK
Proceed with enumeration

DFENUM_CANCEL
Cancel enumeration



DFBVideoProviderCapabilities

Information about an IDirectFBVideoProvider.

DVCAPS_BASIC
basic ops (PlayTo, Stop)

DVCAPS_SEEK
supports SeekTo

DVCAPS_SCALE
can scale the video

DVCAPS_INTERLACED
supports interlaced surfaces

DVCAPS_BRIGHTNESS
supports Brightness adjustment

DVCAPS_CONTRAST
supports Contrast adjustment

DVCAPS_HUE
supports Hue adjustment

DVCAPS_SATURATION
supports Saturation adjustment



DFBColorAdjustmentFlags

Flags defining which fields of a DFBColorAdjustment are valid.

DCAF_NONE
none of these

DCAF_BRIGHTNESS
brightness field is valid

DCAF_CONTRAST
contrast field is valid

DCAF_HUE
hue field is valid

DCAF_SATURATION
saturation field is valid



DFBColorAdjustment

  DFBColorAdjustmentFlags flags;
  __u16 brightness;
  __u16 contrast;
  __u16 hue;
  __u16 saturation;

Color Adjustment used to adjust video colors.

All fields are in the range 0x0 to 0xFFFF with 0x8000 as the default value (no adjustment).



DFBDisplayLayerCooperativeLevel

Cooperative level handling the access permissions.

DLSCL_SHARED
shared access

DLSCL_EXCLUSIVE
exclusive access, fullscreen/mode switching

DLSCL_ADMINISTRATIVE
administrative access, enumerate windows, control them



DFBDisplayLayerBackgroundMode

Background mode defining how to erase/initialize the area for a windowstack repaint

DLBM_DONTCARE
do not clear the layer before repainting the windowstack

DLBM_COLOR
fill with solid color (SetBackgroundColor)

DLBM_IMAGE
use an image (SetBackgroundImage)

DLBM_TILE
use a tiled image (SetBackgroundImage)



DFBDisplayLayerConfig

  DFBDisplayLayerConfigFlags flags; Which fields of the configuration are set
  unsigned int width; Pixel width
  unsigned int height; Pixel height
  DFBSurfacePixelFormat pixelformat; Pixel format
  DFBDisplayLayerBufferMode buffermode; Buffer mode
  DFBDisplayLayerOptions options; Enable capabilities

Layer configuration



DFBSurfaceFlipFlags

Flipping flags controlling the behaviour of Flip().

DSFLIP_WAITFORSYNC
flip during vertical retrace, blocks until it occurs

DSFLIP_BLIT
copy backbuffer into frontbuffer rather than just swapping these buffers



DFBSurfaceTextFlags

Flags controlling the text layout.

DSTF_LEFT
left aligned

DSTF_CENTER
horizontally centered

DSTF_RIGHT
right aligned

DSTF_TOP
y specifies the top instead of the baseline

DSTF_BOTTOM
y specifies the bottom instead of the baseline



DFBSurfaceLockFlags

Flags defining the type of data access. These are important for surface swapping management.

DSLF_READ
request read access while surface is locked

DSLF_WRITE
request write access



DFBSurfacePorterDuffRule

Available Porter/Duff rules.

DSPD_NONE
fs: sa fd: 1.0-sa (defaults)

DSPD_CLEAR
fs: 0.0 fd: 0.0

DSPD_SRC
fs: 1.0 fd: 0.0

DSPD_SRC_OVER
fs: 1.0 fd: 1.0-sa

DSPD_DST_OVER
fs: 1.0-da fd: 1.0

DSPD_SRC_IN
fs: da fd: 0.0

DSPD_DST_IN
fs: 0.0 fd: sa

DSPD_SRC_OUT
fs: 1.0-da fd: 0.0

DSPD_DST_OUT
fs: 0.0 fd: 1.0-sa



DFBSurfaceBlendFunction

Blend functions to use for source and destination blending

DSBF_ZERO

DSBF_ONE

DSBF_SRCCOLOR

DSBF_INVSRCCOLOR

DSBF_SRCALPHA

DSBF_INVSRCALPHA

DSBF_DESTALPHA

DSBF_INVDESTALPHA

DSBF_DESTCOLOR

DSBF_INVDESTCOLOR

DSBF_SRCALPHASAT



DFBInputDeviceKeyState

Specifies whether a key is currently down.

DIKS_UP
key is not pressed

DIKS_DOWN
key is pressed



DFBInputDeviceButtonState

Specifies whether a button is currently pressed.

DIBS_UP
button is not pressed

DIBS_DOWN
button is pressed



DFBInputDeviceButtonMask

Flags specifying which buttons are currently down.

DIBM_LEFT
left mouse button

DIBM_RIGHT
right mouse button

DIBM_MIDDLE
middle mouse button



DFBEventClass

Event class.

DFEC_NONE
none of these

DFEC_INPUT
raw input event

DFEC_WINDOW
windowing event

DFEC_USER
custom events for the user of this library



DFBInputEventType

The type of an input event.

DIET_UNKNOWN
unknown event

DIET_KEYPRESS
a key is been pressed

DIET_KEYRELEASE
a key is been released

DIET_BUTTONPRESS
a (mouse) button is been pressed

DIET_BUTTONRELEASE
a (mouse) button is been released

DIET_AXISMOTION
mouse/joystick movement



DFBInputEventFlags

Flags defining which additional (optional) event fields are valid.

DIEF_NONE
no additional fields

DIEF_TIMESTAMP
timestamp is valid

DIEF_AXISABS
axis and axisabs are valid

DIEF_AXISREL
axis and axisrel are valid

DIEF_KEYCODE
used internally by the input core, always set at application level

DIEF_KEYID
used internally by the input core, always set at application level

DIEF_KEYSYMBOL
used internally by the input core, always set at application level

DIEF_MODIFIERS
used internally by the input core, always set at application level

DIEF_LOCKS
used internally by the input core, always set at application level

DIEF_BUTTONS
used internally by the input core, always set at application level



DFBInputEvent

  DFBEventClass clazz; clazz of event
  DFBInputEventType type; type of event
  DFBInputDeviceID device_id; source of event
  DFBInputEventFlags flags; which optional fields are valid?
  struct timeval timestamp; time of event creation
  int key_code; hardware keycode, no mapping, -1 if device doesn't differentiate between several keys
  DFBInputDeviceKeyIdentifier key_id; basic mapping, modifier independent
  DFBInputDeviceKeySymbol key_symbol; advanced mapping, unicode compatible, modifier dependent
  DFBInputDeviceModifierMask modifiers; pressed modifiers (optional)
  DFBInputDeviceLockState locks; active locks (optional)
  DFBInputDeviceButtonIdentifier button; in case of a button event
  DFBInputDeviceButtonMask buttons; mask of currently pressed buttons
  DFBInputDeviceAxisIdentifier axis; in case of an axis event
  int axisabs; absolute mouse/ joystick coordinate
  int axisrel; relative mouse/ joystick movement

An input event, item of an input buffer.



DFBWindowEventType

Window Event Types - can also be used as flags for event filters.

DWET_POSITION
window has been moved by window manager or the application itself

DWET_SIZE
window has been resized by window manager or the application itself

DWET_CLOSE
closing this window has been requested only

DWET_DESTROYED
window got destroyed by global deinitialization function or the application itself

DWET_GOTFOCUS
window got focus

DWET_LOSTFOCUS
window lost focus

DWET_KEYDOWN
a key has gone down while window has focus

DWET_KEYUP
a key has gone up while window has focus

DWET_BUTTONDOWN
mouse button went down in the window

DWET_BUTTONUP
mouse button went up in the window

DWET_MOTION
mouse cursor changed its position in window

DWET_ENTER
mouse cursor entered the window

DWET_LEAVE
mouse cursor left the window

DWET_WHEEL
mouse wheel was moved while window has focus

DWET_ALL
all event types



DFBWindowEvent

  DFBEventClass clazz; clazz of event
  DFBWindowEventType type; type of event
  DFBWindowID window_id; source of event
  int x; x position of window or coordinate within window
  int y; y position of window or coordinate within window
  int cx; x cursor position
  int cy; y cursor position
  int step; wheel step
  unsigned int w; width of window
  unsigned int h; height of window
  int key_code; hardware keycode, no mapping, -1 if device doesn't differentiate between several keys
  DFBInputDeviceKeyIdentifier key_id; basic mapping, modifier independent
  DFBInputDeviceKeySymbol key_symbol; advanced mapping, unicode compatible, modifier dependent
  DFBInputDeviceModifierMask modifiers; pressed modifiers
  DFBInputDeviceLockState locks; active locks
  DFBInputDeviceButtonIdentifier button; button being pressed or released
  DFBInputDeviceButtonMask buttons; mask of currently pressed buttons

Event from the windowing system.



DFBUserEvent

  DFBEventClass clazz; clazz of event
  unsigned int type; custom type
  void *data; custom data

Event for usage by the user of this library.



DFBEvent

  DFBEventClass clazz; clazz of event
  DFBInputEvent input; field for input events
  DFBWindowEvent window; field for window events
  DFBUserEvent user; field for user-defined events

General container for a DirectFB Event.



DFBWindowOptions

Flags controlling the appearance and behaviour of the window.

DWOP_NONE
none of these

DWOP_COLORKEYING
enable color key

DWOP_ALPHACHANNEL
enable alpha blending using the window's alpha channel

DWOP_KEEP_POSITION
window can't be moved with the mouse

DWOP_KEEP_SIZE
window can't be resized with the mouse

DWOP_KEEP_STACKING
window can't be raised or lowered with the mouse

DWOP_GHOST
never get focus or input, clicks will go through, implies DWOP_KEEP...

DWOP_INDESTRUCTIBLE
window can't be destroyed by internal shortcut

DWOP_ALL
all possible options



DFBWindowStackingClass

The stacking class restricts the stacking order of windows.

DWSC_MIDDLE
This is the default stacking class of new windows.

DWSC_UPPER
Window is always above windows in the middle stacking class. Only windows that are also in the upper stacking class can get above them.

DWSC_LOWER
Window is always below windows in the middle stacking class. Only windows that are also in the lower stacking class can get below them.



DFBImageCapabilities

Capabilities of an image.

DICAPS_NONE
None of these.

DICAPS_ALPHACHANNEL
The image data contains an alphachannel.

DICAPS_COLORKEY
The image has a colorkey, e.g. the transparent color of a GIF image.



DFBImageDescription

  DFBImageCapabilities caps; capabilities
  __u8 colorkey_r; colorkey red channel
  __u8 colorkey_g; colorkey green channel
  __u8 colorkey_b; colorkey blue channel

Information about an image including capabilities and values belonging to available capabilities.

  (C) Copyright by convergence GmbH