NetSurf
|
Implementation of GTK bookmark (hotlist) manager. More...
#include <stdint.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/hotlist.h"
#include "gtk/compat.h"
#include "gtk/plotters.h"
#include "gtk/resources.h"
#include "gtk/corewindow.h"
#include "gtk/hotlist.h"
Go to the source code of this file.
Data Structures | |
struct | nsgtk_hotlist_window |
hotlist window container for gtk. More... | |
struct | menu_events |
Macros | |
#define | MENUPROTO(x) |
#define | MENUEVENT(x) { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
#define | MENUHANDLER(x) |
Functions | |
MENUPROTO (export) | |
MENUPROTO (new_folder) | |
MENUPROTO (new_entry) | |
MENUPROTO (edit_selected) | |
MENUPROTO (delete_selected) | |
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 (export) | |
MENUHANDLER (new_folder) | |
MENUHANDLER (new_entry) | |
MENUHANDLER (edit_selected) | |
MENUHANDLER (delete_selected) | |
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) | |
static void | nsgtk_hotlist_init_menu (struct nsgtk_hotlist_window *hlwin) |
Connects menu events in the hotlist window. More... | |
static nserror | nsgtk_hotlist_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y) |
callback for mouse action on hotlist window More... | |
static nserror | nsgtk_hotlist_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey) |
callback for keypress on hotlist window More... | |
static nserror | nsgtk_hotlist_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r) |
callback on draw event for hotlist window More... | |
static nserror | nsgtk_hotlist_init (void) |
Creates the window for the hotlist tree. More... | |
nserror | nsgtk_hotlist_present (void) |
make the hotlist window visible. More... | |
nserror | nsgtk_hotlist_destroy (void) |
Free any resources allocated for the hotlist window. More... | |
Variables | |
static struct nsgtk_hotlist_window * | hotlist_window = NULL |
static struct menu_events | menu_events [] |
Implementation of GTK bookmark (hotlist) manager.
Definition in file hotlist.c.
#define MENUEVENT | ( | x | ) | { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
#define MENUHANDLER | ( | x | ) |
#define MENUPROTO | ( | x | ) |
MENUHANDLER | ( | clear_selection | ) |
Definition at line 179 of file hotlist.c.
References hotlist_keypress(), and NS_KEY_CLEAR_SELECTION.
MENUHANDLER | ( | collapse_addresses | ) |
Definition at line 216 of file hotlist.c.
References hotlist_contract().
MENUHANDLER | ( | collapse_all | ) |
Definition at line 204 of file hotlist.c.
References hotlist_contract().
MENUHANDLER | ( | collapse_directories | ) |
Definition at line 210 of file hotlist.c.
References hotlist_contract().
MENUHANDLER | ( | delete_selected | ) |
Definition at line 165 of file hotlist.c.
References hotlist_keypress(), and NS_KEY_DELETE_LEFT.
MENUHANDLER | ( | edit_selected | ) |
Definition at line 159 of file hotlist.c.
References hotlist_edit_selection().
MENUHANDLER | ( | expand_addresses | ) |
Definition at line 198 of file hotlist.c.
References hotlist_expand().
MENUHANDLER | ( | expand_all | ) |
Definition at line 186 of file hotlist.c.
References hotlist_expand().
MENUHANDLER | ( | expand_directories | ) |
Definition at line 192 of file hotlist.c.
References hotlist_expand().
MENUHANDLER | ( | export | ) |
Definition at line 113 of file hotlist.c.
References hotlist_export(), NSGTK_STOCK_CANCEL, NSGTK_STOCK_SAVE, and nsgtk_hotlist_window::wnd.
MENUHANDLER | ( | launch | ) |
Definition at line 222 of file hotlist.c.
References hotlist_keypress(), and NS_KEY_CR.
MENUHANDLER | ( | new_entry | ) |
Definition at line 152 of file hotlist.c.
References hotlist_add_entry().
MENUHANDLER | ( | new_folder | ) |
Definition at line 146 of file hotlist.c.
References hotlist_add_folder().
MENUHANDLER | ( | select_all | ) |
Definition at line 171 of file hotlist.c.
References hotlist_keypress(), NS_KEY_ESCAPE, and NS_KEY_SELECT_ALL.
MENUPROTO | ( | clear_selection | ) |
MENUPROTO | ( | collapse_addresses | ) |
MENUPROTO | ( | collapse_all | ) |
MENUPROTO | ( | collapse_directories | ) |
MENUPROTO | ( | delete_selected | ) |
MENUPROTO | ( | edit_selected | ) |
MENUPROTO | ( | expand_addresses | ) |
MENUPROTO | ( | expand_all | ) |
MENUPROTO | ( | expand_directories | ) |
MENUPROTO | ( | export | ) |
MENUPROTO | ( | launch | ) |
MENUPROTO | ( | new_entry | ) |
MENUPROTO | ( | new_folder | ) |
MENUPROTO | ( | select_all | ) |
nserror nsgtk_hotlist_destroy | ( | void | ) |
Free any resources allocated for the hotlist window.
Definition at line 395 of file hotlist.c.
References nsgtk_hotlist_window::builder, nsgtk_hotlist_window::core, hotlist_manager_fini(), hotlist_window, NSERROR_OK, nsgtk_corewindow_fini(), and nsgtk_hotlist_window::wnd.
Referenced by nsgtk_finalise().
|
static |
callback on draw event for hotlist window
nsgtk_cw | The nsgtk core window structure. |
r | The rectangle of the window that needs updating. |
Definition at line 298 of file hotlist.c.
References hotlist_redraw(), redraw_context::interactive, NSERROR_OK, and nsgtk_plotters.
Referenced by nsgtk_hotlist_init().
|
static |
Creates the window for the hotlist tree.
Definition at line 316 of file hotlist.c.
References nsgtk_hotlist_window::builder, nsgtk_hotlist_window::core, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, hotlist_manager_init(), hotlist_window, nsgtk_corewindow::key, nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_corewindow_init(), nsgtk_hotlist_draw(), nsgtk_hotlist_init_menu(), nsgtk_hotlist_key(), nsgtk_hotlist_mouse(), NSLOG, nsgtk_corewindow::scrolled, and nsgtk_hotlist_window::wnd.
Referenced by nsgtk_hotlist_present().
|
static |
Connects menu events in the hotlist window.
Definition at line 232 of file hotlist.c.
References nsgtk_hotlist_window::builder, menu_events, and NSLOG.
Referenced by nsgtk_hotlist_init().
|
static |
callback for keypress on hotlist window
nsgtk_cw | The nsgtk core window structure. |
nskey | The netsurf key code |
Definition at line 282 of file hotlist.c.
References hotlist_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.
Referenced by nsgtk_hotlist_init().
|
static |
callback for mouse action on hotlist 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 265 of file hotlist.c.
References hotlist_mouse_action(), and NSERROR_OK.
Referenced by nsgtk_hotlist_init().
nserror nsgtk_hotlist_present | ( | void | ) |
make the hotlist window visible.
Definition at line 382 of file hotlist.c.
References hotlist_window, NSERROR_OK, nsgtk_hotlist_init(), and nsgtk_hotlist_window::wnd.
Referenced by showbookmarks_button_clicked_cb().
|
static |
Definition at line 50 of file hotlist.c.
Referenced by nsgtk_hotlist_destroy(), nsgtk_hotlist_init(), and nsgtk_hotlist_present().
|
static |
Definition at line 85 of file hotlist.c.
Referenced by nsgtk_hotlist_init_menu().