mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
894efdd1db
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
91 lines
1.5 KiB
C
91 lines
1.5 KiB
C
/*
|
|
*
|
|
* (c) 2004-2008 Laurent Vivier <Laurent@lvivier.info>
|
|
*
|
|
*/
|
|
|
|
#ifndef __MACOS_VIDEO_H__
|
|
#define __MACOS_VIDEO_H__
|
|
|
|
#include <string.h>
|
|
#include <macos/files.h>
|
|
#include <macos/devices.h>
|
|
#include <macos/quickdraw.h>
|
|
|
|
/* control params */
|
|
|
|
/* SetEntries*/
|
|
|
|
typedef struct VDSetEntryRecord {
|
|
ColorSpec *csTable;
|
|
short csStart;
|
|
short csCount;
|
|
} VDSetEntryRecord;
|
|
typedef VDSetEntryRecord *VDSetEntryPtr;
|
|
|
|
typedef struct VDGammaRecord {
|
|
void *csGTable;
|
|
} VDGammaRecord;
|
|
typedef VDGammaRecord *VDGamRecPtr;
|
|
|
|
/* status params */
|
|
|
|
typedef struct VDFlagRec
|
|
{
|
|
char flag;
|
|
} VDFlagRec;
|
|
typedef VDFlagRec *VDFlagPtr;
|
|
|
|
typedef struct VDParamBlock
|
|
{
|
|
COMMON_PARAMS
|
|
short ioRefNum;
|
|
short csCode;
|
|
void* csParam;
|
|
} VDParamBlock;
|
|
typedef VDParamBlock *VDParamBlockPtr;
|
|
|
|
typedef struct VDSwitchInfoRec {
|
|
unsigned short csMode;
|
|
unsigned long csData;
|
|
unsigned short csPage;
|
|
void* csBaseAddr;
|
|
unsigned long csReserved;
|
|
} VDSwitchInfoRec;
|
|
|
|
/* control codes */
|
|
|
|
enum {
|
|
cscReset = 0,
|
|
cscKillIO = 1,
|
|
cscSetMode = 2,
|
|
cscSetEntries = 3,
|
|
cscSetGamma = 4,
|
|
};
|
|
|
|
/* status codes */
|
|
|
|
enum {
|
|
cscGetMode = 2,
|
|
cscGetEntries = 3,
|
|
cscGetGamma = 8,
|
|
cscGetCurMode = 10,
|
|
};
|
|
|
|
/* status commands */
|
|
|
|
static inline OSErr GetCurrentMode(short refNum, VDSwitchInfoRec *hwMode)
|
|
{
|
|
CntrlParam param;
|
|
|
|
memset(¶m, 0, sizeof(param));
|
|
memset(hwMode, 0, sizeof(hwMode));
|
|
|
|
param.csCode = cscGetCurMode;
|
|
param.ioCRefNum = refNum;
|
|
*((VDSwitchInfoRec **)¶m.csParam[0]) = hwMode;
|
|
|
|
return PBStatusSync((ParmBlkPtr)¶m);
|
|
}
|
|
#endif /* __MACOS_VIDEO_H__ */
|