NetSurf
|
librosprite implementation for content image/x-riscos-sprite More...
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <librosprite.h>
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/plotters.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/nssprite.h"
Go to the source code of this file.
Data Structures | |
struct | nssprite_content |
Macros | |
#define | ERRCHK(x) |
Typedefs | |
typedef struct nssprite_content | nssprite_content |
Functions | |
static nserror | nssprite_create (const 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) |
static bool | nssprite_convert (struct content *c) |
Convert a CONTENT_SPRITE for display. More... | |
static void | nssprite_destroy (struct content *c) |
Destroy a CONTENT_SPRITE and free all resources it owns. More... | |
static bool | nssprite_redraw (struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx) |
Redraw a CONTENT_SPRITE. More... | |
static nserror | nssprite_clone (const struct content *old, struct content **newc) |
static void * | nssprite_get_internal (const struct content *c, void *context) |
static content_type | nssprite_content_type (void) |
static bool | nssprite_content_is_opaque (struct content *c) |
CONTENT_FACTORY_REGISTER_TYPES (nssprite, nssprite_types, nssprite_content_handler) | |
Variables | |
static const content_handler | nssprite_content_handler |
static const char * | nssprite_types [] |
librosprite implementation for content image/x-riscos-sprite
Definition in file nssprite.c.
#define ERRCHK | ( | x | ) |
Definition at line 52 of file nssprite.c.
typedef struct nssprite_content nssprite_content |
CONTENT_FACTORY_REGISTER_TYPES | ( | nssprite | , |
nssprite_types | , | ||
nssprite_content_handler | |||
) |
Definition at line 213 of file nssprite.c.
References nssprite_content::base, content__clone(), content_destroy(), CONTENT_STATUS_DONE, CONTENT_STATUS_READY, NSERROR_CLONE_FAILED, NSERROR_NOMEM, NSERROR_OK, nssprite_convert(), and content::status.
|
static |
Definition at line 255 of file nssprite.c.
References nssprite_content::bitmap, netsurf_table::bitmap, gui_bitmap_table::get_opaque, and guit.
|
static |
Definition at line 249 of file nssprite.c.
References CONTENT_IMAGE.
|
static |
Convert a CONTENT_SPRITE for display.
No conversion is necessary. We merely read the sprite dimensions.
Definition at line 99 of file nssprite.c.
References nssprite_content::bitmap, netsurf_table::bitmap, bitmap_format_to_client(), BITMAP_NONE, content__get_source_data(), content__set_title(), content_broadcast_error(), content_set_done(), content_set_ready(), content_set_status(), gui_bitmap_table::create, ERRCHK, gui_bitmap_table::get_buffer, guit, content::height, content::llcache, llcache_handle_get_url(), messages_get_buff(), gui_bitmap_table::modified, NSERROR_NOMEM, NSERROR_SPRITE_ERROR, nsurl_access_leaf(), nssprite_content::sprite_area, and content::width.
Referenced by nssprite_clone().
|
static |
Definition at line 69 of file nssprite.c.
References nssprite_content::base, content__init(), llcache, NSERROR_NOMEM, and NSERROR_OK.
|
static |
Destroy a CONTENT_SPRITE and free all resources it owns.
Definition at line 173 of file nssprite.c.
References nssprite_content::bitmap, netsurf_table::bitmap, gui_bitmap_table::destroy, guit, and nssprite_content::sprite_area.
|
static |
Definition at line 242 of file nssprite.c.
References nssprite_content::bitmap.
|
static |
Redraw a CONTENT_SPRITE.
Definition at line 189 of file nssprite.c.
References content_redraw_data::background_colour, nssprite_content::bitmap, plotter_table::bitmap, BITMAPF_NONE, BITMAPF_REPEAT_X, BITMAPF_REPEAT_Y, content_redraw_data::height, NSERROR_OK, redraw_context::plot, content_redraw_data::repeat_x, content_redraw_data::repeat_y, content_redraw_data::width, content_redraw_data::x, and content_redraw_data::y.
|
static |
Definition at line 266 of file nssprite.c.
|
static |
Definition at line 278 of file nssprite.c.