WebSurf/frontends/gnustep/BrowserWindowController.h

79 lines
2.4 KiB
C
Raw Normal View History

/* All Rights reserved */
2020-12-05 06:07:25 -08:00
#import <AppKit/AppKit.h>
#import "netsurf/netsurf.h"
#import "netsurf/mouse.h"
#import "Website.h"
#import "Preferences.h"
#import "VerticalTabsView.h"
2021-03-22 13:04:22 -07:00
#import "UrlSuggestionView.h"
struct browser_window;
2022-02-10 00:54:37 -08:00
struct form_control;
@interface BrowserWindowController : NSWindowController<NSTextFieldDelegate, VerticalTabsViewDelegate> {
id backButton;
id forwardButton;
id urlBar;
2021-02-17 13:04:38 -08:00
id tabView;
id refreshButton;
2020-12-05 07:43:34 -08:00
id caretView;
2020-12-05 06:07:25 -08:00
enum gui_pointer_shape lastRequestedPointer;
id searchBar;
id searchImage;
2021-04-08 12:47:23 -07:00
id searchLabel;
2021-02-17 13:04:38 -08:00
NSMutableArray *tabs;
BOOL isClosing;
id activeTab;
2021-03-04 12:00:54 -08:00
id verticalTabsView;
TabLocation currentTabLocation;
2021-03-22 13:04:22 -07:00
UrlSuggestionView *urlSuggestionView;
2021-02-17 13:04:38 -08:00
// These three are set based on the currently focused tab.
id scrollView;
id plotView;
struct browser_window *browser;
}
2020-11-14 13:45:05 -08:00
-(id)initWithBrowser: (struct browser_window*)aBrowser;
-(void)back: (id)sender;
-(void)forward: (id)sender;
-(void)stopOrRefresh: (id)sender;
-(NSString*)visibleUrl;
-(void)enterSearch: (id)sender;
-(void)openWebsite: (Website*)aWebsite;
-(void)newTab: (id)sender;
// Returns a tab identifier that must be provided to some of the below messages.
-(id)newTabWithBrowser: (struct browser_window*)aBrowser;
-(void)close: (id)sender;
-(id)initialTabId;
2020-11-21 07:53:14 -08:00
// Browser control
-(NSSize)getBrowserSizeForTab: (id)tab;
-(NSPoint)getBrowserScrollForTab: (id)tab;
-(void)setBrowserScroll: (NSPoint)scroll forTab: (id)tab;
-(void)invalidateBrowserForTab: (id)tab;
-(void)invalidateBrowser: (NSRect)rect forTab: (id)tab;
-(void)updateBrowserExtentForTab: (id)tab;
-(void)placeCaretAtX: (int)x y: (int)y height: (int)height inTab: (id)tab;
-(void)removeCaretInTab: (id)tab;
2020-12-05 06:07:25 -08:00
-(void)setPointerToShape: (enum gui_pointer_shape)shape;
-(void)newContentForTab: (id)tab;
-(void)setNavigationUrl: (NSString*)urlString forTab: (id)tab;
-(void)setTitle: (NSString*)title forTab: (id)tab;
-(void)netsurfWindowDestroyForTab: (id)tab;
2020-12-02 11:48:59 -08:00
-(void)startThrobber;
-(void)stopThrobber;
2020-12-14 13:27:23 -08:00
-(void)findNext: (NSString*)needle matchCase: (BOOL)matchCase sender: (id)sender;
-(void)findPrevious: (NSString*)needle matchCase: (BOOL)matchCase sender: (id)sender;
-(void)showAll: (NSString*)needle matchCase: (BOOL)matchCase sender: (id)sender;
-(void)bookmarkPage: (id)sender;
2020-12-14 13:27:23 -08:00
2022-02-10 00:54:37 -08:00
-(void)showDropdownMenuWithOptions: (NSArray*)options atLocation: (NSPoint)location inTab: (id)tab control: (struct form_control*)control;
+(id)newTabTarget;
@end