00001
00009 #if !defined(_RESCOMPAT_H_)
00010 #define _RESCOMPAT_H_
00011
00012 #include <PalmTypes.h>
00013 #include <Window.h>
00014 #include <Form.h>
00015 #include <Event.h>
00016 #include <sony_support.h>
00017 #include <sections.h>
00018
00019 #define BASEWIDTH ((Coord)160)
00020 #define BASEHEIGHT ((Coord)160)
00021
00022 #if defined(SONY_CLIE) || defined(PALM_HIGH)
00023
00024 #define CM_DEFAULT (0)
00025 #define CM_MOVEX (1<<1)
00026 #define CM_MOVEY (1<<2)
00027 #define CM_MODAL (1<<3)
00028
00029 #define HRSUPPORT
00030
00031 extern Coord sWidth;
00032 extern Coord sHeight;
00033
00034 #define SETWIDTH(x) sWidth = (x)
00035 #define SETHEIGHT(y) sHeight = (y)
00036 #define GETWIDTH() (sWidth)
00037 #define GETHEIGHT() (sHeight)
00038
00039 Boolean isDoubleOrMoreResolution(void);
00040 void scaleEvent(EventPtr event);
00041 UInt32 highDensityFeatureSet(void);
00042 Coord scaleCoord(Coord x);
00043 Coord normalizeCoord(Coord x);
00044 Boolean canHires(void);
00045 Boolean isHires(void);
00046 void setScreenRes(void) HIRES_SECTION;
00047 void StartHiresDraw(void);
00048 void EndHiresDraw(void);
00049 void StartHiresFontDraw(void);
00050 void EndHiresFontDraw(void);
00051 void SetSilkResizable(FormPtr form, UInt8 resizable) HIRES_SECTION;
00052 Int16 hasVirtualSilk(void) HIRES_SECTION;
00053 void StartSilk(void) HIRES_SECTION;
00054 void EndSilk(void) HIRES_SECTION;
00055 Boolean collapseMove(FormPtr form, UInt8 stretchy, Int16 *roffsetX,
00056 Int16 *roffsetY) HIRES_SECTION;
00057 void collapsePreRedraw(FormPtr form) HIRES_SECTION;
00058 #define StartScaleDraw StartHiresFontDraw
00059 #define EndScaleDraw EndHiresFontDraw
00060
00061 #else
00062
00063
00064
00065 #define sWidth BASEWIDTH
00066 #define sHeight BASEHEIGHT
00067
00068 #define SETWIDTH(x)
00069 #define SETHEIGHT(y)
00070 #define GETWIDTH() (BASEWIDTH)
00071 #define GETHEIGHT() (BASEHEIGHT)
00072
00073 #define isHires() (false)
00074 #define canHires() (false)
00075
00076 #define highDensityFeatureSet() (0)
00077 #define isDoubleOrMoreResolution() (0)
00078 #define scaleEvent(e)
00079 #define scaleCoord(x) (x)
00080 #define normalizeCoord(X) (X)
00081 #define StartHiresDraw()
00082 #define EndHiresDraw()
00083 #define StartHiresFontDraw()
00084 #define EndHiresFontDraw()
00085 #define StartScaleDraw()
00086 #define EndScaleDraw()
00087 #define setScreenRes()
00088 #define SetSilkResizable(X,Y)
00089 #define hasVirtualSilk() (0)
00090 #define EndSilk()
00091 #define StartSilk()
00092 #define collapseMove(F,M,X,Y)
00093 #define collapsePreRedraw(X)
00094
00095 #endif
00096
00097
00098 #endif