4 // Copyright (C) 2005, 2006, 2007, 2008, Apple Inc. All rights reserved.
6 /* Unicodes we reserve for function keys on the keyboard, OpenStep reserves the range 0xF700-0xF8FF for this purpose. The availability of various keys will be system dependent. */
8 // Include Platform.h so that other applications including this file don't have to.
9 #ifndef WAKAppKitStubs_h
10 #define WAKAppKitStubs_h
12 #import <JavaScriptCore/Platform.h>
13 #import <CoreGraphics/CoreGraphics.h>
14 #import <Foundation/Foundation.h>
19 #define NSClipView WAKClipView
20 #define NSView WAKView
21 #define NSScroller WAKScroller
22 #define NSScrollView WAKScrollView
23 #define WebDynamicScrollBarsView WAKScrollView
24 #define NSWindow WAKWindow
25 #define NSResponder WAKResponder
27 #define NSPoint CGPoint
31 #define NSZeroPoint CGPointZero
32 #define NSZeroSize CGSizeZero
33 #define NSZeroRect CGRectZero
35 #define NSMakePoint CGPointMake
36 #define NSMakeSize CGSizeMake
37 #define NSMakeRect CGRectMake
39 #define NSEqualPoints CGPointEqualToPoint
40 #define NSEqualSizes CGSizeEqualToSize
41 #define NSEqualRects CGRectEqualToRect
43 #define NSPointInRect(x,y) CGRectContainsPoint(y,x)
44 #define NSInsetRect CGRectInset
45 #define NSIntersectionRect CGRectIntersection
46 #define NSIsEmptyRect CGRectIsEmpty
47 #define NSMaxX CGRectGetMaxX
48 #define NSMaxY CGRectGetMaxY
49 #define NSContainsRect CGRectContainsRect
50 #define NSWidth CGRectGetWidth
51 #define NSHeight CGRectGetHeight
56 NSUpArrowFunctionKey
= 0xF700,
57 NSDownArrowFunctionKey
= 0xF701,
58 NSLeftArrowFunctionKey
= 0xF702,
59 NSRightArrowFunctionKey
= 0xF703,
60 NSF1FunctionKey
= 0xF704,
61 NSF2FunctionKey
= 0xF705,
62 NSF3FunctionKey
= 0xF706,
63 NSF4FunctionKey
= 0xF707,
64 NSF5FunctionKey
= 0xF708,
65 NSF6FunctionKey
= 0xF709,
66 NSF7FunctionKey
= 0xF70A,
67 NSF8FunctionKey
= 0xF70B,
68 NSF9FunctionKey
= 0xF70C,
69 NSF10FunctionKey
= 0xF70D,
70 NSF11FunctionKey
= 0xF70E,
71 NSF12FunctionKey
= 0xF70F,
72 NSF13FunctionKey
= 0xF710,
73 NSF14FunctionKey
= 0xF711,
74 NSF15FunctionKey
= 0xF712,
75 NSF16FunctionKey
= 0xF713,
76 NSF17FunctionKey
= 0xF714,
77 NSF18FunctionKey
= 0xF715,
78 NSF19FunctionKey
= 0xF716,
79 NSF20FunctionKey
= 0xF717,
80 NSF21FunctionKey
= 0xF718,
81 NSF22FunctionKey
= 0xF719,
82 NSF23FunctionKey
= 0xF71A,
83 NSF24FunctionKey
= 0xF71B,
84 NSF25FunctionKey
= 0xF71C,
85 NSF26FunctionKey
= 0xF71D,
86 NSF27FunctionKey
= 0xF71E,
87 NSF28FunctionKey
= 0xF71F,
88 NSF29FunctionKey
= 0xF720,
89 NSF30FunctionKey
= 0xF721,
90 NSF31FunctionKey
= 0xF722,
91 NSF32FunctionKey
= 0xF723,
92 NSF33FunctionKey
= 0xF724,
93 NSF34FunctionKey
= 0xF725,
94 NSF35FunctionKey
= 0xF726,
95 NSInsertFunctionKey
= 0xF727,
96 NSDeleteFunctionKey
= 0xF728,
97 NSHomeFunctionKey
= 0xF729,
98 NSBeginFunctionKey
= 0xF72A,
99 NSEndFunctionKey
= 0xF72B,
100 NSPageUpFunctionKey
= 0xF72C,
101 NSPageDownFunctionKey
= 0xF72D,
102 NSPrintScreenFunctionKey
= 0xF72E,
103 NSScrollLockFunctionKey
= 0xF72F,
104 NSPauseFunctionKey
= 0xF730,
105 NSSysReqFunctionKey
= 0xF731,
106 NSBreakFunctionKey
= 0xF732,
107 NSResetFunctionKey
= 0xF733,
108 NSStopFunctionKey
= 0xF734,
109 NSMenuFunctionKey
= 0xF735,
110 NSUserFunctionKey
= 0xF736,
111 NSSystemFunctionKey
= 0xF737,
112 NSPrintFunctionKey
= 0xF738,
113 NSClearLineFunctionKey
= 0xF739,
114 NSClearDisplayFunctionKey
= 0xF73A,
115 NSInsertLineFunctionKey
= 0xF73B,
116 NSDeleteLineFunctionKey
= 0xF73C,
117 NSInsertCharFunctionKey
= 0xF73D,
118 NSDeleteCharFunctionKey
= 0xF73E,
119 NSPrevFunctionKey
= 0xF73F,
120 NSNextFunctionKey
= 0xF740,
121 NSSelectFunctionKey
= 0xF741,
122 NSExecuteFunctionKey
= 0xF742,
123 NSUndoFunctionKey
= 0xF743,
124 NSRedoFunctionKey
= 0xF744,
125 NSFindFunctionKey
= 0xF745,
126 NSHelpFunctionKey
= 0xF746,
127 NSModeSwitchFunctionKey
= 0xF747
131 NSParagraphSeparatorCharacter
= 0x2029,
132 NSLineSeparatorCharacter
= 0x2028,
133 NSTabCharacter
= 0x0009,
134 NSFormFeedCharacter
= 0x000c,
135 NSNewlineCharacter
= 0x000a,
136 NSCarriageReturnCharacter
= 0x000d,
137 NSEnterCharacter
= 0x0003,
138 NSBackspaceCharacter
= 0x0008,
139 NSBackTabCharacter
= 0x0019,
140 NSDeleteCharacter
= 0x007f
143 /* Device-independent bits found in event modifier flags */
145 NSAlphaShiftKeyMask
= 1 << 16,
146 NSShiftKeyMask
= 1 << 17,
147 NSControlKeyMask
= 1 << 18,
148 NSAlternateKeyMask
= 1 << 19,
149 NSCommandKeyMask
= 1 << 20,
150 NSNumericPadKeyMask
= 1 << 21,
151 NSHelpKeyMask
= 1 << 22,
152 NSFunctionKeyMask
= 1 << 23,
153 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
154 NSDeviceIndependentModifierFlagsMask
= 0xffff0000U
158 typedef enum _NSWritingDirection
{
159 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
160 NSWritingDirectionNatural
= -1, /* Determines direction using the Unicode Bidi Algorithm rules P2 and P3 */
161 #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 */
162 NSWritingDirectionLeftToRight
= 0, /* Left to right writing direction */
163 NSWritingDirectionRightToLeft
/* Right to left writing direction */
164 } NSWritingDirection
;
166 typedef enum _NSSelectionAffinity
{
167 NSSelectionAffinityUpstream
= 0,
168 NSSelectionAffinityDownstream
= 1
169 } NSSelectionAffinity
;
171 typedef enum _NSCellState
{
177 typedef enum _NSCompositingOperation
{
178 NSCompositeClear
= 0,
180 NSCompositeSourceOver
= 2,
181 NSCompositeSourceIn
= 3,
182 NSCompositeSourceOut
= 4,
183 NSCompositeSourceAtop
= 5,
184 NSCompositeDestinationOver
= 6,
185 NSCompositeDestinationIn
= 7,
186 NSCompositeDestinationOut
= 8,
187 NSCompositeDestinationAtop
= 9,
189 NSCompositePlusDarker
= 11,
190 NSCompositeHighlight
= 12,
191 NSCompositePlusLighter
= 13
192 } NSCompositingOperation
;
194 typedef enum _NSMultibyteGlyphPacking
{
195 NSOneByteGlyphPacking
,
196 NSJapaneseEUCGlyphPacking
,
197 NSAsciiWithDoubleByteEUCGlyphPacking
,
198 NSTwoByteGlyphPacking
,
199 NSFourByteGlyphPacking
,
200 NSNativeShortGlyphPacking
201 } NSMultibyteGlyphPacking
;
203 typedef enum _NSSelectionDirection
{
204 NSDirectSelection
= 0,
207 } NSSelectionDirection
;
209 void *WKAutorelease(id object
);
211 @interface NSCursor
: NSObject
212 + (void)setHiddenUntilMouseMoves
:(BOOL
)flag
;
215 @interface
NSValue (CGRidiculousness
)
216 + (id
)valueWithSize
:(CGSize
)aSize
;
218 + (id
)valueWithRect
:(CGRect
)aRect
;
226 BOOL
WKMouseInRect(CGPoint aPoint
, CGRect aRect
);