root/trunk/WebKitLibraries/WebKitSystemInterface.h

Revision 45474, 10.0 KB (checked in by eric.carlson@apple.com, 11 hours ago)

2009-07-02 Pierre d'Herbemont < pdherbemont@apple.com>

Reviewed by Simon Fraser.

< rdar://problem/6518119>

Add a rewind button and hide the timeline for live broadcasts when
in MediaUI mode.

  • css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
  • css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Ditto.
  • css/CSSSelector.h:
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
  • css/CSSValueKeywords.in: Ditto.
  • css/mediaControls.css: Ditto.
  • css/mediaControlsQT.css: Ditto.
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::rewind): New. (WebCore::HTMLMediaElement::returnToRealTime): New. (WebCore::HTMLMediaElement::isStreaming): New.
  • html/HTMLMediaElement.h:
  • page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
  • platform/LocalizedStrings.h: Add localized media state messages.
  • platform/ThemeTypes.h: Add the new pseudo element.
  • platform/mac/LocalizedStringsMac.mm: (WebCore::mediaElementLoadingStateText): Add localized media state. (WebCore::mediaElementLiveBroadcastStateText): Ditto.
  • platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support

multiple states.

  • platform/mac/WebCoreSystemInterface.mm: Ditto.
  • rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::MediaControlElement): Deal with new elements. (WebCore::MediaControlElement::attachToParent): Ditto. (WebCore::MediaControlElement::update): Ditto. (WebCore::MediaControlElement::updateStyle): Ditto. (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto. (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto. (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto. (WebCore::MediaControlStatusDisplayElement::update): Ditto. (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto. (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto. (WebCore::MediaControlInputElement::attachToParent): Ditto. (WebCore::MediaControlInputElement::updateStyle): Ditto. (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto. (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto. (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto. (WebCore::MediaControlTimelineElement::update): Ditto. (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
  • rendering/MediaControlElements.h: Ditto.
  • rendering/RenderMedia.cpp: (WebCore::RenderMedia::styleDidChange): Deal with the new elements. (WebCore::RenderMedia::createPanel): Ditto. (WebCore::RenderMedia::createRewindButton): Ditto. (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto. (WebCore::RenderMedia::createStatusDisplay): Ditto. (WebCore::RenderMedia::createTimelineContainer): Ditto. (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto. (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto. (WebCore::RenderMedia::updateControls): Ditto. (WebCore::RenderMedia::forwardEvent): Ditto.
  • rendering/RenderMedia.h:
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Deal with the new elements.
  • rendering/RenderTheme.h: (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements. (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto. (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements. (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto. (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
  • rendering/style/RenderStyleConstants.h: Add constants for the new elements.

2009-07-02 Pierre d'Herbemont < pdherbemont@apple.com>

Reviewed by Simon Fraser.

< rdar://problem/6518119>

Add localized strings for media controller status messages.

  • English.lproj/Localizable.strings: Localized text.

2009-07-02 Pierre d'Herbemont < pdherbemont@apple.com>

Reviewed by Simon Fraser.

< rdar://problem/6518119>

Add localized strings for media controller status.

  • WebCoreSupport/WebViewFactory.mm: Add new localized text. (-[WebViewFactory mediaElementLoadingStateText]): (-[WebViewFactory mediaElementLiveBroadcastStateText]):

2009-07-02 Pierre d'Herbemont < pdherbemont@apple.com>

Reviewed by Simon Fraser.

Update WebKitSystemInterface for < rdar://problem/6518119>

  • WebKitSystemInterface.h:
  • libWebKitSystemInterfaceLeopard.a:
  • libWebKitSystemInterfaceSnowLeopard.a:
  • libWebKitSystemInterfaceTiger.a:
  • Property svn:eol-style set to native
Line 
1/*     
2    WebKitSystemInterface.h
3    Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4
5    Public header file.
6*/
7
8#import <Cocoa/Cocoa.h>
9#import <Carbon/Carbon.h>
10
11@class QTMovie;
12@class QTMovieView;
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef enum {
19    WKCertificateParseResultSucceeded  = 0,
20    WKCertificateParseResultFailed     = 1,
21    WKCertificateParseResultPKCS7      = 2,
22} WKCertificateParseResult;
23
24CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
25CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
26WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
27
28NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
29NSArray *WKGetExtensionsForMIMEType(NSString *type);
30NSString *WKGetMIMETypeForExtension(NSString *extension);
31
32NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
33NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
34
35CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
36
37void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
38void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
39
40void WKShowKeyAndMain(void);
41#ifndef __LP64__
42OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
43unsigned WKCarbonWindowMask(void);
44void *WKGetNativeWindowFromWindowRef(WindowRef);
45OSType WKCarbonWindowPropertyCreator(void);
46OSType WKCarbonWindowPropertyTag(void);
47#endif
48
49typedef id WKNSURLConnectionDelegateProxyPtr;
50
51WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
52
53void WKDisableCGDeferredUpdates(void);
54
55Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
56void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
57
58unsigned WKGetNSAutoreleasePoolCount(void);
59
60void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
61
62NSString *WKMouseMovedNotification(void);
63NSString *WKWindowWillOrderOnScreenNotification(void);
64void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
65
66CFTypeID WKGetAXTextMarkerTypeID(void);
67CFTypeID WKGetAXTextMarkerRangeTypeID(void);
68CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
69BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
70CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
71CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
72CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
73void WKAccessibilityHandleFocusChanged(void);
74AXUIElementRef WKCreateAXUIElementRef(id element);
75void WKUnregisterUniqueIdForElement(id element);
76
77void WKSetUpFontCache(void);
78
79void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
80void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
81void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
82
83CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
84    void (*formFinalize)(CFReadStreamRef, void *), 
85    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
86    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
87    Boolean (*formCanRead)(CFReadStreamRef, void *), 
88    void (*formClose)(CFReadStreamRef, void *), 
89    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
90    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
91    void *context);
92
93void WKDrawCapsLockIndicator(CGContextRef, CGRect);
94
95void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
96    // The CG context's current path is the focus ring's path.
97    // A color of 0 means "use system focus ring color".
98    // A radius of 0 means "use default focus ring radius".
99
100void WKSetDragImage(NSImage *image, NSPoint offset);
101
102void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
103void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
104void WKDrawBezeledTextArea(NSRect, BOOL enabled);
105void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
106
107void WKSendUserChangeNotifications(void);
108#ifndef __LP64__
109BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
110void WKSendKeyEventToTSM(NSEvent *theEvent);
111void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
112#endif
113
114BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
115NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
116NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
117void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
118BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
119
120#ifdef BUILDING_ON_TIGER
121// CGFontGetAscent, CGFontGetDescent, CGFontGetLeading and CGFontGetUnitsPerEm were not available until Leopard
122void WKGetFontMetrics(CGFontRef font, int *ascent, int *descent, int *lineGap, unsigned *unitsPerEm);
123// CTFontCopyGraphicsFont was not available until Leopard
124CGFontRef WKGetCGFontFromNSFont(NSFont *font);
125// CTFontGetPlatformFont was not available until Leopard
126ATSUFontID WKGetNSFontATSUFontId(NSFont *font);
127// CGFontCopyFullName was not available until Leopard
128CFStringRef WKCopyFullFontName(CGFontRef font);
129#endif
130
131void WKSetPatternBaseCTM(CGContextRef, CGAffineTransform);
132void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
133
134#ifndef BUILDING_ON_TIGER
135void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
136#else
137typedef void *WKGlyphVectorRef;
138OSStatus WKConvertCharToGlyphs(void *styleGroup, const UniChar *characters, unsigned numCharacters, WKGlyphVectorRef glyphs);
139OSStatus WKGetATSStyleGroup(ATSUStyle fontStyle, void **styleGroup);
140void WKReleaseStyleGroup(void *group);
141OSStatus WKInitializeGlyphVector(int count, WKGlyphVectorRef glyphs);
142void WKClearGlyphVector(WKGlyphVectorRef glyphs);
143
144int WKGetGlyphVectorNumGlyphs(WKGlyphVectorRef glyphVector);
145ATSLayoutRecord *WKGetGlyphVectorFirstRecord(WKGlyphVectorRef glyphVector);
146size_t WKGetGlyphVectorRecordSize(WKGlyphVectorRef glyphVector);
147#endif
148
149#ifndef __LP64__
150NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
151NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
152NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
153#endif
154
155CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
156void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
157
158void WKNSWindowMakeBottomCornersSquare(NSWindow *);
159
160// These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
161// use that enum directly).
162typedef enum {
163    WKThemeScrollBarArrowsSingle     = 0,
164    WKThemeScrollBarArrowsLowerRight = 1,
165    WKThemeScrollBarArrowsDouble     = 2,
166    WKThemeScrollBarArrowsUpperLeft  = 3,
167} WKThemeScrollBarArrowStyle;
168
169OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
170
171#ifdef BUILDING_ON_TIGER
172// WKSupportsMultipartXMixedReplace is not required on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest
173BOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request);
174#endif
175
176BOOL WKCGContextIsBitmapContext(CGContextRef context);
177
178void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
179
180BOOL WKAppVersionCheckLessThan(NSString *, int, double);
181
182typedef enum {
183    WKMovieTypeUnknown,
184    WKMovieTypeDownload,
185    WKMovieTypeStoredStream,
186    WKMovieTypeLiveStream
187} WKMovieType;
188
189int WKQTMovieGetType(QTMovie* movie);
190
191unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
192int WKQTMovieDataRate(QTMovie* movie);
193float WKQTMovieMaxTimeLoaded(QTMovie* movie);
194float WKQTMovieMaxTimeSeekable(QTMovie* movie);
195NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
196void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
197
198CFStringRef WKCopyFoundationCacheDirectory(void);
199
200typedef enum {
201    WKMediaUIPartFullscreenButton   = 0,
202    WKMediaUIPartMuteButton,
203    WKMediaUIPartPlayButton,
204    WKMediaUIPartSeekBackButton,
205    WKMediaUIPartSeekForwardButton,
206    WKMediaUIPartSlider,
207    WKMediaUIPartSliderThumb,
208    WKMediaUIPartRewindButton,
209    WKMediaUIPartSeekToRealtimeButton,
210    WKMediaUIPartUnMuteButton,
211    WKMediaUIPartPauseButton,
212    WKMediaUIPartBackground,
213    WKMediaUIPartCurrentTimeDisplay,
214    WKMediaUIPartTimeRemainingDisplay
215} WKMediaUIPart;
216
217typedef enum {
218    WKMediaControllerThemeClassic   = 1,
219    WKMediaControllerThemeQT        = 2
220} WKMediaControllerThemeStyle;
221
222typedef enum {
223    WKMediaControllerStateNormal     = 0,
224    WKMediaControllerStateActivated  = 1,
225    WKMediaControllerStateDisabled   = 2
226} WKMediaControllerThemeState;
227
228BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
229void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
230void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, int state);
231void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
232
233#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && defined(__x86_64__)
234mach_port_t WKInitializeRenderServer(void);
235   
236@class CALayer;
237
238CALayer *WKMakeRenderLayer(uint32_t contextID);
239   
240typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
241
242WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
243void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
244void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
245
246#import <mach/mig.h>
247
248CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
249
250NSUInteger WKGetInputPanelWindowStyle(void);
251 
252UInt8 WKGetNSEventKeyChar(NSEvent *);
253   
254#endif
255
256@class CAPropertyAnimation;
257void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
258
259unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
260
261#ifdef __cplusplus
262}
263#endif
Note: See TracBrowser for help on using the browser.