WebView.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. { Parsed from WebKit.framework WebView.h }
  2. {$ifdef TYPES}
  3. type
  4. WebViewPtr = ^WebView;
  5. {$endif}
  6. {$ifdef EXTERNAL_SYMBOLS}
  7. var
  8. WebElementDOMNodeKey: NSString; cvar; external;
  9. WebElementFrameKey: NSString; cvar; external;
  10. WebElementImageAltStringKey: NSString; cvar; external;
  11. WebElementImageKey: NSString; cvar; external;
  12. WebElementImageRectKey: NSString; cvar; external;
  13. WebElementImageURLKey: NSString; cvar; external;
  14. WebElementIsSelectedKey: NSString; cvar; external;
  15. WebElementLinkURLKey: NSString; cvar; external;
  16. WebElementLinkTargetFrameKey: NSString; cvar; external;
  17. WebElementLinkTitleKey: NSString; cvar; external;
  18. WebElementLinkLabelKey: NSString; cvar; external;
  19. WebViewProgressStartedNotification: NSString; cvar; external;
  20. WebViewProgressEstimateChangedNotification: NSString; cvar; external;
  21. WebViewProgressFinishedNotification: NSString; cvar; external;
  22. {$endif}
  23. {$ifdef CLASSES}
  24. type
  25. WebView = objcclass external (NSView)
  26. private
  27. _private: WebViewPrivate;
  28. public
  29. class function canShowMIMEType (MIMEType: NSString): ObjCBOOL; message 'canShowMIMEType:';
  30. class function canShowMIMETypeAsHTML (MIMEType: NSString): ObjCBOOL; message 'canShowMIMETypeAsHTML:';
  31. class function MIMETypesShownAsHTML: NSArray; message 'MIMETypesShownAsHTML';
  32. class procedure setMIMETypesShownAsHTML (MIMETypes: NSArray); message 'setMIMETypesShownAsHTML:';
  33. class function URLFromPasteboard (pasteboard: NSPasteboard): NSURL; message 'URLFromPasteboard:';
  34. class function URLTitleFromPasteboard (pasteboard: NSPasteboard): NSString; message 'URLTitleFromPasteboard:';
  35. class procedure registerURLSchemeAsLocal (scheme: NSString); message 'registerURLSchemeAsLocal:';
  36. function initWithFrame_frameName_groupName (frame: NSRect; frameName: NSString; groupName: NSString): instancetype; message 'initWithFrame:frameName:groupName:';
  37. procedure close; message 'close';
  38. procedure setShouldCloseWithWindow(newValue: ObjCBOOL); message 'setShouldCloseWithWindow:';
  39. function shouldCloseWithWindow: ObjCBOOL; message 'shouldCloseWithWindow';
  40. procedure setUIDelegate(newValue: id); message 'setUIDelegate:';
  41. function UIDelegate: id; message 'UIDelegate';
  42. procedure setResourceLoadDelegate(newValue: id); message 'setResourceLoadDelegate:';
  43. function resourceLoadDelegate: id; message 'resourceLoadDelegate';
  44. procedure setDownloadDelegate(newValue: id); message 'setDownloadDelegate:';
  45. function downloadDelegate: id; message 'downloadDelegate';
  46. procedure setFrameLoadDelegate(newValue: id); message 'setFrameLoadDelegate:';
  47. function frameLoadDelegate: id; message 'frameLoadDelegate';
  48. procedure setPolicyDelegate(newValue: id); message 'setPolicyDelegate:';
  49. function policyDelegate: id; message 'policyDelegate';
  50. function mainFrame: WebFrame; message 'mainFrame';
  51. function selectedFrame: WebFrame; message 'selectedFrame';
  52. function backForwardList: WebBackForwardList; message 'backForwardList';
  53. procedure setMaintainsBackForwardList (flag: ObjCBOOL); message 'setMaintainsBackForwardList:';
  54. function goBack: ObjCBOOL; message 'goBack';
  55. function goForward: ObjCBOOL; message 'goForward';
  56. function goToBackForwardItem (item: WebHistoryItem): ObjCBOOL; message 'goToBackForwardItem:';
  57. procedure setTextSizeMultiplier(newValue: single); message 'setTextSizeMultiplier:';
  58. function textSizeMultiplier: single; message 'textSizeMultiplier';
  59. procedure setApplicationNameForUserAgent(newValue: NSString); message 'setApplicationNameForUserAgent:';
  60. function applicationNameForUserAgent: NSString; message 'applicationNameForUserAgent';
  61. procedure setCustomUserAgent(newValue: NSString); message 'setCustomUserAgent:';
  62. function customUserAgent: NSString; message 'customUserAgent';
  63. function userAgentForURL (URL: NSURL): NSString; message 'userAgentForURL:';
  64. function supportsTextEncoding: ObjCBOOL; message 'supportsTextEncoding';
  65. procedure setCustomTextEncodingName(newValue: NSString); message 'setCustomTextEncodingName:';
  66. function customTextEncodingName: NSString; message 'customTextEncodingName';
  67. procedure setMediaStyle(newValue: NSString); message 'setMediaStyle:';
  68. function mediaStyle: NSString; message 'mediaStyle';
  69. function stringByEvaluatingJavaScriptFromString (script: NSString): NSString; message 'stringByEvaluatingJavaScriptFromString:';
  70. function windowScriptObject: WebScriptObject; message 'windowScriptObject';
  71. procedure setPreferences(newValue: WebPreferences); message 'setPreferences:';
  72. function preferences: WebPreferences; message 'preferences';
  73. procedure setPreferencesIdentifier(newValue: NSString); message 'setPreferencesIdentifier:';
  74. function preferencesIdentifier: NSString; message 'preferencesIdentifier';
  75. procedure setHostWindow(newValue: NSWindow); message 'setHostWindow:';
  76. function hostWindow: NSWindow; message 'hostWindow';
  77. function searchFor_direction_caseSensitive_wrap (string_: NSString; forward: ObjCBOOL; caseFlag: ObjCBOOL; wrapFlag: ObjCBOOL): ObjCBOOL; message 'searchFor:direction:caseSensitive:wrap:';
  78. class procedure registerViewClass_representationClass_forMIMEType (viewClass: pobjc_class; representationClass: pobjc_class; MIMEType: NSString); message 'registerViewClass:representationClass:forMIMEType:';
  79. procedure setGroupName(newValue: NSString); message 'setGroupName:';
  80. function groupName: NSString; message 'groupName';
  81. function estimatedProgress: double; message 'estimatedProgress';
  82. function isLoading: ObjCBOOL; message 'isLoading';
  83. function elementAtPoint (point: NSPoint): NSDictionary; message 'elementAtPoint:';
  84. function pasteboardTypesForSelection: NSArray; message 'pasteboardTypesForSelection';
  85. procedure writeSelectionWithPasteboardTypes_toPasteboard (types: NSArray; pasteboard: NSPasteboard); message 'writeSelectionWithPasteboardTypes:toPasteboard:';
  86. function pasteboardTypesForElement (element: NSDictionary): NSArray; message 'pasteboardTypesForElement:';
  87. procedure writeElement_withPasteboardTypes_toPasteboard (element: NSDictionary; types: NSArray; pasteboard: NSPasteboard); message 'writeElement:withPasteboardTypes:toPasteboard:';
  88. procedure moveDragCaretToPoint (point: NSPoint); message 'moveDragCaretToPoint:';
  89. procedure removeDragCaret; message 'removeDragCaret';
  90. procedure setDrawsBackground(newValue: ObjCBOOL); message 'setDrawsBackground:';
  91. function drawsBackground: ObjCBOOL; message 'drawsBackground';
  92. procedure setShouldUpdateWhileOffscreen(newValue: ObjCBOOL); message 'setShouldUpdateWhileOffscreen:';
  93. function shouldUpdateWhileOffscreen: ObjCBOOL; message 'shouldUpdateWhileOffscreen';
  94. procedure setMainFrameURL(newValue: NSString); message 'setMainFrameURL:';
  95. function mainFrameURL: NSString; message 'mainFrameURL';
  96. function mainFrameDocument: DOMDocument; message 'mainFrameDocument';
  97. function mainFrameTitle: NSString; message 'mainFrameTitle';
  98. function mainFrameIcon: NSImage; message 'mainFrameIcon';
  99. end;
  100. type
  101. WebIBActions = objccategory external (WebView)
  102. procedure takeStringURLFrom (sender: id); message 'takeStringURLFrom:';
  103. procedure stopLoading (sender: id); message 'stopLoading:';
  104. procedure reload (sender: id); message 'reload:';
  105. procedure reloadFromOrigin (sender: id); message 'reloadFromOrigin:';
  106. function canGoBack: ObjCBOOL; message 'canGoBack';
  107. procedure goBack_ (sender: id); message 'goBack:';
  108. function canGoForward: ObjCBOOL; message 'canGoForward';
  109. procedure goForward_ (sender: id); message 'goForward:';
  110. function canMakeTextLarger: ObjCBOOL; message 'canMakeTextLarger';
  111. procedure makeTextLarger (sender: id); message 'makeTextLarger:';
  112. function canMakeTextSmaller: ObjCBOOL; message 'canMakeTextSmaller';
  113. procedure makeTextSmaller (sender: id); message 'makeTextSmaller:';
  114. function canMakeTextStandardSize: ObjCBOOL; message 'canMakeTextStandardSize';
  115. procedure makeTextStandardSize (sender: id); message 'makeTextStandardSize:';
  116. procedure toggleContinuousSpellChecking (sender: id); message 'toggleContinuousSpellChecking:';
  117. procedure toggleSmartInsertDelete (sender: id); message 'toggleSmartInsertDelete:';
  118. end;
  119. {$endif}
  120. {$ifdef EXTERNAL_SYMBOLS}
  121. var
  122. WebViewDidBeginEditingNotification: NSString; cvar; external;
  123. WebViewDidChangeNotification: NSString; cvar; external;
  124. WebViewDidEndEditingNotification: NSString; cvar; external;
  125. WebViewDidChangeTypingStyleNotification: NSString; cvar; external;
  126. WebViewDidChangeSelectionNotification: NSString; cvar; external;
  127. {$endif}
  128. {$ifdef CLASSES}
  129. type
  130. WebViewCSS = objccategory external (WebView)
  131. function computedStyleForElement_pseudoElement (element: DOMElement; pseudoElement: NSString): DOMCSSStyleDeclaration; message 'computedStyleForElement:pseudoElement:';
  132. end;
  133. type
  134. WebViewEditing = objccategory external (WebView)
  135. function editableDOMRangeForPoint (point: NSPoint): DOMRange; message 'editableDOMRangeForPoint:';
  136. procedure setSelectedDOMRange_affinity (range: DOMRange; selectionAffinity: NSSelectionAffinity); message 'setSelectedDOMRange:affinity:';
  137. function selectedDOMRange: DOMRange; message 'selectedDOMRange';
  138. function selectionAffinity: NSSelectionAffinity; message 'selectionAffinity';
  139. function maintainsInactiveSelection: ObjCBOOL; message 'maintainsInactiveSelection';
  140. procedure setEditable(newValue: ObjCBOOL); message 'setEditable:';
  141. function isEditable: ObjCBOOL; message 'isEditable';
  142. procedure setTypingStyle(newValue: DOMCSSStyleDeclaration); message 'setTypingStyle:';
  143. function typingStyle: DOMCSSStyleDeclaration; message 'typingStyle';
  144. procedure setSmartInsertDeleteEnabled(newValue: ObjCBOOL); message 'setSmartInsertDeleteEnabled:';
  145. function smartInsertDeleteEnabled: ObjCBOOL; message 'smartInsertDeleteEnabled';
  146. procedure setContinuousSpellCheckingEnabled(newValue: ObjCBOOL); message 'setContinuousSpellCheckingEnabled:';
  147. function isContinuousSpellCheckingEnabled: ObjCBOOL; message 'isContinuousSpellCheckingEnabled';
  148. function spellCheckerDocumentTag: NSInteger; message 'spellCheckerDocumentTag';
  149. function undoManager: NSUndoManager; message 'undoManager';
  150. procedure setEditingDelegate(newValue: id); message 'setEditingDelegate:';
  151. function editingDelegate: id; message 'editingDelegate';
  152. function styleDeclarationWithText (text: NSString): DOMCSSStyleDeclaration; message 'styleDeclarationWithText:';
  153. end;
  154. type
  155. WebViewUndoableEditing = objccategory external (WebView)
  156. procedure replaceSelectionWithNode (node: DOMNode); message 'replaceSelectionWithNode:';
  157. procedure replaceSelectionWithText (text: NSString); message 'replaceSelectionWithText:';
  158. procedure replaceSelectionWithMarkupString (markupString: NSString); message 'replaceSelectionWithMarkupString:';
  159. procedure replaceSelectionWithArchive (archive: WebArchive); message 'replaceSelectionWithArchive:';
  160. procedure deleteSelection; message 'deleteSelection';
  161. procedure applyStyle (style: DOMCSSStyleDeclaration); message 'applyStyle:';
  162. end;
  163. type
  164. WebViewEditingActions = objccategory external (WebView)
  165. procedure copy_ (sender: id); message 'copy:';
  166. procedure cut (sender: id); message 'cut:';
  167. procedure paste (sender: id); message 'paste:';
  168. procedure copyFont (sender: id); message 'copyFont:';
  169. procedure pasteFont (sender: id); message 'pasteFont:';
  170. procedure delete (sender: id); message 'delete:';
  171. procedure pasteAsPlainText (sender: id); message 'pasteAsPlainText:';
  172. procedure pasteAsRichText (sender: id); message 'pasteAsRichText:';
  173. procedure changeFont (sender: id); message 'changeFont:';
  174. procedure changeAttributes (sender: id); message 'changeAttributes:';
  175. procedure changeDocumentBackgroundColor (sender: id); message 'changeDocumentBackgroundColor:';
  176. procedure changeColor (sender: id); message 'changeColor:';
  177. procedure alignCenter (sender: id); message 'alignCenter:';
  178. procedure alignJustified (sender: id); message 'alignJustified:';
  179. procedure alignLeft (sender: id); message 'alignLeft:';
  180. procedure alignRight (sender: id); message 'alignRight:';
  181. procedure checkSpelling (sender: id); message 'checkSpelling:';
  182. procedure showGuessPanel (sender: id); message 'showGuessPanel:';
  183. procedure performFindPanelAction (sender: id); message 'performFindPanelAction:';
  184. procedure startSpeaking (sender: id); message 'startSpeaking:';
  185. procedure stopSpeaking (sender: id); message 'stopSpeaking:';
  186. procedure moveToBeginningOfSentence (sender: id); message 'moveToBeginningOfSentence:';
  187. procedure moveToBeginningOfSentenceAndModifySelection (sender: id); message 'moveToBeginningOfSentenceAndModifySelection:';
  188. procedure moveToEndOfSentence (sender: id); message 'moveToEndOfSentence:';
  189. procedure moveToEndOfSentenceAndModifySelection (sender: id); message 'moveToEndOfSentenceAndModifySelection:';
  190. procedure selectSentence (sender: id); message 'selectSentence:';
  191. procedure overWrite (sender: id); message 'overWrite:';
  192. end;
  193. {$endif}