111 .background_images =
true,
140 if ((*win_out) != NULL) {
145 ncwin = calloc(1,
sizeof(*ncwin));
152 NSLOG(netsurf, INFO,
"Local history UI builder init failed");
157 gtk_builder_connect_signals(ncwin->
builder, NULL);
159 ncwin->
wnd = GTK_WINDOW(gtk_builder_get_object(ncwin->
builder,
163 gtk_window_set_type_hint(GTK_WINDOW(ncwin->
wnd),
164 GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU);
165 gtk_window_set_modal(GTK_WINDOW(ncwin->
wnd), TRUE);
169 gtk_builder_get_object(ncwin->
builder,
173 gtk_builder_get_object(ncwin->
builder,
174 "HistoryDrawingArea"));
177 g_signal_connect(G_OBJECT(ncwin->
wnd),
179 G_CALLBACK(gtk_widget_hide_on_delete),
182 g_signal_connect(G_OBJECT(ncwin->
wnd),
184 G_CALLBACK(gtk_widget_hide_on_delete),
187 g_signal_connect(G_OBJECT(ncwin->
wnd),
188 "button-press-event",
189 G_CALLBACK(gtk_widget_hide_on_delete),
221 int prnt_width, prnt_height;
225 gtk_window_group_add_window(gtk_window_get_group(
parent),
229 gtk_widget_get_screen(GTK_WIDGET(
parent)));
231 gtk_window_get_size(
parent, &prnt_width, &prnt_height);
239 if (
width > prnt_width) {
242 if (
height > prnt_height) {
300 NSLOG(netsurf, INFO,
"x=%d y=%d", x, y);
Compatibility functions for older GTK versions (interface)
nserror local_history_redraw(struct local_history_session *session, int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the local history.
nserror local_history_scroll_to_cursor(struct local_history_session *session)
Scroll the local history window to ensure the current cursor is shown.
nserror local_history_get_size(struct local_history_session *session, int *width, int *height)
get size of local history content area.
nserror local_history_set(struct local_history_session *session, struct browser_window *bw)
Change the browser window to draw local history for.
nserror local_history_fini(struct local_history_session *session)
Finalise the local history.
bool local_history_keypress(struct local_history_session *session, uint32_t key)
Key press handling.
nserror local_history_init(void *core_window_handle, struct browser_window *bw, struct local_history_session **session)
Initialise the local history.
nserror local_history_mouse_action(struct local_history_session *session, enum browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
nserror
Enumeration of error codes.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_NOMEM
Memory exhaustion.
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.
nserror nsgtk_local_history_hide(void)
hide the local history window from being visible.
void nsgtk_local_history_set_position(int x, int y)
set the local history window position.
static struct nsgtk_local_history_window * local_history_window
nserror nsgtk_local_history_present(GtkWindow *parent, struct browser_window *bw)
make the local history window visible.
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
nserror nsgtk_local_history_destroy(void)
Destroys the local history window and performs any other necessary cleanup actions.
static nserror nsgtk_local_history_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
callback for keypress on local history window
static nserror nsgtk_local_history_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
callback on draw event for local history window
Interface to GTK local history manager.
Target independent plotting GTK+ interface.
nserror nsgtk_corewindow_init(struct nsgtk_corewindow *nsgtk_cw)
initialise elements of gtk core window.
nserror nsgtk_corewindow_fini(struct nsgtk_corewindow *nsgtk_cw)
finalise elements of gtk core window.
const struct plotter_table nsgtk_plotters
GTK plotter table.
browser_mouse_state
Mouse state.
Target independent plotting interface.
Interface to key press operations.
#define NSLOG(catname, level, logmsg, args...)
nserror nsgtk_builder_new_from_resname(const char *resname, GtkBuilder **builder_out)
Create gtk builder object for the named ui resource.
Interface to gtk builtin resource handling.
nserror nsgtk_scaffolding_position_local_history(struct nsgtk_scaffolding *gs)
Position the local-history popup in the right place.
struct nsgtk_scaffolding * nsgtk_current_scaffolding(void)
Obtain the most recently used scaffolding element.
local history viewer context
nserror(* key)(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
callback for keypress on nsgtk core window
nserror(* draw)(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
callback to draw on drawable area of nsgtk core window
GtkScrolledWindow * scrolled
scrollable area drawing area is within
nserror(* mouse)(struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on nsgtk core window
GtkDrawingArea * drawing_area
GTK drawable widget.
struct nsgtk_corewindow core
struct local_history_session * session
nserror(* clip)(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
const struct plotter_table * plot
Current plot operation table.
bool interactive
Redraw to show interactive features.