Skip to main content

Module request

Module request 

Source
Expand description

What the page may ask the icon route for. Every field is enumerated or validated here, so nothing the page sends reaches the operating system as anything but a file type and a size (spec §4.1, §6).

Structs§

IconRequest
A validated request for the icon of a file type.

Enums§

Kind
What an icon is for.

Constants§

MAX_EXT_LEN
The longest extension accepted (without its dot).
PX_SIZES
The sizes an icon can be asked for, in pixels: CSS size times the display scale and the pane’s zoom, snapped up to one of these by the page.

Functions§

native_list
The native icon list that covers px, as (list number, its pixel size): the smallest one at least that big, so the picture is only ever scaled down. 0 is the shell’s large list (32), 1 small (16), 2 extra large (48), 4 jumbo (256).