NetSurf
|
Implementation of RISC OS local history. More...
#include <stdint.h>
#include <stdlib.h>
#include <oslib/wimp.h>
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
#include "utils/nsurl.h"
#include "netsurf/window.h"
#include "netsurf/plotters.h"
#include "netsurf/keypress.h"
#include "desktop/local_history.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
#include "riscos/menus.h"
#include "riscos/save.h"
#include "riscos/toolbar.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "riscos/corewindow.h"
#include "riscos/local_history.h"
Go to the source code of this file.
Data Structures | |
struct | ro_local_history_window |
Functions | |
static nserror | ro_local_history_draw (struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r) |
callback to draw on drawable area of ro local history window More... | |
static nserror | ro_local_history_key (struct ro_corewindow *ro_cw, uint32_t nskey) |
callback for keypress on ro coookie window More... | |
static nserror | ro_local_history_tooltip (struct ro_local_history_window *lhw, int x, int y) |
handle hover mouse movement for tooltips More... | |
static nserror | ro_local_history_mouse (struct ro_corewindow *ro_cw, browser_mouse_state mouse_state, int x, int y) |
callback for mouse event on ro local_history window More... | |
static nserror | ro_local_history_init (struct browser_window *bw, struct ro_local_history_window **win_out) |
Creates the window for the local_history tree. More... | |
static nserror | ro_local_history_open (struct ro_local_history_window *lhw, wimp_w parent) |
open RISC OS local history window at the correct size More... | |
nserror | ro_gui_local_history_present (wimp_w parent, struct browser_window *bw) |
make the local history window visible. More... | |
void | ro_gui_local_history_initialise (void) |
initialise the local history window template ready for subsequent use. More... | |
nserror | ro_gui_local_history_finalise (void) |
Free any resources allocated for the local history window. More... | |
Variables | |
static struct ro_local_history_window * | local_history_window = NULL |
local_history window is a singleton More... | |
static wimp_window * | dialog_local_history_template |
riscos template for local_history window More... | |
Implementation of RISC OS local history.
Definition in file local_history.c.
nserror ro_gui_local_history_finalise | ( | void | ) |
Free any resources allocated for the local history window.
Definition at line 444 of file local_history.c.
References ro_local_history_window::core, local_history_fini(), local_history_window, NSERROR_OK, ro_corewindow_fini(), and ro_local_history_window::session.
Referenced by gui_quit().
void ro_gui_local_history_initialise | ( | void | ) |
initialise the local history window template ready for subsequent use.
Definition at line 437 of file local_history.c.
References dialog_local_history_template, and ro_gui_dialog_load_template().
Referenced by ro_gui_dialog_init().
nserror ro_gui_local_history_present | ( | wimp_w | parent, |
struct browser_window * | bw | ||
) |
make the local history window visible.
Definition at line 420 of file local_history.c.
References local_history_window, NSERROR_OK, NSLOG, parent, ro_local_history_init(), and ro_local_history_open().
Referenced by ro_gui_window_action_local_history().
|
static |
callback to draw on drawable area of ro local history window
ro_cw | The riscos core window structure. |
r | The rectangle of the window that needs updating. |
originx | The risc os plotter x origin. |
originy | The risc os plotter y origin. |
Definition at line 77 of file local_history.c.
References redraw_context::interactive, local_history_redraw(), no_font_blending, NSERROR_OK, ro_plot_origin_x, ro_plot_origin_y, ro_plotters, and ro_local_history_window::session.
Referenced by ro_local_history_init().
|
static |
Creates the window for the local_history tree.
Definition at line 289 of file local_history.c.
References ro_local_history_window::core, dialog_local_history_template, ro_corewindow::draw, ro_corewindow::key, local_history_init(), local_history_set(), ro_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, NSLOG, ro_corewindow_init(), ro_local_history_draw(), ro_local_history_key(), ro_local_history_mouse(), ro_warn_user(), ro_local_history_window::session, and ro_corewindow::wh.
Referenced by ro_gui_local_history_present().
|
static |
callback for keypress on ro coookie window
ro_cw | The ro core window structure. |
nskey | The netsurf key code. |
Definition at line 111 of file local_history.c.
References local_history_keypress(), NSERROR_NOT_IMPLEMENTED, NSERROR_OK, and ro_local_history_window::session.
Referenced by ro_local_history_init().
|
static |
callback for mouse event on ro local_history window
ro_cw | The ro core window structure. |
mouse_state | mouse state |
x | location of event |
y | location of event |
Definition at line 256 of file local_history.c.
References BROWSER_MOUSE_HOVER, BROWSER_MOUSE_LEAVE, dialog_tooltip, local_history_mouse_action(), NSERROR_OK, ro_gui_dialog_close(), ro_local_history_tooltip(), ro_local_history_window::session, ro_local_history_window::x, and ro_local_history_window::y.
Referenced by ro_local_history_init().
|
static |
open RISC OS local history window at the correct size
Definition at line 354 of file local_history.c.
References ro_local_history_window::core, height, local_history_get_size(), local_history_scroll_to_cursor(), NSERROR_NOMEM, NSERROR_OK, NSLOG, parent, PTR_WIMP_OPEN, ro_gui_dialog_open_persistent(), ro_warn_user(), ro_local_history_window::session, ro_corewindow::wh, and width.
Referenced by ro_gui_local_history_present().
|
static |
handle hover mouse movement for tooltips
Definition at line 128 of file local_history.c.
References dialog_tooltip, local_history_get_url(), NSERROR_NOMEM, NSERROR_OK, NSLOG, nsoption_bool, nsurl_access(), nsurl_length(), nsurl_unref(), PTR_WIMP_OPEN, ro_gui_set_icon_string(), ro_warn_user(), ro_local_history_window::session, width, ro_local_history_window::x, and ro_local_history_window::y.
Referenced by ro_local_history_mouse().
|
static |
riscos template for local_history window
Definition at line 64 of file local_history.c.
Referenced by ro_gui_local_history_initialise(), and ro_local_history_init().
|
static |
local_history window is a singleton
Definition at line 61 of file local_history.c.
Referenced by ro_gui_local_history_finalise(), and ro_gui_local_history_present().