📄 xos_videos.h.svn-base
字号:
//**************************************************************
//Copyright (C), 2008-2008, AnyLook Co., Ltd.
//File name: xBIOS_Video.h
//Author: AnyLook
//Version: 1.0
//Date: 2008/07/31
//Description:
// xOS Include file
//Others:
//Function List:
//<Name> <desc>
//Simple
//History:
//<author> <time> <version > <desc>
// AnyLook 2008/07/31 1.0 build this moudle
//**************************************************************
#ifndef _xOS_Video_VIDEO_H
#define _xOS_Video_VIDEO_H
#ifdef __cplusplus
extern "C" {
#endif
#include "xOS_Videos_VTBL.h"
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
static INLINE char *xOS_Video_VideoDriverName(void *pWindow,char *namebuf, int maxlen)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->VideoDriverName(pWindow, namebuf,maxlen);
}
return 0;
}
static INLINE void *xOS_Video_GetVideoSurface(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GetVideoSurface(pWindow);
}
return 0;
}
static INLINE xOS_VideoInfo *xOS_Video_GetVideoInfo(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GetVideoInfo(pWindow);
}
return 0;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
/*
static INLINE int xOS_Video_Flip(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->Flip( pWindow);
}
return 0;
}
*/
static INLINE int xOS_Video_SetGamma(void *pWindow,float red, float green, float blue)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->SetGamma(pWindow, red, green, blue);
}
return 0;
}
static INLINE int xOS_Video_SetGammaRamp(void *pWindow,const Uint16 *red, const Uint16 *green, const Uint16 *blue)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->SetGammaRamp(pWindow, red, green, blue);
}
return 0;
}
static INLINE int xOS_Video_GetGammaRamp(void *pWindow,Uint16 *red, Uint16 *green, Uint16 *blue)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GetGammaRamp(pWindow, red, green, blue);
}
return 0;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,,
/*
static INLINE Uint32 xOS_Video_MapRGB(void *pWindow,const xOS_PixelFormat * const format,
const Uint8 r, const Uint8 g, const Uint8 b)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->MapRGB(pWindow, format,
r, g, b);
}
return 0;
}
static INLINE Uint32 xOS_Video_MapRGBA(void *pWindow,const xOS_PixelFormat * const format,
const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->MapRGBA(pWindow, format,
r, g, b, a);
}
return 0;
}
static INLINE void xOS_Video_GetRGB(void *pWindow,Uint32 pixel, xOS_PixelFormat *fmt,
Uint8 *r, Uint8 *g, Uint8 *b)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GetRGB(pWindow, pixel, fmt,
r,g, b);
}
}
static INLINE void xOS_Video_GetRGBA(void *pWindow,Uint32 pixel, xOS_PixelFormat *fmt,
Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GetRGBA(pWindow, pixel, fmt,
r, g, b, a);
}
}
static INLINE void *xOS_Video_AllocSurface(void *pWindow,Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->CreateRGBSurface(pWindow,flags, width, height, depth,
Rmask, Gmask, Bmask, Amask);
}
return 0;
}
static INLINE void *xOS_Video_CreateRGBSurface(void *pWindow,Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->CreateRGBSurface(pWindow, flags, width, height, depth,
Rmask, Gmask, Bmask, Amask);
}
return 0;
}
static INLINE void *xOS_Video_CreateRGBSurfaceFrom(void *pWindow,void *pixels,
int width, int height, int depth, int pitch,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->CreateRGBSurfaceFrom(pWindow, pixels,
width, height, depth, pitch,
Rmask, Gmask, Bmask, Amask);
}
return 0;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
static INLINE void *xOS_Video_ConvertSurface(void *pWindow, xOS_PixelFormat *fmt, Uint32 flags)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->ConvertSurface( pWindow, fmt, flags);
}
return 0;
}
static INLINE int xOS_Video_BlitSurface(void *pSrcWindow, xOS_Rect *srcrect,
void *pDstWindow, xOS_Rect *dstrect)
{
if(GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->UpperBlit( pSrcWindow, srcrect,
pDstWindow, dstrect);
}
return 0;
}
static INLINE int xOS_Video_FillRect(void *pWindow, xOS_Rect *dstrect, Uint32 color)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->FillRect( pWindow, dstrect, color);
}
return 0;
}
static INLINE void *xOS_Video_DisplayFormat(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->DisplayFormat( pWindow);
}
return 0;
}
static INLINE void *xOS_Video_DisplayFormatAlpha(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->DisplayFormatAlpha( pWindow);
}
return 0;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
static INLINE xOS_Overlay *xOS_Video_CreateYUVOverlay(void *pWindow,int width, int height,Uint32 format,
void *display)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->CreateYUVOverlay(pWindow, width, height, format,
display);
}
return 0;
}
static INLINE int xOS_Video_LockYUVOverlay(void *pWindow, xOS_Overlay *overlay)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->LockYUVOverlay(pWindow, overlay);
}
return 0;
}
static INLINE void xOS_Video_UnlockYUVOverlay(void *pWindow, xOS_Overlay *overlay)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->UnlockYUVOverlay(pWindow, overlay);
}
}
static INLINE int xOS_Video_DisplayYUVOverlay(void *pWindow, xOS_Overlay *overlay, xOS_Rect *dstrect)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->DisplayYUVOverlay(pWindow, overlay, dstrect);
}
return 0;
}
static INLINE void xOS_Video_FreeYUVOverlay(void *pWindow, xOS_Overlay *overlay)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->FreeYUVOverlay(pWindow, overlay);
}
}
static INLINE int xOS_Video_GL_LoadLibrary(void *pWindow, const char *path)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_LoadLibrary(pWindow, path);
}
return 0;
}
static INLINE void *xOS_Video_GL_GetProcAddress(void *pWindow, const char* proc)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_GetProcAddress(pWindow, proc);
}
return 0;
}
static INLINE int xOS_Video_GL_SetAttribute(void *pWindow, xOS_GLattr attr, int value)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_SetAttribute(pWindow, attr, value);
}
return 0;
}
static INLINE int xOS_Video_GL_GetAttribute(void *pWindow, xOS_GLattr attr, int* value)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_GetAttribute(pWindow, attr, value);
}
return 0;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,,
static INLINE int xOS_Video_GL_LoadLibrary(void *pWindow, const char *path)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_LoadLibrary(pWindow, path);
}
return 0;
}
static INLINE void* xOS_Video_GL_GetProcAddress(void *pWindow, const char *proc)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_GetProcAddress(pWindow, proc);
}
return 0;
}
static INLINE int xOS_Video_GL_SetAttribute(void *pWindow, xOS_GLattr attr, int value)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_SetAttribute(pWindow, attr, value);
}
return 0;
}
static INLINE int xOS_Video_GL_GetAttribute(void *pWindow, xOS_GLattr attr, int* value)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->GL_GetAttribute(pWindow, attr, value);
}
return 0;
}
static INLINE void xOS_Video_GL_SwapBuffers(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GL_SwapBuffers(pWindow);
}
}
static INLINE void xOS_Video_GL_UpdateRects(void *pWindow, int numrects, xOS_Rect* rects)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GL_UpdateRects(pWindow, numrects,rects);
}
}
static INLINE void xOS_Video_GL_Lock(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GL_Lock(pWindow);
}
}
static INLINE void xOS_Video_GL_Unlock(void *pWindow)
{
if (GETVIDEO(g_pxOSList))
{
GETVIDEO(g_pxOSList)->GL_Unlock(pWindow);
}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
static INLINE int xOS_Video_SoftStretch(void *pSrcWindow, xOS_Rect *srcrect,
void *pDstWindow, xOS_Rect *dstrect)
{
if (GETVIDEO(g_pxOSList))
{
return GETVIDEO(g_pxOSList)->SoftStretch( pSrcWindow, srcrect,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -