NetSurf
|
implementation for image/ico content handler More...
#include <stdbool.h>
#include <stdlib.h>
#include <libnsbmp.h>
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
#include "content/llcache.h"
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
#include "desktop/bitmap.h"
#include "image/image.h"
#include "image/ico.h"
Go to the source code of this file.
Data Structures | |
struct | nsico_content |
Typedefs | |
typedef struct nsico_content | nsico_content |
Functions | |
static void * | nsico_bitmap_create (int width, int height, unsigned int bmp_state) |
Callback for libnsbmp; forwards the call to bitmap_create() More... | |
static nserror | nsico_create_ico_data (nsico_content *c) |
static nserror | nsico_create (const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c) |
static bool | nsico_convert (struct content *c) |
static bool | nsico__decode (struct bmp_image *ico) |
static bool | nsico_redraw (struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx) |
static void | nsico_destroy (struct content *c) |
static nserror | nsico_clone (const struct content *old, struct content **newc) |
static void * | nsico_get_internal (const struct content *c, void *context) |
static content_type | nsico_content_type (void) |
static bool | nsico_is_opaque (struct content *c) |
CONTENT_FACTORY_REGISTER_TYPES (nsico, nsico_types, nsico_content_handler) | |
Variables | |
static const content_handler | nsico_content_handler |
static const char * | nsico_types [] |
implementation for image/ico content handler
Definition in file ico.c.
typedef struct nsico_content nsico_content |
CONTENT_FACTORY_REGISTER_TYPES | ( | nsico | , |
nsico_types | , | ||
nsico_content_handler | |||
) |
|
static |
Definition at line 176 of file ico.c.
References netsurf_table::bitmap, bitmap_format_to_client(), guit, gui_bitmap_table::modified, and NSLOG.
Referenced by nsico_get_internal(), nsico_is_opaque(), and nsico_redraw().
|
static |
Callback for libnsbmp; forwards the call to bitmap_create()
width | width of image in pixels |
height | width of image in pixels |
bmp_state | A flag word indicating the initial state |
Definition at line 56 of file ico.c.
References netsurf_table::bitmap, BITMAP_CLEAR, BITMAP_NONE, BITMAP_OPAQUE, gui_bitmap_table::create, guit, height, and width.
Referenced by nsico_create_ico_data().
Definition at line 225 of file ico.c.
References nsico_content::base, content__clone(), content_destroy(), CONTENT_STATUS_DONE, CONTENT_STATUS_READY, NSERROR_CLONE_FAILED, NSERROR_NOMEM, NSERROR_OK, nsico_convert(), nsico_create_ico_data(), and content::status.
|
static |
Definition at line 281 of file ico.c.
References CONTENT_IMAGE.
|
static |
Definition at line 119 of file ico.c.
References content__get_source_data(), content__set_title(), content_broadcast_error(), content_set_done(), content_set_ready(), content_set_status(), content::height, nsico_content::ico, content::llcache, llcache_handle_get_url(), messages_get_buff(), NSERROR_ICO_ERROR, NSERROR_NOMEM, NSLOG, nsurl_access_leaf(), content::size, and content::width.
Referenced by nsico_clone().
|
static |
Definition at line 87 of file ico.c.
References content__init(), llcache, NSERROR_NOMEM, NSERROR_OK, nsico_create_ico_data(), and result.
|
static |
Definition at line 69 of file ico.c.
References nsico_content::base, netsurf_table::bitmap, content_broadcast_error(), gui_bitmap_table::destroy, gui_bitmap_table::get_buffer, guit, nsico_content::ico, NSERROR_NOMEM, NSERROR_OK, and nsico_bitmap_create().
Referenced by nsico_clone(), and nsico_create().
|
static |
Definition at line 217 of file ico.c.
References nsico_content::ico.
|
static |
Definition at line 260 of file ico.c.
References nsico_content::ico, nsico__decode(), and NSLOG.
|
static |
Definition at line 286 of file ico.c.
References netsurf_table::bitmap, gui_bitmap_table::get_opaque, guit, nsico_content::ico, nsico__decode(), and NSLOG.
|
static |
Definition at line 194 of file ico.c.
References clip(), content_redraw_data::height, nsico_content::ico, image_bitmap_plot(), nsico__decode(), NSLOG, and content_redraw_data::width.
|
static |