00001
00007 #if !defined(_SONY_SUPPORT_H_)
00008 #define _SONY_SUPPORT_H_
00009
00010 #ifdef SONY_CLIE
00011
00012 #include <Font.h>
00013 #include <FontSelect.h>
00014 #include <SonyCLIE.h>
00015
00020 Boolean sonyCanHires(void);
00021
00026 Boolean sonyHires(void);
00031 Err loadHiRes(void);
00036 Err unloadHiRes(void);
00038 void unhookHoldSwitch(void);
00043 void hookHoldSwitch(void (*CallBack)(UInt32));
00044
00052 int IsDrawWindowMostOfScreen(void);
00053
00058 Boolean IsSony(void);
00059
00066 Boolean SonySilk(void);
00067
00075 void SonyEndSilk(void);
00076
00081 void SonySetSilkResizable(UInt8 resizeable);
00082
00090 void SonyCollapsePreRedraw(FormPtr form);
00091
00103 Err _WinScreenMode(WinScreenModeOperation op, UInt32 *width, UInt32 *height,
00104 UInt32 *depth, Boolean *enableColor);
00105
00111 void _WinEraseRectangle(RectangleType *r, UInt16 cornerDiam);
00112
00118 void _WinDrawRectangle(RectangleType *rect, UInt16 cornerDiam);
00119
00129 BitmapType *_BmpCreate(Coord width, Coord height, UInt8 depth,
00130 ColorTableType *clut, UInt16 *error);
00131
00138 void _WinDrawBitmap(BitmapPtr bmp, Coord x, Coord y);
00139
00146 WinHandle _WinCreateBitmapWindow(BitmapType *pBitmap, UInt16 *err);
00147
00156 WinHandle _WinCreateOffscreenWindow(Coord width, Coord height,
00157 WindowFormatType format, UInt16 *error);
00158
00168 void _WinCopyRectangle(WinHandle srcWin, WinHandle dstWin,
00169 RectangleType *srcRect, Coord destX, Coord destY, WinDrawOperation mode);
00170
00178 void _WinDrawChars(const Char *chars, Int16 len, Coord x, Coord y);
00179
00185 void _WinDrawRectangleFrame(FrameType frame, RectangleType *rP);
00186
00191 void _FntSetFont(FontID font);
00192
00193 #else
00194
00195
00196 #define sonyCanHires() (false)
00197 #define sonyHires() (false)
00198 #define loadHiRes() (0)
00199 #define unloadHiRes() (0)
00200 #define unhookHoldSwitch()
00201 #define hookHoldSwitch(x)
00202 #define IsDrawWindowMostOfScreen() (true)
00203 #define IsSony() (false)
00204 #define SonySilk() (0)
00205 #define SonyEndSilk()
00206 #define SonySetSilkResizable(X)
00207 #define SonyCollapsePreRedraw(X)
00208
00209 #define _WinScreenMode WinScreenMode
00210 #define _WinEraseRectangle WinEraseRectangle
00211 #define _WinDrawRectangle WinDrawRectangle
00212 #define _WinDrawBitmap WinDrawBitmap
00213 #define _BmpCreate BmpCreate
00214 #define _WinCopyRectangle WinCopyRectangle
00215 #define _WinDrawChars WinDrawChars
00216 #define _WinDrawRectangleFrame WinDrawRectangleFrame
00217 #define _FntSetFont FntSetFont
00218 #define _WinCreateOffscreenWindow WinCreateOffscreenWindow
00219 #define _WinCreateBitmapWindow WinCreateBitmapWindow
00220
00221 #endif
00222
00223 #endif