/* Full-colour application icons and the NBAPP1 icon bundle. * * Shared by the ring-3 WM (user/lib/uwm/uwm_lib.c, user/apps/wm/ucmd_wm.c) * and the host tool tools/mkappicons.c, which converts the 96 px PNGs in * assets/icons/apps/ into /ramfs/icons/apps96.icn. * * APP_ICON_LIST is an X-macro: X(ENUM_SUFFIX, "source file"). The order is * the icon id and the order of the images in the bundle, so append only. * The source files are the upstream GNOME app icon basenames; assets/icons/apps/ * holds both the unchanged SVGs and the pre-rendered .png files. */ #ifndef APP_ICON_ABI_H #define APP_ICON_ABI_H #define APP_ICON_LIST(X) \ X(TERMINAL, "org.gnome.Console") \ X(FILES, "org.gnome.Nautilus") \ X(WEB, "org.gnome.Epiphany") \ X(CHAT, "org.gnome.Fractal") \ X(EDITOR, "org.gnome.TextEditor") \ X(GALLERY, "org.gnome.Adwaita1.Demo") \ X(CLOCK, "org.gnome.clocks") \ X(COLORS, "org.gnome.design.Palette") \ X(MINES, "org.gnome.Mines") \ X(CARDS, "gnome-aisleriot") \ X(DISKS, "org.gnome.DiskUtility") \ X(TASKS, "org.gnome.SystemMonitor") \ X(SERVICES, "org.gnome.tweaks") \ X(SETTINGS, "org.gnome.Settings") \ X(DATETIME, "org.gnome.Calendar") #define APP_ICON_ENUM_(e, file) APP_ICON_##e, enum app_icon { APP_ICON_LIST(APP_ICON_ENUM_) APP_ICON_COUNT }; #undef APP_ICON_ENUM_ /* Bundle geometry. The dock draws at a 48 px base and magnifies to 1.75x, * so 96 px keeps every scale at native resolution or downscaled. */ #define APP_ICON_PX 96 #define APP_ICON_BUNDLE_PATH "/ramfs/icons/apps96.icn" /* ---- NBAPP1 bundle ------------------------------------------------------ * [struct app_icon_file_hdr][count x (96*96 premultiplied RGB565+alpha)] * One pixel is three little-endian bytes: RGB565 low/high, then alpha. * The RGB channels are premultiplied by alpha, so a scaled blit can use * source-over without dark fringes on the transparent edges. */ #define APP_ICON_FILE_MAGIC "NBAPP1\0\0" struct app_icon_file_hdr { char magic[8]; unsigned short count; /* number of icons */ unsigned short size; /* icon edge in px, APP_ICON_PX */ unsigned int reserved; }; #endif