1 /* 2 * Copyright (C) 2003, 2005, 2009 Apple Computer, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26 @class WebCoreTextMarker; 27 @class WebCoreTextMarkerRange; 28 29 @protocol WebCoreViewFactory 30 31 - (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo> 32 - (void)refreshPlugins; 33 34 - (NSString *)inputElementAltText; 35 - (NSString *)resetButtonDefaultLabel; 36 - (NSString *)searchableIndexIntroduction; 37 - (NSString *)submitButtonDefaultLabel; 38 - (NSString *)fileButtonChooseFileLabel; 39 - (NSString *)fileButtonNoFileSelectedLabel; 40 - (NSString *)copyImageUnknownFileLabel; 41 42 #if ENABLE(CONTEXT_MENUS) 43 // Context menu item titles 44 - (NSString *)contextMenuItemTagOpenLinkInNewWindow; 45 - (NSString *)contextMenuItemTagDownloadLinkToDisk; 46 - (NSString *)contextMenuItemTagCopyLinkToClipboard; 47 - (NSString *)contextMenuItemTagOpenImageInNewWindow; 48 - (NSString *)contextMenuItemTagDownloadImageToDisk; 49 - (NSString *)contextMenuItemTagCopyImageToClipboard; 50 - (NSString *)contextMenuItemTagOpenFrameInNewWindow; 51 - (NSString *)contextMenuItemTagCopy; 52 - (NSString *)contextMenuItemTagGoBack; 53 - (NSString *)contextMenuItemTagGoForward; 54 - (NSString *)contextMenuItemTagStop; 55 - (NSString *)contextMenuItemTagReload; 56 - (NSString *)contextMenuItemTagCut; 57 - (NSString *)contextMenuItemTagPaste; 58 - (NSString *)contextMenuItemTagNoGuessesFound; 59 - (NSString *)contextMenuItemTagIgnoreSpelling; 60 - (NSString *)contextMenuItemTagLearnSpelling; 61 - (NSString *)contextMenuItemTagSearchInSpotlight; 62 - (NSString *)contextMenuItemTagSearchWeb; 63 - (NSString *)contextMenuItemTagLookUpInDictionary; 64 - (NSString *)contextMenuItemTagOpenLink; 65 - (NSString *)contextMenuItemTagIgnoreGrammar; 66 - (NSString *)contextMenuItemTagSpellingMenu; 67 - (NSString *)contextMenuItemTagShowSpellingPanel:(bool)show; 68 - (NSString *)contextMenuItemTagCheckSpelling; 69 - (NSString *)contextMenuItemTagCheckSpellingWhileTyping; 70 - (NSString *)contextMenuItemTagCheckGrammarWithSpelling; 71 - (NSString *)contextMenuItemTagFontMenu; 72 - (NSString *)contextMenuItemTagShowFonts; 73 - (NSString *)contextMenuItemTagBold; 74 - (NSString *)contextMenuItemTagItalic; 75 - (NSString *)contextMenuItemTagUnderline; 76 - (NSString *)contextMenuItemTagOutline; 77 - (NSString *)contextMenuItemTagStyles; 78 - (NSString *)contextMenuItemTagShowColors; 79 - (NSString *)contextMenuItemTagSpeechMenu; 80 - (NSString *)contextMenuItemTagStartSpeaking; 81 - (NSString *)contextMenuItemTagStopSpeaking; 82 - (NSString *)contextMenuItemTagWritingDirectionMenu; 83 - (NSString *)contextMenuItemTagTextDirectionMenu; 84 - (NSString *)contextMenuItemTagDefaultDirection; 85 - (NSString *)contextMenuItemTagLeftToRight; 86 - (NSString *)contextMenuItemTagRightToLeft; 87 - (NSString *)contextMenuItemTagCorrectSpellingAutomatically; 88 - (NSString *)contextMenuItemTagSubstitutionsMenu; 89 - (NSString *)contextMenuItemTagShowSubstitutions:(bool)show; 90 - (NSString *)contextMenuItemTagSmartCopyPaste; 91 - (NSString *)contextMenuItemTagSmartQuotes; 92 - (NSString *)contextMenuItemTagSmartDashes; 93 - (NSString *)contextMenuItemTagSmartLinks; 94 - (NSString *)contextMenuItemTagTextReplacement; 95 - (NSString *)contextMenuItemTagTransformationsMenu; 96 - (NSString *)contextMenuItemTagMakeUpperCase; 97 - (NSString *)contextMenuItemTagMakeLowerCase; 98 - (NSString *)contextMenuItemTagCapitalize; 99 - (NSString *)contextMenuItemTagChangeBack:(NSString *)replacedString; 100 - (NSString *)contextMenuItemTagInspectElement; 101 #endif // ENABLE(CONTEXT_MENUS) 102 103 - (NSString *)searchMenuNoRecentSearchesText; 104 - (NSString *)searchMenuRecentSearchesText; 105 - (NSString *)searchMenuClearRecentSearchesText; 106 107 - (NSString *)defaultLanguageCode; 108 109 - (NSString *)imageTitleForFilename:(NSString *)filename width:(int)width height:(int)height; 110 111 - (BOOL)objectIsTextMarker:(id)object; 112 - (BOOL)objectIsTextMarkerRange:(id)object; 113 114 - (WebCoreTextMarker *)textMarkerWithBytes:(const void *)bytes length:(size_t)length; 115 - (BOOL)getBytes:(void *)bytes fromTextMarker:(WebCoreTextMarker *)textMarker length:(size_t)length; 116 117 - (WebCoreTextMarkerRange *)textMarkerRangeWithStart:(WebCoreTextMarker *)start end:(WebCoreTextMarker *)end; 118 - (WebCoreTextMarker *)startOfTextMarkerRange:(WebCoreTextMarkerRange *)range; 119 - (WebCoreTextMarker *)endOfTextMarkerRange:(WebCoreTextMarkerRange *)range; 120 121 - (void)accessibilityHandleFocusChanged; 122 - (CGRect)accessibilityConvertScreenRect:(CGRect)bounds; 123 124 - (AXUIElementRef)AXUIElementForElement:(id)element; 125 - (void)unregisterUniqueIdForUIElement:(id)element; 126 127 - (NSString *)AXWebAreaText; 128 - (NSString *)AXLinkText; 129 - (NSString *)AXListMarkerText; 130 - (NSString *)AXImageMapText; 131 - (NSString *)AXHeadingText; 132 - (NSString *)AXDefinitionListTermText; 133 - (NSString *)AXDefinitionListDefinitionText; 134 - (NSString *)AXARIAContentGroupText:(NSString *)ariaType; 135 136 - (NSString *)AXButtonActionVerb; 137 - (NSString *)AXRadioButtonActionVerb; 138 - (NSString *)AXTextFieldActionVerb; 139 - (NSString *)AXCheckedCheckBoxActionVerb; 140 - (NSString *)AXUncheckedCheckBoxActionVerb; 141 - (NSString *)AXLinkActionVerb; 142 - (NSString *)AXMenuListPopupActionVerb; 143 - (NSString *)AXMenuListActionVerb; 144 145 - (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles; 146 // FTP Directory Related 147 - (NSString *)unknownFileSizeText; 148 149 - (NSString *)mediaElementLoadingStateText; 150 - (NSString *)mediaElementLiveBroadcastStateText; 151 - (NSString*)localizedMediaControlElementString:(NSString*)name; 152 - (NSString*)localizedMediaControlElementHelpText:(NSString*)name; 153 - (NSString*)localizedMediaTimeDescription:(float)time; 154 155 - (NSString *)validationMessageValueMissingText; 156 - (NSString *)validationMessageTypeMismatchText; 157 - (NSString *)validationMessagePatternMismatchText; 158 - (NSString *)validationMessageTooLongText; 159 - (NSString *)validationMessageRangeUnderflowText; 160 - (NSString *)validationMessageRangeOverflowText; 161 - (NSString *)validationMessageStepMismatchText; 162 163 @end 164 165 @interface WebCoreViewFactory : NSObject 166 + (WebCoreViewFactory *)sharedFactory; 167 @end 168 169 @interface WebCoreViewFactory (SubclassResponsibility) <WebCoreViewFactory> 170 @end 171 172 @protocol WebCorePluginInfo <NSObject> 173 - (NSString *)name; 174 - (NSString *)filename; 175 - (NSString *)pluginDescription; 176 - (NSEnumerator *)MIMETypeEnumerator; 177 - (NSString *)descriptionForMIMEType:(NSString *)MIMEType; 178 - (NSArray *)extensionsForMIMEType:(NSString *)MIMEType; 179 @end 180 181