NetSurf
Macros | Enumerations | Functions | Variables
arexx.c File Reference
#include "amiga/os3support.h"
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <proto/intuition.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/clicktab.h>
#include <gadgets/clicktab.h>
#include <reaction/reaction_macros.h>
#include "utils/log.h"
#include "utils/nsoption.h"
#include "utils/nsurl.h"
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
#include "desktop/version.h"
#include "amiga/arexx.h"
#include "amiga/gui.h"
#include "amiga/download.h"
#include "amiga/hotlist.h"
#include "amiga/libs.h"
#include "amiga/misc.h"
#include "amiga/theme.h"
#include "amiga/memory.h"
Include dependency graph for arexx.c:

Go to the source code of this file.

Macros

#define RXHOOKF(func)   static ASM VOID func(REG(a0, struct ARexxCmd* cmd), REG(a1, struct RexxMsg* msg))
 

Enumerations

enum  {
  RX_OPEN =0 , RX_QUIT , RX_TOFRONT , RX_GETURL ,
  RX_GETTITLE , RX_VERSION , RX_SAVE , RX_PUBSCREEN ,
  RX_BACK , RX_FORWARD , RX_HOME , RX_RELOAD ,
  RX_WINDOWS , RX_ACTIVE , RX_CLOSE , RX_HOTLIST ,
  RX_SLABSTATS , RX_EXEC
}
 

Functions

 RXHOOKF (rx_open)
 
 RXHOOKF (rx_quit)
 
 RXHOOKF (rx_tofront)
 
 RXHOOKF (rx_geturl)
 
 RXHOOKF (rx_gettitle)
 
 RXHOOKF (rx_version)
 
 RXHOOKF (rx_save)
 
 RXHOOKF (rx_pubscreen)
 
 RXHOOKF (rx_back)
 
 RXHOOKF (rx_forward)
 
 RXHOOKF (rx_home)
 
 RXHOOKF (rx_reload)
 
 RXHOOKF (rx_windows)
 
 RXHOOKF (rx_active)
 
 RXHOOKF (rx_close)
 
 RXHOOKF (rx_hotlist)
 
 RXHOOKF (rx_slabstats)
 
 RXHOOKF (rx_exec)
 
bool ami_arexx_init (ULONG *rxsig)
 
void ami_arexx_handle (void)
 
static void ami_arexx_command (const char *cmd, const char *port)
 
void ami_arexx_self (const char *cmd)
 
void ami_arexx_execute (char *script)
 
void ami_arexx_cleanup (void)
 
static struct gui_windowami_find_tab_gwin (struct gui_window_2 *gwin, int tab)
 
static int ami_find_tab_bw (struct gui_window_2 *gwin, struct browser_window *bw)
 
static struct gui_windowami_find_tab (int window, int tab)
 

Variables

const char *const verarexx
 
const char *const wt_revid
 
static Object * arexx_obj = NULL
 
STATIC char result [100]
 
STATIC struct ARexxCmd Commands []
 

Macro Definition Documentation

◆ RXHOOKF

#define RXHOOKF (   func)    static ASM VOID func(REG(a0, struct ARexxCmd* cmd), REG(a1, struct RexxMsg* msg))

Definition at line 82 of file arexx.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RX_OPEN 
RX_QUIT 
RX_TOFRONT 
RX_GETURL 
RX_GETTITLE 
RX_VERSION 
RX_SAVE 
RX_PUBSCREEN 
RX_BACK 
RX_FORWARD 
RX_HOME 
RX_RELOAD 
RX_WINDOWS 
RX_ACTIVE 
RX_CLOSE 
RX_HOTLIST 
RX_SLABSTATS 
RX_EXEC 

Definition at line 54 of file arexx.c.

Function Documentation

◆ ami_arexx_cleanup()

void ami_arexx_cleanup ( void  )

Definition at line 185 of file arexx.c.

References arexx_obj.

Referenced by gui_quit().

Here is the caller graph for this function:

◆ ami_arexx_command()

static void ami_arexx_command ( const char *  cmd,
const char *  port 
)
static

Definition at line 161 of file arexx.c.

References arexx_obj, and IDoMethod.

Referenced by ami_arexx_execute(), and ami_arexx_self().

Here is the caller graph for this function:

◆ ami_arexx_execute()

void ami_arexx_execute ( char *  script)

Definition at line 172 of file arexx.c.

References ami_arexx_command(), DevNameFromLock, DN_FULLPATH, and NSLOG.

Referenced by HOOKF(), and main().

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

◆ ami_arexx_handle()

void ami_arexx_handle ( void  )

Definition at line 156 of file arexx.c.

References arexx_obj.

Referenced by ami_get_msg().

Here is the caller graph for this function:

◆ ami_arexx_init()

bool ami_arexx_init ( ULONG *  rxsig)

Definition at line 127 of file arexx.c.

References arexx_obj, ARexxObj, Commands, and rxsig.

Referenced by gui_init2().

Here is the caller graph for this function:

◆ ami_arexx_self()

void ami_arexx_self ( const char *  cmd)

Definition at line 167 of file arexx.c.

References ami_arexx_command().

Referenced by gui_init2().

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

◆ ami_find_tab()

static struct gui_window * ami_find_tab ( int  window,
int  tab 
)
static

Definition at line 238 of file arexx.c.

References ami_find_tab_gwin(), ami_gui_get_window_list(), AMINS_WINDOW, GetHead(), GetSucc(), IsMinListEmpty, nsObject::objstruct, nsObject::Type, and window_list.

Referenced by RXHOOKF().

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

◆ ami_find_tab_bw()

static int ami_find_tab_bw ( struct gui_window_2 gwin,
struct browser_window bw 
)
static

Definition at line 214 of file arexx.c.

References ami_gui2_get_tab_list(), ami_gui2_get_tabs(), ami_gui_get_browser_window(), gui_window::bw, GetHead(), GetSucc(), and tabs.

Referenced by RXHOOKF().

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

◆ ami_find_tab_gwin()

static struct gui_window * ami_find_tab_gwin ( struct gui_window_2 gwin,
int  tab 
)
static

Definition at line 190 of file arexx.c.

References ami_gui2_get_gui_window(), ami_gui2_get_tab_list(), ami_gui2_get_tabs(), GetHead(), GetSucc(), gui_window::tab, and tabs.

Referenced by ami_find_tab().

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

◆ RXHOOKF() [1/18]

RXHOOKF ( rx_active  )

Definition at line 608 of file arexx.c.

References ami_find_tab_bw(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), ami_gui_get_window_list(), AMINS_WINDOW, GetHead(), GetSucc(), IS_CURRENT_GW, IsMinListEmpty, nsObject::objstruct, result, gui_window::tab, nsObject::Type, gui_window::window, and window_list.

Here is the call graph for this function:

◆ RXHOOKF() [2/18]

RXHOOKF ( rx_back  )

Definition at line 520 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_gui_window_2(), and ami_gui_history().

Here is the call graph for this function:

◆ RXHOOKF() [3/18]

RXHOOKF ( rx_close  )

Definition at line 652 of file arexx.c.

References ami_find_tab(), ami_gui_close_window(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), ami_gui_get_gui_window_2(), and browser_window_destroy().

Here is the call graph for this function:

◆ RXHOOKF() [4/18]

RXHOOKF ( rx_exec  )

Definition at line 680 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), browser_window_exec(), NSLOG, and nsoption_bool.

Here is the call graph for this function:

◆ RXHOOKF() [5/18]

RXHOOKF ( rx_forward  )

Definition at line 532 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_gui_window_2(), and ami_gui_history().

Here is the call graph for this function:

◆ RXHOOKF() [6/18]

RXHOOKF ( rx_gettitle  )

Definition at line 414 of file arexx.c.

References ami_find_tab(), ami_gui2_get_tabs(), ami_gui_get_active_gw(), ami_gui_get_gui_window_2(), ami_gui_get_tab_title(), ami_gui_get_win_title(), and result.

Here is the call graph for this function:

◆ RXHOOKF() [7/18]

RXHOOKF ( rx_geturl  )

Definition at line 393 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), browser_window_access_url(), nsurl_access(), and result.

Here is the call graph for this function:

◆ RXHOOKF() [8/18]

RXHOOKF ( rx_home  )

Definition at line 545 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), amiga_warn_user(), browser_window_navigate(), BW_NAVIGATE_HISTORY, NSERROR_OK, nsoption_charp, nsurl_create(), nsurl_unref(), and gui_window::url.

Here is the call graph for this function:

◆ RXHOOKF() [9/18]

RXHOOKF ( rx_hotlist  )

Definition at line 669 of file arexx.c.

References ami_hotlist_close(), and ami_hotlist_present().

Here is the call graph for this function:

◆ RXHOOKF() [10/18]

RXHOOKF ( rx_open  )

◆ RXHOOKF() [11/18]

RXHOOKF ( rx_pubscreen  )

Definition at line 504 of file arexx.c.

References nsoption_charp, and result.

◆ RXHOOKF() [12/18]

RXHOOKF ( rx_quit  )

Definition at line 381 of file arexx.c.

References ami_quit_netsurf().

Here is the call graph for this function:

◆ RXHOOKF() [13/18]

RXHOOKF ( rx_reload  )

Definition at line 571 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), and browser_window_reload().

Here is the call graph for this function:

◆ RXHOOKF() [14/18]

RXHOOKF ( rx_save  )

Definition at line 350 of file arexx.c.

References ami_find_tab(), ami_gui_get_active_gw(), ami_gui_get_browser_window(), ami_gui_get_gui_window_2(), ami_reset_pointer(), ami_set_pointer(), browser_window_access_url(), browser_window_get_content(), content_get_source_data(), FClose, FOpen, GUI_POINTER_WAIT, and nsurl_access().

Here is the call graph for this function:

◆ RXHOOKF() [15/18]

RXHOOKF ( rx_slabstats  )

Definition at line 707 of file arexx.c.

References ami_memory_slab_dump().

Here is the call graph for this function:

◆ RXHOOKF() [16/18]

RXHOOKF ( rx_tofront  )

Definition at line 387 of file arexx.c.

References ami_gui_get_screen().

Here is the call graph for this function:

◆ RXHOOKF() [17/18]

RXHOOKF ( rx_version  )

◆ RXHOOKF() [18/18]

RXHOOKF ( rx_windows  )

Definition at line 593 of file arexx.c.

References ami_gui_count_windows(), result, tabs, and gui_window::window.

Here is the call graph for this function:

Variable Documentation

◆ arexx_obj

Object* arexx_obj = NULL
static

Definition at line 76 of file arexx.c.

Referenced by ami_arexx_cleanup(), ami_arexx_command(), ami_arexx_handle(), and ami_arexx_init().

◆ Commands

STATIC struct ARexxCmd Commands[]
Initial value:
=
{
{"OPEN",RX_OPEN,rx_open,"URL/A,NEW=NEWWINDOW/S,NEWTAB/S,SAVEAS/K,W=WINDOW/K/N,T=TAB/K/N,ACTIVE/S", 0, NULL, 0, 0, NULL },
{"QUIT",RX_QUIT,rx_quit,NULL, 0, NULL, 0, 0, NULL },
{"TOFRONT",RX_TOFRONT,rx_tofront,NULL, 0, NULL, 0, 0, NULL },
{"GETURL",RX_GETURL,rx_geturl, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"GETTITLE",RX_GETTITLE,rx_gettitle, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"VERSION",RX_VERSION,rx_version,"VERSION/N,SVN=REVISION/N,RELEASE/S", 0, NULL, 0, 0, NULL },
{"SAVE",RX_SAVE,rx_save,"FILENAME/A,W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"GETSCREENNAME",RX_PUBSCREEN,rx_pubscreen,NULL, 0, NULL, 0, 0, NULL },
{"BACK", RX_BACK, rx_back, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"FORWARD", RX_FORWARD, rx_forward, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"HOME", RX_HOME, rx_home, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"RELOAD", RX_RELOAD, rx_reload, "FORCE/S,W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"WINDOWS", RX_WINDOWS, rx_windows, "W=WINDOW/K/N", 0, NULL, 0, 0, NULL },
{"ACTIVE", RX_ACTIVE, rx_active, "T=TAB/S", 0, NULL, 0, 0, NULL },
{"CLOSE", RX_CLOSE, rx_close, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"HOTLIST", RX_HOTLIST, rx_hotlist, "A=ACTION/A", 0, NULL, 0, 0, NULL },
{"SLABSTATS", RX_SLABSTATS, rx_slabstats, "FILE", 0, NULL, 0, 0, NULL },
{"EXEC", RX_EXEC, rx_exec, "W=WINDOW/K/N,T=TAB/K/N,COMMAND/A/F", 0, NULL, 0, 0, NULL },
{ NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL }
}
@ RX_SAVE
Definition: arexx.c:62
@ RX_HOTLIST
Definition: arexx.c:71
@ RX_GETURL
Definition: arexx.c:59
@ RX_CLOSE
Definition: arexx.c:70
@ RX_RELOAD
Definition: arexx.c:67
@ RX_VERSION
Definition: arexx.c:61
@ RX_PUBSCREEN
Definition: arexx.c:63
@ RX_BACK
Definition: arexx.c:64
@ RX_ACTIVE
Definition: arexx.c:69
@ RX_OPEN
Definition: arexx.c:56
@ RX_TOFRONT
Definition: arexx.c:58
@ RX_QUIT
Definition: arexx.c:57
@ RX_HOME
Definition: arexx.c:66
@ RX_FORWARD
Definition: arexx.c:65
@ RX_WINDOWS
Definition: arexx.c:68
@ RX_EXEC
Definition: arexx.c:73
@ RX_GETTITLE
Definition: arexx.c:60
@ RX_SLABSTATS
Definition: arexx.c:72

Definition at line 104 of file arexx.c.

Referenced by ami_arexx_init().

◆ result

STATIC char result[100]

Definition at line 77 of file arexx.c.

Referenced by ami_cw_event(), ami_download_window_event(), ami_gui_event(), ami_gui_opts_event(), ami_pageinfo_event(), ami_print_event(), ami_search_event(), ami_utf8_codesets(), box_extract_link(), box_get_attribute(), browser_window_up_available(), check_duplicates(), duk_bi_string_prototype_includes(), fetch_curl_done(), fetch_multipart_data_clone(), fire_dom_event(), fire_dom_keyboard_event(), fire_generic_dom_event(), gif_create(), gui_default_utf8(), hlcache_handle_clone(), hlcache_handle_get_url(), hlcache_handle_retrieve(), html_exec(), html_redraw(), http__parse_challenge(), http__parse_directive(), http_parse_cache_control(), http_parse_content_disposition(), http_parse_content_type(), http_parse_strict_transport_security(), http_parse_www_authenticate(), layout_flex__distribute_free_main(), llcache_handle_clone(), llcache_handle_retrieve(), llcache_hsts_transform_url(), llcache_object_new(), llcache_object_retrieve(), llcache_object_retrieve_from_cache(), nsbeos_bitmap_generate_pretile(), nscss_create(), nscss_parse_colour(), nsgtk_download_dialog_show(), nsico_create(), nsws_window_urlbar_callback(), parse_max_age(), parse_named_colour(), ro_gui_theme_open(), RXHOOKF(), save_as_text(), save_complete(), save_complete_save_html_object(), save_complete_save_stylesheet(), SPrintfN(), timeval_subtract(), url_escape(), url_unescape(), utf8_convert(), utf8_from_enc(), utf8_from_local(), utf8_from_local_encoding(), utf8_to_enc(), utf8_to_font_encoding(), utf8_to_html(), utf8_to_local(), utf8_to_local_encoding(), and VSPrintfN().

◆ verarexx

const char* const verarexx
extern

Referenced by RXHOOKF().

◆ wt_revid

const char* const wt_revid
extern

Referenced by RXHOOKF().