21#define __STDBOOL_H__ 1
41#include <ScrollView.h>
43#include <StringView.h>
44#include <TextControl.h>
88#define TOOLBAR_HEIGHT 32
89#define DRAGGER_WIDTH 8
153 char app[B_PATH_NAME_LENGTH];
169extern int main(
int argc,
char** argv);
181 const char* label,
const char* initialText,
184 = B_FOLLOW_LEFT | B_FOLLOW_TOP,
186 = B_WILL_DRAW | B_NAVIGABLE | B_DRAW_ON_CHILDREN);
189virtual void FrameResized(
float newWidth,
float newHeight);
190virtual void Draw(BRect updateRect);
204 const char* label,
const char* initialText,
208 : BTextControl(frame, name, label, initialText, message, resizeMode, flags),
231 BTextControl::FrameResized(newWidth, newHeight);
240 BTextControl::Draw(updateRect);
247 BTextControl::DrawAfterChildren(updateRect);
251 SetDrawingMode(B_OP_ALPHA);
262 BTextControl::AttachedToWindow();
285 BRect r(TextView()->TextRect());
291 r.left += r.bottom - r.top;
292 TextView()->SetTextRect(r);
306virtual void MouseUp(BPoint where);
308 const BMessage* dragMessage);
310virtual void Draw(BRect updateRect);
321 : BView(frame,
"NSResizeKnob", B_FOLLOW_BOTTOM | B_FOLLOW_RIGHT, B_WILL_DRAW),
326 SetViewColor(0, 255, 0);
338 SetMouseEventMask(B_POINTER_EVENTS,
339 B_NO_POINTER_HISTORY | B_LOCK_WINDOW_FOCUS);
353 const BMessage* dragMessage)
386virtual void Draw(BRect updateRect);
394 : BView(frame,
"NSThrobber", B_FOLLOW_TOP | B_FOLLOW_RIGHT, B_WILL_DRAW),
408 BView::MessageReceived(message);
433 : BView(frame,
"NetSurf", B_FOLLOW_ALL_SIDES,
450 BMessage *message =
new BMessage(B_QUIT_REQUESTED);
454 status_t status = -1;
463 switch (message->what) {
465 case B_ABOUT_REQUESTED:
466 case B_ARGV_RECEIVED:
467 case B_REFS_RECEIVED:
475 case B_NETPOSITIVE_OPEN_URL:
476 case B_NETPOSITIVE_BACK:
477 case B_NETPOSITIVE_FORWARD:
478 case B_NETPOSITIVE_HOME:
479 case B_NETPOSITIVE_RELOAD:
480 case B_NETPOSITIVE_STOP:
481 case B_NETPOSITIVE_DOWN:
482 case B_NETPOSITIVE_UP:
568 Window()->DetachCurrentMessage();
573 BView::MessageReceived(message);
584 err = BView::Archive(archive, deep);
589 archive->AddString(
"add_on",
"application/x-vnd.NetSurf");
592 archive->AddBool(
"openAsText",
false);
593 archive->AddInt32(
"encoding", 258);
601 if (!validate_instantiation(archive,
"NSBaseView"))
604 if (archive->FindString(
"url", &url) < B_OK
605 || url == NULL || strlen(url) == 0) {
616 info->
args[1] = (
char *)info->
url.String();
617 info->
args[2] = NULL;
629 "NetSurf Main Thread", B_NORMAL_PRIORITY, info);
656 BView::AllAttached();
668 rgb_color c = ui_color(B_PANEL_BACKGROUND_COLOR);
688 g->dragger->SetViewColor(c);
693#if defined(__HAIKU__) || defined(B_DANO_VERSION)
703 : BWindow(frame,
"NetSurf", B_DOCUMENT_WINDOW, 0),
720 switch (message->what) {
722 msg =
new BMessage(*message);
726 BWindow::DispatchMessage(message, handler);
733 switch (message->what) {
734 case B_ARGV_RECEIVED:
735 case B_REFS_RECEIVED:
738 case B_NETPOSITIVE_OPEN_URL:
739 case B_NETPOSITIVE_BACK:
740 case B_NETPOSITIVE_FORWARD:
741 case B_NETPOSITIVE_HOME:
742 case B_NETPOSITIVE_RELOAD:
743 case B_NETPOSITIVE_STOP:
744 case B_NETPOSITIVE_DOWN:
745 case B_NETPOSITIVE_UP:
746 DetachCurrentMessage();
750 BWindow::MessageReceived(message);
757 BWindow::QuitRequested();
758 BMessage *message = DetachCurrentMessage();
761 message =
new BMessage(B_QUIT_REQUESTED);
820 rgb_color c = ui_color(B_PANEL_BACKGROUND_COLOR);
835 g->dragger->SetViewColor(c);
840#if defined(__HAIKU__) || defined(B_DANO_VERSION)
855 bool reloadAll =
false;
858 "nsbeos_scaffolding_dispatch_event() what = 0x%08lx",
860 switch (message->what) {
861 case B_QUIT_REQUESTED:
864 case B_ABOUT_REQUESTED:
869 case B_NETPOSITIVE_DOWN:
874 if (!message->HasRef(
"refs")) {
881 case B_REFS_RECEIVED:
886 for (i = 0; message->FindRef(
"refs", i, &ref) >= B_OK; i++) {
887 BString url(
"file://");
889 if (
path.InitCheck() < B_OK)
892 BNode node(
path.Path());
893 if (node.InitCheck() < B_OK)
895 if (node.IsSymLink()) {
897 BEntry entry(
path.Path(),
true);
898 if (entry.InitCheck() < B_OK)
900 if (entry.GetPath(&
path) < B_OK)
902 if (node.SetTo(
path.Path()) < B_OK)
907 if (node.GetAttrInfo(
"META:url", &ai) >= B_OK) {
908 char data[(size_t)ai.size + 1];
909 memset(data, 0, (
size_t)ai.size + 1);
910 if (node.ReadAttr(
"META:url", B_STRING_TYPE, 0LL, data, (
size_t)ai.size) < 4)
941 case B_ARGV_RECEIVED:
948 for (i = 1; message->FindString(
"argv", i, &urltxt) >= B_OK; i++) {
968 case B_NETPOSITIVE_OPEN_URL:
971 if (message->FindString(
"be:url", &url) < B_OK)
1002 NSLOG(netsurf, INFO,
"Selecting all text");
1005 case B_NETPOSITIVE_BACK:
1013 case B_NETPOSITIVE_FORWARD:
1021 case B_NETPOSITIVE_STOP:
1026 case B_NETPOSITIVE_RELOAD:
1034 case B_NETPOSITIVE_HOME:
1041 static const char *addr = NETSURF_HOMEPAGE;
1068 if (!scaffold->
url_bar->LockLooper())
1073 scaffold->
url_bar->UnlockLooper();
1093 if (!scaffold->
url_bar->LockLooper())
1096 scaffold->
url_bar->UnlockLooper();
1111 find_resource(t,
"SearchEngines",
"./beos/res/SearchEngines");
1165 const char *goto_url =
"about:credits";
1183 const char *goto_url =
"about:licence";
1231 if (!scaffold->
url_bar->LockLooper())
1234 scaffold->
url_bar->UnlockLooper();
1298 case B_NETPOSITIVE_UP:
1302 if (!scaffold->
url_bar->LockLooper())
1304 scaffold->
url_bar->MakeFocus();
1305 scaffold->
url_bar->UnlockLooper();
1364 NSLOG(netsurf, INFO,
"Being Destroyed = %d",
1411 if (!be_app || !be_app->Lock())
1413 for (i = be_app->CountWindows() - 1; i >= 0; i--) {
1414 if (be_app->WindowAt(i) == NULL)
1440 menu->SetTargetForItems(handler);
1441 for (
int i = 0; menu->ItemAt(i); i++) {
1442 if (!menu->SubmenuAt(i))
1450 NSLOG(netsurf, INFO,
"Attaching view to scaffolding %p", g);
1460 rect.right -= B_V_SCROLL_BAR_WIDTH;
1461 rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
1468 B_FOLLOW_ALL, 0,
true,
true, B_NO_BORDER);
1475 frame.left = frame.right - B_V_SCROLL_BAR_WIDTH;
1476 frame.top = frame.bottom - B_H_SCROLL_BAR_HEIGHT;
1486 BScrollBar *sb = g->
scroll_view->ScrollBar(B_HORIZONTAL);
1488 float divider =
rect.Width() + 1;
1490 divider *= 67.0/100;
1492 sb->ResizeBy(-divider, 0);
1493 sb->MoveBy(divider, 0);
1495 rect.right =
rect.left + divider - 1;
1507 g->
status_bar->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
1508 g->
status_bar->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
1509#if defined(__HAIKU__) || defined(B_DANO_VERSION)
1538 message =
new BMessage(
'back');
1539 message->AddPointer(
"scaffolding", g);
1540 g->
window->AddShortcut(B_LEFT_ARROW, 0, message,
view);
1542 message =
new BMessage(
'forw');
1543 message->AddPointer(
"scaffolding", g);
1544 g->
window->AddShortcut(B_RIGHT_ARROW, 0, message,
view);
1546 message =
new BMessage(
'stop');
1547 message->AddPointer(
"scaffolding", g);
1548 g->
window->AddShortcut(
'S', 0, message,
view);
1550 message =
new BMessage(
'relo');
1551 message->AddPointer(
"scaffolding", g);
1552 g->
window->AddShortcut(
'R', 0, message,
view);
1554 message =
new BMessage(
'home');
1555 message->AddPointer(
"scaffolding", g);
1556 g->
window->AddShortcut(
'H', 0, message,
view);
1559#if defined(__HAIKU__)
1580static BMenuItem *
make_menu_item(
const char *name, BMessage *message,
bool enabled=
false)
1584 BString accelKey(name);
1585 accelKey +=
"Accel";
1587 if (accel == accelKey)
1592 if (!accel.IsEmpty()) {
1593 if (accel.FindFirst(
"\xe2\x87\x91") > -1) {
1594 accel.RemoveFirst(
"\xe2\x87\x91");
1595 mods |= B_SHIFT_KEY;
1597 if (accel.FindFirst(
"^") > -1) {
1598 accel.RemoveFirst(
"^");
1599 mods |= B_CONTROL_KEY;
1601 if (accel.FindFirst(
"PRINT") > -1) {
1602 accel.RemoveFirst(
"PRINT");
1608 accel.ReplaceAll(
"\xE2\x86\x90", (BString()+=B_LEFT_ARROW).String());
1609 accel.ReplaceAll(
"\xE2\x86\x92", (BString()+=B_RIGHT_ARROW).String());
1610 accel.ReplaceAll(
"\xE2\x86\x91", (BString()+=B_UP_ARROW).String());
1612 if (accel.Length() > 1 && accel[0] ==
'F') {
1614 if (sscanf(accel.String(),
"F%d", &num) > 0) {
1617 }
else if (accel.Length() > 0) {
1624 label.ReplaceAll(
"...", B_UTF8_ELLIPSIS);
1626 item =
new BMenuItem(label.String(), message, key, mods);
1628 item->SetEnabled(enabled);
1641 void Draw(BRect updateRect);
1651 : BButton(
rect, name, label, message)
1667 BButton::Draw(updateRect);
1671 SetDrawingMode(B_OP_COPY);
1672 FillRect(updateRect, B_SOLID_LOW);
1673 rgb_color color = LowColor();
1675 SetDrawingMode(B_OP_ALPHA);
1679 DrawBitmap(
fBitmap, BPoint(1, 1));
1682 DrawBitmap(
fBitmap, BPoint(0, 0));
1693 const void* data =
gAppResources->LoadResource(
'VICN', attrname, &size);
1696 printf(
"CANT LOAD RESOURCE %s\n", attrname);
1700 fBitmap =
new BBitmap(BRect(0, 0, 32, 32), B_RGB32);
1701 status_t status = BIconUtils::GetVectorIcon((
const uint8*)data, size,
fBitmap);
1703 if(status != B_OK) {
1704 fprintf(stderr,
"%s > oops %s\n", attrname, strerror(status));
1713 *pixel = tint_color(*pixel, B_DISABLED_MARK_TINT);
1728 NSLOG(netsurf, INFO,
1729 "Constructing a scaffold of %p for gui_window %p", g, toplevel);
1745 beos_warn_user(
"Error: No subwindow allowed when replicated.", NULL);
1751 BRect frame(0, 0, 600-1, 500-1);
1760 pos = win->Frame().LeftTop();
1761 win->UnlockLooper();
1763 pos += BPoint(20, 20);
1765 BRect screenFrame(screen.Frame());
1766 if (pos.y + frame.Height() >= screenFrame.Height()) {
1770 if (pos.x + frame.Width() >= screenFrame.Width()) {
1774 frame.OffsetToSelf(pos);
1779 rect = frame.OffsetToCopy(0,0);
1794 message =
new BMessage(B_ABOUT_REQUESTED);
1796 menu->AddItem(item);
1801 menu->AddItem(item);
1804 menu->AddItem(submenu);
1808 submenu->AddItem(item);
1812 menu->AddItem(item);
1817 menu->AddItem(item);
1827 menu->AddItem(item);
1831 menu->AddItem(item);
1835 menu->AddItem(item);
1838 menu->AddItem(submenu);
1848 submenu->AddItem(item);
1852 menu->AddItem(submenu);
1857 submenu->AddItem(item);
1862 menu->AddItem(item);
1867 menu->AddItem(item);
1871 menu->AddItem(item);
1881 menu->AddItem(item);
1885 menu->AddItem(item);
1890 menu->AddItem(item);
1900 menu->AddItem(item);
1904 menu->AddItem(item);
1908 menu->AddItem(item);
1912 menu->AddItem(item);
1916 menu->AddItem(item);
1920 menu->AddItem(item);
1930 menu->AddItem(item);
1933 menu->AddItem(submenu);
1937 submenu->AddItem(item);
1941 submenu->AddItem(item);
1945 menu->AddItem(submenu);
1946 submenu->SetEnabled(
false);
1950 submenu->AddItem(item);
1954 submenu->AddItem(item);
1958 submenu->AddItem(item);
1962 submenu->AddItem(item);
1966 menu->AddItem(submenu);
1970 submenu->AddItem(item);
1974 submenu->AddItem(item);
1979 menu->AddItem(item);
1989 menu->AddItem(submenu);
1993 submenu->AddItem(item);
1997 submenu->AddItem(item);
2001 menu->AddItem(submenu);
2005 submenu->AddItem(item);
2009 submenu->AddItem(item);
2014 menu->AddItem(item);
2019 menu->AddItem(item);
2022 menu->AddItem(submenu);
2026 submenu->AddItem(item);
2030 submenu->AddItem(item);
2034 submenu->AddItem(item);
2038 submenu->AddItem(item);
2050 menu->AddItem(item);
2054 menu->AddItem(item);
2058 menu->AddItem(item);
2063 menu->AddItem(item);
2067 menu->AddItem(item);
2072 menu->AddItem(item);
2076 rect = frame.OffsetToCopy(0,0);
2090 g->
popup_menu =
new BPopUpMenu(
"popup",
false,
false);
2108#ifdef ENABLE_DRAGGER
2116 B_FOLLOW_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW);
2118 g->dragger->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
2119 g->dragger->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
2130#ifdef ENABLE_DRAGGER
2136 B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS
2137 | B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE_JUMP, B_PLAIN_BORDER);
2139 g->
tool_bar->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
2140 g->
tool_bar->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
2145 rect.InsetBySelf(5, 5);
2146 rect.OffsetBySelf(0, -1);
2149 message =
new BMessage(
'back');
2150 message->AddPointer(
"scaffolding", g);
2156 message =
new BMessage(
'forw');
2157 message->AddPointer(
"scaffolding", g);
2163 message =
new BMessage(
'stop');
2164 message->AddPointer(
"scaffolding", g);
2170 message =
new BMessage(
'relo');
2171 message->AddPointer(
"scaffolding", g);
2177 message =
new BMessage(
'home');
2178 message->AddPointer(
"scaffolding", g);
2188 rect.InsetBySelf(5, 5);
2189 message =
new BMessage(
'urle');
2190 message->AddPointer(
"scaffolding", g);
2192 B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
2205 message =
new BMessage(
'sear');
2206 message->AddPointer(
"scaffolding", g);
2208 "Search" B_UTF8_ELLIPSIS, message, B_FOLLOW_RIGHT | B_FOLLOW_TOP);
2213 rect.Set(0, 0, 24, 24);
2220 g->
throbber->SetDrawingMode(B_OP_ALPHA);
2221 g->
throbber->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
2228 BString status(
"NetSurf");
2230 g->
status_bar =
new BStringView(BRect(0,0,-1,-1),
"StatusBar",
2231 status.String(), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
2261 g->
window->SetTitle(nt.String());
2275 if (
text == NULL ||
text[0] ==
'\0')
2277 BString status(
"NetSurf");
2378 for (
int i = 0; scaffold->
popup_menu->ItemAt(i); i++) {
2379 scaffold->
popup_menu->ItemAt(i)->SetEnabled(enabled);
2382 scaffold->
popup_menu->Go(screenWhere,
true,
false,
true);
void nsbeos_about(struct gui_window *gui)
Creates the about alert.
static struct s_view view
#define B_UI_SETTINGS_CHANGED
@ BROWSER_NAVIGATE_FORWARD
@ BROWSER_OBJECT_EXPORT_SPRITE
@ BROWSER_OBJECT_SAVE_URL_URI
@ BROWSER_IMAGES_BACKGROUND
@ BROWSER_NAVIGATE_RELOAD
@ BROWSER_OBJECT_SAVE_URL_URL
@ BROWSER_NAVIGATE_RELOAD_ALL
@ BROWSER_IMAGES_FOREGROUND
@ BROWSER_OBJECT_SAVE_URL_TEXT
@ HELP_LAUNCH_INTERACTIVE
BBitmap * nsbeos_bitmap_get_primary(struct bitmap *bitmap)
The primary image associated with this bitmap object.
nserror browser_window_history_forward(struct browser_window *bw, bool new_window)
Go forward in the history.
bool browser_window_history_forward_available(struct browser_window *bw)
Check whether it is pssible to go forwards in the history.
bool browser_window_history_back_available(struct browser_window *bw)
Check whether it is pssible to go back in the history.
nserror browser_window_history_back(struct browser_window *bw, bool new_window)
Go back in the history.
Interface to browser history operations.
Browser window creation and manipulation interface.
nserror browser_window_get_features(struct browser_window *bw, int x, int y, struct browser_window_features *data)
Get access to any page features at the given coordinates.
nserror browser_window_navigate(struct browser_window *bw, struct nsurl *url, struct nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, struct hlcache_handle *parent)
Start fetching a page in a browser window.
bool browser_window_has_content(struct browser_window *bw)
Find out if a browser window is currently showing a content.
nserror browser_window_reload(struct browser_window *bw, bool all)
Reload the page in a browser window.
nserror browser_window_create(enum browser_window_create_flags flags, struct nsurl *url, struct nsurl *referrer, struct browser_window *existing, struct browser_window **bw)
Create and open a new root browser window with the given page.
void browser_window_stop(struct browser_window *bw)
Stop all fetching activity in a browser window.
struct hlcache_handle * browser_window_get_content(struct browser_window *bw)
Get a cache handle for the content within a browser window.
browser_window_create_flags
flags to browser_window_create
@ BW_CREATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
@ BW_CREATE_TAB
New gui_window to be tab in same window as "existing" gui_window.
@ BW_CREATE_CLONE
New gui_window to be clone of "existing" gui_window.
browser_window_nav_flags
flags to browser_window_navigate
@ BW_NAVIGATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
@ BW_NAVIGATE_UNVERIFIABLE
Transation not caused by user interaction (e.g.
status_t AddWindow(const BWindow *window)
virtual status_t Archive(BMessage *archive, bool deep=true) const
virtual void MessageReceived(BMessage *message)
static BArchivable * Instantiate(BMessage *archive)
struct beos_scaffolding * fScaffolding
void SetScaffolding(struct beos_scaffolding *scaf)
virtual void AllAttached(void)
virtual bool QuitRequested(void)
virtual void DispatchMessage(BMessage *message, BHandler *handler)
NSBrowserWindow(BRect frame, struct beos_scaffolding *scaf)
static BWindow * activeWindow
struct beos_scaffolding * fScaffolding
void WindowActivated(bool active)
virtual ~NSBrowserWindow()
virtual void MessageReceived(BMessage *message)
virtual void AttachedToWindow()
virtual void FrameResized(float newWidth, float newHeight)
void SetBitmap(const BBitmap *bitmap)
virtual void Draw(BRect updateRect)
const BBitmap * fIconBitmap
virtual ~NSIconTextControl()
NSIconTextControl(BRect frame, const char *name, const char *label, const char *initialText, BMessage *message, uint32 resizeMode=B_FOLLOW_LEFT|B_FOLLOW_TOP, uint32 flags=B_WILL_DRAW|B_NAVIGABLE|B_DRAW_ON_CHILDREN)
virtual void DrawAfterChildren(BRect updateRect)
void SetBitmap(const BBitmap *bitmap)
virtual void MouseUp(BPoint where)
virtual void MouseDown(BPoint where)
virtual void MouseMoved(BPoint where, uint32 code, const BMessage *dragMessage)
NSResizeKnob(BRect frame, BView *target)
virtual void Draw(BRect updateRect)
virtual void MessageReceived(BMessage *message)
virtual void Draw(BRect updateRect)
void SetBitmap(const BBitmap *bitmap)
Declaration of content enumerations.
void nsbeos_cookies_init(void)
Creates the Cookie Manager.
Browseing window text search interface.
nserror search_web_omni(const char *term, enum search_web_omni_flags flags, struct nsurl **url_out)
Generate a nsurl from a search term.
nserror search_web_init(const char *provider_fname)
Initialise the web search operations.
nserror search_web_finalise(void)
Finalise the web search operations freeing all resources.
nserror
Enumeration of error codes.
Target independent plotting (BeOS interface).
void nsbeos_gui_view_source(struct hlcache_handle *content)
Send the source of a content to a text editor.
image_id nsbeos_find_app_path(char *path)
void nsbeos_gui_poll(void)
int gui_init_replicant(int argc, char **argv)
called when replicated from NSBaseView::Instantiate()
void nsbeos_pipe_message_top(BMessage *message, BWindow *_this, struct beos_scaffolding *scaffold)
char * find_resource(char *buf, const char *filename, const char *def)
Locate a shared resource file by searching known places in order.
bool replicated
if we are running as a replicant
nserror beos_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
void nsbeos_update_system_ui_colors(void)
#define B_PANEL_TEXT_COLOR
Interface to platform-specific clipboard operations.
Public content interface.
struct bitmap * content_get_bitmap(struct hlcache_handle *h)
Retrieve the bitmap contained in an image content.
void content_invalidate_reuse_data(struct hlcache_handle *h)
Invalidate content reuse data.
Target independent plotting interface.
Interface to key press operations.
bool browser_window_key_press(struct browser_window *bw, uint32_t key)
Handle key presses in a browser window.
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get_errorcode(nserror code)
lookup of a message by errorcode from the standard Messages hash.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
NetSurf core interface registration, construction and destruction.
void netsurf_exit(void)
Finalise NetSurf core.
NetSurf URL handling (interface).
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
struct nsurl nsurl
NetSurf URL object.
static void nsbeos_scaffolding_update_colors(nsbeos_scaffolding *g)
void nsbeos_scaffolding_popup_menu(nsbeos_scaffolding *scaffold, struct browser_window *bw, BPoint where, BPoint screenWhere)
BResources * gAppResources
nsbeos_scaffolding * nsbeos_new_scaffolding(struct gui_window *toplevel)
nserror gui_window_set_url(struct gui_window *gw, nsurl *url)
void gui_window_start_throbber(struct gui_window *_g)
static void nsbeos_throb(void *)
NSBaseView * nsbeos_get_baseview_for_scaffolding(nsbeos_scaffolding *scaffold)
void nsbeos_scaffolding_destroy(nsbeos_scaffolding *scaffold)
int main(int argc, char **argv)
Normal entry point from OS.
void gui_window_set_status(struct gui_window *_g, const char *text)
static sem_id replicant_done_sem
static void nsbeos_window_destroy_event(NSBrowserWindow *window, nsbeos_scaffolding *g, BMessage *event)
static BMenuItem * make_menu_item(const char *name, BMessage *message, bool enabled=false)
NSBrowserWindow * nsbeos_find_last_window(void)
static int32 nsbeos_replicant_main_thread(void *_arg)
void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *message)
void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon)
add retrieved favicon to the gui
NSBrowserWindow * nsbeos_get_bwindow_for_scaffolding(nsbeos_scaffolding *scaffold)
static int open_windows
current number of open browsers
static thread_id replicant_thread
static void nsbeos_window_update_back_forward(struct beos_scaffolding *)
static NSBaseView * replicant_view
if not NULL, the replicant View we are running NetSurf for
static void recursively_set_menu_items_target(BMenu *menu, BHandler *handler)
void gui_window_stop_throbber(struct gui_window *_g)
void nsbeos_attach_toplevel_view(nsbeos_scaffolding *g, BView *view)
void gui_window_set_title(struct gui_window *_g, const char *title)
nserror beos_schedule(int t, void(*callback)(void *p), void *p)
core web search facilities interface.
@ SEARCH_WEB_OMNI_SEARCHONLY
The search does not attempt to interpret the url as a url before using it as a search term.
Interface to utility string handling.
struct beos_scaffolding * g
BControl * forward_button
struct beos_history_window * history_window
struct gui_window * top_level
NSIconTextControl * url_bar
struct hlcache_handle * current_menu_object
Object under menu, or 0 if no object.
BScrollView * scroll_view
BTextControl * search_bar
RISC OS wimp toolkit bitmap.
Page features at a specific spatial location.
struct hlcache_handle * object
Object at position or NULL.
struct browser_window * bw
first entry in window list
int nframes
Number of frames in the throbber.
char app[B_PATH_NAME_LENGTH]
struct rect rect
Rectangle coordinates.
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
#define nsoption_int(OPTION)
Get the value of an integer option.
Interface to a number of general purpose functionality.
Version information interface.
nsbeos_scaffolding * nsbeos_get_scaffold(struct gui_window *g)
Get containing scaffold of a beos gui window.
void nsbeos_window_destroy_browser(struct gui_window *g)
struct browser_window * nsbeos_get_browser_for_gui(struct gui_window *g)
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
static nserror bitmap(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
Plot a bitmap.
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.