SWILIB API (ELKA)    
Loading...
Searching...
No Matches
image.h
Go to the documentation of this file.
1#pragma once
2
11#ifndef __IN_SWILIB__
12#include "base.h"
13#endif
14
16
17typedef struct IMGHDR IMGHDR;
18typedef struct EIMGHDR EIMGHDR;
19typedef struct PNGLIST PNGLIST;
21typedef struct PNGTOP_DESC PNGTOP_DESC;
22
23struct PNGLIST {
24 void *next;
25 char *pngname;
27 uint32_t hash;
28 uint32_t pic;
29};
30
32 void *next;
33 int icon;
35};
36
43
58
62struct IMGHDR {
63#ifdef ELKA
64 uint16_t w;
65 uint16_t h;
66 int bpnum;
67#else
68 uint8_t w;
69 uint8_t h;
70 uint16_t bpnum;
71#endif
72 uint8_t *bitmap;
73};
74
78struct EIMGHDR {
79 int bpnum;
80 int w;
81 int h;
82 int zero;
84 uint8_t *bitmap;
85};
86
91#ifdef SWILIB_MODERN
112#else
113 HEADLINE_STANDART = 0x0,
114 HEADLINE_FULLSCREEN = 0x1,
115 BODY_STANDART = 0x2,
116 BODY_TAB = 0x3,
117 BOTTOM_STANDART = 0x4,
118 BOTTOM_FULLSCREEN = 0x5,
119 POPUP_OPTIONS = 0x6,
120 POPUP_FEEDBACK = 0x7,
121 SELECTION_1_LINE = 0x8,
122 SELECTION_2_LINE = 0x9,
123 SELECTION_3_LINE = 0xA,
124 SELECTION_ICON_ONLY = 0xB,
125 POPUP_SEARCH_LINE = 0xC,
126 POPUP_QUICK_ACCESS_FIELD = 0xD,
127 PROGRESS_STATUSBAR = 0xE,
128 TAB_SELECTED = 0xF,
129 TAB_UNSELECTED = 0x10,
130 STATUSBAR_STANDART = 0x11,
131 STATUSBAR_FULLSCREEN = 0x12,
132#endif
133};
134
135#ifdef NEWSGOLD
136 #define FIRST_UCS2_BITMAP 0xE12A
137#else
138 #define FIRST_UCS2_BITMAP 0xE137
139#endif
140
146__swi_begin(0x81B9)
148__swi_end(0x81B9, PNG_TOP, ());
149
155__swi_begin(0x01E)
156IMGHDR *GetPITaddr(int picture)
157__swi_end(0x01E, GetPITaddr, (picture));
158
164__swi_begin(0x021)
165int GetImgHeight(int picture)
166__swi_end(0x021, GetImgHeight, (picture));
167
173__swi_begin(0x022)
174int GetImgWidth(int picture)
175__swi_end(0x022, GetImgWidth, (picture));
176
183__swi_begin(0x1E9)
185__swi_end(0x1E9, CreateIMGHDRFromPngFile, (path, type));
186
192__swi_begin(0x2E0)
194__swi_end(0x2E0, GetIMGHDRFromThemeCache, (index));
195
201__swi_begin(0x1E4)
203__swi_end(0x1E4, GetPicNByUnicodeSymbol, (symbol));
204
210__swi_begin(0x258)
211int CalcBitmapSize(short w, short h, char type)
212__swi_end(0x258, CalcBitmapSize, (w, h, type));
213
226__swi_begin(0x3B3)
228__swi_end(0x3B3, GetIMGHDRFromCanvasCache, (canvas_id));
229
236__swi_begin(0x076)
238__swi_end(0x076, GetCanvasBufferPicPtr, (canvas_id));
239
244__swi_begin(0x075)
245int IsCanvasBufferSet(char canvas_id)
246__swi_end(0x075, IsCanvasBufferSet, (canvas_id));
247
253__swi_begin(0x063)
254void MMI_CanvasBuffer_FlushV(char canvas_id)
255__swi_end(0x063, MMI_CanvasBuffer_FlushV, (canvas_id));
256
268__swi_begin(0x2FB)
270__swi_end(0x2FB, PIT_ClearCache, ());
271
279__swi_begin(0x2FC)
280void PIT_SetImage(uint32_t picture, const IMGHDR *img)
281__swi_end(0x2FC, PIT_SetImage, (picture, img));
282
289__swi_begin(0x2FD)
290void PIT_ResetImage(uint32_t picture)
291__swi_end(0x2FD, PIT_ResetImage, (picture));
292
297__swi_begin(0x3D9)
299__swi_end(0x3D9, GetPITSize, ());
300
306__swi_begin(0x3EF)
307int16_t GetLgpIcon(int lgp_id)
308__swi_end(0x3EF, GetLgpIcon, (lgp_id));
309
324__swi_begin(0x1F6)
326__swi_end(0x1F6, GetPitAdrBy0xE200Symbol, (symbol));
327
333__swi_begin(0x1EA)
335__swi_end(0x1EA, GetMaxDynIcon, ());
336
342__swi_begin(0x1ED)
343int IsDynIconBusy(int picture)
344__swi_end(0x1ED, IsDynIconBusy, (picture));
345
352__swi_begin(0x1EF)
353void SetDynIcon(int picture, IMGHDR *img, char *bitmap)
354__swi_end(0x1EF, SetDynIcon, (picture, img, bitmap));
355
360__swi_begin(0x1EC)
361void FreeDynIcon(int picture)
362__swi_end(0x1EC, FreeDynIcon, (picture));
363
367
#define __swilib_begin
Definition doxygen.h:29
#define __swi_end(number, func, call)
Definition doxygen.h:33
#define __swi_begin(number)
Definition doxygen.h:32
#define __swilib_end
Definition doxygen.h:30
int bpnum
Bitmap type, see: ImghdrBitmapType.
Definition image.h:66
uint16_t w
Image width.
Definition image.h:64
uint8_t * bitmap
Raw bitmap data.
Definition image.h:72
uint8_t * bitmap
Raw bitmap data.
Definition image.h:84
PNGLIST * pltop
Definition image.h:38
int w
Image width.
Definition image.h:80
DYNPNGICONLIST * dyn_pltop
Definition image.h:40
uint32_t hash
Definition image.h:27
int h
Image height.
Definition image.h:81
IMGHDR * img
Definition image.h:26
uint32_t pic
Definition image.h:28
char * bitmap
Definition image.h:39
void * next
Definition image.h:32
void * next
Definition image.h:24
int tp_pixel
Value of the pixel which is replaced by transparency (or -1)
Definition image.h:83
char * pngname
Definition image.h:25
IMGHDR * img
Definition image.h:34
int bpnum
Bitmap type, see: ImghdrBitmapType.
Definition image.h:79
uint16_t h
Image height.
Definition image.h:65
DYNPNGICONLIST * dyn_pltop2
Definition image.h:41
int zero
Definition image.h:82
void SetDynIcon(int picture, IMGHDR *img, char *bitmap)
Set the image to the slot of the dynamic images.
int IsCanvasBufferSet(char canvas_id)
Check if canvas exists for the given canvas_id.
IMGHDR * GetIMGHDRFromCanvasCache(char canvas_id)
Get an image by canvas_id from cache.
int GetImgHeight(int picture)
Get the width of the image from the PIT table.
void PIT_ResetImage(uint32_t picture)
Restore the original image for a given PIT slot.
PNGTOP_DESC * PNG_TOP(void)
Get a pointer to the PNG list (PIT overrides).
void MMI_CanvasBuffer_FlushV(char canvas_id)
Flush "canvas" in cache.
int IsDynIconBusy(int picture)
Check if the specified slot of the dynamic icons is used.
int16_t GetLgpIcon(int lgp_id)
Get image by LGP_ID.
void PIT_SetImage(uint32_t picture, const IMGHDR *img)
Override the default image for a given PIT slot.
int GetImgWidth(int picture)
Get the height of the image from the PIT table.
int GetMaxDynIcon(void)
Get the maximum count of the dynamic icons.
IMGHDR * CreateIMGHDRFromPngFile(const char *path, int type)
Load PNG image from the filesystem.
IMGHDR * GetPitAdrBy0xE200Symbol(int symbol)
Get image from U+E2XX dynamic image.
void PIT_ClearCache(void)
Clear the in‑memory PIT image cache.
ThemeCacheImageID
ID of theme cache images.
Definition image.h:90
IMGHDR * GetCanvasBufferPicPtr(char canvas_id)
Get an image by canvas_id (low level).
int GetPicNByUnicodeSymbol(int symbol)
Get image from U+E1XX "emoji".
ImghdrBitmapType
Type of IMGHDR bitmap.
Definition image.h:47
IMGHDR * GetPITaddr(int picture)
Get an image from the PIT table (images in firmware).
IMGHDR * GetIMGHDRFromThemeCache(int index)
Get an image from the phone theme.
int GetPITSize()
Get the maximum count of PIT icons.
int CalcBitmapSize(short w, short h, char type)
Calculate bitmap size by WxH and type.
void FreeDynIcon(int picture)
Release the slot of the dynamic icons.
@ TCI_SELECTION_2_LINE
Definition image.h:101
@ TCI_STATUS_BAR_FULLSCREEN
Definition image.h:110
@ TCI_HEADLINE_DEFAULT
Definition image.h:92
@ TCI_POPUP_SEARCH_FIELD
Definition image.h:104
@ TCI_TAB_UNSELECTED
Definition image.h:108
@ TCI_PROGRESS_BAR
Definition image.h:106
@ TCI_BODY_DEFAULT
Definition image.h:94
@ TCI_POPUP_QUICK_ACCESS_FIELD
Definition image.h:105
@ TCI_POPUP_OPTIONS
Definition image.h:98
@ TCI_BOTTOM_FULLSCREEN
Definition image.h:97
@ TCI_POPUP_FEEDBACK
Definition image.h:99
@ TCI_TOTAL
Definition image.h:111
@ TCI_SELECTION_3_LINE
Definition image.h:102
@ TCI_STATUS_BAR_STANDARD
Definition image.h:109
@ TCI_BOTTOM_DEFAULT
Definition image.h:96
@ TCI_HEADLINE_FULLSCREEN
Definition image.h:93
@ TCI_BODY_TAB
Definition image.h:95
@ TCI_SELECTION_ICON_ONLY
Definition image.h:103
@ TCI_TAB_SELECTED
Definition image.h:107
@ TCI_SELECTION_1_LINE
Definition image.h:100
@ IMGHDR_TYPE_RLE_RGB565
RLE 16-bit.
Definition image.h:55
@ IMGHDR_TYPE_RGB332
8-bit [r3g3b2]
Definition image.h:49
@ IMGHDR_TYPE_RLE_ARGB4444
RLE 16-bit.
Definition image.h:54
@ IMGHDR_TYPE_ARGB4444
16-bit [?4r4g4b4]
Definition image.h:50
@ IMGHDR_TYPE_RLE_ARGB8888
RLE 32-bit.
Definition image.h:56
@ IMGHDR_TYPE_RGB565
16-bit [r5g6b5]
Definition image.h:51
@ IMGHDR_TYPE_WB
1-bit
Definition image.h:48
@ IMGHDR_TYPE_RLE_RGB332
RLE 8-bit.
Definition image.h:53
@ IMGHDR_TYPE_ARGB8888
32-bit [a8r8g8b8]
Definition image.h:52
Extended image header (without 255x255 limitation).
Definition image.h:78
Image header.
Definition image.h:62
#define const
Definition zconf.h:115