NetSurf
Data Structures | Macros | Enumerations | Functions
gui.h File Reference
#include <stdbool.h>
#include <graphics/rastport.h>
#include <intuition/classusr.h>
#include <dos/dos.h>
#include <devices/inputevent.h>
#include "netsurf/window.h"
#include "netsurf/mouse.h"
#include "amiga/gui_menu.h"
#include "amiga/object.h"
#include "amiga/os3support.h"
Include dependency graph for gui.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ami_win_event_table
 
struct  ami_generic_window
 

Macros

#define HOOKF(ret, func, type, ptr, msgtype)   static ASM ret func(REG(a0, struct Hook *hook),REG(a2, type ptr), REG(a1, msgtype msg))
 
#define AMI_GUI_TOOLBAR_MAX   20
 
#define IS_CURRENT_GW(GWIN, GW)   (ami_gui2_get_gui_window(GWIN) == GW)
 

Enumerations

enum  {
  AMI_GAD_THROBBER = 0 , AMI_GAD_TABS , AMI_GAD_URL , AMI_GAD_SEARCH ,
  AMI_WIN_MAIN
}
 

Functions

STRPTR ami_locale_langs (int *codeset)
 
char * ami_gui_get_cache_favicon_name (struct nsurl *url, bool only_if_avail)
 
void ami_get_msg (void)
 
void ami_try_quit (void)
 
void ami_quit_netsurf (void)
 
void ami_schedule_redraw (struct gui_window_2 *gwin, bool full_redraw)
 Schedule a redraw of the browser window - Amiga-specific function. More...
 
int ami_key_to_nskey (ULONG keycode, struct InputEvent *ie)
 
bool ami_text_box_at_point (struct gui_window_2 *gwin, ULONG *restrict x, ULONG *restrict y)
 
bool ami_mouse_to_ns_coords (struct gui_window_2 *gwin, int *restrict x, int *restrict y, int mouse_x, int mouse_y)
 
BOOL ami_gadget_hit (Object *obj, int x, int y)
 
void ami_gui_history (struct gui_window_2 *gwin, bool back)
 
void ami_gui_hotlist_update_all (void)
 Update hotlist toolbar and recreate the menu for all windows. More...
 
void ami_gui_tabs_toggle_all (void)
 
bool ami_locate_resource (char *fullpath, const char *file)
 
void ami_gui_update_hotlist_button (struct gui_window_2 *gwin)
 
nserror ami_gui_new_blank_tab (struct gui_window_2 *gwin)
 
int ami_gui_count_windows (int window, int *tabs)
 Count windows, and optionally tabs. More...
 
void ami_gui_set_scale (struct gui_window *gw, float scale)
 Set the scale of a gui window. More...
 
void ami_set_pointer (struct gui_window_2 *gwin, gui_pointer_shape shape, bool update)
 
void ami_reset_pointer (struct gui_window_2 *gwin)
 
void * ami_window_at_pointer (int type)
 undocumented, or internal, or documented elsewhere More...
 
void ami_gui_beep (void)
 Beep. More...
 
void ami_gui_close_window (void *w)
 Close a window and all tabs attached to it. More...
 
void ami_gui_close_inactive_tabs (struct gui_window_2 *gwin)
 Close all tabs in a window except the active one. More...
 
nserror ami_gui_get_space_box (Object *obj, struct IBox **bbox)
 Compatibility function to get space.gadget render area. More...
 
void ami_gui_free_space_box (struct IBox *bbox)
 Free any data obtained via ami_gui_get_space_box(). More...
 
struct MsgPort * ami_gui_get_shared_msgport (void)
 Get shared message port. More...
 
uint32 ami_gui_get_app_id (void)
 Get the application.library ID NetSurf is registered as. More...
 
struct Screen * ami_gui_get_screen (void)
 Get a pointer to the screen NetSurf is running on. More...
 
STRPTR ami_gui_get_screen_title (void)
 Get the string for NetSurf's screen titlebar. More...
 
void ami_gui_switch_to_new_tab (struct gui_window_2 *gwin)
 Switch to the most-recently-opened tab. More...
 
nserror ami_gui_win_list_add (void *win, int type, const struct ami_win_event_table *table)
 Add a window to the NetSurf window list (to enable event processing) More...
 
void ami_gui_win_list_remove (void *win)
 Remove a window from the NetSurf window list. More...
 
struct MinList * ami_gui_get_window_list (void)
 Get the window list. More...
 
int ami_gui_get_quals (Object *win_obj)
 Get which qualifier keys are being pressed. More...
 
bool ami_gui_window_update_box_deferred_check (struct MinList *deferred_rects, const struct rect *restrict new_rect, APTR mempool)
 Check rect is not already queued for redraw. More...
 
void ami_gui_adjust_scale (struct gui_window *gw, float adjustment)
 Adjust scale by specified amount. More...
 
struct gui_windowami_gui_get_active_gw (void)
 Get a pointer to the gui_window which NetSurf considers to be the current/active one. More...
 
struct browser_windowami_gui_get_browser_window (struct gui_window *gw)
 Get browser window from gui_window. More...
 
struct browser_windowami_gui2_get_browser_window (struct gui_window_2 *gwin)
 Get browser window from gui_window_2. More...
 
struct gui_window_2ami_gui_get_gui_window_2 (struct gui_window *gw)
 Get gui_window_2 from gui_window. More...
 
struct gui_windowami_gui2_get_gui_window (struct gui_window_2 *gwin)
 Get gui_window from gui_window_2. More...
 
struct List * ami_gui_get_download_list (struct gui_window *gw)
 Get download list from gui_window. More...
 
const char * ami_gui_get_tab_title (struct gui_window *gw)
 Get tab title from gui_window. More...
 
const char * ami_gui_get_win_title (struct gui_window *gw)
 Get window title from gui_window. More...
 
struct Node * ami_gui_get_tab_node (struct gui_window *gw)
 Get tab node from gui_window. More...
 
ULONG ami_gui2_get_tabs (struct gui_window_2 *gwin)
 Get tabs from gui_window_2. More...
 
struct List * ami_gui2_get_tab_list (struct gui_window_2 *gwin)
 Get tab list from gui_window_2. More...
 
struct hlcache_handleami_gui_get_favicon (struct gui_window *gw)
 Get favicon from gui_window. More...
 
struct ami_history_local_windowami_gui_get_history_window (struct gui_window *gw)
 Get local history window from gui_window. More...
 
void ami_gui_set_history_window (struct gui_window *gw, struct ami_history_local_window *hw)
 Set local history window in gui_window. More...
 
void ami_gui_set_find_window (struct gui_window *gw, struct find_window *fw)
 Set search window in gui_window. More...
 
bool ami_gui_get_throbbing (struct gui_window *gw)
 Get throbbing status from gui_window. More...
 
int ami_gui_get_throbber_frame (struct gui_window *gw)
 Get throbbing frame from gui_window. More...
 
void ami_gui_set_throbber_frame (struct gui_window *gw, int frame)
 Set throbbing frame in gui_window. More...
 
void ami_gui_set_throbbing (struct gui_window *gw, bool throbbing)
 Set throbbing status in gui_window. More...
 
Object * ami_gui2_get_object (struct gui_window_2 *gwin, int object_type)
 Get object from gui_window. More...
 
struct Window * ami_gui_get_window (struct gui_window *gw)
 Get window from gui_window. More...
 
struct Window * ami_gui2_get_window (struct gui_window_2 *gwin)
 Get window from gui_window_2. More...
 
struct Menu * ami_gui_get_menu (struct gui_window *gw)
 Get imenu from gui_window. More...
 
void ami_gui2_set_menu (struct gui_window_2 *gwin, struct Menu *menu)
 Set imenu to gui_window_2. More...
 
struct ami_menu_data ** ami_gui2_get_menu_data (struct gui_window_2 *gwin)
 Get menu_data from gui_window_2. More...
 
void ami_gui2_set_ctxmenu_history_tmp (struct gui_window_2 *gwin, int temp)
 Set ctxmenu history tmp in gui_window_2. More...
 
int ami_gui2_get_ctxmenu_history_tmp (struct gui_window_2 *gwin)
 Get ctxmenu history tmp from gui_window_2. More...
 
Object * ami_gui2_get_ctxmenu_history (struct gui_window_2 *gwin, ULONG direction)
 Get ctxmenu history from gui_window_2. More...
 
void ami_gui2_set_ctxmenu_history (struct gui_window_2 *gwin, ULONG direction, Object *ctx_hist)
 Set ctxmenu history in gui_window_2. More...
 
void ami_gui2_set_closed (struct gui_window_2 *gwin, bool closed)
 Set closed in gui_window_2. More...
 
void ami_gui2_set_new_content (struct gui_window_2 *gwin, bool new_content)
 Set new_content in gui_window_2 Indicates the window needs redrawing. More...
 

Macro Definition Documentation

◆ AMI_GUI_TOOLBAR_MAX

#define AMI_GUI_TOOLBAR_MAX   20

Definition at line 57 of file gui.h.

◆ HOOKF

#define HOOKF (   ret,
  func,
  type,
  ptr,
  msgtype 
)    static ASM ret func(REG(a0, struct Hook *hook),REG(a2, type ptr), REG(a1, msgtype msg))

Definition at line 38 of file gui.h.

◆ IS_CURRENT_GW

#define IS_CURRENT_GW (   GWIN,
  GW 
)    (ami_gui2_get_gui_window(GWIN) == GW)

Definition at line 78 of file gui.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AMI_GAD_THROBBER 
AMI_GAD_TABS 
AMI_GAD_URL 
AMI_GAD_SEARCH 
AMI_WIN_MAIN 

Definition at line 42 of file gui.h.

Function Documentation

◆ ami_gadget_hit()

BOOL ami_gadget_hit ( Object *  obj,
int  x,
int  y 
)

Definition at line 6211 of file gui.c.

References GetAttrs(), height, and width.

Referenced by ami_drag_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_get_msg()

void ami_get_msg ( void  )

Definition at line 3521 of file gui.c.

References ami_arexx_handle(), ami_handle_applib(), ami_handle_appmsg(), ami_handle_msg(), ami_help_process(), ami_help_signal(), ami_print_cont(), ami_print_get_msgport(), ami_quit_netsurf_delayed(), ami_schedule_handle(), applibsig, appport, fetch_fdset(), NSERROR_OK, NSLOG, rxsig, schedulermsgport, and sport.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui2_get_browser_window()

struct browser_window * ami_gui2_get_browser_window ( struct gui_window_2 gwin)

Get browser window from gui_window_2.

Definition at line 426 of file gui.c.

References ami_gui_get_browser_window(), and gui_window_2::gw.

Referenced by ami_drag_selection(), ami_file_open(), ami_file_save_req(), ami_history_global_drag_end(), ami_hotlist_drag_end(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui2_get_ctxmenu_history()

Object * ami_gui2_get_ctxmenu_history ( struct gui_window_2 gwin,
ULONG  direction 
)

Get ctxmenu history from gui_window_2.

Definition at line 617 of file gui.c.

References gui_window_2::history_ctxmenu.

◆ ami_gui2_get_ctxmenu_history_tmp()

int ami_gui2_get_ctxmenu_history_tmp ( struct gui_window_2 gwin)

Get ctxmenu history tmp from gui_window_2.

Definition at line 611 of file gui.c.

References gui_window_2::temp.

◆ ami_gui2_get_gui_window()

struct gui_window * ami_gui2_get_gui_window ( struct gui_window_2 gwin)

Get gui_window from gui_window_2.

Definition at line 444 of file gui.c.

References gui_window_2::gw.

Referenced by ami_file_save_req(), ami_find_tab_gwin(), and HOOKF().

Here is the caller graph for this function:

◆ ami_gui2_get_menu_data()

struct ami_menu_data ** ami_gui2_get_menu_data ( struct gui_window_2 gwin)

Get menu_data from gui_window_2.

Definition at line 599 of file gui.c.

References gui_window_2::menu_data.

Referenced by ami_gui_menu_create().

Here is the caller graph for this function:

◆ ami_gui2_get_object()

Object * ami_gui2_get_object ( struct gui_window_2 gwin,
int  object_type 
)

Get object from gui_window.

Definition at line 535 of file gui.c.

References AMI_GAD_SEARCH, AMI_GAD_TABS, AMI_GAD_THROBBER, AMI_GAD_URL, AMI_WIN_MAIN, GID_SEARCHSTRING, GID_TABS, GID_THROBBER, GID_URL, gui_window_2::objects, and OID_MAIN.

Referenced by ami_drag_selection(), ami_gui_menu_free(), ami_gui_menu_update_checked(), ami_throbber_update(), gui_window_start_throbber(), and gui_window_stop_throbber().

Here is the caller graph for this function:

◆ ami_gui2_get_tab_list()

struct List * ami_gui2_get_tab_list ( struct gui_window_2 gwin)

Get tab list from gui_window_2.

Definition at line 475 of file gui.c.

References gui_window_2::tab_list.

Referenced by ami_find_tab_bw(), and ami_find_tab_gwin().

Here is the caller graph for this function:

◆ ami_gui2_get_tabs()

ULONG ami_gui2_get_tabs ( struct gui_window_2 gwin)

Get tabs from gui_window_2.

Definition at line 469 of file gui.c.

References gui_window_2::tabs.

Referenced by ami_find_tab_bw(), ami_find_tab_gwin(), gui_window_start_throbber(), gui_window_stop_throbber(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui2_get_window()

struct Window * ami_gui2_get_window ( struct gui_window_2 gwin)

Get window from gui_window_2.

Definition at line 571 of file gui.c.

References gui_window_2::win.

Referenced by ami_drag_selection(), ami_file_open(), ami_file_save_req(), ami_gui_get_window(), ami_gui_menu_update_checked(), ami_reset_pointer(), ami_set_pointer(), and HOOKF().

Here is the caller graph for this function:

◆ ami_gui2_set_closed()

void ami_gui2_set_closed ( struct gui_window_2 gwin,
bool  closed 
)

Set closed in gui_window_2.

Definition at line 629 of file gui.c.

References gui_window_2::closed.

Referenced by HOOKF().

Here is the caller graph for this function:

◆ ami_gui2_set_ctxmenu_history()

void ami_gui2_set_ctxmenu_history ( struct gui_window_2 gwin,
ULONG  direction,
Object *  ctx_hist 
)

Set ctxmenu history in gui_window_2.

Definition at line 623 of file gui.c.

References gui_window_2::history_ctxmenu.

◆ ami_gui2_set_ctxmenu_history_tmp()

void ami_gui2_set_ctxmenu_history_tmp ( struct gui_window_2 gwin,
int  temp 
)

Set ctxmenu history tmp in gui_window_2.

Definition at line 605 of file gui.c.

References gui_window_2::temp.

◆ ami_gui2_set_menu()

void ami_gui2_set_menu ( struct gui_window_2 gwin,
struct Menu *  menu 
)

Set imenu to gui_window_2.

A value of NULL will free the menu (and menu_data!)

Definition at line 590 of file gui.c.

References ami_gui_menu_freemenus(), gui_window_2::imenu, and gui_window_2::menu_data.

Referenced by ami_gui_menu_create(), and ami_gui_menu_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui2_set_new_content()

void ami_gui2_set_new_content ( struct gui_window_2 gwin,
bool  new_content 
)

Set new_content in gui_window_2 Indicates the window needs redrawing.

Definition at line 635 of file gui.c.

References gui_window_2::new_content.

Referenced by HOOKF().

Here is the caller graph for this function:

◆ ami_gui_adjust_scale()

void ami_gui_adjust_scale ( struct gui_window gw,
float  adjustment 
)

Adjust scale by specified amount.

Definition at line 4373 of file gui.c.

References ami_schedule_redraw(), browser_window_set_scale(), gui_window::bw, and gui_window::shared.

Referenced by ami_gui_event(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_beep()

void ami_gui_beep ( void  )

Beep.

Definition at line 415 of file gui.c.

References scrn.

Referenced by ami_drag_selection(), ami_history_global_drag_end(), and ami_hotlist_drag_end().

Here is the caller graph for this function:

◆ ami_gui_close_inactive_tabs()

void ami_gui_close_inactive_tabs ( struct gui_window_2 gwin)

Close all tabs in a window except the active one.

Parameters
gwingui_window_2 to act upon.

Definition at line 5484 of file gui.c.

References ami_gui_close_tabs().

Here is the call graph for this function:

◆ ami_gui_close_window()

void ami_gui_close_window ( void *  w)

Close a window and all tabs attached to it.

Parameters
wgui_window_2 to act upon.

Definition at line 5478 of file gui.c.

References ami_gui_close_tabs(), and gui_window_2::w.

Referenced by ami_gui_event(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_count_windows()

int ami_gui_count_windows ( int  window,
int *  tabs 
)

Count windows, and optionally tabs.

Parameters
windowwindow to count tabs of
tabsif window > 0, will be updated to contain the number of tabs in that window, unchanged otherwise
Returns
number of windows currently open

Definition at line 4339 of file gui.c.

References AMINS_WINDOW, GetHead(), GetSucc(), IsMinListEmpty, nsObject::objstruct, gui_window_2::tabs, tabs, nsObject::Type, and window_list.

Referenced by gui_window_create(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_free_space_box()

void ami_gui_free_space_box ( struct IBox *  bbox)

Free any data obtained via ami_gui_get_space_box().

Parameters
bboxA pointer to a struct IBox.

Definition at line 1875 of file gui.c.

References LIB_IS_AT_LEAST.

Referenced by ami_cw_mouse_pos(), ami_cw_redraw(), ami_cw_redraw_rect(), ami_cw_window_size(), ami_do_redraw(), ami_do_redraw_limits(), ami_gui_event(), ami_gui_scroll_internal(), ami_mouse_to_ns_coords(), ami_ns_rect_to_ibox(), ami_refresh_window(), ami_switch_tab(), ami_text_box_at_point(), ami_throbber_update(), gui_window_get_dimensions(), gui_window_place_caret(), gui_window_set_icon(), gui_window_set_scroll(), gui_window_stop_throbber(), and gui_window_update_extent().

Here is the caller graph for this function:

◆ ami_gui_get_active_gw()

struct gui_window * ami_gui_get_active_gw ( void  )

Get a pointer to the gui_window which NetSurf considers to be the current/active one.

Definition at line 399 of file gui.c.

References cur_gw.

Referenced by ami_gui_opts_event(), ami_misc_req(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_app_id()

uint32 ami_gui_get_app_id ( void  )

Get the application.library ID NetSurf is registered as.

Returns
App ID.

Definition at line 6354 of file gui.c.

References ami_appid.

Referenced by gui_download_window_create(), gui_download_window_data(), and gui_download_window_done().

Here is the caller graph for this function:

◆ ami_gui_get_browser_window()

struct browser_window * ami_gui_get_browser_window ( struct gui_window gw)

Get browser window from gui_window.

Definition at line 420 of file gui.c.

References gui_window::bw.

Referenced by ami_drag_selection(), ami_find_tab_bw(), ami_gui2_get_browser_window(), ami_gui_menu_update_disabled(), ami_gui_opts_event(), ami_history_local_present(), ami_search_close(), ami_search_event(), ami_search_open(), gui_download_window_create(), gui_page_info_change(), gui_start_selection(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_cache_favicon_name()

char * ami_gui_get_cache_favicon_name ( struct nsurl url,
bool  only_if_avail 
)

Definition at line 3961 of file gui.c.

References ASPrintf(), current_user_faviconcache, NSLOG, and nsurl_hash().

Referenced by ami_gui_cache_favicon(), ami_gui_hotlist_add(), and ami_menu_hotlist_add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_get_download_list()

struct List * ami_gui_get_download_list ( struct gui_window gw)

Get download list from gui_window.

Definition at line 432 of file gui.c.

References gui_window::dllist.

Referenced by gui_download_window_create(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_favicon()

struct hlcache_handle * ami_gui_get_favicon ( struct gui_window gw)

Get favicon from gui_window.

Definition at line 481 of file gui.c.

References gui_window::favicon.

Referenced by ami_file_save_req().

Here is the caller graph for this function:

◆ ami_gui_get_gui_window_2()

struct gui_window_2 * ami_gui_get_gui_window_2 ( struct gui_window gw)

Get gui_window_2 from gui_window.

Definition at line 438 of file gui.c.

References gui_window_2::gw, and gui_window::shared.

Referenced by ami_throbber_update(), gui_page_info_change(), gui_window_save_link(), gui_window_set_pointer(), gui_window_start_throbber(), gui_window_stop_throbber(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_history_window()

struct ami_history_local_window * ami_gui_get_history_window ( struct gui_window gw)

Get local history window from gui_window.

Definition at line 487 of file gui.c.

References ami_history_local_window::gw, and gui_window::hw.

Referenced by ami_history_local_present().

Here is the caller graph for this function:

◆ ami_gui_get_menu()

struct Menu * ami_gui_get_menu ( struct gui_window gw)

Get imenu from gui_window.

Definition at line 583 of file gui.c.

References gui_window_2::imenu, and gui_window::shared.

Referenced by ami_gui_menu_update_disabled(), and gui_start_selection().

Here is the caller graph for this function:

◆ ami_gui_get_quals()

int ami_gui_get_quals ( Object *  win_obj)

Get which qualifier keys are being pressed.

Definition at line 1827 of file gui.c.

References BROWSER_MOUSE_MOD_1, BROWSER_MOUSE_MOD_2, BROWSER_MOUSE_MOD_3, NSA_QUAL_ALT, and NSA_QUAL_SHIFT.

Referenced by ami_cw_event(), and ami_update_quals().

Here is the caller graph for this function:

◆ ami_gui_get_screen()

struct Screen * ami_gui_get_screen ( void  )

◆ ami_gui_get_screen_title()

STRPTR ami_gui_get_screen_title ( void  )

Get the string for NetSurf's screen titlebar.

Returns
String to use as the screen's titlebar text.

Definition at line 975 of file gui.c.

References ASPrintf(), netsurf_version, and nsscreentitle.

Referenced by ami_cookies_create_window(), ami_font_scan_gui_open(), ami_gui_opts_open(), ami_history_global_create_window(), ami_history_local_create_window(), ami_hotlist_create_window(), ami_openscreen(), ami_pageinfo_create_window(), ami_print_progress(), ami_print_ui(), ami_search_open(), gui_download_window_create(), gui_window_create(), and gui_window_set_title().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_get_shared_msgport()

struct MsgPort * ami_gui_get_shared_msgport ( void  )

Get shared message port.

Returns
Pointer to an initialised MsgPort

Referenced by ami_cookies_create_window(), ami_gui_opts_open(), ami_history_global_create_window(), ami_history_local_create_window(), ami_hotlist_create_window(), ami_pageinfo_create_window(), ami_print_ui(), ami_search_open(), and gui_download_window_create().

Here is the caller graph for this function:

◆ ami_gui_get_space_box()

nserror ami_gui_get_space_box ( Object *  obj,
struct IBox **  bbox 
)

Compatibility function to get space.gadget render area.

Parameters
objA space.gadget object.
bboxA pointer to a struct IBox *.
Returns
error status.

Definition at line 1858 of file gui.c.

References LIB_IS_AT_LEAST, NSERROR_NOMEM, and NSERROR_OK.

Referenced by ami_cw_mouse_pos(), ami_cw_redraw(), ami_cw_redraw_rect(), ami_cw_window_size(), ami_do_redraw(), ami_do_redraw_limits(), ami_gui_event(), ami_gui_scroll_internal(), ami_mouse_to_ns_coords(), ami_ns_rect_to_ibox(), ami_refresh_window(), ami_switch_tab(), ami_text_box_at_point(), ami_throbber_update(), gui_window_get_dimensions(), gui_window_place_caret(), gui_window_set_icon(), gui_window_set_scroll(), gui_window_stop_throbber(), and gui_window_update_extent().

Here is the caller graph for this function:

◆ ami_gui_get_tab_node()

struct Node * ami_gui_get_tab_node ( struct gui_window gw)

Get tab node from gui_window.

Definition at line 463 of file gui.c.

References gui_window::tab_node.

Referenced by gui_window_start_throbber(), and gui_window_stop_throbber().

Here is the caller graph for this function:

◆ ami_gui_get_tab_title()

const char * ami_gui_get_tab_title ( struct gui_window gw)

Get tab title from gui_window.

Definition at line 457 of file gui.c.

References gui_window::tabtitle.

Referenced by RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_throbber_frame()

int ami_gui_get_throbber_frame ( struct gui_window gw)

Get throbbing frame from gui_window.

Definition at line 521 of file gui.c.

References ami_history_local_window::gw, gui_window::shared, and gui_window_2::throbber_frame.

Referenced by ami_throbber_update(), and gui_window_start_throbber().

Here is the caller graph for this function:

◆ ami_gui_get_throbbing()

bool ami_gui_get_throbbing ( struct gui_window gw)

Get throbbing status from gui_window.

Definition at line 509 of file gui.c.

References ami_history_local_window::gw, and gui_window::throbbing.

Referenced by ami_throbber_update().

Here is the caller graph for this function:

◆ ami_gui_get_win_title()

const char * ami_gui_get_win_title ( struct gui_window gw)

Get window title from gui_window.

Definition at line 450 of file gui.c.

References gui_window::shared, and gui_window_2::wintitle.

Referenced by RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_get_window()

struct Window * ami_gui_get_window ( struct gui_window gw)

Get window from gui_window.

Definition at line 577 of file gui.c.

References ami_gui2_get_window(), and gui_window::shared.

Referenced by ami_gui_menu_update_disabled(), ami_misc_req(), ami_search_event(), ami_throbber_update(), gui_download_window_create(), gui_start_selection(), gui_window_save_link(), gui_window_start_throbber(), and gui_window_stop_throbber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_get_window_list()

struct MinList * ami_gui_get_window_list ( void  )

Get the window list.

\TODO: Nothing should be poking around in this list, but we aren't assigning unique IDs to windows (ARexx interface needs this) ami_find_gwin_by_id() is close but not ARexx-friendly

Definition at line 409 of file gui.c.

References window_list.

Referenced by ami_find_tab(), and RXHOOKF().

Here is the caller graph for this function:

◆ ami_gui_history()

void ami_gui_history ( struct gui_window_2 gwin,
bool  back 
)

Definition at line 1689 of file gui.c.

References ami_update_buttons(), browser_window_back_available(), browser_window_forward_available(), browser_window_history_back(), browser_window_history_forward(), gui_window::bw, and gui_window_2::gw.

Referenced by ami_gui_event(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_hotlist_update_all()

void ami_gui_hotlist_update_all ( void  )

Update hotlist toolbar and recreate the menu for all windows.

Definition at line 4206 of file gui.c.

References ami_gui_hotlist_toolbar_update(), ami_gui_menu_refresh_hotlist(), AMINS_WINDOW, GetHead(), GetSucc(), IsMinListEmpty, nsObject::objstruct, nsObject::Type, and window_list.

Referenced by ami_hotlist_destroy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_new_blank_tab()

nserror ami_gui_new_blank_tab ( struct gui_window_2 gwin)

Definition at line 4392 of file gui.c.

References ami_gui_switch_to_new_tab(), amiga_warn_user(), browser_window_create(), browser_window::bw, gui_window::bw, BW_CREATE_HISTORY, BW_CREATE_TAB, gui_window_2::gw, messages_get_errorcode(), NSERROR_OK, nsoption_charp, nsurl_create(), and nsurl_unref().

Referenced by ami_gui_event(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_set_find_window()

void ami_gui_set_find_window ( struct gui_window gw,
struct find_window fw 
)

Set search window in gui_window.

Definition at line 499 of file gui.c.

References ami_history_local_window::gw, gui_window_2::searchwin, and gui_window::shared.

Referenced by ami_search_close(), and ami_search_open().

Here is the caller graph for this function:

◆ ami_gui_set_history_window()

void ami_gui_set_history_window ( struct gui_window gw,
struct ami_history_local_window hw 
)

Set local history window in gui_window.

Definition at line 493 of file gui.c.

References ami_history_local_window::gw, and gui_window::hw.

Referenced by ami_history_local_destroy(), and ami_history_local_present().

Here is the caller graph for this function:

◆ ami_gui_set_scale()

void ami_gui_set_scale ( struct gui_window gw,
float  scale 
)

Set the scale of a gui window.

Parameters
gwgui_window to set scale for
scalescale to set

Definition at line 4367 of file gui.c.

References ami_schedule_redraw(), browser_window_set_scale(), gui_window::bw, and gui_window::shared.

Referenced by ami_gui_event(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_set_throbber_frame()

void ami_gui_set_throbber_frame ( struct gui_window gw,
int  frame 
)

Set throbbing frame in gui_window.

Definition at line 528 of file gui.c.

References ami_history_local_window::gw, gui_window::shared, and gui_window_2::throbber_frame.

Referenced by ami_throbber_update(), and gui_window_start_throbber().

Here is the caller graph for this function:

◆ ami_gui_set_throbbing()

void ami_gui_set_throbbing ( struct gui_window gw,
bool  throbbing 
)

Set throbbing status in gui_window.

Definition at line 515 of file gui.c.

References ami_history_local_window::gw, and gui_window::throbbing.

Referenced by gui_window_start_throbber(), and gui_window_stop_throbber().

Here is the caller graph for this function:

◆ ami_gui_switch_to_new_tab()

void ami_gui_switch_to_new_tab ( struct gui_window_2 gwin)

Switch to the most-recently-opened tab.

Definition at line 4379 of file gui.c.

References ami_switch_tab(), GID_TABS, gui_window_2::last_new_tab, nsoption_bool, gui_window_2::objects, RefreshSetGadgetAttrs(), and gui_window_2::win.

Referenced by ami_gui_new_blank_tab(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_tabs_toggle_all()

void ami_gui_tabs_toggle_all ( void  )

Definition at line 4303 of file gui.c.

References ami_toggletabbar(), AMINS_WINDOW, GetHead(), GetSucc(), IsMinListEmpty, nsoption_bool, nsObject::objstruct, gui_window_2::tabs, nsObject::Type, and window_list.

Referenced by ami_gui_opts_use().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_update_hotlist_button()

void ami_gui_update_hotlist_button ( struct gui_window_2 gwin)

Definition at line 3991 of file gui.c.

References ami_gui_cache_favicon(), content_get_bitmap(), gui_window::favicon, GID_FAVE, GID_FAVE_ADD, GID_FAVE_RMV, GID_URL, gui_window_2::gw, hotlist_has_url(), NSERROR_OK, nsurl_create(), nsurl_unref(), gui_window_2::objects, RefreshSetGadgetAttrs(), and gui_window_2::win.

Referenced by ami_gui_event(), ami_switch_tab(), gui_window_new_content(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_win_list_add()

nserror ami_gui_win_list_add ( void *  win,
int  type,
const struct ami_win_event_table table 
)

Add a window to the NetSurf window list (to enable event processing)

Definition at line 4675 of file gui.c.

References AddObject(), ami_generic_window::node, NSERROR_NOMEM, NSERROR_OK, nsObject::objstruct, ami_generic_window::tbl, type, and window_list.

Referenced by ami_corewindow_init(), ami_gui_opts_open(), ami_print_ui(), ami_search_open(), gui_download_window_create(), and gui_window_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_win_list_remove()

void ami_gui_win_list_remove ( void *  win)

Remove a window from the NetSurf window list.

Definition at line 4689 of file gui.c.

References AMINS_TVWINDOW, DelObject(), DelObjectNoFree(), ami_generic_window::node, and nsObject::Type.

Referenced by ami_corewindow_fini(), ami_gui_opts_close(), ami_print_close(), ami_search_close(), gui_download_window_done(), and gui_window_destroy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_gui_window_update_box_deferred_check()

bool ami_gui_window_update_box_deferred_check ( struct MinList *  deferred_rects,
const struct rect *restrict  new_rect,
APTR  mempool 
)

Check rect is not already queued for redraw.

Definition at line 5686 of file gui.c.

References ami_memory_itempool_free, DelObjectNoFree(), GetHead(), GetSucc(), IsMinListEmpty, NSLOG, nsObject::objstruct, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by ami_cw_redraw(), and amiga_window_invalidate_area().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_key_to_nskey()

int ami_key_to_nskey ( ULONG  keycode,
struct InputEvent *  ie 
)

◆ ami_locale_langs()

STRPTR ami_locale_langs ( int *  codeset)

Definition at line 703 of file gui.c.

References ami_gui_map_filename(), and ASPrintf().

Referenced by ami_gui_opts_event(), and ami_set_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_locate_resource()

bool ami_locate_resource ( char *  fullpath,
const char *  file 
)

Definition at line 815 of file gui.c.

References ami_gui_check_resource(), ami_gui_map_filename(), current_user_dir, netsurf_mkpath(), and nsoption_charp.

Referenced by ami_gui_hotlist_add(), ami_menu_alloc_item(), gui_get_resource_url(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_mouse_to_ns_coords()

bool ami_mouse_to_ns_coords ( struct gui_window_2 gwin,
int *restrict  x,
int *restrict  y,
int  mouse_x,
int  mouse_y 
)

Definition at line 1899 of file gui.c.

References ami_gui_free_space_box(), ami_gui_get_space_box(), ami_spacebox_to_ns_coords(), amiga_warn_user(), GID_BROWSER, mouse_x, mouse_y, NSERROR_OK, gui_window_2::objects, and gui_window_2::win.

Referenced by ami_gui_scroll_internal(), and ami_handle_appmsg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_quit_netsurf()

void ami_quit_netsurf ( void  )

Definition at line 3808 of file gui.c.

References ami_quit, AMINS_WINDOW, ami_win_event_table::close, GetHead(), GetSucc(), IsMinListEmpty, ami_generic_window::node, nsoption_set_bool, nsObject::objstruct, ShowWindow, ami_generic_window::tbl, nsObject::Type, gui_window_2::w, gui_window_2::win, win_destroyed, WINDOW_BACKMOST, and window_list.

Referenced by ami_handle_applib(), ami_handle_msg(), ami_quit_netsurf_delayed(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_reset_pointer()

void ami_reset_pointer ( struct gui_window_2 gwin)

Definition at line 697 of file gui.c.

References ami_gui2_get_window(), ami_update_pointer(), and gui_window_2::mouse_pointer.

Referenced by ami_do_redraw_tiled(), ami_gui_window_update_box_deferred(), ami_refresh_window(), gui_window_save_link(), HOOKF(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_schedule_redraw()

void ami_schedule_redraw ( struct gui_window_2 gwin,
bool  full_redraw 
)

Schedule a redraw of the browser window - Amiga-specific function.

Parameters
gwina struct gui_window_2
full_redrawset to true to schedule a full redraw, should only be set to false when called from amiga_window_invalidate_area()

Definition at line 5642 of file gui.c.

References ami_redraw_callback(), ami_schedule(), and gui_window_2::redraw_required.

Referenced by ami_gui_adjust_scale(), ami_gui_console_log_add(), ami_gui_console_log_remove(), ami_gui_hotlist_toolbar_add(), ami_gui_hotlist_toolbar_remove(), ami_gui_set_scale(), amiga_window_invalidate_area(), gui_window_set_scroll(), and HOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_set_pointer()

void ami_set_pointer ( struct gui_window_2 gwin,
gui_pointer_shape  shape,
bool  update 
)

Definition at line 689 of file gui.c.

References ami_gui2_get_window(), ami_update_pointer(), and gui_window_2::mouse_pointer.

Referenced by ami_do_redraw_tiled(), ami_gui_event(), ami_gui_window_update_box_deferred(), ami_refresh_window(), gui_window_save_link(), gui_window_set_pointer(), HOOKF(), and RXHOOKF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_text_box_at_point()

bool ami_text_box_at_point ( struct gui_window_2 gwin,
ULONG *restrict  x,
ULONG *restrict  y 
)

Definition at line 6184 of file gui.c.

References ami_get_hscroll_pos(), ami_get_vscroll_pos(), ami_gui_free_space_box(), ami_gui_get_space_box(), amiga_warn_user(), browser_window_get_features(), gui_window::bw, browser_window_features::CTX_FORM_TEXT, browser_window_features::form_features, GID_BROWSER, gui_window_2::gw, NSERROR_OK, and gui_window_2::objects.

Referenced by ami_drag_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_try_quit()

void ami_try_quit ( void  )

Definition at line 3905 of file gui.c.

References ami_gui_close_screen(), ami_quit, IsMinListEmpty, locked_screen, nsoption_bool, scrn, and window_list.

Referenced by ami_handle_msg(), gui_download_window_done(), and gui_window_destroy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ami_window_at_pointer()

void * ami_window_at_pointer ( int  type)

undocumented, or internal, or documented elsewhere

Todo:
check if OS4 version of this function will build on OS3, even if it isn't called

Definition at line 683 of file gui.c.

Referenced by ami_cw_drag_end(), ami_drag_selection(), ami_history_global_drag_end(), and ami_hotlist_drag_end().

Here is the caller graph for this function: