Revision: 4615
http://skim-app.svn.sourceforge.net/skim-app/?rev=4615&view=rev
Author: hofman
Date: 2008-09-12 12:50:58 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
rename class file of accessibility element
Modified Paths:
--------------
trunk/PDFDisplayView_SKExtensions.m
trunk/SKColorSwatch.m
trunk/SKPDFView.m
trunk/Skim.xcodeproj/project.pbxproj
Added Paths:
-----------
trunk/SKAccessibilityFauxUIElement.h
trunk/SKAccessibilityFauxUIElement.m
Removed Paths:
-------------
trunk/SKAccessibilityProxyElement.h
trunk/SKAccessibilityProxyElement.m
Modified: trunk/PDFDisplayView_SKExtensions.m
===================================================================
--- trunk/PDFDisplayView_SKExtensions.m 2008-09-12 12:48:17 UTC (rev 4614)
+++ trunk/PDFDisplayView_SKExtensions.m 2008-09-12 12:50:58 UTC (rev 4615)
@@ -43,7 +43,7 @@
#import "NSAttributedString_SKExtensions.h"
#import "SKPDFDocument.h"
#import "SKRuntime.h"
-#import "SKAccessibilityProxyElement.h"
+#import "SKAccessibilityFauxUIElement.h"
@interface NSView (SKPDFDisplayViewPrivateDeclarations)
- (void)passwordEntered:(id)sender;
Copied: trunk/SKAccessibilityFauxUIElement.h (from rev 4614,
trunk/SKAccessibilityProxyElement.h)
===================================================================
--- trunk/SKAccessibilityFauxUIElement.h (rev 0)
+++ trunk/SKAccessibilityFauxUIElement.h 2008-09-12 12:50:58 UTC (rev
4615)
@@ -0,0 +1,77 @@
+//
+// SKAccessibilityFauxUIElement.h
+// Skim
+//
+// Created by Christiaan Hofman on 4/22/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 <Cocoa/Cocoa.h>
+
+
[EMAIL PROTECTED] SKAccessibilityFauxUIElement : NSObject {
+ id parent;
+}
+- (id)initWithParent:(id)aParent;
+- (id)parent;
+- (id)representedObject;
+- (int)index;
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement :
SKAccessibilityFauxUIElement {
+ id object;
+}
++ (id)elementWithObject:(id)anObject parent:(id)aParent;
+- (id)initWithObject:(id)anObject parent:(id)aParent;
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement :
SKAccessibilityFauxUIElement {
+ int index;
+}
++ (id)elementWithIndex:(int)anIndex parent:(id)aParent;
+- (id)initWithIndex:(int)anIndex parent:(id)aParent;
[EMAIL PROTECTED]
+
+#pragma mark -
+
+// parent should implement these methods
[EMAIL PROTECTED] NSObject (SKAccessibilityFauxUIElementParent)
+- (NSRect)screenRectForFauxUIElement:(SKAccessibilityFauxUIElement *)element;
+- (BOOL)isFauxUIElementFocused:(SKAccessibilityFauxUIElement *)element;
+- (void)fauxUIElement:(SKAccessibilityFauxUIElement *)element
setFocused:(BOOL)focused;
+- (void)pressFauxUIElement:(SKAccessibilityFauxUIElement *)element;
[EMAIL PROTECTED]
Copied: trunk/SKAccessibilityFauxUIElement.m (from rev 4614,
trunk/SKAccessibilityProxyElement.m)
===================================================================
--- trunk/SKAccessibilityFauxUIElement.m (rev 0)
+++ trunk/SKAccessibilityFauxUIElement.m 2008-09-12 12:50:58 UTC (rev
4615)
@@ -0,0 +1,230 @@
+//
+// SKAccessibilityFauxUIElement.m
+// Skim
+//
+// Created by Christiaan Hofman on 4/22/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 "SKAccessibilityFauxUIElement.h"
+
+static NSString *SKAttributeWithoutAXPrefix(NSString *attribute) {
+ return [attribute hasPrefix:@"AX"] ? [attribute substringFromIndex:2] :
attribute;
+}
+
+static SEL SKAttributeGetter(NSString *attribute) {
+ return NSSelectorFromString([NSString stringWithFormat:@"[EMAIL
PROTECTED]", SKAttributeWithoutAXPrefix(attribute)]);
+}
+
[EMAIL PROTECTED] SKAccessibilityFauxUIElement
+
+- (id)initWithParent:(id)aParent {
+ if (self = [super init]) {
+ parent = aParent;
+ }
+ return self;
+}
+
+- (BOOL)isEqual:(id)other {
+ if ([other isKindOfClass:[SKAccessibilityFauxUIElement class]]) {
+ SKAccessibilityFauxUIElement *otherElement =
(SKAccessibilityFauxUIElement *)other;
+ return parent == [otherElement parent];
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return [parent hash];
+}
+
+- (id)parent {
+ return parent;
+}
+
+- (id)representedObject {
+ return nil;
+}
+
+- (int)index {
+ return -1;
+}
+
+- (NSArray *)accessibilityAttributeNames {
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
+}
+
+- (id)accessibilityAttributeValue:(NSString *)attribute {
+ if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
+ return NSAccessibilityUnignoredAncestor(parent);
+ } else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
+ // We're in the same window as our parent.
+ return [NSAccessibilityUnignoredAncestor(parent)
accessibilityAttributeValue:NSAccessibilityWindowAttribute];
+ } else if ([attribute
isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
+ // We're in the same top level element as our parent.
+ return [NSAccessibilityUnignoredAncestor(parent)
accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
+ } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
+ return [NSNumber numberWithBool:[parent isFauxUIElementFocused:self]];
+ } else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
+ return [NSValue valueWithPoint:[parent
screenRectForFauxUIElement:self].origin];
+ } else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
+ return [NSValue valueWithSize:[parent
screenRectForFauxUIElement:self].size];
+ } else if ([[self accessibilityAttributeNames] containsObject:attribute]) {
+ SEL getter = SKAttributeGetter(attribute);
+ if ([self respondsToSelector:getter])
+ return [self performSelector:getter];
+ else if ([[self representedObject] respondsToSelector:getter])
+ return [[self representedObject] performSelector:getter];
+ else
+ return nil;
+ } else {
+ return nil;
+ }
+}
+
+- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+ return [attribute isEqualToString:NSAccessibilityFocusedAttribute];
+}
+
+- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
+ if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
+ [parent fauxUIElement:self setFocused:[value boolValue]];
+}
+
+- (BOOL)accessibilityIsIgnored {
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] accessibilityIsIgnored] : NO;
+}
+
+- (id)accessibilityHitTest:(NSPoint)point {
+ return NSAccessibilityUnignoredAncestor(self);
+}
+
+- (id)accessibilityFocusedUIElement {
+ return NSAccessibilityUnignoredAncestor(self);
+}
+
+- (NSArray *)accessibilityActionNames {
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
+}
+
+- (NSString *)accessibilityActionDescription:(NSString *)anAction {
+ return NSAccessibilityActionDescription(anAction);
+}
+
+- (void)accessibilityPerformAction:(NSString *)anAction {
+ if ([anAction isEqualToString:NSAccessibilityPressAction])
+ [parent pressFauxUIElement:self];
+}
+
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement
+
++ (id)elementWithObject:(id)anObject parent:(id)aParent {
+ return [[[self alloc] initWithObject:anObject parent:aParent] autorelease];
+}
+
+- (id)initWithObject:(id)anObject parent:(id)aParent {
+ if (self = [super initWithParent:aParent]) {
+ object = [anObject retain];
+ }
+ return self;
+}
+
+- (id)initWithParent:(id)aParent {
+ return [self initWithObject:nil parent:aParent];
+}
+
+- (void)dealloc {
+ [object release];
+ [super dealloc];
+}
+
+- (BOOL)isEqual:(id)other {
+ if ([other isKindOfClass:[SKAccessibilityProxyFauxUIElement class]]) {
+ SKAccessibilityProxyFauxUIElement *otherElement =
(SKAccessibilityProxyFauxUIElement *)other;
+ return [super isEqual:other] && object == [otherElement
representedObject];
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return [super hash] + [object hash];
+}
+
+- (id)representedObject {
+ return object;
+}
+
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement
+
++ (id)elementWithIndex:(int)anIndex parent:(id)aParent {
+ return [[[self alloc] initWithIndex:anIndex parent:aParent] autorelease];
+}
+
+- (id)initWithIndex:(int)anIndex parent:(id)aParent {
+ if (self = [super initWithParent:aParent]) {
+ index = anIndex;
+ }
+ return self;
+}
+
+- (id)initWithParent:(id)aParent {
+ return [self initWithIndex:-1 parent:aParent];
+}
+
+- (BOOL)isEqual:(id)other {
+ if ([other isKindOfClass:[SKAccessibilityIndexedFauxUIElement class]]) {
+ SKAccessibilityIndexedFauxUIElement *otherElement =
(SKAccessibilityIndexedFauxUIElement *)other;
+ return [super isEqual:other] && index == [otherElement index];
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return [super hash] + index;
+}
+
+- (int)index {
+ return index;
+}
+
[EMAIL PROTECTED]
Deleted: trunk/SKAccessibilityProxyElement.h
===================================================================
--- trunk/SKAccessibilityProxyElement.h 2008-09-12 12:48:17 UTC (rev 4614)
+++ trunk/SKAccessibilityProxyElement.h 2008-09-12 12:50:58 UTC (rev 4615)
@@ -1,77 +0,0 @@
-//
-// SKAccessibilityProxyElement.h
-// Skim
-//
-// Created by Christiaan Hofman on 4/22/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 <Cocoa/Cocoa.h>
-
-
[EMAIL PROTECTED] SKAccessibilityFauxUIElement : NSObject {
- id parent;
-}
-- (id)initWithParent:(id)aParent;
-- (id)parent;
-- (id)representedObject;
-- (int)index;
[EMAIL PROTECTED]
-
-#pragma mark -
-
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement :
SKAccessibilityFauxUIElement {
- id object;
-}
-+ (id)elementWithObject:(id)anObject parent:(id)aParent;
-- (id)initWithObject:(id)anObject parent:(id)aParent;
[EMAIL PROTECTED]
-
-#pragma mark -
-
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement :
SKAccessibilityFauxUIElement {
- int index;
-}
-+ (id)elementWithIndex:(int)anIndex parent:(id)aParent;
-- (id)initWithIndex:(int)anIndex parent:(id)aParent;
[EMAIL PROTECTED]
-
-#pragma mark -
-
-// parent should implement these methods
[EMAIL PROTECTED] NSObject (SKAccessibilityFauxUIElementParent)
-- (NSRect)screenRectForFauxUIElement:(SKAccessibilityFauxUIElement *)element;
-- (BOOL)isFauxUIElementFocused:(SKAccessibilityFauxUIElement *)element;
-- (void)fauxUIElement:(SKAccessibilityFauxUIElement *)element
setFocused:(BOOL)focused;
-- (void)pressFauxUIElement:(SKAccessibilityFauxUIElement *)element;
[EMAIL PROTECTED]
Deleted: trunk/SKAccessibilityProxyElement.m
===================================================================
--- trunk/SKAccessibilityProxyElement.m 2008-09-12 12:48:17 UTC (rev 4614)
+++ trunk/SKAccessibilityProxyElement.m 2008-09-12 12:50:58 UTC (rev 4615)
@@ -1,230 +0,0 @@
-//
-// SKAccessibilityProxyElement.m
-// Skim
-//
-// Created by Christiaan Hofman on 4/22/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 "SKAccessibilityProxyElement.h"
-
-static NSString *SKAttributeWithoutAXPrefix(NSString *attribute) {
- return [attribute hasPrefix:@"AX"] ? [attribute substringFromIndex:2] :
attribute;
-}
-
-static SEL SKAttributeGetter(NSString *attribute) {
- return NSSelectorFromString([NSString stringWithFormat:@"[EMAIL
PROTECTED]", SKAttributeWithoutAXPrefix(attribute)]);
-}
-
[EMAIL PROTECTED] SKAccessibilityFauxUIElement
-
-- (id)initWithParent:(id)aParent {
- if (self = [super init]) {
- parent = aParent;
- }
- return self;
-}
-
-- (BOOL)isEqual:(id)other {
- if ([other isKindOfClass:[SKAccessibilityFauxUIElement class]]) {
- SKAccessibilityFauxUIElement *otherElement =
(SKAccessibilityFauxUIElement *)other;
- return parent == [otherElement parent];
- } else {
- return NO;
- }
-}
-
-- (unsigned int)hash {
- return [parent hash];
-}
-
-- (id)parent {
- return parent;
-}
-
-- (id)representedObject {
- return nil;
-}
-
-- (int)index {
- return -1;
-}
-
-- (NSArray *)accessibilityAttributeNames {
- return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
-}
-
-- (id)accessibilityAttributeValue:(NSString *)attribute {
- if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
- return NSAccessibilityUnignoredAncestor(parent);
- } else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
- // We're in the same window as our parent.
- return [NSAccessibilityUnignoredAncestor(parent)
accessibilityAttributeValue:NSAccessibilityWindowAttribute];
- } else if ([attribute
isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
- // We're in the same top level element as our parent.
- return [NSAccessibilityUnignoredAncestor(parent)
accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
- } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
- return [NSNumber numberWithBool:[parent isFauxUIElementFocused:self]];
- } else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
- return [NSValue valueWithPoint:[parent
screenRectForFauxUIElement:self].origin];
- } else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
- return [NSValue valueWithSize:[parent
screenRectForFauxUIElement:self].size];
- } else if ([[self accessibilityAttributeNames] containsObject:attribute]) {
- SEL getter = SKAttributeGetter(attribute);
- if ([self respondsToSelector:getter])
- return [self performSelector:getter];
- else if ([[self representedObject] respondsToSelector:getter])
- return [[self representedObject] performSelector:getter];
- else
- return nil;
- } else {
- return nil;
- }
-}
-
-- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- return [attribute isEqualToString:NSAccessibilityFocusedAttribute];
-}
-
-- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
- if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
- [parent fauxUIElement:self setFocused:[value boolValue]];
-}
-
-- (BOOL)accessibilityIsIgnored {
- return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] accessibilityIsIgnored] : NO;
-}
-
-- (id)accessibilityHitTest:(NSPoint)point {
- return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (id)accessibilityFocusedUIElement {
- return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (NSArray *)accessibilityActionNames {
- return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
-}
-
-- (NSString *)accessibilityActionDescription:(NSString *)anAction {
- return NSAccessibilityActionDescription(anAction);
-}
-
-- (void)accessibilityPerformAction:(NSString *)anAction {
- if ([anAction isEqualToString:NSAccessibilityPressAction])
- [parent pressFauxUIElement:self];
-}
-
[EMAIL PROTECTED]
-
-#pragma mark -
-
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement
-
-+ (id)elementWithObject:(id)anObject parent:(id)aParent {
- return [[[self alloc] initWithObject:anObject parent:aParent] autorelease];
-}
-
-- (id)initWithObject:(id)anObject parent:(id)aParent {
- if (self = [super initWithParent:aParent]) {
- object = [anObject retain];
- }
- return self;
-}
-
-- (id)initWithParent:(id)aParent {
- return [self initWithObject:nil parent:aParent];
-}
-
-- (void)dealloc {
- [object release];
- [super dealloc];
-}
-
-- (BOOL)isEqual:(id)other {
- if ([other isKindOfClass:[SKAccessibilityProxyFauxUIElement class]]) {
- SKAccessibilityProxyFauxUIElement *otherElement =
(SKAccessibilityProxyFauxUIElement *)other;
- return [super isEqual:other] && object == [otherElement
representedObject];
- } else {
- return NO;
- }
-}
-
-- (unsigned int)hash {
- return [super hash] + [object hash];
-}
-
-- (id)representedObject {
- return object;
-}
-
[EMAIL PROTECTED]
-
-#pragma mark -
-
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement
-
-+ (id)elementWithIndex:(int)anIndex parent:(id)aParent {
- return [[[self alloc] initWithIndex:anIndex parent:aParent] autorelease];
-}
-
-- (id)initWithIndex:(int)anIndex parent:(id)aParent {
- if (self = [super initWithParent:aParent]) {
- index = anIndex;
- }
- return self;
-}
-
-- (id)initWithParent:(id)aParent {
- return [self initWithIndex:-1 parent:aParent];
-}
-
-- (BOOL)isEqual:(id)other {
- if ([other isKindOfClass:[SKAccessibilityIndexedFauxUIElement class]]) {
- SKAccessibilityIndexedFauxUIElement *otherElement =
(SKAccessibilityIndexedFauxUIElement *)other;
- return [super isEqual:other] && index == [otherElement index];
- } else {
- return NO;
- }
-}
-
-- (unsigned int)hash {
- return [super hash] + index;
-}
-
-- (int)index {
- return index;
-}
-
[EMAIL PROTECTED]
Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m 2008-09-12 12:48:17 UTC (rev 4614)
+++ trunk/SKColorSwatch.m 2008-09-12 12:50:58 UTC (rev 4615)
@@ -40,7 +40,7 @@
#import "SKRuntime.h"
#import "NSColor_SKExtensions.h"
#import <Carbon/Carbon.h>
-#import "SKAccessibilityProxyElement.h"
+#import "SKAccessibilityFauxUIElement.h"
NSString *SKColorSwatchColorsChangedNotification =
@"SKColorSwatchColorsChangedNotification";
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-09-12 12:48:17 UTC (rev 4614)
+++ trunk/SKPDFView.m 2008-09-12 12:50:58 UTC (rev 4615)
@@ -65,7 +65,7 @@
#import "BDSKEdgeView.h"
#import "PDFDocument_SKExtensions.h"
#import "PDFDisplayView_SKExtensions.h"
-#import "SKAccessibilityProxyElement.h"
+#import "SKAccessibilityFauxUIElement.h"
#import "NSEvent_SKExtensions.h"
#define ANNOTATION_MODE_COUNT 8
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2008-09-12 12:48:17 UTC (rev
4614)
+++ trunk/Skim.xcodeproj/project.pbxproj 2008-09-12 12:50:58 UTC (rev
4615)
@@ -206,7 +206,7 @@
CEE106150BCBB72C00BF2D3E /* SKNotesDocument.m in Sources */ =
{isa = PBXBuildFile; fileRef = CEE106140BCBB72C00BF2D3E /* SKNotesDocument.m
*/; };
CEE1065E0BCBBE1300BF2D3E /* NotesDocument.nib in Resources */ =
{isa = PBXBuildFile; fileRef = CEE106580BCBBE1200BF2D3E /* NotesDocument.nib
*/; };
CEE176E40DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CEE176E30DBD5B0C00E6C317 /*
PDFDisplayView_SKExtensions.m */; };
- CEE177960DBE140900E6C317 /* SKAccessibilityProxyElement.m in
Sources */ = {isa = PBXBuildFile; fileRef = CEE177950DBE140900E6C317 /*
SKAccessibilityProxyElement.m */; };
+ CEE177960DBE140900E6C317 /* SKAccessibilityFauxUIElement.m in
Sources */ = {isa = PBXBuildFile; fileRef = CEE177950DBE140900E6C317 /*
SKAccessibilityFauxUIElement.m */; };
CEE229390BFB7CE9002B746B /* ReleaseNotes.rtf in Resources */ =
{isa = PBXBuildFile; fileRef = CE54AA8E0BBC037400008750 /* ReleaseNotes.rtf */;
};
CEE22EA30BFB8672002B746B /* displayline in CopyFiles */ = {isa
= PBXBuildFile; fileRef = CE1E2F120BDB86A10011D9DD /* displayline */; };
CEE54D880DA2E37B0037169F /* PDFAnnotation_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CEE54D870DA2E37B0037169F /*
PDFAnnotation_SKExtensions.m */; };
@@ -855,8 +855,8 @@
CEE107380BCBCA3200BF2D3E /* Dutch */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = Dutch; path =
Dutch.lproj/NotesDocument.nib; sourceTree = "<group>"; };
CEE176E20DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = PDFDisplayView_SKExtensions.h; sourceTree = "<group>"; };
CEE176E30DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = PDFDisplayView_SKExtensions.m; sourceTree =
"<group>"; };
- CEE177940DBE140900E6C317 /* SKAccessibilityProxyElement.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = SKAccessibilityProxyElement.h; sourceTree = "<group>"; };
- CEE177950DBE140900E6C317 /* SKAccessibilityProxyElement.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = SKAccessibilityProxyElement.m; sourceTree =
"<group>"; };
+ CEE177940DBE140900E6C317 /* SKAccessibilityFauxUIElement.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = SKAccessibilityFauxUIElement.h; sourceTree = "<group>"; };
+ CEE177950DBE140900E6C317 /* SKAccessibilityFauxUIElement.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = SKAccessibilityFauxUIElement.m; sourceTree =
"<group>"; };
CEE54D170DA2AA050037169F /* cs */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/InfoWindow.nib;
sourceTree = "<group>"; };
CEE54D190DA2AA100037169F /* cs */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/MainMenu.nib;
sourceTree = "<group>"; };
CEE54D1B0DA2AA280037169F /* cs */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/NoteWindow.nib;
sourceTree = "<group>"; };
@@ -1313,8 +1313,8 @@
CE2DE4D20B85D94800D0DA12 /* Data */ = {
isa = PBXGroup;
children = (
- CEE177940DBE140900E6C317 /*
SKAccessibilityProxyElement.h */,
- CEE177950DBE140900E6C317 /*
SKAccessibilityProxyElement.m */,
+ CEE177940DBE140900E6C317 /*
SKAccessibilityFauxUIElement.h */,
+ CEE177950DBE140900E6C317 /*
SKAccessibilityFauxUIElement.m */,
CEBD52EA0C9C0AE500FBF6A4 /* SKBookmark.h */,
CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */,
CECB03D10DC7503A0000B16B /*
SKGroupedSearchResult.h */,
@@ -2077,7 +2077,7 @@
CE0859D20DAE912500760AFC /*
SKSnapshotPageCell.m in Sources */,
CECF61FF0DB258D600587D96 /* SKFontWell.m in
Sources */,
CEE176E40DBD5B0C00E6C317 /*
PDFDisplayView_SKExtensions.m in Sources */,
- CEE177960DBE140900E6C317 /*
SKAccessibilityProxyElement.m in Sources */,
+ CEE177960DBE140900E6C317 /*
SKAccessibilityFauxUIElement.m in Sources */,
CECB03D30DC7503A0000B16B /*
SKGroupedSearchResult.m in Sources */,
CEEC0A0A0DCB2594003DD9B6 /*
SKMainWindowController_UI.m in Sources */,
CE0EB4D60DD054DC0034DF92 /*
NSInvocation_SKExtensions.m in Sources */,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit