21#define __STDBOOL_H__ 1
41#include <ScrollView.h>
43#include <StringView.h>
44#include <TextControl.h>
89#define TOOLBAR_HEIGHT 32
90#define DRAGGER_WIDTH 8
154 char app[B_PATH_NAME_LENGTH];
170extern int main(
int argc,
char** argv);
182 const char* label,
const char* initialText,
185 = B_FOLLOW_LEFT | B_FOLLOW_TOP,
187 = B_WILL_DRAW | B_NAVIGABLE | B_DRAW_ON_CHILDREN);
190virtual void FrameResized(
float newWidth,
float newHeight);
191virtual void Draw(BRect updateRect);
205 const char* label,
const char* initialText,
209 : BTextControl(frame, name, label, initialText, message, resizeMode, flags),
232 BTextControl::FrameResized(newWidth, newHeight);
241 BTextControl::Draw(updateRect);
248 BTextControl::DrawAfterChildren(updateRect);
252 SetDrawingMode(B_OP_ALPHA);
263 BTextControl::AttachedToWindow();
286 BRect r(TextView()->TextRect());
292 r.left += r.bottom - r.top;
293 TextView()->SetTextRect(r);
307virtual void MouseUp(BPoint where);
309 const BMessage* dragMessage);
311virtual void Draw(BRect updateRect);
322 : BView(frame,
"NSResizeKnob", B_FOLLOW_BOTTOM | B_FOLLOW_RIGHT, B_WILL_DRAW),
327 SetViewColor(0, 255, 0);
339 SetMouseEventMask(B_POINTER_EVENTS,
340 B_NO_POINTER_HISTORY | B_LOCK_WINDOW_FOCUS);
354 const BMessage* dragMessage)
387virtual void Draw(BRect updateRect);
395 : BView(frame,
"NSThrobber", B_FOLLOW_TOP | B_FOLLOW_RIGHT, B_WILL_DRAW),
409 BView::MessageReceived(message);
434 : BView(frame,
"NetSurf", B_FOLLOW_ALL_SIDES,
451 BMessage *message =
new BMessage(B_QUIT_REQUESTED);
455 status_t status = -1;
464 switch (message->what) {
466 case B_ABOUT_REQUESTED:
467 case B_ARGV_RECEIVED:
468 case B_REFS_RECEIVED:
476 case B_NETPOSITIVE_OPEN_URL:
477 case B_NETPOSITIVE_BACK:
478 case B_NETPOSITIVE_FORWARD:
479 case B_NETPOSITIVE_HOME:
480 case B_NETPOSITIVE_RELOAD:
481 case B_NETPOSITIVE_STOP:
482 case B_NETPOSITIVE_DOWN:
483 case B_NETPOSITIVE_UP:
569 Window()->DetachCurrentMessage();
574 BView::MessageReceived(message);
585 err = BView::Archive(archive, deep);
590 archive->AddString(
"add_on",
"application/x-vnd.NetSurf");
593 archive->AddBool(
"openAsText",
false);
594 archive->AddInt32(
"encoding", 258);
602 if (!validate_instantiation(archive,
"NSBaseView"))
605 if (archive->FindString(
"url", &url) < B_OK
606 || url == NULL || strlen(url) == 0) {
617 info->
args[1] = (
char *)info->
url.String();
618 info->
args[2] = NULL;
630 "NetSurf Main Thread", B_NORMAL_PRIORITY, info);
657 BView::AllAttached();
669 rgb_color c = ui_color(B_PANEL_BACKGROUND_COLOR);
689 g->dragger->SetViewColor(c);
694#if defined(__HAIKU__) || defined(B_DANO_VERSION)
704 : BWindow(frame,
"NetSurf", B_DOCUMENT_WINDOW, 0),
721 switch (message->what) {
723 msg =
new BMessage(*message);
727 BWindow::DispatchMessage(message, handler);
734 switch (message->what) {
735 case B_ARGV_RECEIVED:
736 case B_REFS_RECEIVED:
739 case B_NETPOSITIVE_OPEN_URL:
740 case B_NETPOSITIVE_BACK:
741 case B_NETPOSITIVE_FORWARD:
742 case B_NETPOSITIVE_HOME:
743 case B_NETPOSITIVE_RELOAD:
744 case B_NETPOSITIVE_STOP:
745 case B_NETPOSITIVE_DOWN:
746 case B_NETPOSITIVE_UP:
747 DetachCurrentMessage();
751 BWindow::MessageReceived(message);
758 BWindow::QuitRequested();
759 BMessage *message = DetachCurrentMessage();
762 message =
new BMessage(B_QUIT_REQUESTED);
821 rgb_color c = ui_color(B_PANEL_BACKGROUND_COLOR);
836 g->dragger->SetViewColor(c);
841#if defined(__HAIKU__) || defined(B_DANO_VERSION)
856 bool reloadAll =
false;
859 "nsbeos_scaffolding_dispatch_event() what = 0x%08" PRIx32,
861 switch (message->what) {
862 case B_QUIT_REQUESTED:
865 case B_ABOUT_REQUESTED:
870 case B_NETPOSITIVE_DOWN:
875 if (!message->HasRef(
"refs")) {
883 case B_REFS_RECEIVED:
888 for (i = 0; message->FindRef(
"refs", i, &ref) >= B_OK; i++) {
889 BString url(
"file://");
891 if (
path.InitCheck() < B_OK)
894 BNode node(
path.Path());
895 if (node.InitCheck() < B_OK)
897 if (node.IsSymLink()) {
899 BEntry entry(
path.Path(),
true);
900 if (entry.InitCheck() < B_OK)
902 if (entry.GetPath(&
path) < B_OK)
904 if (node.SetTo(
path.Path()) < B_OK)
909 if (node.GetAttrInfo(
"META:url", &ai) >= B_OK) {
910 char data[(size_t)ai.size + 1];
911 memset(data, 0, (
size_t)ai.size + 1);
912 if (node.ReadAttr(
"META:url", B_STRING_TYPE, 0LL, data, (
size_t)ai.size) < 4)
943 case B_ARGV_RECEIVED:
950 for (i = 1; message->FindString(
"argv", i, &urltxt) >= B_OK; i++) {
970 case B_NETPOSITIVE_OPEN_URL:
973 if (message->FindString(
"be:url", &url) < B_OK)
1004 NSLOG(netsurf, INFO,
"Selecting all text");
1007 case B_NETPOSITIVE_BACK:
1015 case B_NETPOSITIVE_FORWARD:
1023 case B_NETPOSITIVE_STOP:
1028 case B_NETPOSITIVE_RELOAD:
1036 case B_NETPOSITIVE_HOME:
1043 static const char *addr = NETSURF_HOMEPAGE;
1070 if (!scaffold->
url_bar->LockLooper())
1075 scaffold->
url_bar->UnlockLooper();
1095 if (!scaffold->
url_bar->LockLooper())
1098 scaffold->
url_bar->UnlockLooper();
1113 find_resource(t,
"SearchEngines",
"./beos/res/SearchEngines");
1167 const char *goto_url =
"about:credits";
1185 const char *goto_url =
"about:licence";
1233 if (!scaffold->
url_bar->LockLooper())
1236 scaffold->
url_bar->UnlockLooper();
1300 case B_NETPOSITIVE_UP:
1304 if (!scaffold->
url_bar->LockLooper())
1306 scaffold->
url_bar->MakeFocus();
1307 scaffold->
url_bar->UnlockLooper();
1366 NSLOG(netsurf, INFO,
"Being Destroyed = %d",
1413 if (!be_app || !be_app->Lock())
1415 for (i = be_app->CountWindows() - 1; i >= 0; i--) {
1416 if (be_app->WindowAt(i) == NULL)
1442 menu->SetTargetForItems(handler);
1443 for (
int i = 0; menu->ItemAt(i); i++) {
1444 if (!menu->SubmenuAt(i))
1452 NSLOG(netsurf, INFO,
"Attaching view to scaffolding %p", g);
1462 rect.right -= B_V_SCROLL_BAR_WIDTH;
1463 rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
1470 B_FOLLOW_ALL, 0,
true,
true, B_NO_BORDER);
1477 frame.left = frame.right - B_V_SCROLL_BAR_WIDTH;
1478 frame.top = frame.bottom - B_H_SCROLL_BAR_HEIGHT;
1488 BScrollBar *sb = g->
scroll_view->ScrollBar(B_HORIZONTAL);
1490 float divider =
rect.Width() + 1;
1492 divider *= 67.0/100;
1494 sb->ResizeBy(-divider, 0);
1495 sb->MoveBy(divider, 0);
1497 rect.right =
rect.left + divider - 1;
1509 g->
status_bar->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
1510 g->
status_bar->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
1511#if defined(__HAIKU__) || defined(B_DANO_VERSION)
1540 message =
new BMessage(
'back');
1541 message->AddPointer(
"scaffolding", g);
1542 g->
window->AddShortcut(B_LEFT_ARROW, 0, message,
view);
1544 message =
new BMessage(
'forw');
1545 message->AddPointer(
"scaffolding", g);
1546 g->
window->AddShortcut(B_RIGHT_ARROW, 0, message,
view);
1548 message =
new BMessage(
'stop');
1549 message->AddPointer(
"scaffolding", g);
1550 g->
window->AddShortcut(
'S', 0, message,
view);
1552 message =
new BMessage(
'relo');
1553 message->AddPointer(
"scaffolding", g);
1554 g->
window->AddShortcut(
'R', 0, message,
view);
1556 message =
new BMessage(
'home');
1557 message->AddPointer(
"scaffolding", g);
1558 g->
window->AddShortcut(
'H', 0, message,
view);
1561#if defined(__HAIKU__)
1582static BMenuItem *
make_menu_item(
const char *name, BMessage *message,
bool enabled=
false)
1586 BString accelKey(name);
1587 accelKey +=
"Accel";
1589 if (accel == accelKey)
1594 if (!accel.IsEmpty()) {
1595 if (accel.FindFirst(
"\xe2\x87\x91") > -1) {
1596 accel.RemoveFirst(
"\xe2\x87\x91");
1597 mods |= B_SHIFT_KEY;
1599 if (accel.FindFirst(
"^") > -1) {
1600 accel.RemoveFirst(
"^");
1601 mods |= B_CONTROL_KEY;
1603 if (accel.FindFirst(
"PRINT") > -1) {
1604 accel.RemoveFirst(
"PRINT");
1610 accel.ReplaceAll(
"\xE2\x86\x90", (BString()+=B_LEFT_ARROW).String());
1611 accel.ReplaceAll(
"\xE2\x86\x92", (BString()+=B_RIGHT_ARROW).String());
1612 accel.ReplaceAll(
"\xE2\x86\x91", (BString()+=B_UP_ARROW).String());
1614 if (accel.Length() > 1 && accel[0] ==
'F') {
1616 if (sscanf(accel.String(),
"F%d", &num) > 0) {
1619 }
else if (accel.Length() > 0) {
1626 label.ReplaceAll(
"...", B_UTF8_ELLIPSIS);
1628 item =
new BMenuItem(label.String(), message, key, mods);
1630 item->SetEnabled(enabled);
1643 void Draw(BRect updateRect);
1653 : BButton(
rect, name, label, message)
1669 BButton::Draw(updateRect);
1673 SetDrawingMode(B_OP_COPY);
1674 FillRect(updateRect, B_SOLID_LOW);
1675 rgb_color color = LowColor();
1677 SetDrawingMode(B_OP_ALPHA);
1681 DrawBitmap(
fBitmap, BPoint(1, 1));
1684 DrawBitmap(
fBitmap, BPoint(0, 0));
1695 const void* data =
gAppResources->LoadResource(
'VICN', attrname, &size);
1698 printf(
"CANT LOAD RESOURCE %s\n", attrname);
1702 fBitmap =
new BBitmap(BRect(0, 0, 32, 32), B_RGB32);
1703 status_t status = BIconUtils::GetVectorIcon((
const uint8*)data, size,
fBitmap);
1705 if(status != B_OK) {
1706 fprintf(stderr,
"%s > oops %s\n", attrname, strerror(status));
1715 *pixel = tint_color(*pixel, B_DISABLED_MARK_TINT);
1730 NSLOG(netsurf, INFO,
1731 "Constructing a scaffold of %p for gui_window %p", g, toplevel);
1747 beos_warn_user(
"Error: No subwindow allowed when replicated.", NULL);
1753 BRect frame(0, 0, 600-1, 500-1);
1762 pos = win->Frame().LeftTop();
1763 win->UnlockLooper();
1765 pos += BPoint(20, 20);
1767 BRect screenFrame(screen.Frame());
1768 if (pos.y + frame.Height() >= screenFrame.Height()) {
1772 if (pos.x + frame.Width() >= screenFrame.Width()) {
1776 frame.OffsetToSelf(pos);
1781 rect = frame.OffsetToCopy(0,0);
1796 message =
new BMessage(B_ABOUT_REQUESTED);
1798 menu->AddItem(item);
1803 menu->AddItem(item);
1806 menu->AddItem(submenu);
1810 submenu->AddItem(item);
1814 menu->AddItem(item);
1819 menu->AddItem(item);
1829 menu->AddItem(item);
1833 menu->AddItem(item);
1837 menu->AddItem(item);
1840 menu->AddItem(submenu);
1850 submenu->AddItem(item);
1854 menu->AddItem(submenu);
1859 submenu->AddItem(item);
1864 menu->AddItem(item);
1869 menu->AddItem(item);
1873 menu->AddItem(item);
1883 menu->AddItem(item);
1887 menu->AddItem(item);
1892 menu->AddItem(item);
1902 menu->AddItem(item);
1906 menu->AddItem(item);
1910 menu->AddItem(item);
1914 menu->AddItem(item);
1918 menu->AddItem(item);
1922 menu->AddItem(item);
1932 menu->AddItem(item);
1935 menu->AddItem(submenu);
1939 submenu->AddItem(item);
1943 submenu->AddItem(item);
1947 menu->AddItem(submenu);
1948 submenu->SetEnabled(
false);
1952 submenu->AddItem(item);
1956 submenu->AddItem(item);
1960 submenu->AddItem(item);
1964 submenu->AddItem(item);
1968 menu->AddItem(submenu);
1972 submenu->AddItem(item);
1976 submenu->AddItem(item);
1981 menu->AddItem(item);
1991 menu->AddItem(submenu);
1995 submenu->AddItem(item);
1999 submenu->AddItem(item);
2003 menu->AddItem(submenu);
2007 submenu->AddItem(item);
2011 submenu->AddItem(item);
2016 menu->AddItem(item);
2021 menu->AddItem(item);
2024 menu->AddItem(submenu);
2028 submenu->AddItem(item);
2032 submenu->AddItem(item);
2036 submenu->AddItem(item);
2040 submenu->AddItem(item);
2052 menu->AddItem(item);
2056 menu->AddItem(item);
2060 menu->AddItem(item);
2065 menu->AddItem(item);
2069 menu->AddItem(item);
2074 menu->AddItem(item);
2078 rect = frame.OffsetToCopy(0,0);
2092 g->
popup_menu =
new BPopUpMenu(
"popup",
false,
false);
2110#ifdef ENABLE_DRAGGER
2118 B_FOLLOW_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW);
2120 g->dragger->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
2121 g->dragger->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
2132#ifdef ENABLE_DRAGGER
2138 B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS
2139 | B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE_JUMP, B_PLAIN_BORDER);
2141 g->
tool_bar->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
2142 g->
tool_bar->SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)) ;
2147 rect.InsetBySelf(5, 5);
2148 rect.OffsetBySelf(0, -1);
2151 message =
new BMessage(
'back');
2152 message->AddPointer(
"scaffolding", g);
2158 message =
new BMessage(
'forw');
2159 message->AddPointer(
"scaffolding", g);
2165 message =
new BMessage(
'stop');
2166 message->AddPointer(
"scaffolding", g);
2172 message =
new BMessage(
'relo');
2173 message->AddPointer(
"scaffolding", g);
2179 message =
new BMessage(
'home');
2180 message->AddPointer(
"scaffolding", g);
2190 rect.InsetBySelf(5, 5);
2191 message =
new BMessage(
'urle');
2192 message->AddPointer(
"scaffolding", g);
2194 B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
2207 message =
new BMessage(
'sear');
2208 message->AddPointer(
"scaffolding", g);
2210 "Search" B_UTF8_ELLIPSIS, message, B_FOLLOW_RIGHT | B_FOLLOW_TOP);
2215 rect.Set(0, 0, 24, 24);
2222 g->
throbber->SetDrawingMode(B_OP_ALPHA);
2223 g->
throbber->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
2230 BString status(
"NetSurf");
2232 g->
status_bar =
new BStringView(BRect(0,0,-1,-1),
"StatusBar",
2233 status.String(), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
2263 g->
window->SetTitle(nt.String());
2277 if (
text == NULL ||
text[0] ==
'\0')
2279 BString status(
"NetSurf");
2380 for (
int i = 0; scaffold->
popup_menu->ItemAt(i); i++) {
2381 scaffold->
popup_menu->ItemAt(i)->SetEnabled(enabled);
2384 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.
const char *const netsurf_version
User friendly version string.
Version information interface.
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.
Netsurf additional integer type formatting macros.
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.
#define fallthrough
switch fall through
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.