NetSurf
|
Public content interface. More...
Go to the source code of this file.
Data Structures | |
struct | content_redraw_data |
parameters to content redraw More... | |
Functions | |
struct bitmap * | content_get_bitmap (struct hlcache_handle *h) |
Retrieve the bitmap contained in an image content. More... | |
const char * | content_get_encoding (struct hlcache_handle *h, enum content_encoding_type op) |
Retrieve the encoding of a content. More... | |
lwc_string * | content_get_mime_type (struct hlcache_handle *h) |
Retrieve mime-type of content. More... | |
const uint8_t * | content_get_source_data (struct hlcache_handle *h, size_t *size) |
Retrieve source of content. More... | |
const char * | content_get_title (struct hlcache_handle *h) |
Retrieve title associated with content. More... | |
content_type | content_get_type (struct hlcache_handle *h) |
Retrieve computed type of content. More... | |
int | content_get_width (struct hlcache_handle *h) |
Retrieve width of content. More... | |
int | content_get_height (struct hlcache_handle *h) |
Retrieve height of content. More... | |
void | content_invalidate_reuse_data (struct hlcache_handle *h) |
Invalidate content reuse data. More... | |
bool | content_redraw (struct hlcache_handle *h, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx) |
Display content on screen with optional tiling. More... | |
bool | content_scaled_redraw (struct hlcache_handle *h, int width, int height, const struct redraw_context *ctx) |
Redraw a content with scale set for horizontal fit. More... | |
struct nsurl * | hlcache_handle_get_url (const struct hlcache_handle *handle) |
Retrieve the URL associated with a high level cache handle. More... | |
Public content interface.
The content functions manipulate content objects.
Definition in file content.h.
struct bitmap * content_get_bitmap | ( | struct hlcache_handle * | h | ) |
Retrieve the bitmap contained in an image content.
h | handle to the content. |
Definition at line 1264 of file content.c.
References content__get_bitmap(), and hlcache_handle_get_content().
Referenced by ami_file_save(), ami_gui_menu_update_disabled(), ami_gui_update_hotlist_button(), amiga_icon_superimpose_favicon_internal(), browser_window_history_get_thumbnail(), default_ico_callback(), gui_window_set_icon(), HOOKF(), ro_gui_save_object_native(), search_web_get_provider_bitmap(), search_web_ico_callback(), and search_web_select_provider().
const char * content_get_encoding | ( | struct hlcache_handle * | h, |
enum content_encoding_type | op | ||
) |
Retrieve the encoding of a content.
h | handle to the content. |
op | encoding operation. |
Definition at line 1321 of file content.c.
References content__get_encoding(), and hlcache_handle_get_content().
Referenced by browser_window_navigate(), nsgtk_viewsource(), and ro_gui_window_prepare_pageinfo().
int content_get_height | ( | struct hlcache_handle * | h | ) |
Retrieve height of content.
h | handle to the content to get height of. |
Definition at line 1175 of file content.c.
References content__get_height(), and hlcache_handle_get_content().
Referenced by browser_window_content_done(), browser_window_get_extents(), browser_window_handle_scrollbars(), browser_window_history_update(), browser_window_redraw(), html_object_callback(), html_redraw_background(), html_redraw_inline_background(), layout_calculate_descendant_bboxes(), layout_get_object_dimensions(), layout_line(), layout_lists(), print_apply_settings(), print_basic_run(), print_declare_fonts(), print_document(), print_set_up(), ro_gui_url_bar_res_cb(), ro_gui_url_bar_set_site_favicon(), and treeview_res_cb().
lwc_string * content_get_mime_type | ( | struct hlcache_handle * | h | ) |
Retrieve mime-type of content.
h | handle to the content to retrieve mime type from |
Definition at line 1073 of file content.c.
References content__get_mime_type(), and hlcache_handle_get_content().
Referenced by ami_mime_compare(), ami_mime_content_to_cmd(), ami_mime_content_to_filetype(), nsbeos_gui_view_source(), ro_content_filetype(), ro_gui_window_prepare_objectinfo(), ro_gui_window_prepare_pageinfo(), save_complete_save_html_document(), save_complete_save_html_object(), and save_complete_save_stylesheet().
const uint8_t * content_get_source_data | ( | struct hlcache_handle * | h, |
size_t * | size | ||
) |
Retrieve source of content.
h | Content handle to retrieve source of |
size | Pointer to location to receive byte size of source |
Definition at line 1209 of file content.c.
References content__get_source_data(), hlcache_handle_get_content(), and content::size.
Referenced by ami_file_save(), context_popup(), convert_script_sync_cb(), html_script_exec(), nsbeos_gui_view_source(), nsgtk_viewsource(), ro_gui_save_content(), ro_gui_save_object_native(), ro_gui_theme_install_apply(), ro_gui_view_source(), RXHOOKF(), save_complete_save_html_object(), save_complete_save_stylesheet(), and theme_install_callback().
const char * content_get_title | ( | struct hlcache_handle * | h | ) |
Retrieve title associated with content.
h | handle to the content to retrieve title from |
Definition at line 1106 of file content.c.
References content__get_title(), and hlcache_handle_get_content().
Referenced by ami_file_save(), browser_window_content_ready(), browser_window_get_title(), browser_window_history_add(), browser_window_history_update(), browser_window_update(), print_send_printsave(), ro_gui_save_complete(), ro_gui_window_menu_warning(), and ro_gui_window_prepare_pageinfo().
content_type content_get_type | ( | struct hlcache_handle * | h | ) |
Retrieve computed type of content.
h | handle to the content to retrieve type of. |
Definition at line 1061 of file content.c.
References CONTENT_NONE, content::handler, hlcache_handle_get_content(), and content_handler::type.
Referenced by ami_gui_menu_update_disabled(), ami_mime_content_to_filetype(), browser_window_callback(), browser_window_can_search(), browser_window_can_select(), browser_window_content_ready(), browser_window_create_frameset(), browser_window_create_frameset_internal(), browser_window_create_iframes(), browser_window_find_target(), browser_window_mouse_click_internal(), browser_window_navigate(), browser_window_recalculate_frameset(), browser_window_redraw(), browser_window_reload(), convert_script_sync_cb(), get_context_info(), get_mouse_action_node(), html_get_id_offset(), html_object_callback(), html_object_close_objects(), html_object_free_objects(), html_object_open_objects(), html_object_refresh(), html_redraw_box(), html_script_exec(), layout_block_add_scrollbar(), layout_block_find_dimensions(), layout_calculate_descendant_bboxes(), layout_float_find_dimensions(), layout_minmax_block(), layout_update_descendant_bbox(), nsgtk_viewsource(), print_button_clicked_cb(), print_document(), ro_content_filetype(), ro_gui_save_content(), ro_gui_search_bw_searchable(), ro_gui_url_bar_set_site_favicon(), ro_gui_window_content_export_types(), ro_gui_window_menu_warning(), ro_gui_window_prepare_pageinfo(), save_as_text(), save_complete_save_html(), save_complete_save_html_object(), and theme_install_start().
int content_get_width | ( | struct hlcache_handle * | h | ) |
Retrieve width of content.
h | handle to the content to get width of. |
Definition at line 1158 of file content.c.
References content__get_width(), and hlcache_handle_get_content().
Referenced by bitmap_render(), browser_window_content_done(), browser_window_get_extents(), browser_window_handle_scrollbars(), browser_window_history_update(), browser_window_redraw(), html_object_callback(), html_redraw_background(), html_redraw_inline_background(), layout_calculate_descendant_bboxes(), layout_get_object_dimensions(), layout_lists(), layout_minmax_block(), print_apply_settings(), print_declare_fonts(), print_document(), and ro_gui_url_bar_set_site_favicon().
void content_invalidate_reuse_data | ( | struct hlcache_handle * | h | ) |
Invalidate content reuse data.
causes subsequent requests for content URL to query server to determine if content can be reused. This is required behaviour for forced reloads etc.
h | Content handle to invalidate. |
Definition at line 1229 of file content.c.
References content__invalidate_reuse_data(), and hlcache_handle_get_content().
Referenced by browser_window_refresh(), browser_window_reload(), html_object_refresh(), nsbeos_scaffolding_dispatch_event(), ro_gui_window_menu_select(), and theme_install_start().
bool content_redraw | ( | struct hlcache_handle * | h, |
struct content_redraw_data * | data, | ||
const struct rect * | clip, | ||
const struct redraw_context * | ctx | ||
) |
Display content on screen with optional tiling.
h | The content to redraw. |
data | The contents redraw data. |
clip | The clipping rectangle to use when redrawing the content. |
ctx | current redraw context. |
Calls the redraw function for the content.
Definition at line 558 of file content.c.
References clip(), content::handler, hlcache_handle_get_content(), content::locked, and content_handler::redraw.
Referenced by browser_window_redraw(), html_redraw_background(), html_redraw_box(), html_redraw_inline_background(), print_declare_fonts(), print_document(), print_draw_next_page(), ro_gui_url_bar_redraw(), treeview_redraw(), treeview_redraw_search(), and treeview_redraw_tree().
bool content_scaled_redraw | ( | struct hlcache_handle * | h, |
int | width, | ||
int | height, | ||
const struct redraw_context * | ctx | ||
) |
Redraw a content with scale set for horizontal fit.
Redraws the content at a specified width and height with the content drawing scaled to fit within the area.
h | The content to redraw |
width | The target width |
height | The target height |
ctx | current redraw context |
The thumbnail is guaranteed to be filled to its width/height extents, so there is no need to render a solid background first.
Units for width and height are pixels.
Definition at line 583 of file content.c.
References content_redraw_data::background_colour, clip(), plotter_table::clip, content::handler, height, content_redraw_data::height, hlcache_handle_get_content(), knockout_plot_end(), knockout_plot_start(), content::locked, NSERROR_OK, NSLOG, plotter_table::option_knockout, redraw_context::plot, plot_style_fill_white, plotter_table::rectangle, content_handler::redraw, content_redraw_data::repeat_x, content_redraw_data::repeat_y, content_redraw_data::scale, content::width, width, content_redraw_data::width, content_redraw_data::x, and content_redraw_data::y.
Referenced by bitmap_render(), and riscos_bitmap_render().
struct nsurl * hlcache_handle_get_url | ( | const struct hlcache_handle * | handle | ) |
Retrieve the URL associated with a high level cache handle.
handle | The handle to inspect |
Referenced by ami_file_save(), ami_file_save_req(), ami_print(), amiga_plugin_hack_execute(), box_dump(), browser_window__handle_error(), browser_window_access_url(), browser_window_content_done(), browser_window_content_ready(), browser_window_create_frameset_internal(), browser_window_create_iframes(), browser_window_get_page_info_state(), browser_window_history_add(), browser_window_navigate(), browser_window_refresh(), browser_window_refresh_url_bar(), browser_window_reload(), browser_window_up_available(), browser_window_update_favicon(), content_saw_insecure_objects(), context_popup(), convert_script_async_cb(), convert_script_defer_cb(), convert_script_sync_cb(), default_ico_callback(), gui_drag_save_object(), html_convert_css_callback(), html_script_exec(), layout_block_object(), nsbeos_gui_view_source(), ro_gui_save_complete(), ro_gui_save_prepare(), ro_gui_view_source(), ro_gui_window_menu_warning(), ro_gui_window_prepare_objectinfo(), ro_gui_window_prepare_pageinfo(), save_complete_ctx_find_content(), save_complete_inventory(), save_complete_save_html_object(), save_complete_save_stylesheet(), and search_web_ico_callback().