SWILIB API (ELKA)    
Loading...
Searching...
No Matches
patch.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef __IN_SWILIB__
4#include "base.h"
5#include "date.h"
6#include "wstring.h"
7#endif
8
10
28
29typedef struct CHAN_BAN_Q CHAN_BAN_Q;
30typedef struct SFN_DATA SFN_DATA;
31
35struct CHAN_BAN_Q {
37 uint32_t (*proc)(int chan, uint32_t lvl);
38};
39
46
56
66__swi_begin(0x0C1)
68__swi_end(0x0C1, RunDispatcher, ());
69
74__swi_begin(0x0C2)
77
83__swi_begin(0x0C4)
84void *GetBuffer(int patch_id)
85__swi_end(0x0C4, GetBuffer, (patch_id));
86
91__swi_begin(0x0BE)
93__swi_end(0x0BE, RunScaner, ());
94
99__swi_begin(0x80E4)
100void *FreeRAM()
101__swi_end(0x80E4, FreeRAM, ());
102
117__swi_begin(0x011)
118char *OpenReadCloseFile(const char *path, void *ram)
119__swi_end(0x011, OpenReadCloseFile, (path, ram));
120
127__swi_begin(0x007)
128char *GetLP(int lgp_id)
129__swi_end(0x007, GetLP, (lgp_id));
130
138__swi_begin(0x1F9)
139void SendMP_cmd(uint16_t cmd, int16_t substract)
140__swi_end(0x1F9, SendMP_cmd, (cmd, substract));
141
149__swi_begin(0x0AD)
150void StrAnsi2Uni(const char *in, uint16_t *out)
151__swi_end(0x0AD, StrAnsi2Uni, (in, out));
152
160__swi_begin(0x0AE)
161void StrUni2Ansi(const uint16_t *in, char *out)
162__swi_end(0x0AE, StrUni2Ansi, (in, out));
163
170__swi_begin(0x0B0)
171void DrawPicWithCanvas(int x, int y, int picture)
172__swi_end(0x0B0, DrawPicWithCanvas, (x, y, picture));
173
182__swi_begin(0x0B1)
183#ifdef NEWSGOLD
184void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen)
185__swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen));
186#else
187void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen, const char *brush)
188__swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen, brush));
189#endif
190
204__swi_begin(0x0AC)
205void DrawText(const WSHDR *text, int x, int y, int font, int w, int h, int align, const char *pen, const char *brush, int inversion)
206__swi_end(0x0AC, DrawText, (text, x, y, font, w, h, align, pen, brush, inversion));
207
215__swi_begin(0x0C3)
216void ProcessFiles(const char *path, void (*callback)(const char *text))
217__swi_end(0x0C3, ProcessFiles, (path, callback));
218
226__swi_begin(0x056)
227void PlayVibra(int freq, int duration, int force)
228__swi_end(0x056, PlayVibra, (freq, duration, force));
229
238__swi_begin(0x098)
239void PlaySoundVibra(int sound_n, int vibra_freq, int vibra_duration, int vibra_force)
240__swi_end(0x098, PlaySoundVibra, (sound_n, vibra_freq, vibra_duration, vibra_force));
241
248__swi_begin(0x097)
250__swi_end(0x097, CreatePath, (path));
251
258__swi_begin(0x0B3)
259long Seconds2iTime(int timeval)
260__swi_end(0x0B3, Seconds2iTime, (timeval));
261
268__swi_begin(0x1F7)
269long GetFileSize(const char *path)
270__swi_end(0x1F7, GetFileSize, (path));
271
277__swi_begin(0x088)
279__swi_end(0x088, GetAccessoryType, ());
280
287__swi_begin(0x009E)
288int GetMissedEventCount(uint32_t event)
289__swi_end(0x009E, GetMissedEventCount, (event));
290
299__swi_begin(0x242)
300void gb2ws(WSHDR *destination, const char *source, int size)
301__swi_end(0x242, gb2ws, (destination, source, size));
302
311__swi_begin(0x243)
312void ws2gb(const WSHDR *source, char *destination, int size)
313__swi_end(0x243, ws2gb, (source, destination, size));
314
326__swi_begin(0x200)
328__swi_end(0x200, ScreenShoot, ());
329
341__swi_begin(0x0BF)
343__swi_end(0x0BF, SpellTime, ());
344
357__swi_begin(0x81BB)
359__swi_end(0x81BB, DATA_N_SFB, ());
360
372__swi_begin(0x010A)
373void *GetConfig(uint32_t id)
374__swi_end(0x010A, GetConfig, (id));
375
382__swi_begin(0x010E)
383void Vibration(uint32_t power, uint32_t duration)
384__swi_end(0x010E, Vibration, (power, duration));
385
390__swi_begin(0x810B)
392__swi_end(0x810B, GetMinAdrScan, ());
393
398__swi_begin(0x810C)
400__swi_end(0x810C, GetMaxAdrScan, ());
401
413__swi_begin(0x80FB)
415__swi_end(0x80FB, ShortcutsTableAddr, ());
416
422__swi_begin(0x80FC)
425
430__swi_begin(0x80FD)
433
438__swi_begin(0x80FE)
441
447__swi_begin(0x80F8)
450
455__swi_begin(0x80F9)
458
463__swi_begin(0x80FA)
465__swi_end(0x80FA, Additional_PIT_end, ());
466
479__swi_begin(0x0C0)
480uint32_t MiniGPS()
481__swi_end(0x0C0, MiniGPS, ());
482
497__swi_begin(0x1EE)
498int ProgressCalculate(int current, int total)
499__swi_end(0x1EE, ProgressCalculate, (current, total));
500
513__swi_begin(0x0B2)
514void *GetBuildCanvas(void)
515__swi_end(0x0B2, GetBuildCanvas, ());
516
531__swi_begin(0x234)
532int GetLunarDate(const TDate *date, TDate *lunar_date)
533__swi_end(0x234, GetLunarDate, (date, lunar_date));
534
541__swi_begin(0x235)
542int GetLunarYearID(int year)
543__swi_end(0x235, GetLunarYearID, (year));
544
551__swi_begin(0x236)
552int GetLunarAnimal(int year)
553__swi_end(0x236, GetLunarAnimal, (year));
554
566__swi_begin(0x0C7)
567void CallLibFunByNumber(int func_id)
568__swi_end(0x0C7, CallLibFunByNumber, (func_id));
569
573
#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
Date of the day.
Definition date.h:26
CHAN_BAN_Q * ChanBannerQ
Channels list.
Definition patch.h:44
uint32_t(* proc)(int chan, uint32_t lvl)
Get RX level.
Definition patch.h:37
CHAN_BAN_Q * next
Pointer to the next channel.
Definition patch.h:36
char * OpenReadCloseFile(const char *path, void *ram)
Read file content.
void PlaySoundVibra(int sound_n, int vibra_freq, int vibra_duration, int vibra_force)
Play sound with vibration.
void * GetMaxAdrScan()
Unknown function.
void RunDispatcher()
Run MasterPatch dispatcher.
void CallLibFunByNumber(int func_id)
Unknown.
void ProcessFiles(const char *path, void(*callback)(const char *text))
Read all files in the specified folder and run a callback for each.
void * ShortcutsTableAddr()
Shortcuts table address.
void Vibration(uint32_t power, uint32_t duration)
Do vibration.
void SendMP_cmd(uint16_t cmd, int16_t substract)
Send cmd to the MediaPlayer.
void ws2gb(const WSHDR *source, char *destination, int size)
Convert WSHDR to the Chinese one-byte C-string.
AccessoryTypeID
Accessory types.
Definition patch.h:24
const WSHDR * CreatePath(const WSHDR *path)
Recursive mkdir.
void * GetConfig(uint32_t id)
Unknown function.
void PlayVibra(int freq, int duration, int force)
Play vibration.
void * GetMinAdrScan()
Unknown function.
long GetFileSize(const char *path)
Get file size.
uint32_t Additional_PIT_start()
First PIT number for additional table.
void * Additional_PIT_address()
Additional PIT address.
uint32_t Additional_PIT_end()
Last PIT number for additional table.
uint32_t NextPictureMagicValue()
Magic value for the next picture.
void DrawText(const WSHDR *text, int x, int y, int font, int w, int h, int align, const char *pen, const char *brush, int inversion)
Draw a multi-line string.
void gb2ws(WSHDR *destination, const char *source, int size)
Convert Chinese one-byte C-string to WHSDR.
void * FreeRAM()
Pointer to the free memory for MasterPatch patches.
void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen)
Draw image from the PIT table with "canvas" on background.
void DrawPicWithCanvas(int x, int y, int picture)
Draw image from the PIT table with "canvas" on background.
int GetLunarDate(const TDate *date, TDate *lunar_date)
Convert normal date to the Lunar date.
MissedEvent
Missed event types.
Definition patch.h:50
void GetAllPatchesByInject()
Unknown.
void * GetBuffer(int patch_id)
[MasterPatch] Get memory buffer for the patch by ID.
void SpellTime()
Spell current time.
void StrAnsi2Uni(const char *in, uint16_t *out)
Convert ANSI string to Unicode (1st word - len).
void RunScaner()
Run MasterPatch scaner.
int GetLunarAnimal(int year)
Get Lunar Year animal picture by year.
long Seconds2iTime(int timeval)
Unknown.
char GetAccessoryType(void)
Get the type of current accessory connected to the phone.
void * GetBuildCanvas(void)
Unknown.
void * PictureRelocationTableAddr()
Picture relocation table address.
void ScreenShoot()
Make screenshot.
uint32_t PictureRelocationBaseAddr()
Picture relocation base address.
SFN_DATA * DATA_N_SFB(void)
Get list of the GSM channels RX levels.
int ProgressCalculate(int current, int total)
Calculate current progress by current & total.
uint32_t MiniGPS()
Run MiniGPS patch.
int GetLunarYearID(int year)
Get Lunar Year ID by year.
char * GetLP(int lgp_id)
Get message from langpack.
void StrUni2Ansi(const uint16_t *in, char *out)
Convert Unicode string (1st word - len) to ANSI.
int GetMissedEventCount(uint32_t event)
Get missed events count.
@ ACC_TYPE_IMS_700
IMS-700.
Definition patch.h:26
@ ACC_TYPE_SERIAL_CABLE
DCA-510.
Definition patch.h:25
@ MISSED_EVENT_SMS
Definition patch.h:53
@ MISSED_EVENT_OTHER
Definition patch.h:54
@ MISSED_EVENT_ALL
Definition patch.h:51
@ MISSED_EVENT_CALLS
Definition patch.h:52
GSM Channel item.
Definition patch.h:35
Channels list container.
Definition patch.h:43
Wide-string header.
Definition wstring.h:35
#define const
Definition zconf.h:115