NetSurf
Macros | Functions
icon.c File Reference

Content for image/x-amiga-icon (icon.library implementation). More...

#include "utils/config.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <proto/exec.h>
#include <proto/icon.h>
#include <datatypes/pictureclass.h>
#include <workbench/icon.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/file.h"
#include "netsurf/plotters.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
#include "content/content.h"
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
#include "amiga/os3support.h"
#include "amiga/bitmap.h"
#include "amiga/icon.h"
Include dependency graph for icon.c:

Go to the source code of this file.

Macros

#define THUMBNAIL_WIDTH   100 /* Icon sizes for thumbnails, usually the same as */
 
#define THUMBNAIL_HEIGHT   86 /* WIDTH/HEIGHT in desktop/thumbnail.c */
 

Functions

static ULONG * amiga_icon_convertcolouricon32 (UBYTE *icondata, ULONG width, ULONG height, ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha)
 
void amiga_icon_superimpose_favicon_internal (struct hlcache_handle *icon, struct DiskObject *dobj)
 
void amiga_icon_superimpose_favicon (char *path, struct hlcache_handle *icon, char *type)
 
struct DiskObject * amiga_icon_from_bitmap (struct bitmap *bm)
 
void amiga_icon_free (struct DiskObject *dobj)
 

Detailed Description

Content for image/x-amiga-icon (icon.library implementation).

Definition in file icon.c.

Macro Definition Documentation

◆ THUMBNAIL_HEIGHT

#define THUMBNAIL_HEIGHT   86 /* WIDTH/HEIGHT in desktop/thumbnail.c */

Definition at line 58 of file icon.c.

◆ THUMBNAIL_WIDTH

#define THUMBNAIL_WIDTH   100 /* Icon sizes for thumbnails, usually the same as */

Definition at line 57 of file icon.c.

Function Documentation

◆ amiga_icon_convertcolouricon32()

static ULONG * amiga_icon_convertcolouricon32 ( UBYTE *  icondata,
ULONG  width,
ULONG  height,
ULONG  trans,
ULONG  pals1,
struct ColorRegister *  pal1,
int  alpha 
)
static

Definition at line 343 of file icon.c.

References height, and width.

Referenced by amiga_icon_superimpose_favicon().

Here is the caller graph for this function:

◆ amiga_icon_free()

void amiga_icon_free ( struct DiskObject *  dobj)

Definition at line 569 of file icon.c.

References ami_bitmap_free_icondata().

Referenced by ami_gui_appicon_remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ amiga_icon_from_bitmap()

struct DiskObject * amiga_icon_from_bitmap ( struct bitmap bm)

Definition at line 521 of file icon.c.

References ami_bitmap_get_native(), ami_bitmap_set_icondata(), bitmap(), ICONCTRLA_SetImageDataFormat, IDFMT_DIRECTMAPPED, THUMBNAIL_HEIGHT, and THUMBNAIL_WIDTH.

Referenced by ami_gui_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ amiga_icon_superimpose_favicon()

void amiga_icon_superimpose_favicon ( char *  path,
struct hlcache_handle icon,
char *  type 
)

Definition at line 445 of file icon.c.

References amiga_icon_convertcolouricon32(), amiga_icon_superimpose_favicon_internal(), height, ICONCTRLA_GetImageDataFormat, ICONCTRLA_SetImageDataFormat, IDFMT_DIRECTMAPPED, IDFMT_PALETTEMAPPED, path(), type, and width.

Referenced by ami_file_save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ amiga_icon_superimpose_favicon_internal()

void amiga_icon_superimpose_favicon_internal ( struct hlcache_handle icon,
struct DiskObject *  dobj 
)

Definition at line 390 of file icon.c.

References ami_bitmap_get_native(), BLITA_UseSrcAlpha, content_get_bitmap(), height, ICONCTRLA_GetImageDataFormat, IDFMT_DIRECTMAPPED, and width.

Referenced by ami_gui_event(), and amiga_icon_superimpose_favicon().

Here is the call graph for this function:
Here is the caller graph for this function: