NetSurf
|
#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"
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_window * | ami_gui_get_active_gw (void) |
Get a pointer to the gui_window which NetSurf considers to be the current/active one. More... | |
struct browser_window * | ami_gui_get_browser_window (struct gui_window *gw) |
Get browser window from gui_window. More... | |
struct browser_window * | ami_gui2_get_browser_window (struct gui_window_2 *gwin) |
Get browser window from gui_window_2. More... | |
struct gui_window_2 * | ami_gui_get_gui_window_2 (struct gui_window *gw) |
Get gui_window_2 from gui_window. More... | |
struct gui_window * | ami_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_handle * | ami_gui_get_favicon (struct gui_window *gw) |
Get favicon from gui_window. More... | |
struct ami_history_local_window * | ami_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... | |
#define IS_CURRENT_GW | ( | GWIN, | |
GW | |||
) | (ami_gui2_get_gui_window(GWIN) == GW) |
anonymous enum |
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().
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().
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().
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.
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.
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().
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().
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().
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().
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().
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().
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().
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.
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.
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().
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().
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().
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().
void ami_gui_close_inactive_tabs | ( | struct gui_window_2 * | gwin | ) |
Close all tabs in a window except the active one.
gwin | gui_window_2 to act upon. |
Definition at line 5484 of file gui.c.
References ami_gui_close_tabs().
void ami_gui_close_window | ( | void * | w | ) |
Close a window and all tabs attached to it.
w | gui_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().
int ami_gui_count_windows | ( | int | window, |
int * | tabs | ||
) |
Count windows, and optionally tabs.
window | window to count tabs of |
tabs | if window > 0, will be updated to contain the number of tabs in that window, unchanged otherwise |
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().
void ami_gui_free_space_box | ( | struct IBox * | bbox | ) |
Free any data obtained via ami_gui_get_space_box().
bbox | A 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().
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().
uint32 ami_gui_get_app_id | ( | void | ) |
Get the application.library ID NetSurf is registered as.
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().
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().
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().
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().
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().
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().
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().
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().
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().
struct Screen * ami_gui_get_screen | ( | void | ) |
Get a pointer to the screen NetSurf is running on.
Definition at line 404 of file gui.c.
References scrn.
Referenced by ami_bitmap(), ami_bitmap_get_generic(), ami_clearclipreg(), ami_cookies_create_window(), ami_cw_drag_end(), ami_file_open(), ami_file_save_req(), ami_font_scan_gui_open(), ami_gui_opts_event(), ami_gui_opts_open(), ami_history_global_create_window(), ami_history_local_create_window(), ami_hotlist_create_window(), ami_menu_layout_gt(), ami_pageinfo_create_window(), ami_plot_obtain_pen(), ami_plot_ra_alloc(), ami_plot_release_pens(), ami_print_progress(), ami_print_ui(), ami_search_open(), gui_download_window_create(), gui_window_save_link(), HOOKF(), and RXHOOKF().
STRPTR ami_gui_get_screen_title | ( | void | ) |
Get the string for NetSurf's screen titlebar.
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().
struct MsgPort * ami_gui_get_shared_msgport | ( | void | ) |
Get shared message port.
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().
nserror ami_gui_get_space_box | ( | Object * | obj, |
struct IBox ** | bbox | ||
) |
Compatibility function to get space.gadget render area.
obj | A space.gadget object. |
bbox | A pointer to a struct IBox *. |
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
void ami_gui_set_scale | ( | struct gui_window * | gw, |
float | scale | ||
) |
Set the scale of a gui window.
gw | gui_window to set scale for |
scale | scale 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().
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().
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().
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().
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().
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().
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().
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().
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().
int ami_key_to_nskey | ( | ULONG | keycode, |
struct InputEvent * | ie | ||
) |
Definition at line 1705 of file gui.c.
References buffer, NS_KEY_COPY_SELECTION, NS_KEY_CUT_SELECTION, NS_KEY_DELETE_LEFT, NS_KEY_DELETE_LINE_END, NS_KEY_DELETE_LINE_START, NS_KEY_DELETE_RIGHT, NS_KEY_DOWN, NS_KEY_ESCAPE, NS_KEY_LEFT, NS_KEY_LINE_END, NS_KEY_LINE_START, NS_KEY_PAGE_DOWN, NS_KEY_PAGE_UP, NS_KEY_PASTE, NS_KEY_REDO, NS_KEY_RIGHT, NS_KEY_SELECT_ALL, NS_KEY_SHIFT_TAB, NS_KEY_TAB, NS_KEY_TEXT_END, NS_KEY_TEXT_START, NS_KEY_UNDO, NS_KEY_UP, NS_KEY_WORD_LEFT, NS_KEY_WORD_RIGHT, NSA_QUAL_ALT, NSA_QUAL_SHIFT, NSERROR_OK, RAWKEY_BACKSPACE, RAWKEY_CRSRDOWN, RAWKEY_CRSRLEFT, RAWKEY_CRSRRIGHT, RAWKEY_CRSRUP, RAWKEY_DEL, RAWKEY_END, RAWKEY_ESC, RAWKEY_F10, RAWKEY_F12, RAWKEY_F5, RAWKEY_F8, RAWKEY_F9, RAWKEY_HELP, RAWKEY_HOME, RAWKEY_PAGEDOWN, RAWKEY_PAGEUP, RAWKEY_TAB, utf8_char_byte_length(), utf8_from_local_encoding(), and utf8_to_ucs4().
Referenced by ami_cw_event(), and ami_gui_event().
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().
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().
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().
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().
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().
void ami_schedule_redraw | ( | struct gui_window_2 * | gwin, |
bool | full_redraw | ||
) |
Schedule a redraw of the browser window - Amiga-specific function.
gwin | a struct gui_window_2 |
full_redraw | set 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().
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().
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().
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().
void * ami_window_at_pointer | ( | int | type | ) |
undocumented, or internal, or documented elsewhere
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().