NetSurf
Data Structures | Functions | Variables
history_local.c File Reference

Implementation of Amiga local history using core windows. More...

#include <stdint.h>
#include <stdlib.h>
#include <proto/intuition.h>
#include <classes/window.h>
#include <gadgets/button.h>
#include <gadgets/layout.h>
#include <gadgets/scroller.h>
#include <gadgets/space.h>
#include <images/label.h>
#include <intuition/icclass.h>
#include <reaction/reaction_macros.h>
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/local_history.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "utils/nsurl.h"
#include "amiga/corewindow.h"
#include "amiga/gui.h"
#include "amiga/libs.h"
#include "amiga/history_local.h"
#include "amiga/utf8.h"
Include dependency graph for history_local.c:

Go to the source code of this file.

Data Structures

struct  ami_history_local_window
 Amiga local history viewing window context. More...
 

Functions

nserror ami_history_local_destroy (struct ami_history_local_window *history_local_win)
 destroy a previously created local history view More...
 
static void ami_history_local_destroy_cw (struct ami_corewindow *ami_cw)
 
static nserror ami_history_local_mouse (struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
 callback for mouse action for local history on core window More...
 
static nserror ami_history_local_key (struct ami_corewindow *ami_cw, uint32_t nskey)
 callback for keypress for local history on core window More...
 
static nserror ami_history_local_draw (struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
 callback on draw event for certificate verify on core window More...
 
static nserror ami_history_local_create_window (struct ami_history_local_window *history_local_win)
 
nserror ami_history_local_present (struct gui_window *gw)
 Open the global history viewer. More...
 

Variables

static struct ami_history_local_windowhistory_local_window = NULL
 

Detailed Description

Implementation of Amiga local history using core windows.

Definition in file history_local.c.

Function Documentation

◆ ami_history_local_create_window()

static nserror ami_history_local_create_window ( struct ami_history_local_window history_local_win)
static

Definition at line 192 of file history_local.c.

References ami_gui_get_screen(), ami_gui_get_screen_title(), ami_gui_get_shared_msgport(), BVS_DISPLAY, ami_history_local_window::core, GID_CW_DRAW, GID_CW_MAIN, GID_CW_WIN, IDCMP_EXTENDEDMOUSE, ami_corewindow::idcmp_hook, LayoutVObj, NSERROR_NOMEM, NSERROR_OK, nsoption_bool, ami_corewindow::objects, SpaceObj, WindowObj, and ami_corewindow::wintitle.

Referenced by ami_history_local_present().

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

◆ ami_history_local_destroy()

nserror ami_history_local_destroy ( struct ami_history_local_window history_local_win)

destroy a previously created local history view

Definition at line 74 of file history_local.c.

References ami_corewindow_fini(), ami_gui_set_history_window(), ami_history_local_window::core, ami_history_local_window::gw, history_local_window, local_history_fini(), NSERROR_OK, and ami_history_local_window::session.

Referenced by ami_history_local_destroy_cw(), and gui_window_destroy().

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

◆ ami_history_local_destroy_cw()

static void ami_history_local_destroy_cw ( struct ami_corewindow ami_cw)
static

Definition at line 91 of file history_local.c.

References ami_history_local_destroy().

Referenced by ami_history_local_present().

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

◆ ami_history_local_draw()

static nserror ami_history_local_draw ( struct ami_corewindow ami_cw,
int  x,
int  y,
struct rect r,
struct redraw_context ctx 
)
static

callback on draw event for certificate verify on core window

Parameters
ami_cwThe Amiga core window structure.
xthe x coordinate to draw
ythe y coordinate to draw
rThe rectangle of the window that needs updating.
ctxThe drawing context
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 178 of file history_local.c.

References local_history_redraw(), NSERROR_OK, and ami_history_local_window::session.

Referenced by ami_history_local_present().

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

◆ ami_history_local_key()

static nserror ami_history_local_key ( struct ami_corewindow ami_cw,
uint32_t  nskey 
)
static

callback for keypress for local history on core window

Parameters
ami_cwThe Amiga core window structure.
nskeyThe netsurf key code
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 154 of file history_local.c.

References local_history_keypress(), NSERROR_NOT_IMPLEMENTED, NSERROR_OK, and ami_history_local_window::session.

Referenced by ami_history_local_present().

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

◆ ami_history_local_mouse()

static nserror ami_history_local_mouse ( struct ami_corewindow ami_cw,
browser_mouse_state  mouse_state,
int  x,
int  y 
)
static

callback for mouse action for local history on core window

Parameters
ami_cwThe Amiga core window structure.
mouse_statenetsurf mouse state on event
xlocation of event
ylocation of event
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 110 of file history_local.c.

References GA_HintInfo, GID_CW_DRAW, local_history_get_url(), local_history_mouse_action(), NSERROR_OK, nsurl_access(), nsurl_unref(), ami_corewindow::objects, ami_history_local_window::session, and ami_corewindow::win.

Referenced by ami_history_local_present().

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

◆ ami_history_local_present()

nserror ami_history_local_present ( struct gui_window gw)

Variable Documentation

◆ history_local_window

struct ami_history_local_window* history_local_window = NULL
static

Definition at line 68 of file history_local.c.

Referenced by ami_history_local_destroy(), and ami_history_local_present().