📄 directfb_stub.h
字号:
} DFBSurfacePixelFormat;
typedef enum {
DLBM_UNKNOWN = 0x00000000,
DLBM_FRONTONLY = 0x00000001, /* no backbuffer */
DLBM_BACKVIDEO = 0x00000002, /* backbuffer in video memory */
DLBM_BACKSYSTEM = 0x00000004, /* backbuffer in system memory */
DLBM_TRIPLE = 0x00000008, /* triple buffering */
DLBM_WINDOWS = 0x00000010 /* no layer buffers at all,
using buffer of each window */
} DFBDisplayLayerBufferMode;
typedef enum {
DLOP_NONE = 0x00000000, /* None of these. */
DLOP_ALPHACHANNEL = 0x00000001, /* Make usage of alpha channel
for blending on a pixel per
pixel basis. */
DLOP_FLICKER_FILTERING = 0x00000002, /* Enable flicker filtering. */
DLOP_DEINTERLACING = 0x00000004, /* Enable deinterlacing of an
interlaced (video) source. */
DLOP_SRC_COLORKEY = 0x00000008, /* Enable source color key. */
DLOP_DST_COLORKEY = 0x00000010, /* Enable dest. color key. */
DLOP_OPACITY = 0x00000020, /* Make usage of the global alpha
factor set by SetOpacity. */
DLOP_FIELD_PARITY = 0x00000040 /* Set field parity */
} DFBDisplayLayerOptions;
typedef unsigned int DFBDisplayLayerSourceID;
typedef enum {
DSCAPS_NONE = 0x00000000, /* None of these. */
DSCAPS_PRIMARY = 0x00000001, /* It's the primary surface. */
DSCAPS_SYSTEMONLY = 0x00000002, /* Surface data is permanently stored in system memory.<br>
There's no video memory allocation/storage. */
DSCAPS_VIDEOONLY = 0x00000004, /* Surface data is permanently stored in video memory.<br>
There's no system memory allocation/storage. */
DSCAPS_DOUBLE = 0x00000010, /* Surface is double buffered */
DSCAPS_SUBSURFACE = 0x00000020, /* Surface is just a sub area of another
one sharing the surface data. */
DSCAPS_INTERLACED = 0x00000040, /* Each buffer contains interlaced video (or graphics)
data consisting of two fields.<br>
Their lines are stored interleaved. One field's height
is a half of the surface's height. */
DSCAPS_SEPARATED = 0x00000080, /* For usage with DSCAPS_INTERLACED.<br>
DSCAPS_SEPARATED specifies that the fields are NOT
interleaved line by line in the buffer.<br>
The first field is followed by the second one. */
DSCAPS_STATIC_ALLOC = 0x00000100, /* 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. */
DSCAPS_TRIPLE = 0x00000200, /* Surface is triple buffered. */
DSCAPS_PREMULTIPLIED = 0x00001000, /* Surface stores data with premultiplied alpha. */
DSCAPS_DEPTH = 0x00010000, /* A depth buffer is allocated. */
DSCAPS_ALL = 0x000113F7, /* All of these. */
DSCAPS_FLIPPING = DSCAPS_DOUBLE | DSCAPS_TRIPLE /* Surface needs Flip() calls to make
updates/changes visible/usable. */
} DFBSurfaceCapabilities;
typedef struct {
DFBDisplayLayerConfigFlags flags; /* Which fields of the configuration are set */
int width; /* Pixel width */
int height; /* Pixel height */
DFBSurfacePixelFormat pixelformat; /* Pixel format */
DFBDisplayLayerBufferMode buffermode; /* Buffer mode */
DFBDisplayLayerOptions options; /* Enable capabilities */
DFBDisplayLayerSourceID source; /* Selected layer source */
DFBSurfaceCapabilities surface_caps; /* Choose surface capabilities, available:
INTERLACED, SEPARATED, PREMULTIPLIED. */
} DFBDisplayLayerConfig;
typedef enum {
DSDESC_CAPS = 0x00000001, /* caps field is valid */
DSDESC_WIDTH = 0x00000002, /* width field is valid */
DSDESC_HEIGHT = 0x00000004, /* height field is valid */
DSDESC_PIXELFORMAT = 0x00000008, /* pixelformat field is valid */
DSDESC_PREALLOCATED = 0x00000010, /* 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 = 0x00000020, /* Initialize the surfaces palette
with the entries specified in the
description. */
DSDESC_DFBPALETTEHANDLE
= 0x00000040 /* Pointer to a IDirectFBPalette */
} DFBSurfaceDescriptionFlags;
typedef struct {
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 */
} DFBRectangle;
struct IDirectFBPalette
{
DFBResult Release ( void* thiz );
DFBResult SetEntries ( IDirectFBPalette* thiz, const DFBColor* entries, unsigned int num_entries, unsigned int offset );
DFBResult GetEntries ( IDirectFBPalette* thiz, DFBColor* ret_entries, unsigned int num_entries, unsigned int offset );
};
typedef struct {
DFBSurfaceDescriptionFlags flags; /* field validation */
DFBSurfaceCapabilities caps; /* capabilities */
int width; /* pixel width */
int height; /* pixel height */
DFBSurfacePixelFormat pixelformat; /* pixel format */
struct {
void *data; /* data pointer of existing buffer */
int pitch; /* pitch of buffer */
} preallocated[2];
struct {
DFBColor *entries;
unsigned int size;
} palette; /* initial palette values */
IDirectFBPalette *dfbpalette; /* initial IDirectFBPalette */
} DFBSurfaceDescription;
typedef struct {
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 */
} DFBRegion;
typedef enum {
DSFLIP_NONE = 0x00000000, /* None of these. */
DSFLIP_WAIT = 0x00000001, /* Flip() returns upon vertical sync. Flipping is still done
immediately unless DSFLIP_ONSYNC is specified, too. */
DSFLIP_BLIT = 0x00000002, /* Copy from back buffer to front buffer rather than
just swapping these buffers. This behaviour is enforced
if the region passed to Flip() is not NULL or if the
surface being flipped is a sub surface. */
DSFLIP_ONSYNC = 0x00000004, /* Do the actual flipping upon the next vertical sync.
The Flip() method will still return immediately unless
DSFLIP_WAIT is specified, too. */
DSFLIP_PIPELINE = 0x00000008,
DSFLIP_WAITFORSYNC = DSFLIP_WAIT | DSFLIP_ONSYNC
} DFBSurfaceFlipFlags;
typedef enum
{
DPDESC_CAPS = 0x00000001, /* Specify palette capabilities. */
DPDESC_SIZE = 0x00000002, /* Specify number of entries. */
DPDESC_ENTRIES = 0x00000004 /* Initialize the palette with the
entries specified in the
description. */
} DFBPaletteDescriptionFlags;
typedef enum
{
DPCAPS_NONE = 0x00000000 /* None of these. */
} DFBPaletteCapabilities;
typedef struct
{
DFBPaletteDescriptionFlags flags; /* Validation of fields. */
DFBPaletteCapabilities caps; /* Palette capabilities. */
unsigned int size; /* Number of entries. */
DFBColor *entries; /* Preset palette
entries. */
} DFBPaletteDescription;
typedef enum
{
DFDESC_ATTRIBUTES = 0x00000001, /* attributes field is valid */
DFDESC_HEIGHT = 0x00000002, /* height is specified */
DFDESC_WIDTH = 0x00000004, /* width is specified */
DFDESC_INDEX = 0x00000008, /* index is specified */
DFDESC_FIXEDADVANCE = 0x00000010 /* specify a fixed advance overriding
any character advance of fixed or
proportional fonts */
} DFBFontDescriptionFlags;
typedef enum
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -