http://www.directfb.org
index.html
DirectFB Reference Manual
index.html
DirectFB Interfaces
IDirectFB
IDirectFB
is the main interface. It can be
retrieved by a call to
DirectFBCreate
. It's the only
interface with a global creation facility. Other interfaces
are created by this interface or interfaces created by it.
Hardware capabilities
such as the amount of video
memory or a list of supported drawing/blitting functions and
flags can be retrieved.  It also provides enumeration of all
supported video modes.
Input devices
and
display layers
that are
present can be enumerated via a callback mechanism. The
callback is given the capabilities and the device or layer
ID. An interface to specific input devices or display layers
can be retrieved by passing the device or layer ID to the
corresponding method.
Surfaces
for general purpose use can be created via
CreateSurface
. These surfaces are so called "offscreen
surfaces" and could be used for sprites or icons.
The
primary surface
is an abstraction and API shortcut
for getting a surface for visual output. Fullscreen games for
example have the whole screen as their primary
surface. Alternatively fullscreen applications can be forced
to run in a window. The primary surface is also created via
CreateSurface
but with the special capability
DSCAPS_PRIMARY.
The
cooperative level
selects the type of the primary
surface.  With a call to
SetCooperativeLevel
the
application can choose between the surface of an implicitly
created window and the surface of the primary layer
(deactivating the window stack). The application doesn't need
to have any extra functionality to run in a window. If the
application is forced to run in a window the call to
SetCooperativeLevel
fails with DFB_ACCESSDENIED.
Applications that want to be "window aware" shouldn't exit on
this error.
The
video mode
can be changed via
SetVideoMode
and is the size and depth of the primary surface, i.e. the
screen when in exclusive cooperative level. Without exclusive
access
SetVideoMode
sets the size of the implicitly
created window.
Event buffers
can be created with an option to
automatically attach input devices matching the specified
capabilities. If DICAPS_NONE is passed an event buffer with
nothing attached to is created. An event buffer can be
attached to input devices and windows.
Fonts, images and videos
are created by this
interface. There are different implementations for different
content types. On creation a suitable implementation is
automatically chosen.
Methods of IDirectFB
Cooperative level, video mode
IDirectFB_SetCooperativeLevel.html
SetCooperativeLevel
Puts the interface into the specified cooperative level.
IDirectFB_SetVideoMode.html
SetVideoMode
Switch the current video mode (primary layer).
Hardware capabilities
IDirectFB_GetCardCapabilities.html
GetCardCapabilities
Get a rough description of all drawing/blitting functions along with drawing/blitting flags supported by the hardware.
IDirectFB_EnumVideoModes.html
EnumVideoModes
Enumerate supported video modes.
Surfaces & Palettes
IDirectFB_CreateSurface.html
CreateSurface
Create a surface matching the specified description.
IDirectFB_CreatePalette.html
CreatePalette
Create a palette matching the specified description.
Screens
IDirectFB_EnumScreens.html
EnumScreens
Enumerate all existing screen.
IDirectFB_GetScreen.html
GetScreen
Retrieve an interface to a specific screen.
Display Layers
IDirectFB_EnumDisplayLayers.html
EnumDisplayLayers
Enumerate all existing display layers.
IDirectFB_GetDisplayLayer.html
GetDisplayLayer
Retrieve an interface to a specific display layer.
Input Devices
IDirectFB_EnumInputDevices.html
EnumInputDevices
Enumerate all existing input devices.
IDirectFB_GetInputDevice.html
GetInputDevice
Retrieve an interface to a specific input device.
IDirectFB_CreateEventBuffer.html
CreateEventBuffer
Create a buffer for events.
IDirectFB_CreateInputEventBuffer.html
CreateInputEventBuffer
Create a buffer for events with input devices connected.
Media
IDirectFB_CreateImageProvider.html
CreateImageProvider
Create an image provider for the specified file.
IDirectFB_CreateVideoProvider.html
CreateVideoProvider
Create a video provider.
IDirectFB_CreateFont.html
CreateFont
Load a font from the specified file given a description of how to load the glyphs.
IDirectFB_CreateDataBuffer.html
CreateDataBuffer
Create a data buffer.
Clipboard
IDirectFB_SetClipboardData.html
SetClipboardData
Set clipboard content.
IDirectFB_GetClipboardData.html
GetClipboardData
Get clipboard content.
IDirectFB_GetClipboardTimeStamp.html
GetClipboardTimeStamp
Get time stamp of last SetClipboardData call.
Misc
IDirectFB_Suspend.html
Suspend
Suspend DirectFB, no other calls to DirectFB are allowed until Resume has been called.
IDirectFB_Resume.html
Resume
Resume DirectFB, only to be called after Suspend.
IDirectFB_WaitIdle.html
WaitIdle
Wait until graphics card is idle, i.e. finish all drawing/blitting functions.
IDirectFB_WaitForSync.html
WaitForSync
Wait for next vertical retrace.
Extensions
IDirectFB_GetInterface.html
GetInterface
Load an implementation of a specific interface type.
