Revision: 6465
http://skim-app.svn.sourceforge.net/skim-app/?rev=6465&view=rev
Author: hofman
Date: 2010-04-17 16:58:11 +0000 (Sat, 17 Apr 2010)
Log Message:
-----------
combine macros
Modified Paths:
--------------
trunk/SKTableView.h
trunk/SKTocOutlineView.h
trunk/Skim_Prefix.pch
Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2010-04-16 17:35:24 UTC (rev 6464)
+++ trunk/SKTableView.h 2010-04-17 16:58:11 UTC (rev 6465)
@@ -59,10 +59,7 @@
- (void)scrollToBeginningOfDocument:(id)sender;
- (void)scrollToEndOfDocument:(id)sender;
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
-- (id <SKTableViewDelegate>)delegate;
-- (void)setDelegate:(id <SKTableViewDelegate>)newDelegate;
-#endif
+SUBCLASS_DELEGATE_DECLARATION(SKTableViewDelegate)
@end
Modified: trunk/SKTocOutlineView.h
===================================================================
--- trunk/SKTocOutlineView.h 2010-04-16 17:35:24 UTC (rev 6464)
+++ trunk/SKTocOutlineView.h 2010-04-17 16:58:11 UTC (rev 6465)
@@ -46,10 +46,7 @@
@interface SKTocOutlineView : SKOutlineView {
NSMutableSet *trackingAreas;
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
-- (id <SKTocOutlineViewDelegate>)delegate;
-- (void)setDelegate:(id <SKTocOutlineViewDelegate>)newDelegate;
-#endif
+SUBCLASS_DELEGATE_DECLARATION(SKTocOutlineViewDelegate)
@end
Modified: trunk/Skim_Prefix.pch
===================================================================
--- trunk/Skim_Prefix.pch 2010-04-16 17:35:24 UTC (rev 6464)
+++ trunk/Skim_Prefix.pch 2010-04-17 16:58:11 UTC (rev 6465)
@@ -43,27 +43,24 @@
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
- #define SUBCLASS_DELEGATE_DECLARATION(protocol) \
- - (id <protocol>)delegate; \
- - (void)setDelegate:(id <protocol>)newDelegate;
- #define SUBCLASS_DELEGATE_DEFINITION(protocol) \
- - (id <protocol>)delegate { return (id <protocol>)[super delegate]; } \
- - (void)setDelegate:(id <protocol>)newDelegate { [super
setDelegate:newDelegate]; }
- #define SUBCLASS_DATASOURCE_DECLARATION(protocol) \
- - (id <protocol>)dataSource; \
- - (void)setDataSource:(id <protocol>)newDataSource;
- #define SUBCLASS_DATASOURCE_DEFINITION(protocol) \
- - (id <protocol>)dataSource { return (id <protocol>)[super dataSource]; } \
- - (void)setDataSource:(id <protocol>)newDataSource { [super
setDataSource:newDataSource]; }
+ #define SUBCLASS_ACCESSOR_DECLARATION(protocol, key, Key) \
+ - (id <protocol>)key; \
+ - (void)set##Key:(id <protocol>)new##Key;
+ #define SUBCLASS_ACCESSOR_DEFINITION(protocol, key, Key) \
+ - (id <protocol>)key { return (id <protocol>)[super key]; } \
+ - (void)set##Key:(id <protocol>)new##Key { [super set##Key:new##Key]; }
#else
- #define SUBCLASS_DELEGATE_DECLARATION(protocol)
- #define SUBCLASS_DELEGATE_DEFINITION(protocol)
- #define SUBCLASS_DATASOURCE_DECLARATION(protocol)
- #define SUBCLASS_DATASOURCE_DEFINITION(protocol)
+ #define SUBCLASS_ACCESSOR_DECLARATION(protocol, key, Key)
+ #define SUBCLASS_ACCESSOR_DEFINITION(protocol, key, Key)
#endif
+
+ #define SUBCLASS_DELEGATE_DECLARATION(protocol)
SUBCLASS_ACCESSOR_DECLARATION(protocol, delegate, Delegate)
+ #define SUBCLASS_DELEGATE_DEFINITION(protocol)
SUBCLASS_ACCESSOR_DEFINITION(protocol, delegate, Delegate)
+ #define SUBCLASS_DATASOURCE_DECLARATION(protocol)
SUBCLASS_ACCESSOR_DECLARATION(protocol, dataSource, DataSource)
+ #define SUBCLASS_DATASOURCE_DEFINITION(protocol)
SUBCLASS_ACCESSOR_DEFINITION(protocol, dataSource, DataSource)
#else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit