NetSurf
|
Implementation of GTK local history manager. More...
#include <stdint.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/local_history.h"
#include "gtk/compat.h"
#include "gtk/plotters.h"
#include "gtk/resources.h"
#include "gtk/corewindow.h"
#include "gtk/local_history.h"
#include "gtk/scaffolding.h"
Go to the source code of this file.
Data Structures | |
struct | nsgtk_local_history_window |
Functions | |
static nserror | nsgtk_local_history_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y) |
callback for mouse action on local history window More... | |
static nserror | nsgtk_local_history_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey) |
callback for keypress on local history window More... | |
static nserror | nsgtk_local_history_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r) |
callback on draw event for local history window More... | |
static nserror | nsgtk_local_history_init (struct browser_window *bw, struct nsgtk_local_history_window **win_out) |
Creates the window for the local history view. More... | |
nserror | nsgtk_local_history_present (GtkWindow *parent, struct browser_window *bw) |
make the local history window visible. More... | |
nserror | nsgtk_local_history_hide (void) |
hide the local history window from being visible. More... | |
nserror | nsgtk_local_history_destroy (void) |
Destroys the local history window and performs any other necessary cleanup actions. More... | |
void | nsgtk_local_history_set_position (int x, int y) |
set the local history window position. More... | |
Variables | |
static struct nsgtk_local_history_window * | local_history_window = NULL |
Implementation of GTK local history manager.
Definition in file local_history.c.
nserror nsgtk_local_history_destroy | ( | void | ) |
Destroys the local history window and performs any other necessary cleanup actions.
Definition at line 276 of file local_history.c.
References nsgtk_local_history_window::builder, nsgtk_local_history_window::core, local_history_fini(), local_history_window, NSERROR_OK, nsgtk_corewindow_fini(), nsgtk_local_history_window::session, and nsgtk_local_history_window::wnd.
Referenced by nsgtk_finalise().
|
static |
callback on draw event for local history window
nsgtk_cw | The nsgtk core window structure. |
r | The rectangle of the window that needs updating. |
Definition at line 107 of file local_history.c.
References plotter_table::clip, redraw_context::interactive, local_history_redraw(), NSERROR_OK, nsgtk_plotters, redraw_context::plot, and nsgtk_local_history_window::session.
Referenced by nsgtk_local_history_init().
nserror nsgtk_local_history_hide | ( | void | ) |
hide the local history window from being visible.
Definition at line 261 of file local_history.c.
References local_history_set(), local_history_window, NSERROR_OK, nsgtk_local_history_window::session, and nsgtk_local_history_window::wnd.
Referenced by back_button_clicked_cb(), forward_button_clicked_cb(), nsgtk_toolbar_throbber(), nsgtk_window_button_press_event(), scaffolding_update_context(), and scaffolding_window_destroy().
|
static |
Creates the window for the local history view.
Definition at line 131 of file local_history.c.
References nsgtk_local_history_window::builder, nsgtk_local_history_window::core, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, nsgtk_corewindow::key, local_history_init(), local_history_set(), nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_corewindow_init(), nsgtk_local_history_draw(), nsgtk_local_history_key(), nsgtk_local_history_mouse(), NSLOG, nsgtk_corewindow::scrolled, nsgtk_local_history_window::session, and nsgtk_local_history_window::wnd.
Referenced by nsgtk_local_history_present().
|
static |
callback for keypress on local history window
nsgtk_cw | The nsgtk core window structure. |
nskey | The netsurf key code |
Definition at line 86 of file local_history.c.
References local_history_keypress(), NSERROR_NOT_IMPLEMENTED, NSERROR_OK, and nsgtk_local_history_window::session.
Referenced by nsgtk_local_history_init().
|
static |
callback for mouse action on local history window
nsgtk_cw | The nsgtk core window structure. |
mouse_state | netsurf mouse state on event |
x | location of event |
y | location of event |
Definition at line 64 of file local_history.c.
References local_history_mouse_action(), NSERROR_OK, and nsgtk_local_history_window::session.
Referenced by nsgtk_local_history_init().
nserror nsgtk_local_history_present | ( | GtkWindow * | parent, |
struct browser_window * | bw | ||
) |
make the local history window visible.
Definition at line 217 of file local_history.c.
References height, local_history_get_size(), local_history_scroll_to_cursor(), local_history_window, NSERROR_OK, nsgtk_current_scaffolding(), nsgtk_local_history_init(), nsgtk_scaffolding_position_local_history(), parent, nsgtk_local_history_window::session, width, and nsgtk_local_history_window::wnd.
Referenced by localhistory_button_clicked_cb().
void nsgtk_local_history_set_position | ( | int | x, |
int | y | ||
) |
set the local history window position.
Definition at line 298 of file local_history.c.
References local_history_window, NSLOG, and nsgtk_local_history_window::wnd.
Referenced by nsgtk_toolbar_position_local_history().
|
static |
Definition at line 50 of file local_history.c.
Referenced by nsgtk_local_history_destroy(), nsgtk_local_history_hide(), nsgtk_local_history_present(), and nsgtk_local_history_set_position().