27#ifndef NETSURF_CONTENT_CONTENT_PROTECTED_H_
28#define NETSURF_CONTENT_CONTENT_PROTECTED_H_
31#include <libwapcaplet/libwapcaplet.h>
63 lwc_string *imime_type,
66 const char *fallback_charset,
bool quirks,
70 const char *data,
unsigned int size);
87 char * (*get_selection)(
struct content *c);
const char *const content_type_name[]
int content__get_available_width(struct content *c)
Retrieve available width of content.
void content_destroy(struct content *c)
Destroy and free a content.
bool content__add_rfc5988_link(struct content *c, const struct content_rfc5988_link *link)
associate a metadata link with a content.
bool content__get_opaque(struct content *c)
Determine if a content is opaque.
lwc_string * content__get_mime_type(struct content *c)
Retrieve mime-type of content.
void content__reformat(struct content *c, bool background, int width, int height)
cause a content to be reformatted.
void content_remove_user(struct content *c, void(*callback)(struct content *c, content_msg msg, const union content_msg_data *data, void *pw), void *ctx)
Remove a callback user.
void content_broadcast(struct content *c, content_msg msg, const union content_msg_data *data)
Send a message to all users.
bool content_add_user(struct content *h, void(*callback)(struct content *c, content_msg msg, const union content_msg_data *data, void *pw), void *pw)
Register a user for callbacks.
int content__get_height(struct content *c)
Retrieve height of content.
struct content_rfc5988_link * content__free_rfc5988_link(struct content_rfc5988_link *link)
free a rfc5988 link
struct nsurl * content__get_refresh_url(struct content *c)
Retrieve the refresh URL for a content.
struct bitmap * content__get_bitmap(struct content *c)
Retrieve the bitmap contained in an image content.
void content_set_done(struct content *c)
Put a content in status CONTENT_STATUS_DONE.
int content__get_width(struct content *c)
Retrieve width of content.
uint32_t content_count_users(struct content *c)
Count users for the content.
const char *const content_status_name[]
bool content__set_title(struct content *c, const char *title)
Set title associated with content.
bool content__is_locked(struct content *c)
Return whether a content is currently locked.
const char * content__get_encoding(struct content *c, enum content_encoding_type op)
Retrieve the encoding of a content.
bool content_is_shareable(struct content *c)
Determine if a content is shareable.
nserror content__init(struct content *c, const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks)
Initialise a new base content structure.
struct nsurl * content_get_url(struct content *c)
Retrieve URL associated with content.
void content_set_error(struct content *c)
Put a content in status CONTENT_STATUS_ERROR and unlock the content.
void content__request_redraw(struct content *c, int x, int y, int width, int height)
Request a redraw of an area of a content.
const uint8_t * content__get_source_data(struct content *c, size_t *size)
Retrieve source of content.
const char * content__get_title(struct content *c)
Retrieve title associated with content.
nserror content__clone(const struct content *c, struct content *nc)
Clone a content's data members.
void content_set_ready(struct content *c)
Put a content in status CONTENT_STATUS_READY and unlock the content.
const struct llcache_handle * content_get_llcache_handle(struct content *c)
Retrieve the low-level cache handle for a content.
struct content * content_clone(struct content *c)
Clone a content object in its current state.
bool content_matches_quirks(struct content *c, bool quirks)
Determine if quirks mode matches.
void content__invalidate_reuse_data(struct content *c)
Invalidate content reuse data.
nserror content_abort(struct content *c)
Abort a content object.
const char * content__get_status_message(struct content *c)
Retrieve status message associated with content.
void content_set_status(struct content *c, const char *status_message)
Updates content with new status.
void content_broadcast_error(struct content *c, nserror errorcode, const char *msg)
Send an error message to all users.
Declaration of content enumerations.
content_status
Status of a content.
content_type
The type of a content.
content_msg
Used in callbacks to indicate what has occurred.
content_debug
Debugging dump operations.
content_encoding_type
Content encoding information types.
nserror
Enumeration of error codes.
Core mouse and pointer states.
browser_mouse_state
Mouse state.
static struct llcache_s * llcache
low level cache state
struct nsurl nsurl
NetSurf URL object.
RISC OS wimp toolkit bitmap.
Page features at a specific spatial location.
struct browser_window * bw
Content operation function table.
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
nserror(* close)(struct content *c)
void(* reformat)(struct content *c, int width, int height)
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(* get_contextual_content)(struct content *c, int x, int y, struct browser_window_features *data)
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
nserror(* mouse_track)(struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
nserror(* textselection_get_end)(struct content *c, unsigned *end_idx)
get maximum index of text section.
void(* clear_selection)(struct content *c)
bool(* data_complete)(struct content *c)
bool(* keypress)(struct content *c, uint32_t key)
bool(* scroll_at_point)(struct content *c, int x, int y, int scrx, int scry)
bool(* process_data)(struct content *c, const char *data, unsigned int size)
void(* add_user)(struct content *c)
bool(* saw_insecure_objects)(struct content *c)
void(* remove_user)(struct content *c)
void(* destroy)(struct content *c)
nserror(* debug)(struct content *c, enum content_debug op)
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
nserror(* debug_dump)(struct content *c, FILE *f, enum content_debug op)
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)
nserror(* mouse_action)(struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
bool(* exec)(struct content *c, const char *src, size_t srclen)
void(* stop)(struct content *c)
nserror(* textselection_redraw)(struct content *c, unsigned start_idx, unsigned end_idx)
redraw an area of selected text
content_type(* type)(void)
bool(* is_opaque)(struct content *c)
are the content contents opaque.
bool(* matches_quirks)(const struct content *c, bool quirks)
nserror(* clone)(const struct content *old, struct content **newc)
bool no_share
There must be one content per user for this type.
bool(* drop_file_at_point)(struct content *c, int x, int y, char *file)
parameters to content redraw
Linked list of users of a content.
void(* callback)(struct content *c, content_msg msg, const union content_msg_data *data, void *pw)
struct content_user * next
Content which corresponds to a single URL.
bool quirks
Content is in quirks mode.
int height
Height dimension, if applicable.
struct content_user * user_list
List of users.
lwc_string * mime_type
Original MIME type of data.
char * fallback_charset
Fallback charset, or NULL.
int width
Width dimension, if applicable.
const struct content_handler * handler
Handler for content.
unsigned int active
Number of child fetches or conversions currently in progress.
char status_message[120]
Full text for status bar.
struct llcache_handle * llcache
Low-level cache object.
int available_height
Viewport height.
unsigned long total_size
Total data size, 0 if unknown.
long http_code
HTTP status code, 0 if not HTTP.
struct content::@117 textsearch
Free text search state.
uint64_t time
Creation timestamp when LOADING or READY.
struct textsearch_context * context
content_status status
Current status.
unsigned int size
Estimated size of all data associated with this content.
uint64_t reformat_time
Earliest time to attempt a period reflow while fetching a page's objects.
struct content_rfc5988_link * links
list of metadata links
bool locked
Content is being processed: data structures may be inconsistent and content must not be redrawn or mo...
int available_width
Viewport width.
char sub_status[80]
Status of content.
struct nsurl * refresh
URL for refresh request.
char * title
Title for browser window.
Representation of an HTTP parameter.
Handle to low-level cache object.
Parameters for object element and similar elements.
struct object_param * params
The context for a free text search.
struct content * c
content search was performed upon
Extra data for some content_msg messages.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.