Revision: 3615 http://skim-app.svn.sourceforge.net/skim-app/?rev=3615&view=rev Author: hofman Date: 2008-04-04 09:20:17 -0700 (Fri, 04 Apr 2008)
Log Message: ----------- Rename files. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/SKCFCallBacks.h trunk/SKCFCallBacks.m Removed Paths: ------------- trunk/SKCFDictionaryCallBacks.h trunk/SKCFDictionaryCallBacks.m Copied: trunk/SKCFCallBacks.h (from rev 3610, trunk/SKCFDictionaryCallBacks.h) =================================================================== --- trunk/SKCFCallBacks.h (rev 0) +++ trunk/SKCFCallBacks.h 2008-04-04 16:20:17 UTC (rev 3615) @@ -0,0 +1,70 @@ +// +// SKCFCallBacks.h +// Skim +// +// Created by Christiaan Hofman on 3/20/08. +/* + This software is Copyright (c) 2008 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Carbon/Carbon.h> + +extern const void *SKNSObjectRetain(CFAllocatorRef allocator, const void *value); + +extern void SKNSObjectRelease(CFAllocatorRef allocator, const void *value); + +extern CFStringRef SKNSObjectCopyDescription(const void *value); + + +extern const void *SKFloatRetain(CFAllocatorRef allocator, const void *value); + +extern void SKFloatRelease(CFAllocatorRef allocator, const void *value); + +extern CFStringRef SKFloatCopyDescription(const void *value); + +extern Boolean SKFloatEqual(const void *value1, const void *value2); + + +extern const void *SKNSRectRetain(CFAllocatorRef allocator, const void *value); + +extern void SKNSRectRelease(CFAllocatorRef allocator, const void *value); + +extern CFStringRef SKNSRectCopyDescription(const void *value); + +extern Boolean SKNSRectEqual(const void *value1, const void *value2); + + +extern const CFDictionaryKeyCallBacks SKPointerEqualObjectDictionaryKeyCallbacks; + +extern const CFDictionaryValueCallBacks SKFloatDictionaryValueCallbacks; + +extern const CFDictionaryValueCallBacks SKNSRectDictionaryValueCallbacks; Copied: trunk/SKCFCallBacks.m (from rev 3610, trunk/SKCFDictionaryCallBacks.m) =================================================================== --- trunk/SKCFCallBacks.m (rev 0) +++ trunk/SKCFCallBacks.m 2008-04-04 16:20:17 UTC (rev 3615) @@ -0,0 +1,113 @@ +// +// SKCFCallBacks.m +// Skim +// +// Created by Christiaan Hofman on 3/20/08. +/* + This software is Copyright (c) 2008 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SKCFCallBacks.h" + + +const void *SKNSObjectRetain(CFAllocatorRef allocator, const void *value) { + return [(id)value retain]; +} + +void SKNSObjectRelease(CFAllocatorRef allocator, const void *value) { + [(id)value release]; +} + +CFStringRef SKNSObjectCopyDescription(const void *value) { + return (CFStringRef)[[(id)value description] retain]; +} + +const void *SKFloatRetain(CFAllocatorRef allocator, const void *value) { + float *floatPtr = (float *)CFAllocatorAllocate(allocator, sizeof(float), 0); + *floatPtr = *(float *)value; + return floatPtr; +} + +void SKFloatRelease(CFAllocatorRef allocator, const void *value) { + CFAllocatorDeallocate(allocator, (float *)value); +} + +CFStringRef SKFloatCopyDescription(const void *value) { + return CFStringCreateWithFormat(NULL, NULL, CFSTR("%f"), *(float *)value); +} + +Boolean SKFloatEqual(const void *value1, const void *value2) { + return fabsf(*(float *)value1 - *(float *)value2) < 0.00000001; +} + +const void *SKNSRectRetain(CFAllocatorRef allocator, const void *value) { + NSRect *rectPtr = (NSRect *)CFAllocatorAllocate(allocator, sizeof(NSRect), 0); + *rectPtr = *(NSRect *)value; + return rectPtr; +} + +void SKNSRectRelease(CFAllocatorRef allocator, const void *value) { + CFAllocatorDeallocate(allocator, (NSRect *)value); +} + +CFStringRef SKNSRectCopyDescription(const void *value) { + return (CFStringRef)[NSStringFromRect(*(NSRect *)value) retain]; +} + +Boolean SKNSRectEqual(const void *value1, const void *value2) { + return NSEqualRects(*(NSRect *)value1, *(NSRect *)value2); +} + +const CFDictionaryKeyCallBacks SKPointerEqualObjectDictionaryKeyCallbacks = { + 0, // version + SKNSObjectRetain, + SKNSObjectRelease, + SKNSObjectCopyDescription, + NULL, // equal + NULL // hash +}; + +const CFDictionaryValueCallBacks SKFloatDictionaryValueCallbacks = { + 0, // version + SKFloatRetain, + SKFloatRelease, + SKFloatCopyDescription, + SKFloatEqual +}; + +const CFDictionaryValueCallBacks SKNSRectDictionaryValueCallbacks = { + 0, // version + SKNSRectRetain, + SKNSRectRelease, + SKNSRectCopyDescription, + SKNSRectEqual +}; Deleted: trunk/SKCFDictionaryCallBacks.h =================================================================== --- trunk/SKCFDictionaryCallBacks.h 2008-04-04 09:57:27 UTC (rev 3614) +++ trunk/SKCFDictionaryCallBacks.h 2008-04-04 16:20:17 UTC (rev 3615) @@ -1,70 +0,0 @@ -// -// SKCFDictionaryCallBacks.h -// Skim -// -// Created by Christiaan Hofman on 3/20/08. -/* - This software is Copyright (c) 2008 - Christiaan Hofman. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - - Neither the name of Christiaan Hofman nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import <Carbon/Carbon.h> - -extern const void *SKNSObjectRetain(CFAllocatorRef allocator, const void *value); - -extern void SKNSObjectRelease(CFAllocatorRef allocator, const void *value); - -extern CFStringRef SKNSObjectCopyDescription(const void *value); - - -extern const void *SKFloatRetain(CFAllocatorRef allocator, const void *value); - -extern void SKFloatRelease(CFAllocatorRef allocator, const void *value); - -extern CFStringRef SKFloatCopyDescription(const void *value); - -extern Boolean SKFloatEqual(const void *value1, const void *value2); - - -extern const void *SKNSRectRetain(CFAllocatorRef allocator, const void *value); - -extern void SKNSRectRelease(CFAllocatorRef allocator, const void *value); - -extern CFStringRef SKNSRectCopyDescription(const void *value); - -extern Boolean SKNSRectEqual(const void *value1, const void *value2); - - -extern const CFDictionaryKeyCallBacks SKPointerEqualObjectDictionaryKeyCallbacks; - -extern const CFDictionaryValueCallBacks SKFloatDictionaryValueCallbacks; - -extern const CFDictionaryValueCallBacks SKNSRectDictionaryValueCallbacks; Deleted: trunk/SKCFDictionaryCallBacks.m =================================================================== --- trunk/SKCFDictionaryCallBacks.m 2008-04-04 09:57:27 UTC (rev 3614) +++ trunk/SKCFDictionaryCallBacks.m 2008-04-04 16:20:17 UTC (rev 3615) @@ -1,113 +0,0 @@ -// -// SKCFDictionaryCallBacks.m -// Skim -// -// Created by Christiaan Hofman on 3/20/08. -/* - This software is Copyright (c) 2008 - Christiaan Hofman. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - - Neither the name of Christiaan Hofman nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SKCFDictionaryCallBacks.h" - - -const void *SKNSObjectRetain(CFAllocatorRef allocator, const void *value) { - return [(id)value retain]; -} - -void SKNSObjectRelease(CFAllocatorRef allocator, const void *value) { - [(id)value release]; -} - -CFStringRef SKNSObjectCopyDescription(const void *value) { - return (CFStringRef)[[(id)value description] retain]; -} - -const void *SKFloatRetain(CFAllocatorRef allocator, const void *value) { - float *floatPtr = (float *)CFAllocatorAllocate(allocator, sizeof(float), 0); - *floatPtr = *(float *)value; - return floatPtr; -} - -void SKFloatRelease(CFAllocatorRef allocator, const void *value) { - CFAllocatorDeallocate(allocator, (float *)value); -} - -CFStringRef SKFloatCopyDescription(const void *value) { - return CFStringCreateWithFormat(NULL, NULL, CFSTR("%f"), *(float *)value); -} - -Boolean SKFloatEqual(const void *value1, const void *value2) { - return fabsf(*(float *)value1 - *(float *)value2) < 0.00000001; -} - -const void *SKNSRectRetain(CFAllocatorRef allocator, const void *value) { - NSRect *rectPtr = (NSRect *)CFAllocatorAllocate(allocator, sizeof(NSRect), 0); - *rectPtr = *(NSRect *)value; - return rectPtr; -} - -void SKNSRectRelease(CFAllocatorRef allocator, const void *value) { - CFAllocatorDeallocate(allocator, (NSRect *)value); -} - -CFStringRef SKNSRectCopyDescription(const void *value) { - return (CFStringRef)[NSStringFromRect(*(NSRect *)value) retain]; -} - -Boolean SKNSRectEqual(const void *value1, const void *value2) { - return NSEqualRects(*(NSRect *)value1, *(NSRect *)value2); -} - -const CFDictionaryKeyCallBacks SKPointerEqualObjectDictionaryKeyCallbacks = { - 0, // version - SKNSObjectRetain, - SKNSObjectRelease, - SKNSObjectCopyDescription, - NULL, // equal - NULL // hash -}; - -const CFDictionaryValueCallBacks SKFloatDictionaryValueCallbacks = { - 0, // version - SKFloatRetain, - SKFloatRelease, - SKFloatCopyDescription, - SKFloatEqual -}; - -const CFDictionaryValueCallBacks SKNSRectDictionaryValueCallbacks = { - 0, // version - SKNSRectRetain, - SKNSRectRelease, - SKNSRectCopyDescription, - SKNSRectEqual -}; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2008-04-04 09:57:27 UTC (rev 3614) +++ trunk/SKMainWindowController.m 2008-04-04 16:20:17 UTC (rev 3615) @@ -88,7 +88,7 @@ #import "SKSheetController.h" #import "OBUtilities.h" #import "SKApplicationController.h" -#import "SKCFDictionaryCallbacks.h" +#import "SKCFCallbacks.h" #import "NSSegmentedControl_SKExtensions.h" #define WINDOW_X_DELTA 0.0 Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2008-04-04 09:57:27 UTC (rev 3614) +++ trunk/Skim.xcodeproj/project.pbxproj 2008-04-04 16:20:17 UTC (rev 3615) @@ -120,7 +120,7 @@ CE5F71560C8CDF9A008BE480 /* NSCell_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5F71540C8CDF9A008BE480 /* NSCell_SKExtensions.m */; }; CE5FA1680C909886008BE480 /* SKFDFParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5FA1660C909886008BE480 /* SKFDFParser.m */; }; CE64E81A0D92BB97000AD050 /* ToolbarFontsBlack.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE64E8190D92BB97000AD050 /* ToolbarFontsBlack.tiff */; }; - CE64E8A30D92E670000AD050 /* SKCFDictionaryCallBacks.m in Sources */ = {isa = PBXBuildFile; fileRef = CE64E8A20D92E670000AD050 /* SKCFDictionaryCallBacks.m */; }; + CE64E8A30D92E670000AD050 /* SKCFCallBacks.m in Sources */ = {isa = PBXBuildFile; fileRef = CE64E8A20D92E670000AD050 /* SKCFCallBacks.m */; }; CE67BB260BC44AC9007B6929 /* ZoomValues.strings in Resources */ = {isa = PBXBuildFile; fileRef = CE67BB240BC44AC9007B6929 /* ZoomValues.strings */; }; CE6A5B9E0D663491003B7CC3 /* ToolbarCustomize.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE6A5B9D0D663491003B7CC3 /* ToolbarCustomize.tiff */; }; CE6A5BB20D663771003B7CC3 /* ToolbarPrint.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE6A5BB10D663771003B7CC3 /* ToolbarPrint.tiff */; }; @@ -592,8 +592,8 @@ CE5FA1650C909886008BE480 /* SKFDFParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKFDFParser.h; sourceTree = "<group>"; }; CE5FA1660C909886008BE480 /* SKFDFParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKFDFParser.m; sourceTree = "<group>"; }; CE64E8190D92BB97000AD050 /* ToolbarFontsBlack.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarFontsBlack.tiff; path = Images/ToolbarFontsBlack.tiff; sourceTree = "<group>"; }; - CE64E8A10D92E670000AD050 /* SKCFDictionaryCallBacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKCFDictionaryCallBacks.h; sourceTree = "<group>"; }; - CE64E8A20D92E670000AD050 /* SKCFDictionaryCallBacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKCFDictionaryCallBacks.m; sourceTree = "<group>"; }; + CE64E8A10D92E670000AD050 /* SKCFCallBacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKCFCallBacks.h; sourceTree = "<group>"; }; + CE64E8A20D92E670000AD050 /* SKCFCallBacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKCFCallBacks.m; sourceTree = "<group>"; }; CE67BB250BC44AC9007B6929 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/ZoomValues.strings; sourceTree = "<group>"; }; CE67BB290BC44AD5007B6929 /* Dutch */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/ZoomValues.strings; sourceTree = "<group>"; }; CE68C62F0CEF891B00B082F1 /* German */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = German; path = German.lproj/InfoWindow.nib; sourceTree = "<group>"; }; @@ -1073,8 +1073,6 @@ CE070EC10B89063400733CC8 /* Categories */ = { isa = PBXGroup; children = ( - CE64E8A10D92E670000AD050 /* SKCFDictionaryCallBacks.h */, - CE64E8A20D92E670000AD050 /* SKCFDictionaryCallBacks.m */, CE4EC8810B7E6E920091F228 /* CIImage_BDSKExtensions.h */, CE4EC8820B7E6E920091F228 /* CIImage_BDSKExtensions.m */, CEBF85DF0CCE2DE70057A050 /* NSAffineTransform_SKExtensions.h */, @@ -1329,6 +1327,8 @@ CE2DE4D40B85DA1C00D0DA12 /* Miscellaneous */ = { isa = PBXGroup; children = ( + CE64E8A10D92E670000AD050 /* SKCFCallBacks.h */, + CE64E8A20D92E670000AD050 /* SKCFCallBacks.m */, 45A3BD060B4F0770002B297F /* SKStringConstants.h */, 45A3BD070B4F0770002B297F /* SKStringConstants.m */, CE0464A00B84E3E400C11E4A /* OBUtilities.h */, @@ -1959,7 +1959,7 @@ CE9B951E0D04657A00EB1A6C /* SKRemoteStateWindow.m in Sources */, CE6DC7BB0D689138003A072F /* PDFDocument_SKExtensions.m in Sources */, CEA8FCD60D89C34A00E8A6F4 /* SKAnimatedBorderlessWindow.m in Sources */, - CE64E8A30D92E670000AD050 /* SKCFDictionaryCallBacks.m in Sources */, + CE64E8A30D92E670000AD050 /* SKCFCallBacks.m in Sources */, CE199DFD0D957A16009B2055 /* SKAnnotationTypeImageCell.m in Sources */, CEE54D880DA2E37B0037169F /* PDFAnnotation_SKExtensions.m in Sources */, CEE54D930DA2E5E10037169F /* SKPDFAnnotationCircle.m in Sources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit