37 unsigned _shadowStyle;
39 BOOL _shouldUpdateContentRect;
40 BOOL _hasInitializeInstanceWithWindow;
45 DOMElement _DOMBodyElement;
46 DOMElement _DOMFocusElement;
47 DOMElement _DOMEventGuard;
48 DOMElement _DOMScrollingElement;
49 id _hideDOMScrollingElementTimeout;
51 CPArray _windowLevels;
55 BOOL _mouseDownIsRightClick;
56 int _firstMouseDownButton;
57 CGPoint _lastMouseEventLocation;
59 CPTimeInterval _lastMouseUp;
60 CPTimeInterval _lastMouseDown;
69 CPPlatformPasteboard _platformPasteboard;
81 + (CPSet)visiblePlatformWindows
86 + (BOOL)supportsMultipleInstances
105 - (id)initWithContentRect:(CGRect)aRect
111 _contentRect = CGRectMakeCopy(aRect);
119 _platformPasteboard = [CPPlatformPasteboard new];
130 _hasInitializeInstanceWithWindow = YES;
142 - (CGRect)contentRect
144 return CGRectMakeCopy(_contentRect);
147 - (CGRect)contentBounds
151 contentBounds.origin = CGPointMakeZero();
153 return contentBounds;
156 - (CGRect)visibleFrame
160 frame.origin = CGPointMakeZero();
164 var menuBarHeight = [[CPApp mainMenu] menuBarHeight];
166 frame.origin.y += menuBarHeight;
167 frame.size.height -= menuBarHeight;
173 - (CGRect)usableContentFrame
178 - (void)setContentRect:(CGRect)aRect
180 if (!aRect || CGRectEqualToRect(_contentRect, aRect))
183 _contentRect = CGRectMakeCopy(aRect);
186 [
self updateNativeContentRect];
190 - (void)updateFromNativeContentRect
195 - (CGPoint)convertBaseToScreen:(CGPoint)aPoint
199 return CGPointMake(aPoint.x + CGRectGetMinX(contentRect), aPoint.y + CGRectGetMinY(contentRect));
202 - (CGPoint)convertScreenToBase:(CGPoint)aPoint
206 return CGPointMake(aPoint.x - CGRectGetMinX(contentRect), aPoint.y - CGRectGetMinY(contentRect));
212 return _DOMWindow !== NULL && _DOMWindow !== undefined;
218 - (void)deminiaturize:(
id)sender
222 - (void)miniaturize:(
id)sender
226 - (void)moveWindow:(
CPWindow)aWindow fromLevel:(
int)fromLevel toLevel:(
int)toLevel
229 if (!aWindow._isVisible)
232 var fromLayer = [
self layerAtLevel:fromLevel create:NO],
233 toLayer = [
self layerAtLevel:toLevel create:YES];
235 [fromLayer removeWindow:aWindow];
236 [toLayer insertWindow:aWindow atIndex:CPNotFound];
240 - (void)setLevel:(CPInteger)aLevel
245 - (void)setHasShadow:(BOOL)shouldHaveShadow
247 _hasShadow = shouldHaveShadow;
250 - (void)setShadowStyle:(
int)aStyle
252 _shadowStyle = aStyle;
255 - (BOOL)supportsFullPlatformWindows
266 _DOMWindow.document &&
267 ([aWindow isFullPlatformWindow]))
269 _DOMWindow.document.title = _title;
279 - (BOOL)_canUpdateContentRect
282 return _shouldUpdateContentRect && _hasInitializeInstanceWithWindow;
285 - (BOOL)_hasInitializeInstanceWithWindow
287 return _hasInitializeInstanceWithWindow;
290 - (void)_setShouldUpdateContentRect:(BOOL)aBoolean
292 _shouldUpdateContentRect = aBoolean;
297 #if PLATFORM(BROWSER)
void setPlatformWindow:(CPPlatformWindow aPlatformWindow)
A mutable key-value pair collection.
An immutable string (collection of characters).
CPInternetExplorerBrowserEngine
void setFullPlatformWindow:(BOOL shouldBeFullPlatformWindow)
function CPBrowserIsEngine(anEngine)