|
NetSurf
|
Implementation of GTK global 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/global_history.h"#include "gtk/compat.h"#include "gtk/plotters.h"#include "gtk/resources.h"#include "gtk/corewindow.h"#include "gtk/global_history.h"Go to the source code of this file.
Data Structures | |
| struct | nsgtk_global_history_window |
| struct | menu_events |
Macros | |
| #define | MENUPROTO(x) |
| #define | MENUEVENT(x) { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
| #define | MENUHANDLER(x) |
Functions | |
| MENUPROTO (export) | |
| MENUPROTO (delete_selected) | |
| MENUPROTO (delete_all) | |
| MENUPROTO (select_all) | |
| MENUPROTO (clear_selection) | |
| MENUPROTO (expand_all) | |
| MENUPROTO (expand_directories) | |
| MENUPROTO (expand_addresses) | |
| MENUPROTO (collapse_all) | |
| MENUPROTO (collapse_directories) | |
| MENUPROTO (collapse_addresses) | |
| MENUPROTO (launch) | |
| MENUHANDLER (delete_selected) | |
| MENUHANDLER (delete_all) | |
| MENUHANDLER (select_all) | |
| MENUHANDLER (clear_selection) | |
| MENUHANDLER (expand_all) | |
| MENUHANDLER (expand_directories) | |
| MENUHANDLER (expand_addresses) | |
| MENUHANDLER (collapse_all) | |
| MENUHANDLER (collapse_directories) | |
| MENUHANDLER (collapse_addresses) | |
| MENUHANDLER (launch) | |
| MENUHANDLER (export) | |
| static void | nsgtk_global_history_init_menu (struct nsgtk_global_history_window *ghwin) |
| Connects menu events in the global history window. More... | |
| static nserror | nsgtk_global_history_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y) |
| callback for mouse action on global history window More... | |
| static nserror | nsgtk_global_history_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey) |
| callback for keypress on global history window More... | |
| static nserror | nsgtk_global_history_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r) |
| callback on draw event for global history window More... | |
| static nserror | nsgtk_global_history_init (void) |
| Creates the window for the global history tree. More... | |
| nserror | nsgtk_global_history_present (void) |
| make the global history window visible. More... | |
| nserror | nsgtk_global_history_destroy (void) |
| Destroys the global history window and performs any other necessary cleanup actions. More... | |
Variables | |
| static struct nsgtk_global_history_window * | global_history_window = NULL |
| static struct menu_events | menu_events [] |
Implementation of GTK global history manager.
Definition in file global_history.c.
| #define MENUEVENT | ( | x | ) | { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
Definition at line 50 of file global_history.c.
| #define MENUHANDLER | ( | x | ) |
Definition at line 51 of file global_history.c.
| #define MENUPROTO | ( | x | ) |
Definition at line 48 of file global_history.c.
| MENUHANDLER | ( | clear_selection | ) |
Definition at line 125 of file global_history.c.
References global_history_keypress(), NS_KEY_CLEAR_SELECTION, and NS_KEY_ESCAPE.
| MENUHANDLER | ( | collapse_addresses | ) |
Definition at line 164 of file global_history.c.
References global_history_contract().
| MENUHANDLER | ( | collapse_all | ) |
Definition at line 152 of file global_history.c.
References global_history_contract().
| MENUHANDLER | ( | collapse_directories | ) |
Definition at line 158 of file global_history.c.
References global_history_contract().
| MENUHANDLER | ( | delete_all | ) |
Definition at line 108 of file global_history.c.
References global_history_keypress(), NS_KEY_DELETE_LEFT, NS_KEY_ESCAPE, and NS_KEY_SELECT_ALL.
| MENUHANDLER | ( | delete_selected | ) |
Definition at line 102 of file global_history.c.
References global_history_keypress(), and NS_KEY_DELETE_LEFT.
| MENUHANDLER | ( | expand_addresses | ) |
Definition at line 146 of file global_history.c.
References global_history_expand().
| MENUHANDLER | ( | expand_all | ) |
Definition at line 134 of file global_history.c.
References global_history_expand().
| MENUHANDLER | ( | expand_directories | ) |
Definition at line 140 of file global_history.c.
References global_history_expand().
| MENUHANDLER | ( | export | ) |
Definition at line 177 of file global_history.c.
References global_history_export(), NSGTK_STOCK_CANCEL, NSGTK_STOCK_SAVE, and nsgtk_global_history_window::wnd.
| MENUHANDLER | ( | launch | ) |
Definition at line 170 of file global_history.c.
References global_history_keypress(), and NS_KEY_CR.
| MENUHANDLER | ( | select_all | ) |
Definition at line 117 of file global_history.c.
References global_history_keypress(), NS_KEY_ESCAPE, and NS_KEY_SELECT_ALL.
| MENUPROTO | ( | clear_selection | ) |
| MENUPROTO | ( | collapse_addresses | ) |
| MENUPROTO | ( | collapse_all | ) |
| MENUPROTO | ( | collapse_directories | ) |
| MENUPROTO | ( | delete_all | ) |
| MENUPROTO | ( | delete_selected | ) |
| MENUPROTO | ( | expand_addresses | ) |
| MENUPROTO | ( | expand_all | ) |
| MENUPROTO | ( | expand_directories | ) |
| MENUPROTO | ( | export | ) |
| MENUPROTO | ( | launch | ) |
| MENUPROTO | ( | select_all | ) |
| nserror nsgtk_global_history_destroy | ( | void | ) |
Destroys the global history window and performs any other necessary cleanup actions.
Definition at line 381 of file global_history.c.
References nsgtk_global_history_window::builder, nsgtk_global_history_window::core, global_history_fini(), global_history_window, NSERROR_OK, nsgtk_corewindow_fini(), and nsgtk_global_history_window::wnd.
Referenced by nsgtk_finalise().
|
static |
callback on draw event for global history window
| nsgtk_cw | The nsgtk core window structure. |
| r | The rectangle of the window that needs updating. |
Definition at line 282 of file global_history.c.
References global_history_redraw(), redraw_context::interactive, NSERROR_OK, and nsgtk_plotters.
Referenced by nsgtk_global_history_init().
|
static |
Creates the window for the global history tree.
Definition at line 300 of file global_history.c.
References nsgtk_global_history_window::builder, nsgtk_global_history_window::core, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, global_history_init(), global_history_window, nsgtk_corewindow::key, nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_corewindow_init(), nsgtk_global_history_draw(), nsgtk_global_history_init_menu(), nsgtk_global_history_key(), nsgtk_global_history_mouse(), NSLOG, nsgtk_corewindow::scrolled, and nsgtk_global_history_window::wnd.
Referenced by nsgtk_global_history_present().
|
static |
Connects menu events in the global history window.
Definition at line 214 of file global_history.c.
References nsgtk_global_history_window::builder, menu_events, and NSLOG.
Referenced by nsgtk_global_history_init().
|
static |
callback for keypress on global history window
| nsgtk_cw | The nsgtk core window structure. |
| nskey | The netsurf key code |
Definition at line 265 of file global_history.c.
References global_history_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.
Referenced by nsgtk_global_history_init().
|
static |
callback for mouse action on global 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 247 of file global_history.c.
References global_history_mouse_action(), and NSERROR_OK.
Referenced by nsgtk_global_history_init().
| nserror nsgtk_global_history_present | ( | void | ) |
make the global history window visible.
Definition at line 368 of file global_history.c.
References global_history_window, NSERROR_OK, nsgtk_global_history_init(), and nsgtk_global_history_window::wnd.
Referenced by globalhistory_button_clicked_cb().
|
static |
Definition at line 46 of file global_history.c.
Referenced by nsgtk_global_history_destroy(), nsgtk_global_history_init(), and nsgtk_global_history_present().
|
static |
Definition at line 78 of file global_history.c.
Referenced by nsgtk_global_history_init_menu().