|
SWILIB API (NSG)
|
Functions from patches.
Usage: #include <swilib/patch.h>
Data Structures | |
| struct | CHAN_BAN_Q |
| GSM Channel item. More... | |
| struct | SFN_DATA |
| Channels list container. More... | |
Typedefs | |
| typedef struct CHAN_BAN_Q | CHAN_BAN_Q |
| typedef struct SFN_DATA | SFN_DATA |
Enumerations | |
| enum | AccessoryTypeID { ACC_TYPE_SERIAL_CABLE = 15 , ACC_TYPE_IMS_700 = 29 } |
| Accessory types. More... | |
| enum | MissedEvent { MISSED_EVENT_ALL = 0 , MISSED_EVENT_CALLS = 1 , MISSED_EVENT_SMS = 2 , MISSED_EVENT_OTHER = 3 } |
| Missed event types. More... | |
MasterPatch | |
| void | RunDispatcher () |
| Run MasterPatch dispatcher. | |
| void | GetAllPatchesByInject () |
| Unknown. | |
| void * | GetBuffer (int patch_id) |
| [MasterPatch] Get memory buffer for the patch by ID. | |
| void | RunScaner () |
| Run MasterPatch scaner. | |
| void * | FreeRAM () |
| Pointer to the free memory for MasterPatch patches. | |
API | |
| char * | OpenReadCloseFile (const char *path, void *ram) |
| Read file content. | |
| char * | GetLP (int lgp_id) |
| Get message from langpack. | |
| void | SendMP_cmd (uint16_t cmd, int16_t substract) |
| Send cmd to the MediaPlayer. | |
| void | StrAnsi2Uni (const char *in, uint16_t *out) |
| Convert ANSI string to Unicode (1st word - len). | |
| void | StrUni2Ansi (const uint16_t *in, char *out) |
| Convert Unicode string (1st word - len) to ANSI. | |
| void | DrawPicWithCanvas (int x, int y, int picture) |
| Draw image from the PIT table with "canvas" on background. | |
| void | DrawColorPicWithCanvas (int x, int y, int picture, const char *pen) |
| Draw image from the PIT table with "canvas" on background. | |
| 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 | ProcessFiles (const char *path, void(*callback)(const char *text)) |
| Read all files in the specified folder and run a callback for each. | |
| void | PlayVibra (int freq, int duration, int force) |
| Play vibration. | |
| void | PlaySoundVibra (int sound_n, int vibra_freq, int vibra_duration, int vibra_force) |
| Play sound with vibration. | |
| const WSHDR * | CreatePath (const WSHDR *path) |
| Recursive mkdir. | |
| long | Seconds2iTime (int timeval) |
| Unknown. | |
| long | GetFileSize (const char *path) |
| Get file size. | |
| char | GetAccessoryType (void) |
| Get the type of current accessory connected to the phone. | |
| int | GetMissedEventCount (uint32_t event) |
| Get missed events count. | |
| void | gb2ws (WSHDR *destination, const char *source, int size) |
| Convert Chinese one-byte C-string to WHSDR. | |
| void | ws2gb (const WSHDR *source, char *destination, int size) |
| Convert WSHDR to the Chinese one-byte C-string. | |
Screen Shooter | |
| void | ScreenShoot () |
| Make screenshot. | |
Talking phone | |
| void | SpellTime () |
| Spell current time. | |
Channel Banner | |
| SFN_DATA * | DATA_N_SFB (void) |
| Get list of the GSM channels RX levels. | |
BoBaPack | |
| void * | GetConfig (uint32_t id) |
| Unknown function. | |
| void | Vibration (uint32_t power, uint32_t duration) |
| Do vibration. | |
| void * | GetMinAdrScan () |
| Unknown function. | |
| void * | GetMaxAdrScan () |
| Unknown function. | |
Extending PIT and Shortcuts. | |
| void * | ShortcutsTableAddr () |
| Shortcuts table address. | |
| void * | PictureRelocationTableAddr () |
| Picture relocation table address. | |
| uint32_t | PictureRelocationBaseAddr () |
| Picture relocation base address. | |
| uint32_t | NextPictureMagicValue () |
| Magic value for the next picture. | |
| void * | Additional_PIT_address () |
| Additional PIT address. | |
| uint32_t | Additional_PIT_start () |
| First PIT number for additional table. | |
| uint32_t | Additional_PIT_end () |
| Last PIT number for additional table. | |
MiniGPS. | |
| uint32_t | MiniGPS () |
| Run MiniGPS patch. | |
Extra Info on ProgressBars. | |
| int | ProgressCalculate (int current, int total) |
| Calculate current progress by current & total. | |
Chinese patches. | |
| void * | GetBuildCanvas (void) |
| Unknown. | |
| int | GetLunarDate (const TDate *date, TDate *lunar_date) |
| Convert normal date to the Lunar date. | |
| int | GetLunarYearID (int year) |
| Get Lunar Year ID by year. | |
| int | GetLunarAnimal (int year) |
| Get Lunar Year animal picture by year. | |
Unknown functions from unknown patches. | |
| void | CallLibFunByNumber (int func_id) |
| Unknown. | |
| struct CHAN_BAN_Q |
| struct SFN_DATA |
| enum AccessoryTypeID |
| enum MissedEvent |
| void RunDispatcher | ( | ) |
Run MasterPatch dispatcher.
| void GetAllPatchesByInject | ( | ) |
Unknown.
| void * GetBuffer | ( | int | patch_id | ) |
[MasterPatch] Get memory buffer for the patch by ID.
| patch_id | uniq patch ID |
| void RunScaner | ( | ) |
Run MasterPatch scaner.
| void * FreeRAM | ( | ) |
Pointer to the free memory for MasterPatch patches.
| char * OpenReadCloseFile | ( | const char * | path, |
| void * | ram ) |
Read file content.
| path | path to the file |
| ram | unknown |
| char * GetLP | ( | int | lgp_id | ) |
Get message from langpack.
| lgp_id | langpack ID |
| void SendMP_cmd | ( | uint16_t | cmd, |
| int16_t | substract ) |
Send cmd to the MediaPlayer.
| cmd | command |
| substract | magic value |
mplayer.h and Send_MPlayer_Command | void StrAnsi2Uni | ( | const char * | in, |
| uint16_t * | out ) |
Convert ANSI string to Unicode (1st word - len).
| in | input string |
| out | output string |
| void StrUni2Ansi | ( | const uint16_t * | in, |
| char * | out ) |
Convert Unicode string (1st word - len) to ANSI.
| in | input string |
| out | output string |
| void DrawPicWithCanvas | ( | int | x, |
| int | y, | ||
| int | picture ) |
Draw image from the PIT table with "canvas" on background.
| x,y | image coordinates |
| picture | image number |
| void DrawColorPicWithCanvas | ( | int | x, |
| int | y, | ||
| int | picture, | ||
| const char * | pen ) |
Draw image from the PIT table with "canvas" on background.
| x,y | image coordinates |
| picture | image number |
| pen | replace black color or NULL |
| brush | replace background color or NULL (SG and X75 only) |
| 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.
You can use UnicodeControlChars for custom formatting of the text.
| text | UTF-16 text |
| x,y | left+top coordinates |
| font | font ID, see SystemFontID |
| w,h | drawing region size |
| align | align flags, see TextAttributesFlags |
| pen | stroke color |
| brush | fill color |
| inversion | invert colors |
Read all files in the specified folder and run a callback for each.
File content will be passed in the text argument of the callback.
| path | folder path (example: 0:\Misc\*) |
| callback | callback |
| void PlayVibra | ( | int | freq, |
| int | duration, | ||
| int | force ) |
Play vibration.
| freq | frequency of the vibration |
| duration | duration of the vibration |
| force | run vibration even if disabled in settings |
| void PlaySoundVibra | ( | int | sound_n, |
| int | vibra_freq, | ||
| int | vibra_duration, | ||
| int | vibra_force ) |
Play sound with vibration.
| sound_n | sound ID (if > 0x80, plays with vibra) |
| vibra_freq | frequency of the vibration |
| vibra_duration | duration of the vibration |
| vibra_force | run vibration even if disabled in settings |
Recursive mkdir.
| path | path for creation |
| long Seconds2iTime | ( | int | timeval | ) |
Unknown.
| timeval | unknown |
| long GetFileSize | ( | const char * | path | ) |
Get file size.
| path | path to the file |
| char GetAccessoryType | ( | void | ) |
Get the type of current accessory connected to the phone.
| int GetMissedEventCount | ( | uint32_t | event | ) |
Get missed events count.
| event | see MissedEvent |
Convert Chinese one-byte C-string to WHSDR.
| destination | pointer to the destination WSHDR, which should be large enough to contain the source string |
| source | input C-string to be converted to WSHDR |
| size | maximum number of characters to be converted |
Convert WSHDR to the Chinese one-byte C-string.
| source | input WSHDR to be converted to C-string |
| destination | pointer to the destination C-string, which should be large enough to contain the source WSHDR |
| size | maximum number of characters to be converted |
| void ScreenShoot | ( | ) |
Make screenshot.
| void SpellTime | ( | ) |
Spell current time.
| SFN_DATA * DATA_N_SFB | ( | void | ) |
Get list of the GSM channels RX levels.
| void * GetConfig | ( | uint32_t | id | ) |
Unknown function.
| void Vibration | ( | uint32_t | power, |
| uint32_t | duration ) |
Do vibration.
| power | power of vibration |
| duration | duration of the vibration |
| void * GetMinAdrScan | ( | ) |
Unknown function.
| void * GetMaxAdrScan | ( | ) |
Unknown function.
| void * ShortcutsTableAddr | ( | ) |
Shortcuts table address.
| void * PictureRelocationTableAddr | ( | ) |
Picture relocation table address.
| uint32_t PictureRelocationBaseAddr | ( | ) |
Picture relocation base address.
| uint32_t NextPictureMagicValue | ( | ) |
Magic value for the next picture.
| void * Additional_PIT_address | ( | ) |
Additional PIT address.
| uint32_t Additional_PIT_start | ( | ) |
First PIT number for additional table.
| uint32_t Additional_PIT_end | ( | ) |
Last PIT number for additional table.
| uint32_t MiniGPS | ( | ) |
Run MiniGPS patch.
| int ProgressCalculate | ( | int | current, |
| int | total ) |
Calculate current progress by current & total.
| current | something "current" value |
| total | something "total" value |
| void * GetBuildCanvas | ( | void | ) |
Unknown.
Convert normal date to the Lunar date.
| date | normal date | |
| [out] | lunar_date | output for converted date |
| int GetLunarYearID | ( | int | year | ) |
Get Lunar Year ID by year.
| year | given year |
| int GetLunarAnimal | ( | int | year | ) |
Get Lunar Year animal picture by year.
| year | given year |
| void CallLibFunByNumber | ( | int | func_id | ) |
Unknown.
| func_id | unknown |