SWILIB API (ELKA)    
Loading...
Searching...
No Matches
explorer.h
Go to the documentation of this file.
1#pragma once
2
11#ifndef __IN_SWILIB__
12#include "base.h"
13#include "wstring.h"
14#endif
15
17
22
24
27typedef struct REGEXPLEXT REGEXPLEXT;
29
30#ifdef NEWSGOLD
31typedef struct REGEXPLEXT TREGEXPLEXT;
32#else
33typedef struct REGEXPLEXT_ARM_NEW TREGEXPLEXT;
34#endif
35
45
50 int unk1;
52 short unk2;
53 uint16_t attr;
54};
55
78
82struct REGEXPLEXT {
83#ifdef NEWSGOLD
84 const char *ext;
88 short menu_flag;
89 const int *icon1;
90 const int *icon2;
94 void *proc;
95 void *altproc;
96#else
97 const char *ext;
98 int unical_id;
99 char enabled_options;
100 uint8_t obex_path_id;
101 uint16_t menu_flag;
102 const int *icon1;
103 const int *icon2;
104 void *proc;
105 void *altproc;
106#endif
107};
108
113 int zero;
114 const uint32_t *icon1;
117 char unk;
118 uint16_t menu_flag;
120 char not_used[3];
122 void *proc;
123 void *altproc;
124 const uint32_t *icon2;
125};
126
131__swi_begin(0x08C)
133__swi_end(0x08C, RegExplorerExt, (ext));
134
141__swi_begin(0x095)
143__swi_end(0x095, UnRegExplorerExt, (ext));
144
150__swi_begin(0x81B8)
151void *EXT_TOP(void)
152__swi_end(0x81B8, EXT_TOP, ());
153
159__swi_begin(0x1CF)
161__swi_end(0x1CF, get_regextpnt_by_uid, (uid));
162
168__swi_begin(0x1D0)
170__swi_end(0x1D0, GetExtUid_ws, (ext));
171
177__swi_begin(0x2E1)
179__swi_end(0x2E1, GetExtUidByFileName_ws, (file));
180
186__swi_begin(0x2DB)
188__swi_end(0x2DB, MediaSendCSM_Open, (file, path));
189
199__swi_begin(0x3CC)
200int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode)
201__swi_end(0x3CC, PersMenuCSM_Open, (file_name, dir, flag, open_mode));
202
208__swi_begin(0x254)
210__swi_end(0x254, StartNativeExplorer, (data));
211
217__swi_begin(0x22E)
219__swi_end(0x22E, OpenExplorer, (data));
220
226__swi_begin(0x212)
227int CardExplGetCurItem(void *csm)
228__swi_end(0x212, CardExplGetCurItem, (csm));
229
236__swi_begin(0x213)
237void CardExplGetFName(void *csm, int index, WSHDR *filename)
238__swi_end(0x213, CardExplGetFName, (csm, index, filename));
239
247__swi_begin(0x094)
248int ExecuteFile(const WSHDR *filepath, const WSHDR *mime, void *param)
249__swi_end(0x094, ExecuteFile, (filepath, mime, param));
250
267__swi_begin(0x1F0)
268#ifdef NEWSGOLD
269int ExplorerCopyFile(const WSHDR *from, const WSHDR *to, int overwrite, char transfer_id, uint32_t *errp)
270#else
271int ExplorerCopyFile(const char *from, const char *to, int overwrite, char transfer_id, uint32_t *errp)
272#endif
273__swi_end(0x1F0, ExplorerCopyFile, (from, to, overwrite, transfer_id, errp));
274
281__swi_begin(0x1F1)
282void ExplorerSetTransferState(char transfer_id, int state)
283__swi_end(0x1F1, ExplorerSetTransferState, (transfer_id, state));
284
293__swi_begin(0x3C8)
294int GetMimeType(int uid, WSHDR *mime_type, int occurrence)
295__swi_end(0x3C8, GetMimeType, (uid, mime_type, occurrence));
296
305__swi_begin(0x3D5)
306int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir)
307__swi_end(0x3D5, BuildPath, (path, file_name, dir));
308
310
#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
WSHDR * file_name
File name.
Definition explorer.h:51
int(* show_item_handler)(NATIVE_EXPLORER_ITEM *)
Callback for showing items.
Definition explorer.h:69
int Options_lgpid
Name of the "Options" item in the file menu (LGP_ID or C-string)
Definition explorer.h:92
void * proc
Callback for the "Open".
Definition explorer.h:94
WSHDR * full_filename
Full path to the dir or file.
Definition explorer.h:71
const char * ext
Name of the extension, example: "elf".
Definition explorer.h:84
WSHDR * path_to_file
Full path to the dir or file.
Definition explorer.h:62
uint16_t menu_flag
Menu flags.
Definition explorer.h:118
int dir_enum
Usually 0x26.
Definition explorer.h:61
void * altproc
Callback for the "Options".
Definition explorer.h:123
int mode
See NativeExplorerMode.
Definition explorer.h:60
WSHDR * ext
Name of the extension in UTF-16.
Definition explorer.h:121
const int * icon1
Pointer to the SMALL icons (16x16)
Definition explorer.h:89
const uint32_t * icon1
Pointer to the SMALL icons (16x16)
Definition explorer.h:114
const int * icon2
Pointer to the BIG icons (32x32)
Definition explorer.h:90
int unical_id
Uniq ID of the extension.
Definition explorer.h:115
char obex_path_id
Path for saving files through the OBEX (set to 8 - 0:\Misc)
Definition explorer.h:87
int unk1
Unknown.
Definition explorer.h:50
short menu_flag
Set to MENU_FLAG2.
Definition explorer.h:88
int(* user_handler)(NATIVE_EXPLORER_ITEM *)
Callback for mode=NATIVE_EXPLORER_MODE_SELECT.
Definition explorer.h:73
char obex_path_id
Path for saving files through the OBEX.
Definition explorer.h:116
WSHDR * file_name
Scroll to the file/dir, if non-empty (Only filename)
Definition explorer.h:63
void * altproc
Callback for the "Options".
Definition explorer.h:95
NativeExplorerData * this_struct_addr
Self-reference to this structure.
Definition explorer.h:74
const uint32_t * icon2
Pointer to the BIG icons (32x32)
Definition explorer.h:124
int Open_lgpid
Name of the "Open" item in the file menu (LGP_ID or C-string)
Definition explorer.h:91
short unk2
Unknown.
Definition explorer.h:52
int Enter_lgpid
Icon for the center softkey, set to LGP_DOIT_PIC.
Definition explorer.h:93
char enabled_options
Options flags.
Definition explorer.h:119
int unical_id
Uniq ID of the extension.
Definition explorer.h:85
int is_exact_dir
Set to 1.
Definition explorer.h:65
uint16_t attr
File attributes, see FileAttributes.
Definition explorer.h:53
void * proc
Callback for the "Open".
Definition explorer.h:122
char enabled_options
Enabled options, set to 0xFF.
Definition explorer.h:86
void ExplorerSetTransferState(char transfer_id, int state)
Set transfer state.
int CardExplGetCurItem(void *csm)
Get current item in open Explorer.
int GetExtUid_ws(const WSHDR *ext)
Get the ID of the registered extension by its name.
TREGEXPLEXT * get_regextpnt_by_uid(int uid)
Get explorer extension definition by ID.
void * EXT_TOP(void)
Get a pointer to the explorer extensions.
int ExplorerCopyFile(const WSHDR *from, const WSHDR *to, int overwrite, char transfer_id, uint32_t *errp)
Copy file.
int UnRegExplorerExt(const REGEXPLEXT *ext)
Unregister extension from the NativeExplorer.
NativeExplorerMode
Mode of the NativeExplorer.
Definition explorer.h:39
int GetMimeType(int uid, WSHDR *mime_type, int occurrence)
Get MIME type.
void CardExplGetFName(void *csm, int index, WSHDR *filename)
Get filename of the item in the open Explorer.
int OpenExplorer(NativeExplorerData *data)
Open NativeExplorer.
ExplorerTransferStates
Definition explorer.h:18
int GetExtUidByFileName_ws(const WSHDR *file)
Get the ID of the registered extension by path to the file.
void MediaSendCSM_Open(const WSHDR *file, const WSHDR *path)
Open menu for sending file.
int ExecuteFile(const WSHDR *filepath, const WSHDR *mime, void *param)
Execute file by the NativeExplorer.
int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode)
Open menu for setting resource as Wallpaper, Logo, Ringtone, etc.
int StartNativeExplorer(NativeExplorerData *data)
Open NativeExplorer.
void RegExplorerExt(const REGEXPLEXT *ext)
Register own extension in the NativeExplorer.
int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir)
Build a full path by a file name and a directory name.
@ NATIVE_EXPLORER_MODE_SELECT
Select file.
Definition explorer.h:41
@ NATIVE_EXPLORER_MODE_COPY
Copy file mode.
Definition explorer.h:42
@ NATIVE_EXPLORER_MODE_DEFAULT
Explore files, default mode.
Definition explorer.h:40
@ NATIVE_EXPLORER_MODE_MOVE
Move file mode.
Definition explorer.h:43
@ EXPLORER_TRANSFER_STATE_RUNNING
Definition explorer.h:20
@ EXPLORER_TRANSFER_STATE_STOP
Definition explorer.h:19
Item structure of the NativeExplorer.
Definition explorer.h:49
NativeExplorer options.
Definition explorer.h:59
Extension registration structure.
Definition explorer.h:82
Native Explorer extension entry returned by get_regextpnt_by_uid on SG and X75.
Definition explorer.h:112
Wide-string header.
Definition wstring.h:35
#define const
Definition zconf.h:115