dev.stuconnolly.com / svn / safaritabs

  1. /*
  2.  *  $Id: BrowserWindowController.h 198 2010-01-06 23:05:30Z stuart $
  3.  *
  4.  *  SafariTabs
  5.  *  http://stuconnolly.com/projects/safaritabs/
  6.  *
  7.  *  Copyright (c) 2010 Stuart Connolly. All rights reserved.
  8.  *
  9.  *  This program is free software: you can redistribute it and/or modify
  10.  *  it under the terms of the GNU General Public License as published by
  11.  *  the Free Software Foundation, either version 3 of the License, or
  12.  *  (at your option) any later version.
  13.  *
  14.  *  This program is distributed in the hope that it will be useful,
  15.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17.  *  GNU General Public License for more details.
  18.  *
  19.  *  You should have received a copy of the GNU General Public License
  20.  *  along with this program. If not, see <http://www.gnu.org/licenses/>.
  21.  */
  22.  
  23. #import "WindowController.h"
  24.  
  25. @class BarBackground,
  26.        ClosedWebViewHolder,
  27.        EtchedStringView,
  28.        FavoritesBarView,
  29.        LocationFieldEditor,
  30.        OldURLCompletionController,
  31.        OldWebSearchCompletionController,
  32.        PDFLoadingProgressController,
  33.        SlidingImageView,
  34.        TabBarEnclosureView,
  35.        TabBarView,
  36.        TextFieldEditor,
  37.        ToolbarController,
  38.        BrowserTabViewItem;
  39.  
  40. @interface BrowserWindowController : WindowController
  41. {
  42.     FavoritesBarView *favoritesBarView;
  43.     NSButton *toggleBookmarksButton;
  44.     TabBarView *tabBarView;
  45.     TabBarEnclosureView *tabBarEnclosureView;
  46.     NSTabView *tabSwitcher;
  47.     BarBackground *statusBar;
  48.     NSTextField *statusTextField;
  49.     ToolbarController *_toolbarController;
  50.     LocationFieldEditor *_locationFieldEditor;
  51.     TextFieldEditor *_searchFieldEditor;
  52.     EtchedStringView *_statusStringView;
  53.     OldURLCompletionController *_URLCompletionController;
  54.     OldWebSearchCompletionController *_searchCompletionController;
  55.     NSMenu *_dynamicBackMenu;
  56.     NSMenu *_dynamicForwardMenu;
  57.     BOOL _isLoading;
  58.     BOOL _temporaryLocationBar;
  59.     BOOL _editedLocationField;
  60.     BOOL _editedLocationFieldWhileLoading;
  61.     BOOL _focusedLocationFieldWhileLoading;
  62.     BOOL _tabBarHiddenByJavaScript;
  63.     BOOL _readyToUpdateKeyboardLoop;
  64.     NSMutableDictionary *_viewFramesForResizing;
  65.     BOOL _favoritesBarShowing;
  66.     BOOL _tabBarShowing;
  67.     BOOL _statusBarShowing;
  68.     BOOL _acceptsGenericIcon;
  69.     NSString *_statusText;
  70.     BOOL _clearStatus;
  71.     BOOL _ellipsizeStatus;
  72.     NSString *_newStatus;
  73.     BOOL _stopAndReloadButtonWillStop;
  74.     BOOL _stopAndReloadButtonIsForTopSites;
  75.     BOOL _tabBarInTransition;
  76.     BOOL _tabBarShownForTabDrag;
  77.     BOOL _confirmUnsubmittedFormText;
  78.     BOOL _isAutoFilling;
  79.     BOOL _hideToolbarOnEndSheet;
  80.     BOOL _keepTabBarHiddenWhenCreatingTab;
  81.     NSTabView *_tabSwitcherForGoBack;
  82.     NSTabView *_tabSwitcherForGoForward;
  83.     BrowserTabViewItem *_deselectedTab;
  84.     NSUInteger _coalescedUpdateMask;
  85.     BOOL _performingCoalescedUpdates;
  86.     NSUInteger _postponedToolbarUpdateMask;
  87.     BOOL _postponeToolbarUpdates;
  88.     BOOL _RSSTransitionSlowMotion;
  89.     SlidingImageView *_RSSTransitionImageView;
  90.     NSTimer *_RSSTransitionTimer;
  91.     double _RSSTransitionStartTime;
  92.     double _RSSTransitionDuration;
  93.     BOOL _RSSTransitionInProgress;
  94.     BOOL _startRSSAnimationAfterFirstLayout;
  95.     ClosedWebViewHolder *_closedWebViewHolder;
  96.     NSTimer *_springToFrontTimer;
  97.     NSTimer *_setStatusMessageTimer;
  98.     PDFLoadingProgressController *_pdfLoadingProgressController;
  99. }
  100.  
  101. + (void)reopen;
  102. + (NSInteger)windowPolicyFromCurrentEvent;
  103. + (NSInteger)windowPolicyFromCurrentEventRequireCommandKey:(BOOL)arg1;
  104. + (NSInteger)windowPolicyFromCurrentEventRequireCommandKey:(BOOL)arg1 respectTargetedClicksPreference:(BOOL)arg2;
  105. + (NSInteger)windowPolicyFromCurrentEventRespectingKeyEquivalents:(BOOL)arg1;
  106. + (NSInteger)windowPolicyFromEventModifierFlags:(NSUInteger)arg1 isMiddleMouseButton:(BOOL)arg2;
  107. + (NSInteger)windowPolicyFromEventModifierFlags:(NSUInteger)arg1 isMiddleMouseButton:(BOOL)arg2 requireCommandKey:(BOOL)arg3 respectTargetedClicksPreference:(BOOL)arg4;
  108. + (NSInteger)windowPolicyFromEventModifierFlags:(NSUInteger)arg1 requireCommandKey:(BOOL)arg2;
  109. + (NSInteger)windowPolicyFromEventModifierFlags:(NSUInteger)arg1 requireCommandKey:(BOOL)arg2 respectTargetedClicksPreference:(BOOL)arg3;
  110. - (id)_localSearchStringFromWebSearchString:(id)arg1;
  111. - (void)_safari_windowDidEndLiveResize;
  112. - (void)_searchForStringWithoutUpdatingRecentSearches:(id)arg1;
  113. - (void)_tellAppControllerWindowWillClose;
  114. - (BOOL)acceptsGenericIcon;
  115. - (void)addBookmark:(id)arg1;
  116. - (struct _NSRect)adjustedFrameForCascade:(struct _NSRect)arg1 fromWindow:(id)arg2;
  117. - (struct _NSRect)adjustedFrameForSaving:(struct _NSRect)arg1;
  118. - (BOOL)allowBookmarksChanges;
  119. - (BOOL)anyToolbarsVisible;
  120. - (void)autoFill:(id)arg1;
  121. - (id)bookmarkTitleForLocationTextField:(id)arg1;
  122. - (void)browserWebView:(id)arg1 willMoveToWindow:(id)arg2;
  123. - (void)browserWindow:(id)arg1 shouldGoToURL:(id)arg2;
  124. - (id)browserWindowTitleBarURL:(id)arg1;
  125. - (BOOL)canCloseSelectedTab;
  126. - (BOOL)canCreateNewTab;
  127. - (BOOL)canReloadAllTabs;
  128. - (BOOL)canReloadObeyingLocationField;
  129. - (BOOL)canReloadTab:(id)arg1;
  130. - (BOOL)canShowInputFields;
  131. - (BOOL)canShowTopSitesWall;
  132. - (void)cancel:(id)arg1;
  133. - (void)cancelUpdateTabTitlesSoon;
  134. - (void)changeTextEncoding:(id)arg1;
  135. - (void)closeCurrentTab:(id)arg1;
  136. - (void)closeInactiveTabs:(id)arg1;
  137. - (BOOL)closeKeyEquivalentClosesTab;
  138. - (void)closeOtherTabs:(id)arg1;
  139. - (void)closeOtherTabsFromMenu:(id)arg1;
  140. - (void)closeTab:(id)arg1;
  141. - (void)closeTabFromMenu:(id)arg1;
  142. - (void)closeTabOrWindow:(id)arg1;
  143. - (BOOL)control:(id)arg1 textView:(id)arg2 doCommandBySelector:(SEL)arg3;
  144. - (void)controlTextDidChange:(id)arg1;
  145. - (void)controlTextDidEndEditing:(id)arg1;
  146. - (id)createInactiveTab;
  147. - (id)createInactiveTabWithFrameName:(id)arg1;
  148. - (id)createTab;
  149. - (id)createTabWithFrameName:(id)arg1;
  150. - (id)createTabWithFrameName:(id)arg1 andShow:(BOOL)arg2 addToRightSide:(BOOL)arg3;
  151. - (id)createTabWithWebView:(id)arg1 andShow:(BOOL)arg2 addToRightSide:(BOOL)arg3;
  152. - (void)createWebClip:(id)arg1;
  153. - (id)currentWebView;
  154. - (void)dealloc;
  155. - (struct _NSRect)defaultFrame;
  156. - (void)deleteBookmark:(id)arg1;
  157. - (void)didSelectTabViewItem;
  158. - (void)doCommandBySelector:(SEL)arg1;
  159. - (id)dynamicBackMenu;
  160. - (id)dynamicForwardMenu;
  161. - (void)editAddressOfFavorite:(id)arg1;
  162. - (void)editContentsOfFavorite:(id)arg1;
  163. - (void)editTitleOfBookmarksCollection:(id)arg1;
  164. - (void)editTitleOfFavorite:(id)arg1;
  165. - (id)favoritesBarView;
  166. - (void)firstResponderMightHaveChanged;
  167. - (void)goBack:(id)arg1;
  168. - (void)goBackAndFlashToolbarButton:(id)arg1;
  169. - (void)goBackOrForwardFromSegmentedControl:(id)arg1;
  170. - (void)goForward:(id)arg1;
  171. - (void)goForwardAndFlashToolbarButton:(id)arg1;
  172. - (void)goHome:(id)arg1;
  173. - (void)goToToolbarLocation:(id)arg1;
  174. - (void)insertInOrderedTabViewItems:(id)arg1;
  175. - (void)insertInOrderedTabViewItems:(id)arg1 atIndex:(NSUInteger)arg2;
  176. - (BOOL)isAutoFilling;
  177. - (BOOL)isAvailableForForcedLocationUsingWindowPolicy:(NSInteger)arg1;
  178. - (BOOL)isFavoritesBarVisible;
  179. - (BOOL)isLocationBarVisible;
  180. - (BOOL)isStatusBarVisible;
  181. - (BOOL)isTabBarVisible;
  182. - (id)locationField;
  183. - (BOOL)locationTextField:(id)arg1 mouseDownInRSSButton:(id)arg2;
  184. - (void)locationTextField:(id)arg1 mouseUpInEVCertificateButton:(id)arg2;
  185. - (void)locationTextField:(id)arg1 mouseUpInRSSButton:(id)arg2;
  186. - (void)locationTextField:(id)arg1 mouseUpInStopReloadButton:(id)arg2;
  187. - (void)locationTextFieldPerformEVCertificateButtonAction:(id)arg1;
  188. - (void)locationTextFieldPerformRSSButtonAction:(id)arg1;
  189. - (void)locationTextFieldPerformStopReloadButtonAction:(id)arg1;
  190. - (void)locationTextFieldURLDropped:(id)arg1;
  191. - (void)mainDocumentDidFirstVisuallyNonEmptyLayout;
  192. - (BOOL)menuHasKeyEquivalent:(id)arg1 forEvent:(id)arg2 target:(id *)arg3 action:(SEL *)arg4;
  193. - (void)menuNeedsUpdate:(id)arg1;
  194. - (NSUInteger)morphingDragImage:(id)arg1 draggingEntered:(id)arg2;
  195. - (void)morphingDragImage:(id)arg1 draggingExited:(id)arg2;
  196. - (NSUInteger)morphingDragImage:(id)arg1 draggingUpdated:(id)arg2;
  197. - (void)morphingDragImage:(id)arg1 enteredWindow:(id)arg2;
  198. - (void)morphingDragImage:(id)arg1 exitedWindow:(id)arg2;
  199. - (BOOL)morphingDragImage:(id)arg1 performDragOperation:(id)arg2;
  200. - (void)moveCurrentTabToNewWindow:(id)arg1;
  201. - (void)moveTabFromOtherWindow:(id)arg1 toIndex:(NSUInteger)arg2 andShow:(BOOL)arg3;
  202. - (void)moveTabToNewWindowFromMenu:(id)arg1;
  203. - (void)newBookmarkFolder:(id)arg1;
  204. - (void)newTab:(id)arg1;
  205. - (void)noResponderFor:(SEL)arg1;
  206. - (NSUInteger)numberOfNonDisposableTabs;
  207. - (id)orderedTabViewItems;
  208. - (id)orderedTabs;
  209. - (void)performQuickSearch:(id)arg1;
  210. - (void)printFromToolbar:(id)arg1;
  211. - (void)reloadAllTabs:(id)arg1;
  212. - (void)reloadObeyingLocationField:(id)arg1;
  213. - (void)reloadTabFromMenu:(id)arg1;
  214. - (void)reloadTabsMatchingURLs:(id)arg1;
  215. - (void)removeFromOrderedTabViewItemsAtIndex:(NSUInteger)arg1;
  216. - (void)replaceEmptyTabWithTabs:(id)arg1;
  217. - (void)replaceInOrderedTabViewItems:(id)arg1 atIndex:(NSUInteger)arg2;
  218. - (void)replaceTabURLs:(id)arg1 usingTabLabels:(id)arg2 allowGoBack:(BOOL)arg3;
  219. - (void)reportBugToApple:(id)arg1;
  220. - (void)revealFavorite:(id)arg1;
  221. - (BOOL)searchField:(id)arg1 shouldRememberSearchString:(id)arg2;
  222. - (BOOL)searchField:(id)arg1 trackSearchButtonForEvent:(id)arg2 inRect:(struct _NSRect)arg3;
  223. - (void)searchForString:(id)arg1;
  224. - (void)searchProviderConfirmationDidEnd:(id)arg1 returnCode:(NSInteger)arg2 contextInfo:(void *)arg3;
  225. - (void)selectLocationField:(id)arg1;
  226. - (void)selectNextTab:(id)arg1;
  227. - (void)selectPreviousTab:(id)arg1;
  228. - (void)selectSearchField:(id)arg1;
  229. - (void)selectTab:(id)arg1;
  230. - (id)selectedTab;
  231. - (NSUInteger)selectedTabIndex;
  232. - (void)setAcceptsGenericIcon:(BOOL)arg1;
  233. - (void)setDocument:(id)arg1;
  234. - (void)setFavoritesBarVisible:(BOOL)arg1;
  235. - (void)setLocationBarVisible:(BOOL)arg1;
  236. - (void)setSearchFieldText:(id)arg1;
  237. - (void)setStatusBarVisible:(BOOL)arg1;
  238. - (void)setTabBarVisible:(BOOL)arg1;
  239. - (void)setToolbarsVisible:(BOOL)arg1;
  240. - (BOOL)shouldCloseDocument;
  241. - (void)showBookmarksView:(id)arg1;
  242. - (void)showHistoryInBookmarksView:(id)arg1;
  243. - (void)showTopSitesWall:(id)arg1;
  244. - (void)showWindow:(id)arg1;
  245. - (void)stopLoading:(id)arg1;
  246. - (void)stopOrReload:(id)arg1;
  247. - (void)swipeWithEvent:(id)arg1;
  248. - (CGFloat)tabBarHeight;
  249. - (id)tabBarView;
  250. - (void)tabBarViewDidRearrangeTabsWithOldSelectedTabIndex:(NSUInteger)arg1;
  251. - (id)tabsWithUnsubmittedFormText;
  252. - (void)toggleFavoritesBar:(id)arg1;
  253. - (void)toggleLocationBar:(id)arg1;
  254. - (void)toggleShowBookmarks:(id)arg1;
  255. - (void)toggleStatusBar:(id)arg1;
  256. - (void)toggleTabBar:(id)arg1;
  257. - (BOOL)toolbarInputFieldsIncludeSearchField;
  258. - (void)updateTabLabelForWebView:(id)arg1;
  259. - (void)updateTabTitlesSoon;
  260. - (BOOL)validateMenuItem:(id)arg1;
  261. - (BOOL)validateUserInterfaceItem:(id)arg1;
  262. - (void)webFrame:(id)arg1 willPerformClientRedirectToURL:(id)arg2;
  263. - (void)webFrameLoadCommitted:(id)arg1;
  264. - (void)webFrameLoadFinished:(id)arg1 withError:(id)arg2;
  265. - (void)webFrameLoadStarted:(id)arg1;
  266. - (void)webViewBannerHasChanged:(id)arg1;
  267. - (void)webViewBlockedFromKeyViewLoopHasChanged:(id)arg1;
  268. - (void)webViewFormEditedStatusHasChanged:(id)arg1;
  269. - (void)webViewLoadingStatusHasChanged:(id)arg1;
  270. - (void)webViewLocationFieldIconHasChanged:(id)arg1;
  271. - (void)webViewLocationFieldURLHasChanged:(id)arg1;
  272. - (void)webViewMainDocumentDidFirstLayout:(id)arg1;
  273. - (void)webViewMainDocumentHasLoaded:(id)arg1;
  274. - (void)webViewNameHasChanged:(id)arg1;
  275. - (void)webViewProgressValueHasChanged:(id)arg1;
  276. - (void)webViewReloadabilityHasChanged:(id)arg1;
  277. - (void)webViewSheetRequestStatusHasChanged:(id)arg1;
  278. - (void)webViewStatusMessageHasChanged:(id)arg1;
  279. - (void)willSelectTabViewItem;
  280. - (void)willShowCustomizeToolbarSheet;
  281. - (BOOL)window:(id)arg1 willHandleKeyEvent:(id)arg2;
  282. - (BOOL)window:(id)arg1 willHandleMouseDownEvent:(id)arg2;
  283. - (struct _NSRect)window:(id)arg1 willPositionSheet:(id)arg2 usingRect:(struct _NSRect)arg3;
  284. - (void)windowDidBecomeKey:(id)arg1;
  285. - (void)windowDidBecomeMain:(id)arg1;
  286. - (void)windowDidDeminiaturize:(id)arg1;
  287. - (void)windowDidEndSheet:(id)arg1;
  288. - (void)windowDidLoad;
  289. - (void)windowDidMiniaturize:(id)arg1;
  290. - (void)windowDidMove:(id)arg1;
  291. - (void)windowDidResignKey:(id)arg1;
  292. - (void)windowDidResignMain:(id)arg1;
  293. - (void)windowDidResize:(id)arg1;
  294. - (id)windowForSheet;
  295. - (id)windowNibName;
  296. - (BOOL)windowShouldClose:(id)arg1;
  297. - (void)windowTitleNeedsUpdate;
  298. - (void)windowWillClose:(id)arg1;
  299. - (void)windowWillLoad;
  300. - (struct _NSSize)windowWillResize:(id)arg1 toSize:(struct _NSSize)arg2;
  301. - (id)windowWillReturnFieldEditor:(id)arg1 toObject:(id)arg2;
  302. - (struct _NSRect)windowWillUseStandardFrame:(id)arg1 defaultFrame:(struct _NSRect)arg2;
  303. - (void)zoomIn:(id)arg1;
  304. - (void)zoomInOrOutFromSegmentedControl:(id)arg1;
  305. - (void)zoomOut:(id)arg1;
  306. - (void)zoomToStandardSize:(id)arg1;
  307.  
  308. @end
  309.