⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 directfb_stub.h

📁 这是DVD中伺服部分的核心代码
💻 H
📖 第 1 页 / 共 3 页
字号:
         DFFA_NONE           = 0x00000000,  /* none of these flags */
         DFFA_NOKERNING      = 0x00000001,  /* don't use kerning */
         DFFA_NOHINTING      = 0x00000002,  /* don't use hinting */
         DFFA_MONOCHROME     = 0x00000004,  /* don't use anti-aliasing */
         DFFA_NOCHARMAP      = 0x00000008   /* no char map, glyph indices are
                                               specified directly */
    } DFBFontAttributes;


    typedef struct 
    {
         DFBFontDescriptionFlags            flags;

         DFBFontAttributes                  attributes;
         int                                height;
         int                                width;
         unsigned int                       index;
         int                                fixed_advance;
    } DFBFontDescription;


    struct IDirectFBFont
    {
        DFBResult Release           ( void* thiz );
        DFBResult GetStringWidth    ( IDirectFBFont* thiz, const char* text, int bytes, int* ret_width );
    };



    typedef enum 
    {
        DSMT_SURFACEMANAGER_FIRSTFIT,
        DSMT_SURFACEMANAGER_BUDDY

    } DFBSurfaceManagerTypes;


    typedef enum 
    {
         DSLF_READ           = 0x00000001,  /* request read access while
                                               surface is locked */
         DSLF_WRITE          = 0x00000002   /* request write access */

    } DFBSurfaceLockFlags;

    typedef enum 
    {
         DSTF_LEFT           = 0x00000000,  /* left aligned */
         DSTF_CENTER         = 0x00000001,  /* horizontally centered */
         DSTF_RIGHT          = 0x00000002,  /* right aligned */

         DSTF_TOP            = 0x00000004,  /* y specifies the top
                                               instead of the baseline */
         DSTF_BOTTOM         = 0x00000008,  /* y specifies the bottom
                                               instead of the baseline */

         DSTF_TOPLEFT        = DSTF_TOP | DSTF_LEFT,
         DSTF_TOPCENTER      = DSTF_TOP | DSTF_CENTER,
         DSTF_TOPRIGHT       = DSTF_TOP | DSTF_RIGHT,

         DSTF_BOTTOMLEFT     = DSTF_BOTTOM | DSTF_LEFT,
         DSTF_BOTTOMCENTER   = DSTF_BOTTOM | DSTF_CENTER,
         DSTF_BOTTOMRIGHT    = DSTF_BOTTOM | DSTF_RIGHT,
         
         /*
          * these flag specify that glyphs should be compressed to occupy only 
          * half of its normal height or width on the surface it's blit on.
          */
         DSTF_HALFHEIGHT     = 0x80000000,
         DSTF_HALFWIDTH      = 0x40000000
         
    } DFBSurfaceTextFlags;


    struct IDirectFBSurface
    {
        DFBResult Release               ( void* thiz );
        DFBResult Flip                  ( IDirectFBSurface* thiz, const DFBRegion* region, DFBSurfaceFlipFlags flags );
        DFBResult GetPalette            ( IDirectFBSurface* thiz, IDirectFBPalette** ret_interface );
        DFBResult GetSize               ( IDirectFBSurface* thiz, int* ret_width, int* ret_height );
        DFBResult FillRectangle         ( IDirectFBSurface* thiz, int x, int y, int w, int h );
        DFBResult SetColorIndex         ( IDirectFBSurface* thiz, unsigned int index );
        DFBResult Clear                 ( IDirectFBSurface* thiz, __u8 r, __u8 g, __u8 b, __u8 a );
        DFBResult Blit                  ( IDirectFBSurface* thiz, IDirectFBSurface* source, const DFBRectangle* source_rect, int x, int y );
        DFBResult SetPalette            ( IDirectFBSurface* thiz, IDirectFBPalette* palette);
        DFBResult FillRectangles        ( IDirectFBSurface* thiz, const DFBRectangle* rects, unsigned int num );
        DFBResult Lock                  ( IDirectFBSurface* thiz, DFBSurfaceLockFlags flags, void** ret_ptr, int* ret_pitch );
        DFBResult Unlock                ( IDirectFBSurface* thiz  );
        DFBResult SetFont               ( IDirectFBSurface* thiz, IDirectFBFont* font );
        DFBResult DrawString            ( IDirectFBSurface* thiz, const char* text, int bytes, int x, int y, DFBSurfaceTextFlags flags );
    };


    struct IDirectFBDisplayLayer
    {
                  IDirectFBDisplayLayer ( void );
        DFBResult Release               ( void* thiz );
        DFBResult SetCooperativeLevel   ( IDirectFBDisplayLayer* thiz, DFBDisplayLayerCooperativeLevel level );
        DFBResult SetBackgroundColor    ( IDirectFBDisplayLayer* thiz, __u8 r, __u8 g, __u8 b, __u8 a  );
        DFBResult GetConfiguration      ( IDirectFBDisplayLayer* thiz, DFBDisplayLayerConfig* ret_config );
        DFBResult SetConfiguration      ( IDirectFBDisplayLayer* thiz, const DFBDisplayLayerConfig* ret_config );
        DFBResult GetSurface            ( IDirectFBDisplayLayer* thiz, IDirectFBSurface** ret_interface );
        DFBResult SetSourceRectangle    ( IDirectFBDisplayLayer* thiz, int x, int y, int width, int height );
        DFBResult SetScreenLocation     ( IDirectFBDisplayLayer* thiz, float x, float y, float width, float height );
        DFBResult SetLevel              ( IDirectFBDisplayLayer* thiz, int level );
        DFBResult GetLevel              ( IDirectFBDisplayLayer* thiz, int* ret_level );
    };


    struct IDirectFBImageProvider
    {
        DFBResult Release               ( void* thiz );
        DFBResult GetSurfaceDescription ( IDirectFBImageProvider* thiz, DFBSurfaceDescription* ret_dsc );
        DFBResult RenderTo              ( IDirectFBImageProvider* thiz, IDirectFBSurface* destination, const DFBRectangle* destination_rect );
    };


    struct IDirectFBSurfaceManager
    {
        DFBResult Release               ( void* thiz );
        DFBResult CreateSurface         ( IDirectFBSurfaceManager* thiz, const DFBSurfaceDescription* desc, IDirectFBSurface** ret_interface );
    };



    struct IDirectFB  
    {
            DFBResult SetVideoMode          ( struct IDirectFB* thiz, int width, int height, int bpp );
            DFBResult GetDisplayLayer       ( struct IDirectFB* thiz, DFBDisplayLayerID layer_id,  IDirectFBDisplayLayer   **ret_interface );
            DFBResult CreateImageProvider   ( struct IDirectFB* thiz, const char* filename, IDirectFBImageProvider  **ret_interface );
            DFBResult CreateSurfaceManager  ( IDirectFB* thiz, unsigned int size, unsigned int minimum_page_size, DFBSurfaceManagerTypes type, IDirectFBSurfaceManager** ret_interface );
            DFBResult CreatePalette         ( IDirectFB* thiz, const DFBPaletteDescription* desc, IDirectFBPalette** ret_interface );
            DFBResult CreateSurface         ( IDirectFB* thiz, const DFBSurfaceDescription* desc, IDirectFBSurface** ret_interface );
            DFBResult CreateMemoryFont      ( IDirectFB* thiz, const void* data, unsigned int length, const DFBFontDescription* desc, IDirectFBFont** ret_interface  );
    };




#ifdef __cplusplus
extern "C" {
#endif

    DFBResult DirectFBErrorFatal( DFBResult result );


#ifdef __cplusplus
    }
#endif


/*********************************************************************************************************************/
/*                                          END OPEN SOURCE CODE                                                     */
/*********************************************************************************************************************/



/*********************************************************************************************************************/
/*                                          PLATFORM SPECIFIC EXTENSION                                              */
/*********************************************************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

    #define DFB_EXT_BD_HDMV_PRESENTATION_LAYER  1
    #define DFB_EXT_BD_HDMV_INTERACTIVE_LAYER   2
    #define DFB_EXT_SPLASHSCREEN_LAYER          3


    typedef struct tagDfbExtLayerSettingsType 
    {

        DFBDisplayLayerID            id;            

    } DfbExtLayerSettingsType;


    struct DfbExtObject
    {
        char* name;
    };

    typedef struct DfbExtObject*      DfbExtHandle;

    typedef int DfbExtResult;


    typedef enum {

        DFB_EXT_FRAME_RATE_UNKNOWN = 0,
        DFB_EXT_FRAME_RATE_23_976,
        DFB_EXT_FRAME_RATE_24,
        DFB_EXT_FRAME_RATE_25,
        DFB_EXT_FRAME_RATE_29_97,
        DFB_EXT_FRAME_RATE_50,
        DFB_EXT_FRAME_RATE_59_94

    } DfbExtFrameRate;

    DfbExtHandle    DfbExtDisplayLayerOpen  ( int layer );
    DfbExtResult    DfbExtDisplayLayerClose ( DfbExtHandle layer );
    DfbExtResult    DfbExtLayerGet          ( DfbExtHandle layer, DfbExtLayerSettingsType* settings );
    DfbExtResult    DfbExtSetCurrentPTS     ( unsigned long int currentPTS );
    DfbExtResult    DfbExtSetVideoSource    ( void* decodeHandle, DfbExtFrameRate frameRate );


#ifdef __cplusplus
    }
#endif


#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -