27 #include "K2TypeTraits.h" 39 Int32Rect() {top = 0; left = 0; bottom = 0; right = 0;}
45 typedef CGFloat SysCoord;
48 SysPoint(SysCoord h, SysCoord v ) {x = h; y = v;}
49 SysPoint(
const CGPoint& pt) {x = pt.x; y = pt.y;}
53 SysPoint& operator=(
const CGPoint& pt) {x = pt.x; y = pt.y;
return *
this;}
60 SysSize(SysCoord h, SysCoord w ) {width = h; height = w;}
61 SysSize(
const CGPoint& pt) {width = pt.x; height = pt.y;}
62 SysSize(
const CGSize& sz) {width = sz.width; height = sz.height;}
63 SysSize() {width = 0; height = 0;}
64 SysSize& operator=(
const SysPoint& pt) {width = pt.x; height = pt.y;
return *
this;}
65 SysSize& operator=(
const CGSize& sz) {width = sz.width; height = sz.height;
return *
this;}
69 SysRect(SysCoord left, SysCoord top, SysCoord right, SysCoord bottom ) {origin.x = left; origin.y = top; size.width = right - left; size.height = bottom - top;}
71 SysRect(
const Int32Rect& r) {origin.x = r.left; origin.y = r.top; size.width = r.right - r.left; size.height = r.bottom - r.top;}
72 SysRect(
const CGRect& r) {origin = r.origin; size = r.size;}
74 SysRect() {origin.x =0; origin.y = 0; size.width = 0; size.height = 0;}
75 SysRect& operator=(
const SysRect& r) {origin = r.origin; size = r.size;
return *
this;}
76 SysRect& operator=(
const CGRect& r) {origin = r.origin; size = r.size;
return *
this;}
83 CGRect temp = CGRectIntegral(*
this);
84 foo.left = (int32) temp.origin.x; foo.top = (int32) temp.origin.y; foo.right = foo.left + (int32) temp.size.width; foo.bottom = foo.top +(int32) temp.size.height;
92 typedef HIMutableShapeRef SysRgn;
93 typedef HIShapeRef ConstSysRgn;
95 typedef SysRgn SysWireframe;
96 DECLARE_BASE_TYPE(SysRgn);
98 typedef SysCoord GSysCoord;
99 typedef SysCoord WSysCoord;
100 typedef uint16_t SysChar;
101 typedef uint16 SysKeyCode;
102 typedef WindowPtr SysWindow;
103 DECLARE_BASE_TYPE(SysWindow);
105 typedef void* SysControl;
107 typedef GrafPtr SysPort;
109 typedef CGContextRef SysPort_NEW;
110 DECLARE_BASE_TYPE(SysPort_NEW);
112 typedef GWorldPtr SysBitmap;
113 typedef CGContextRef SysBitmap_NEW;
115 typedef int16 SysFileRef;
116 typedef void* SysEvent;
117 typedef Handle SysHandle;
124 typedef int16 MenuID;
125 typedef int32 PlatformError;
126 typedef uint32 UserError;
127 typedef int16 CursorID;
129 typedef struct FInfo SysFileInfo;
131 typedef ResType RsrcType;
132 typedef char *RsrcName;
133 typedef uint32 RsrcID;
136 typedef CFBundleRef SysConnection;
137 DECLARE_BASE_TYPE(SysConnection);
139 #ifndef PARAMS_SYSRECT 140 #define PARAMS_SYSRECT(sysRect) (int)sysRect.origin.x,(int)sysRect.origin.y,(int)sysRect.size.width,(int)sysRect.size.height 143 #endif // __SYSTYPE__