NetSurf
Data Fields
content_handler Struct Reference

Content operation function table. More...

#include <content_protected.h>

Data Fields

void(* fini )(void)
 
nserror(* create )(const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
 
bool(* process_data )(struct content *c, const char *data, unsigned int size)
 
bool(* data_complete )(struct content *c)
 
void(* reformat )(struct content *c, int width, int height)
 
void(* destroy )(struct content *c)
 
void(* stop )(struct content *c)
 
nserror(* mouse_track )(struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
 
nserror(* mouse_action )(struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
 
bool(* keypress )(struct content *c, uint32_t key)
 
bool(* redraw )(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
 
nserror(* open )(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params)
 
nserror(* close )(struct content *c)
 
void(* clear_selection )(struct content *c)
 
char *(* get_selection )(struct content *c)
 
nserror(* get_contextual_content )(struct content *c, int x, int y, struct browser_window_features *data)
 
bool(* scroll_at_point )(struct content *c, int x, int y, int scrx, int scry)
 
bool(* drop_file_at_point )(struct content *c, int x, int y, char *file)
 
nserror(* debug_dump )(struct content *c, FILE *f, enum content_debug op)
 
nserror(* debug )(struct content *c, enum content_debug op)
 
nserror(* clone )(const struct content *old, struct content **newc)
 
bool(* matches_quirks )(const struct content *c, bool quirks)
 
const char *(* get_encoding )(const struct content *c, enum content_encoding_type op)
 
content_type(* type )(void)
 
void(* add_user )(struct content *c)
 
void(* remove_user )(struct content *c)
 
bool(* exec )(struct content *c, const char *src, size_t srclen)
 
bool(* saw_insecure_objects )(struct content *c)
 
nserror(* textsearch_find )(struct content *c, struct textsearch_context *context, const char *pattern, int p_len, bool case_sens)
 content specific free text search find More...
 
nserror(* textsearch_bounds )(struct content *c, unsigned start_idx, unsigned end_idx, struct box *start_ptr, struct box *end_ptr, struct rect *bounds_out)
 get bounds of free text search match More...
 
nserror(* textselection_redraw )(struct content *c, unsigned start_idx, unsigned end_idx)
 redraw an area of selected text More...
 
nserror(* textselection_copy )(struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr)
 copy selected text into selection string possibly with formatting More...
 
nserror(* textselection_get_end )(struct content *c, unsigned *end_idx)
 get maximum index of text section. More...
 
void *(* get_internal )(const struct content *c, void *context)
 handler dependant content sensitive internal data interface. More...
 
bool(* is_opaque )(struct content *c)
 are the content contents opaque. More...
 
bool no_share
 There must be one content per user for this type. More...
 

Detailed Description

Content operation function table.

function table implementing a content type.

Definition at line 59 of file content_protected.h.

Field Documentation

◆ add_user

void(* content_handler::add_user) (struct content *c)

Definition at line 100 of file content_protected.h.

Referenced by content_add_user().

◆ clear_selection

void(* content_handler::clear_selection) (struct content *c)

Definition at line 86 of file content_protected.h.

Referenced by content_clear_selection().

◆ clone

nserror(* content_handler::clone) (const struct content *old, struct content **newc)

Definition at line 96 of file content_protected.h.

Referenced by content_clone().

◆ close

nserror(* content_handler::close) (struct content *c)

Definition at line 85 of file content_protected.h.

Referenced by content_close().

◆ create

nserror(* content_handler::create) (const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)

Definition at line 62 of file content_protected.h.

Referenced by content_factory_create_content().

◆ data_complete

bool(* content_handler::data_complete) (struct content *c)

Definition at line 71 of file content_protected.h.

Referenced by content_convert().

◆ debug

nserror(* content_handler::debug) (struct content *c, enum content_debug op)

Definition at line 95 of file content_protected.h.

Referenced by content_debug().

◆ debug_dump

nserror(* content_handler::debug_dump) (struct content *c, FILE *f, enum content_debug op)

Definition at line 94 of file content_protected.h.

Referenced by content_debug_dump().

◆ destroy

void(* content_handler::destroy) (struct content *c)

Definition at line 73 of file content_protected.h.

Referenced by content_destroy().

◆ drop_file_at_point

bool(* content_handler::drop_file_at_point) (struct content *c, int x, int y, char *file)

Definition at line 92 of file content_protected.h.

Referenced by content_drop_file_at_point().

◆ exec

bool(* content_handler::exec) (struct content *c, const char *src, size_t srclen)

Definition at line 102 of file content_protected.h.

Referenced by content_exec().

◆ fini

void(* content_handler::fini) (void)

Definition at line 60 of file content_protected.h.

Referenced by content_factory_fini().

◆ get_contextual_content

nserror(* content_handler::get_contextual_content) (struct content *c, int x, int y, struct browser_window_features *data)

Definition at line 88 of file content_protected.h.

Referenced by content_get_contextual_content().

◆ get_encoding

const char *(* content_handler::get_encoding) (const struct content *c, enum content_encoding_type op)

Definition at line 98 of file content_protected.h.

Referenced by content__get_encoding().

◆ get_internal

void *(* content_handler::get_internal) (const struct content *c, void *context)

handler dependant content sensitive internal data interface.

Definition at line 145 of file content_protected.h.

Referenced by content__get_bitmap().

◆ get_selection

char *(* content_handler::get_selection) (struct content *c)

Definition at line 87 of file content_protected.h.

Referenced by content_clear_selection(), and content_get_selection().

◆ is_opaque

bool(* content_handler::is_opaque) (struct content *c)

are the content contents opaque.

Determine if this content would obscure (not mix with) any background

Parameters
cThe content to check

Definition at line 154 of file content_protected.h.

Referenced by content__get_opaque().

◆ keypress

bool(* content_handler::keypress) (struct content *c, uint32_t key)

Definition at line 79 of file content_protected.h.

Referenced by content_keypress().

◆ matches_quirks

bool(* content_handler::matches_quirks) (const struct content *c, bool quirks)

Definition at line 97 of file content_protected.h.

Referenced by content_matches_quirks().

◆ mouse_action

nserror(* content_handler::mouse_action) (struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)

Definition at line 77 of file content_protected.h.

Referenced by content_mouse_action().

◆ mouse_track

nserror(* content_handler::mouse_track) (struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)

Definition at line 75 of file content_protected.h.

Referenced by content_mouse_track().

◆ no_share

bool content_handler::no_share

There must be one content per user for this type.

Definition at line 159 of file content_protected.h.

Referenced by content_is_shareable().

◆ open

nserror(* content_handler::open) (struct content *c, struct browser_window *bw, struct content *page, struct object_params *params)

Definition at line 83 of file content_protected.h.

Referenced by content_open().

◆ process_data

bool(* content_handler::process_data) (struct content *c, const char *data, unsigned int size)

Definition at line 69 of file content_protected.h.

Referenced by content_llcache_callback().

◆ redraw

bool(* content_handler::redraw) (struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)

Definition at line 80 of file content_protected.h.

Referenced by content_redraw(), and content_scaled_redraw().

◆ reformat

void(* content_handler::reformat) (struct content *c, int width, int height)

Definition at line 72 of file content_protected.h.

Referenced by content__reformat(), and content_can_reformat().

◆ remove_user

void(* content_handler::remove_user) (struct content *c)

Definition at line 101 of file content_protected.h.

Referenced by content_remove_user().

◆ saw_insecure_objects

bool(* content_handler::saw_insecure_objects) (struct content *c)

Definition at line 103 of file content_protected.h.

Referenced by content_saw_insecure_objects().

◆ scroll_at_point

bool(* content_handler::scroll_at_point) (struct content *c, int x, int y, int scrx, int scry)

Definition at line 90 of file content_protected.h.

Referenced by content_scroll_at_point().

◆ stop

void(* content_handler::stop) (struct content *c)

Definition at line 74 of file content_protected.h.

Referenced by content_abort().

◆ textsearch_bounds

nserror(* content_handler::textsearch_bounds) (struct content *c, unsigned start_idx, unsigned end_idx, struct box *start_ptr, struct box *end_ptr, struct rect *bounds_out)

get bounds of free text search match

Definition at line 113 of file content_protected.h.

Referenced by content_textsearch_create(), and search_text().

◆ textsearch_find

nserror(* content_handler::textsearch_find) (struct content *c, struct textsearch_context *context, const char *pattern, int p_len, bool case_sens)

content specific free text search find

Definition at line 108 of file content_protected.h.

Referenced by content_textsearch_create(), and search_text().

◆ textselection_copy

nserror(* content_handler::textselection_copy) (struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr)

copy selected text into selection string possibly with formatting

Definition at line 131 of file content_protected.h.

Referenced by selection_copy().

◆ textselection_get_end

nserror(* content_handler::textselection_get_end) (struct content *c, unsigned *end_idx)

get maximum index of text section.

Parameters
[in]cThe content to measure
[out]end_idxpointer to value to recive result
Returns
NSERROR_OK and end_idx updated else error code

Definition at line 140 of file content_protected.h.

Referenced by selection_reinit().

◆ textselection_redraw

nserror(* content_handler::textselection_redraw) (struct content *c, unsigned start_idx, unsigned end_idx)

redraw an area of selected text

The defined text selection will cause an area of the content to be marked as invalid and hence redrawn.

Parameters
cThe content being redrawn
start_idxThe start index of the text region to be redrawn
end_idxThe end index of teh text region to be redrawn
Returns
NSERROR_OK on success else error code

Definition at line 126 of file content_protected.h.

Referenced by selection_redraw().

◆ type

content_type(* content_handler::type) (void)

The documentation for this struct was generated from the following file: