Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
* WebView.subproj/WebDefaultResourceLoadDelegate.m:
(-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
* WebView.subproj/WebFrame.m:
(-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
* WebView.subproj/WebLoader.m:
(-[NSURLProtocol didReceiveData:lengthReceived:]):
* WebView.subproj/WebResourceLoadDelegate.h:
* WebView.subproj/WebUIDelegate.h:
* WebView.subproj/WebView.h:
* WebView.subproj/WebView.m:
(-[WebView _mouseDidMoveOverElement:modifierFlags:]):
(-[WebView spellCheckerDocumentTag]):
* WebView.subproj/WebViewInternal.h:
* WebView.subproj/WebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10839
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-10-12 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin.
+
+ Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
+ Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
+
+ * WebView.subproj/WebDefaultResourceLoadDelegate.m:
+ (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
+ * WebView.subproj/WebLoader.m:
+ (-[NSURLProtocol didReceiveData:lengthReceived:]):
+ * WebView.subproj/WebResourceLoadDelegate.h:
+ * WebView.subproj/WebUIDelegate.h:
+ * WebView.subproj/WebView.h:
+ * WebView.subproj/WebView.m:
+ (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
+ (-[WebView spellCheckerDocumentTag]):
+ * WebView.subproj/WebViewInternal.h:
+ * WebView.subproj/WebViewPrivate.h:
+
2005-10-12 Darin Adler <darin@apple.com>
* WebView.subproj/WebPolicyDelegate.h: Fix a comment.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+typedef unsigned int WebNSUInt;
+#else
+typedef NSUInt WebNSUInt;
+#endif
+
#import <WebKit/WebDefaultResourceLoadDelegate.h>
#import <Foundation/NSURLAuthenticationChallenge.h>
{
}
--(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource
+-(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (WebNSUInt)length fromDataSource:(WebDataSource *)dataSource
{
}
if (length > 0) {
if (implementations.delegateImplementsDidReceiveContentLength) {
- [delegate webView:wv resource:identifier didReceiveContentLength:length fromDataSource:dataSource];
+ [delegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
} else {
- [sharedDelegate webView:wv resource:identifier didReceiveContentLength:length fromDataSource:dataSource];
+ [sharedDelegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
}
}
[webView _incrementProgressForConnectionDelegate:self data:data];
if (implementations.delegateImplementsDidReceiveContentLength)
- [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:lengthReceived fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:lengthReceived fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:dataSource];
[self release];
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInt int
+#else
+#define WebNSInt NSInt
+#endif
+
@class WebView;
@class WebDataSource;
@class NSURLAuthenticationChallenge;
@param length The amount of new data received. This is not the total amount, just the new amount received.
@param dataSource The dataSource that initiated the load.
*/
-- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength:(WebNSInt)length fromDataSource:(WebDataSource *)dataSource;
/*!
@method webView:resource:didFinishLoadingFromDataSource:
@end
-
+#undef WebNSInt
\ No newline at end of file
#import <Cocoa/Cocoa.h>
#import <Foundation/NSURLRequest.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSUInt unsigned int
+#else
+#define WebNSUInt NSUInt
+#endif
+
/*!
@enum WebMenuItemTag
@discussion Each menu item in the default menu items array passed in
@param elementInformation Dictionary that describes the element that the mouse is over, or nil.
@param modifierFlags The modifier flags as in NSEvent.
*/
-- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(WebNSUInt)modifierFlags;
/*!
@method webView:contextMenuItemsForElement:defaultMenuItems:
- (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard;
@end
+
+#undef WebNSUInt
\ No newline at end of file
#import <Cocoa/Cocoa.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInt int
+#else
+#define WebNSInt NSInt
+#endif
+
@class DOMCSSStyleDeclaration;
@class DOMDocument;
@class DOMElement;
- (BOOL)smartInsertDeleteEnabled;
- (void)setContinuousSpellCheckingEnabled:(BOOL)flag;
- (BOOL)isContinuousSpellCheckingEnabled;
-- (int)spellCheckerDocumentTag;
+- (WebNSInt)spellCheckerDocumentTag;
- (NSUndoManager *)undoManager;
- (void)setEditingDelegate:(id)delegate;
- (id)editingDelegate;
*/
@end
+
+#undef WebNSInt
\ No newline at end of file
return menu;
}
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags
{
// When the mouse isn't over this view at all, we'll get called with a dictionary of nil over
// and over again. So it's a good idea to catch that here and not send multiple calls to the delegate
return _private->continuousSpellCheckingEnabled && [self _continuousCheckingAllowed];
}
-- (int)spellCheckerDocumentTag
+- (WebNSInt)spellCheckerDocumentTag
{
if (!_private->hasSpellCheckerDocumentTag) {
_private->spellCheckerDocumentTag = [NSSpellChecker uniqueSpellDocumentTag];
WebBridge *dragCaretBridge;
BOOL hasSpellCheckerDocumentTag;
- int spellCheckerDocumentTag;
+ WebNSInt spellCheckerDocumentTag;
BOOL continuousSpellCheckingEnabled;
BOOL smartInsertDeleteEnabled;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
+// Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+typedef int WebNSInt;
+typedef unsigned int WebNSUInt;
+#else
+typedef NSInt WebNSInt;
+typedef NSUInt WebNSUInt;
+#endif
+
#import <WebKit/WebView.h>
#import <WebKit/WebFramePrivate.h>
- (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items;
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags;
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags;
/*!
Could be worth adding to the API.