NetSurf
Data Structures | Functions
page_info.c File Reference

Implementation of gtk certificate viewing using gtk core windows. More...

#include <stdint.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "netsurf/misc.h"
#include "netsurf/browser_window.h"
#include "desktop/page-info.h"
#include "desktop/gui_internal.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
#include "gtk/resources.h"
#include "gtk/page_info.h"
#include "gtk/corewindow.h"
Include dependency graph for page_info.c:

Go to the source code of this file.

Data Structures

struct  nsgtk_pi_window
 GTK certificate viewing window context. More...
 

Functions

static gboolean nsgtk_pi_delete_event (GtkWidget *w, GdkEvent *event, gpointer data)
 destroy a previously created page information window More...
 
static void nsgtk_pi_close_callback (void *pw)
 Called to cause the page-info window to close cleanly. More...
 
static nserror nsgtk_pi_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y)
 callback for mouse action for certificate verify on core window More...
 
static nserror nsgtk_pi_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
 callback for keypress for certificate verify on core window More...
 
static nserror nsgtk_pi_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
 callback on draw event for certificate verify on core window More...
 
nserror nsgtk_page_info (struct browser_window *bw)
 Page information window. More...
 
void nsgtk_page_info_set_position (struct nsgtk_pi_window *win, int x, int y)
 Position the given page information window at the given coordinates. More...
 

Detailed Description

Implementation of gtk certificate viewing using gtk core windows.

Definition in file page_info.c.

Function Documentation

◆ nsgtk_page_info()

nserror nsgtk_page_info ( struct browser_window bw)

Page information window.

Parameters
bwthe browser window to get page information for
Returns
NSERROR_OK or error code if prompt creation failed.

Definition at line 163 of file page_info.c.

References nsgtk_pi_window::builder, nsgtk_pi_window::core, nsgtk_pi_window::dlg, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, nsgtk_corewindow::key, messages_get_errorcode(), nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_corewindow_init(), nsgtk_current_scaffolding(), nsgtk_pi_delete_event(), nsgtk_pi_draw(), nsgtk_pi_key(), nsgtk_pi_mouse(), nsgtk_scaffolding_position_page_info(), nsgtk_scaffolding_window(), NSLOG, page_info_create(), and nsgtk_pi_window::pi.

Referenced by url_entry_icon_release_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_page_info_set_position()

void nsgtk_page_info_set_position ( struct nsgtk_pi_window pi,
int  x,
int  y 
)

Position the given page information window at the given coordinates.

Parameters
pithe page info window to position
xthe X coordinate for the top left of the window
ythe Y coordinate for the top left of the window

Definition at line 251 of file page_info.c.

References nsgtk_pi_window::dlg, and NSLOG.

Referenced by nsgtk_toolbar_position_page_info().

Here is the caller graph for this function:

◆ nsgtk_pi_close_callback()

static void nsgtk_pi_close_callback ( void *  pw)
static

Called to cause the page-info window to close cleanly.

Definition at line 82 of file page_info.c.

References nsgtk_pi_delete_event().

Referenced by nsgtk_pi_mouse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_pi_delete_event()

static gboolean nsgtk_pi_delete_event ( GtkWidget *  w,
GdkEvent *  event,
gpointer  data 
)
static

destroy a previously created page information window

Definition at line 63 of file page_info.c.

References nsgtk_pi_window::builder, nsgtk_pi_window::core, nsgtk_pi_window::dlg, nsgtk_corewindow_fini(), page_info_destroy(), and nsgtk_pi_window::pi.

Referenced by nsgtk_page_info(), and nsgtk_pi_close_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_pi_draw()

static nserror nsgtk_pi_draw ( struct nsgtk_corewindow nsgtk_cw,
struct rect r 
)
static

callback on draw event for certificate verify on core window

Parameters
nsgtk_cwThe nsgtk core window structure.
rThe rectangle of the window that needs updating.
Returns
NSERROR_OK on success otherwise appropriate error code

Definition at line 145 of file page_info.c.

References redraw_context::interactive, NSERROR_OK, nsgtk_plotters, page_info_redraw(), and nsgtk_pi_window::pi.

Referenced by nsgtk_page_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_pi_key()

static nserror nsgtk_pi_key ( struct nsgtk_corewindow nsgtk_cw,
uint32_t  nskey 
)
static

callback for keypress for certificate verify on core window

Parameters
nsgtk_cwThe nsgtk core window structure.
nskeyThe netsurf key code
Returns
NSERROR_OK on success otherwise appropriate error code

Definition at line 124 of file page_info.c.

References NSERROR_NOT_IMPLEMENTED, NSERROR_OK, page_info_keypress(), and nsgtk_pi_window::pi.

Referenced by nsgtk_page_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_pi_mouse()

static nserror nsgtk_pi_mouse ( struct nsgtk_corewindow nsgtk_cw,
browser_mouse_state  mouse_state,
int  x,
int  y 
)
static

callback for mouse action for certificate verify on core window

Parameters
nsgtk_cwThe nsgtk core window structure.
mouse_statenetsurf mouse state on event
xlocation of event
ylocation of event
Returns
NSERROR_OK on success otherwise appropriate error code

Definition at line 97 of file page_info.c.

References guit, netsurf_table::misc, NSERROR_OK, nsgtk_pi_close_callback(), page_info_mouse_action(), nsgtk_pi_window::pi, and gui_misc_table::schedule.

Referenced by nsgtk_page_info().

Here is the call graph for this function:
Here is the caller graph for this function: