dev.stuconnolly.com / svn / safaritabs

  1. /*
  2.  *  BrowserWindowController.h
  3.  *
  4.  *  SafariTabs
  5.  *
  6.  *  Copyright (c) 2007 Stuart Connolly. All rights reserved.
  7.  *
  8.  *  This program is free software; you can redistribute it and/or
  9.  *  modify it under the terms of the GNU General Public License
  10.  *  as published by the Free Software Foundation; either version 2
  11.  *  of the License, or (at your option) any later version.
  12.  *
  13.  *  This program is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16.  *  GNU General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with this program; if not, write to the Free Software
  20.  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  21.  */
  22.  
  23. #import <Cocoa/Cocoa.h>
  24. #import "WindowController.h"
  25.  
  26. /*  This file is the header for Safari's BrowserWindowController class. It was produced by
  27.  *  reverse engineering Safari's mach-o-file using class-dump, available from
  28.  *  http://www.codethecode.com/Projects/class-dump/
  29.  *
  30.  *  This file is not strictly necessary but it does supress many compiler warnings
  31.  *  and is extremely useful as a reference for further development.
  32.  */
  33.  
  34. @interface BrowserWindowController : WindowController
  35. {
  36.     id *locationBar;
  37.     id *favoritesBarView;
  38.     id *tabBarView;
  39.     id *backButton;
  40.     id *forwardButton;
  41.     NSButton *homeButton;
  42.     NSButton *addBookmarkButton;
  43.     NSButton *autoFillButton;
  44.     NSButton *fontSmallerButton;
  45.     NSButton *fontBiggerButton;
  46.     NSButton *stopAndReloadButton;
  47.     id *locationField;
  48.     id *searchField;
  49.     id *toggleBookmarksButton;
  50.     NSTabView *tabSwitcher;
  51.     id *statusBar;
  52.     id *statusStringView;
  53.     id *_favoritesBar;
  54.     id *_toolbarController;
  55.     id *_locationFieldEditor;
  56.     id *_searchFieldEditor;
  57.     id *_completionController;
  58.     id *_searchSuggestionController;
  59.     BOOL _isLoading;
  60.     BOOL _isLoadingCounterpartURLForRSS;
  61.     BOOL _temporaryLocationBar;
  62.     BOOL _editedLocationField;
  63.     BOOL _editedLocationFieldWhileLoading;
  64.     BOOL _editedSearchField;
  65.     BOOL _nextSplitViewResizeIsProgrammatic;
  66.     BOOL _tabBarHiddenByJavaScript;
  67.     BOOL _readyToUpdateKeyboardLoop;
  68.     NSMutableDictionary *_viewFramesForResizing;
  69.     BOOL _favoritesBarShowing;
  70.     BOOL _tabBarShowing;
  71.     BOOL _statusBarShowing;
  72.     BOOL _acceptsGenericIcon;
  73.     NSString *_statusText;
  74.     BOOL _clearStatus;
  75.     BOOL _ellipsizeStatus;
  76.     NSString *_newStatus;
  77.     BOOL _stopAndReloadButtonWillStop;
  78.     BOOL _tabBarInTransition;
  79.     BOOL _parentalControlEnabled;
  80.     NSTabView *_tabSwitcherForGoBack;
  81.     NSTabView *_tabSwitcherForGoForward;
  82.     unsigned int _coalescedUpdateMask;
  83.     BOOL _performingCoalescedUpdates;
  84.     NSURL *_pendingSearchURL;
  85.     BOOL _RSSTransitionSlowMotion;
  86.     id *_RSSTransitionImageView;
  87.     NSTimer *_RSSTransitionTimer;
  88.     double _RSSTransitionStartTime;
  89.     double _RSSTransitionDuration;
  90.     BOOL _mainFrameDidFirstLayout;
  91.     BOOL _startRSSAnimationAfterFirstLayout;
  92. }
  93.  
  94. + (int)windowPolicyFromEventModifierFlags:(unsigned int)fp8 requireCommandKey:(BOOL)fp12;
  95. + (int)windowPolicyFromEventModifierFlags:(unsigned int)fp8;
  96. + (int)windowPolicyFromCurrentEventRequireCommandKey:(BOOL)fp8;
  97. + (int)windowPolicyFromCurrentEvent;
  98. + (int)windowPolicyFromCurrentEventRespectingKeyEquivalents:(BOOL)fp8;
  99. + (void)reopen;
  100. - (id)browserDocument;
  101. - (id)currentWebView;
  102. - (id)currentBookmarksViewController;
  103. - (id)windowNibName;
  104. - (id)locationField;
  105. - (id)searchField;
  106. - (void)_makeFirstResponder:(id)fp8;
  107. - (void)_makeLocationFieldFirstResponder;
  108. - (void)_makeSearchFieldFirstResponder;
  109. - (BOOL)_searchFieldIsFirstResponder;
  110. - (void)updateSearchSnapBackButton;
  111. - (void)updateSnapBackButtons;
  112. - (void)webViewPageForSnapBackHasChanged:(id)fp8;
  113. - (void)setUpSearchField;
  114. - (BOOL)locationBarIsShowing;
  115. - (void)setUpLocationBar;
  116. - (BOOL)isShowingBookmarks;
  117. - (BOOL)allowBookmarksChanges;
  118. - (BOOL)firstResponderIsDescendantOf:(id)fp8;
  119. - (id)selectedTab;
  120. - (id)mainWebFrameView;
  121. - (BOOL)isShowingBar:(id)fp8;
  122. - (void)updateKeyboardLoop;
  123. - (void)collectViewFramesForResizing;
  124. - (void)getTabLabel:(id *)fp8 andToolTip:(id *)fp12 forWebView:(id)fp16;
  125. - (id)tabLabelForWebView:(id)fp8;
  126. - (void)updateLabelForTab:(id)fp8 evenIfTabBarHidden:(BOOL)fp12;
  127. - (void)updateLabelForTab:(id)fp8;
  128. - (id)setUpTabForWebView:(id)fp8 addToRightSide:(BOOL)fp12;
  129. - (id)setUpTabForWebView:(id)fp8;
  130. - (BOOL)alwaysShowTabBar;
  131. - (struct _NSRect)defaultFrame;
  132. - (BOOL)searchFieldShouldShowGoogleSuggestions;
  133. - (id)completionController;
  134. - (id)searchSuggestionController;
  135. - (void)_preloadImages;
  136. - (void)windowWillLoad;
  137. - (void)windowDidLoad;
  138. - (BOOL)_windowIsFullHeight;
  139. - (struct _NSRect)adjustedFrameForSaving:(struct _NSRect)fp8;
  140. - (struct _NSRect)adjustedFrameForCascade:(struct _NSRect)fp8 fromWindow:(id)fp24;
  141. - (struct _NSSize)windowWillResize:(id)fp8 toSize:(struct _NSSize)fp12;
  142. - (void)windowDidResize:(id)fp8;
  143. - (void)setDocumentEdited:(BOOL)fp8;
  144. - (void)dealloc;
  145. - (void)setDocument:(id)fp8;
  146. - (void)stopLoading:(id)fp8;
  147. - (void)cancel:(id)fp8;
  148. - (BOOL)windowWillHandleKeyEvent:(id)fp8;
  149. - (id)_computePriorFirstResponder;
  150. - (void)locationTextFieldURLDropped:(id)fp8;
  151. - (id)windowWillReturnFieldEditor:(id)fp8 toObject:(id)fp12;
  152. - (struct _NSSize)bestWindowSizeForBookmarksOutline;
  153. - (struct _NSSize)bestWindowSizeForCurrentPageWithDefaultSize:(struct _NSSize)fp8;
  154. - (struct _NSRect)windowWillUseStandardFrame:(id)fp8 defaultFrame:(struct _NSRect)fp12;
  155. - (id)windowTitleBarURL;
  156. - (id)windowURL;
  157. - (id)locationFieldURL;
  158. - (void)windowShouldGoToURL:(id)fp8;
  159. - (BOOL)windowShouldClose:(id)fp8;
  160. - (void)toggleLocationBarWithoutSavingConfiguration;
  161. - (void)showLocationBarTemporarilyIfHidden;
  162. - (void)makeLocationBarPermanentIfTemporary;
  163. - (void)hideLocationBarIfTemporary;
  164. - (void)selectSearchField:(id)fp8;
  165. - (BOOL)canShowInputFields;
  166. - (BOOL)searchField:(id)fp8 shouldRememberSearchString:(id)fp12;
  167. - (void)setPendingSearchURL:(id)fp8;
  168. - (void)noResponderFor:(SEL)fp8;
  169. - (void)performQuickSearch:(id)fp8;
  170. - (void)webFrameLoadStarted:(id)fp8;
  171. - (void)updateLocationFieldTextNow;
  172. - (void)updateLocationFieldTextSoon;
  173. - (void)updateSecureIcon;
  174. - (void)updateRSSButton;
  175. - (id)createIncomingImageForRSSTransition;
  176. - (void)removeRSSTransitionImageViewAndDisplay:(BOOL)fp8;
  177. - (void)cancelRSSAnimationAfterSpecificInterval;
  178. - (void)cleanUpRSSAnimationAndDisplay:(BOOL)fp8;
  179. - (void)advanceRSSAnimation;
  180. - (void)startRSSAnimationWithSlowMotion:(BOOL)fp8;
  181. - (void)installRSSTransitionImageView;
  182. - (void)goToCounterpartURLForRSSWithSlowMotion:(BOOL)fp8;
  183. - (void)webFrameLoadCommitted:(id)fp8;
  184. - (void)startRSSAnimation;
  185. - (void)startRSSAnimationForFrame:(id)fp8 error:(id)fp12;
  186. - (void)startRSSAnimationAfterSpecificInterval;
  187. - (void)webFrameLoadDidFirstLayout:(id)fp8;
  188. - (void)webFrameLoadFinished:(id)fp8 withError:(id)fp12;
  189. - (void)webFrame:(id)fp8 willPerformClientRedirectToURL:(id)fp12;
  190. - (BOOL)shouldMakeFirstResponder:(id)fp8;
  191. - (void)tryToAutofillPasswords:(id)fp8;
  192. - (id)locationFieldText;
  193. - (void)setLocationFieldText:(id)fp8;
  194. - (void)selectLocationField:(id)fp8;
  195. - (void)tryMultipleURLs:(id)fp8 windowPolicy:(int)fp12;
  196. - (void)goToToolbarLocationWithWindowPolicy:(int)fp8;
  197. - (void)goToToolbarLocation:(id)fp8;
  198. - (BOOL)locationFieldIsEmpty;
  199. - (BOOL)searchFieldIsEmpty;
  200. - (BOOL)locationFieldTextIsCurrentURL;
  201. - (BOOL)locationFieldTextIsLocationFieldURL;
  202. - (BOOL)updateStopAndReloadButtonNow;
  203. - (void)updateStopAndReloadButtonSoon;
  204. - (void)updateToggleBookmarksButton;
  205. - (void)setLoading:(BOOL)fp8;
  206. - (BOOL)isAvailableForForcedLocationUsingWindowPolicy:(int)fp8;
  207. - (void)reloadObeyingLocationField:(id)fp8;
  208. - (void)stopOrReload:(id)fp8;
  209. - (void)updateWindowTitleNow;
  210. - (void)updateWindowTitleSoon;
  211. - (void)windowTitleNeedsUpdate;
  212. - (void)toggleShowBookmarks:(id)fp8;
  213. - (void)newBookmarkFolder:(id)fp8;
  214. - (void)editAddressOfFavorite:(id)fp8;
  215. - (void)editContentsOfFavorite:(id)fp8;
  216. - (void)editTitleOfFavorite:(id)fp8;
  217. - (void)revealFavorite:(id)fp8;
  218. - (void)deleteBookmark:(id)fp8;
  219. - (void)editTitleOfBookmarksCollection:(id)fp8;
  220. - (void)setUpFavoritesBar;
  221. - (void)toggleBar:(id)fp8 withAnimation:(BOOL)fp12 isShowing:(char *)fp16;
  222. - (void)toggleFavoritesBarWithAnimation:(BOOL)fp8;
  223. - (void)toggleFavoritesBar:(id)fp8;
  224. - (void)toggleToolbarIgnoringCurrentEvent:(id)fp8;
  225. - (void)toggleLocationBar:(id)fp8;
  226. - (void)setToolbarsVisible:(BOOL)fp8;
  227. - (BOOL)anyToolbarsVisible;
  228. - (void)toggleTabBarWithAnimation:(BOOL)fp8;
  229. - (void)setUpTabBar;
  230. - (void)showTab:(id)fp8;
  231. - (void)showTabAtIndex:(int)fp8;
  232. - (BOOL)moreThanOneTabShowing;
  233. - (void)updateCloseKeyEquivalents;
  234. - (id)createTabWithFrameName:(id)fp8 andShow:(BOOL)fp12 addToRightSide:(BOOL)fp16;
  235. - (id)createTabWithFrameName:(id)fp8;
  236. - (id)createInactiveTabWithFrameName:(id)fp8;
  237. - (id)createTab;
  238. - (id)createInactiveTab;
  239. - (void)newTab:(id)fp8;
  240. - (void)closeTab:(id)fp8;
  241. - (void)closeCurrentTab:(id)fp8;
  242. - (void)closeOtherTabs:(id)fp8;
  243. - (void)closeInactiveTabs:(id)fp8;
  244. - (void)reloadTabsMatchingURLs:(id)fp8;
  245. - (void)tabBarView:(id)fp8 didClickTabViewItem:(id)fp12;
  246. - (void)tabBarView:(id)fp8 didClickCloseButtonForTabViewItem:(id)fp12 mouseDownModifierFlags:(unsigned int)fp16;
  247. - (void)willSelectTabViewItem;
  248. - (void)didSelectTabViewItem;
  249. - (void)tabView:(id)fp8 willSelectTabViewItem:(id)fp12;
  250. - (void)tabView:(id)fp8 didSelectTabViewItem:(id)fp12;
  251. - (void)selectNextTab:(id)fp8;
  252. - (void)selectPreviousTab:(id)fp8;
  253. - (id)findTabForWebView:(id)fp8;
  254. - (void)selectTab:(id)fp8;
  255. - (void)closeTabOrWindow:(id)fp8;
  256. - (void)webViewNameHasChanged:(id)fp8;
  257. - (void)webViewLocationFieldURLHasChanged:(id)fp8;
  258. - (void)webViewLocationFieldIconHasChanged:(id)fp8;
  259. - (id)tabBarView:(id)fp8 menuForEvent:(id)fp12;
  260. - (id)tabBarView:(id)fp8 menuForButtonForTabViewItem:(id)fp12 event:(id)fp16;
  261. - (id)tabBarView:(id)fp8 menuForClippedTabViewItems:(id)fp12;
  262. - (void)selectClippedTabViewItem:(id)fp8;
  263. - (void)closeTabFromMenu:(id)fp8;
  264. - (void)closeOtherTabsFromMenu:(id)fp8;
  265. - (void)reloadTab:(id)fp8;
  266. - (void)reloadTabFromMenu:(id)fp8;
  267. - (void)reloadAllTabs:(id)fp8;
  268. - (BOOL)shouldShowTabBar;
  269. - (void)updateTabBarVisibility;
  270. - (void)reloadParentallyRestrictedFrames;
  271. - (void)defaultsDidChange;
  272. - (void)windowDidBecomeKey:(id)fp8;
  273. - (void)fixFocusRingAroundLocationField;
  274. - (void)windowDidResignKey:(id)fp8;
  275. - (BOOL)shouldCloseDocument;
  276. - (id)replaceTabSwitcher:(id)fp8;
  277. - (void)releaseTabSwitcher:(id)fp8;
  278. - (void)releaseTabSwitchersForBackForward;
  279. - (void)replaceTabURLs:(id)fp8 usingTabLabelsFromBookmarks:(id)fp12;
  280. - (void)updateTabLabelForWebView:(id)fp8;
  281. - (void)webViewSheetRequestStatusHasChanged:(id)fp8;
  282. - (void)webViewLoadingStatusHasChanged:(id)fp8;
  283. - (id)orderedTabs;
  284. - (void)tabBarView:(id)fp8 performDragOperationForTabViewItem:(id)fp12 URL:(id)fp16;
  285. - (void)tabBarView:(id)fp8 performDragOperationForURL:(id)fp12 droppedOnRightSide:(BOOL)fp16;
  286. - (void)setUpStatusBar;
  287. - (void)toggleStatusBarWithAnimation:(BOOL)fp8;
  288. - (void)toggleStatusBar:(id)fp8;
  289. - (id)_defaultStatus;
  290. - (void)clearStatus;
  291. - (void)setStatusMessageNow;
  292. - (void)setStatusMessage:(id)fp8 ellipsize:(BOOL)fp12;
  293. - (void)updateStatusMessage;
  294. - (void)webViewStatusMessageHasChanged:(id)fp8;
  295. - (BOOL)isStatusBarVisible;
  296. - (void)setStatusBarVisible:(BOOL)fp8;
  297. - (BOOL)acceptsGenericIcon;
  298. - (void)setAcceptsGenericIcon:(BOOL)fp8;
  299. - (void)updateLocationFieldIconNow;
  300. - (void)updateLocationFieldIconSoon;
  301. - (void)controlTextDidChange:(id)fp8;
  302. - (void)controlTextDidEndEditing:(id)fp8;
  303. - (BOOL)control:(id)fp8 textView:(id)fp12 doCommandBySelector:(SEL)fp16;
  304. - (void)updatePopUpCheckmark:(id)fp8;
  305. - (float)splitView:(id)fp8 constrainMaxCoordinate:(float)fp12 ofSubviewAt:(int)fp16;
  306. - (float)splitView:(id)fp8 constrainMinCoordinate:(float)fp12 ofSubviewAt:(int)fp16;
  307. - (float)rememberCurrentInputFieldWidthRatioForSplitView:(id)fp8;
  308. - (void)splitViewDidResizeSubviews:(id)fp8;
  309. - (void)splitView:(id)fp8 resizeSubviewsWithOldSize:(struct _NSSize)fp12;
  310. - (id)targetForSearch;
  311. - (BOOL)goToBookmarks;
  312. - (void)goBack:(id)fp8;
  313. - (void)goForward:(id)fp8;
  314. - (BOOL)canGoBack;
  315. - (BOOL)canGoForward;
  316. - (id)backListMenuForButton:(id)fp8;
  317. - (id)forwardListMenuForButton:(id)fp8;
  318. - (BOOL)canOpenInDashboard;
  319. - (BOOL)canAddBookmark;
  320. - (BOOL)canGoHome;
  321. - (BOOL)canAutoFill;
  322. - (BOOL)canPrintFromToolbar;
  323. - (void)goHome:(id)fp8;
  324. - (void)openInDashboard:(id)fp8;
  325. - (void)addBookmark:(id)fp8;
  326. - (BOOL)canToggleShowSearchField;
  327. - (void)toggleShowGoogleSearch:(id)fp8;
  328. - (BOOL)canReloadObeyingLocationField;
  329. - (BOOL)canReloadTab:(id)fp8;
  330. - (BOOL)canReloadAllTabs;
  331. - (BOOL)validateUserInterfaceItem:(id)fp8;
  332. - (BOOL)validateMenuItem:(id)fp8;
  333. - (void)changeTextEncoding:(id)fp8;
  334. - (void)setSearchFieldText:(id)fp8;
  335. - (id)searchFieldText;
  336. - (void)searchForString:(id)fp8;
  337. - (void)chooseSearchString:(id)fp8;
  338. - (void)recentSearchesCleared:(id)fp8;
  339. - (void)textFieldWithControlsPerformRightButtonAction:(id)fp8;
  340. - (void)textFieldWithControlsPerformRightButton2Action:(id)fp8;
  341. - (void)textFieldWithControls:(id)fp8 mouseUpInRightButton:(id)fp12;
  342. - (void)textFieldWithControls:(id)fp8 mouseUpInRightButton2:(id)fp12;
  343. - (id)bookmarkTitleForLocationField:(id)fp8;
  344. - (void)setProgressBarValue:(double)fp8;
  345. - (void)updateProgressBarNow;
  346. - (void)performCoalescedUpdates;
  347. - (void)performCoalescedUpdateSoon:(int)fp8;
  348. - (void)cancelCoalescedUpdate:(int)fp8;
  349. - (void)updateProgressBarSoon;
  350. - (void)updateProgressBar:(BOOL)fp8;
  351. - (void)showCompleteProgressBarNow;
  352. - (void)showCompleteProgressBarSoon;
  353. - (void)clearProgressBar;
  354. - (void)webViewProgressFinished:(id)fp8;
  355. - (void)tellUserThatAppIsHosed;
  356. - (void)showWindow:(id)fp8;
  357. - (void)makeTextLarger:(id)fp8;
  358. - (void)makeTextSmaller:(id)fp8;
  359. - (void)reportBugToApple:(id)fp8;
  360. - (void)printFromToolbar:(id)fp8;
  361. - (void)autoFill:(id)fp8;
  362.  
  363. @end