Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
filepicker.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
10
11#ifndef __MUTEKI_UI_MODALS_FILEPICKER_H__
12#define __MUTEKI_UI_MODALS_FILEPICKER_H__
13
14#include "../../common.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
27#define FILEPICKER_CONTEXT_OUTPUT_ALLOC(calloc_impl, entries, is_utf16) \
28 calloc_impl(entries * 260 + 2, is_utf16 ? sizeof(UTF16) : sizeof(char))
29
33#define FILEPICKER_CONTEXT_OUTPUT_MAX_LFN 260
34
49
54
63 size_t ctx_size;
67 void *unk_0x4;
82 const char *type_list;
91 void *paths;
100 void *unk_0x18;
104 void *unk_0x1c;
108 char *unk_0x20;
120 short unk_0x2c;
124 unsigned short type_list_max_size;
131 unsigned short path_max_cu;
135 unsigned short unk_0x32;
139 unsigned short current_path_idx;
148 unsigned short npaths;
152 unsigned int flags;
164 void *unk_0x44;
168 short unk_0x48;
197 unsigned short status;
201 short unk_0x52;
202};
203
212
221
231
232#ifdef __cplusplus
233} // extern "C"
234#endif
235
236#endif // __MUTEKI_UI_MODALS_FILEPICKER_H__
Common include file for all muteki-shims headers.
#define UTF16
"Portable" Besta UTF-16 type used by other headers.
Definition common.h:54
ui_filepicker_flag_e
Known file picker flags.
Definition filepicker.h:39
@ FILEPICKER_ALLOW_MULTIPLE
Allow multiple files.
Definition filepicker.h:43
@ FILEPICKER_USE_MB
Use multi-byte strings in the current locale's encoding instead of UTF16.
Definition filepicker.h:47
int _GetNextFileName(ui_filepicker_context_t *ctx, UTF16 *out)
Read the next path from a context struct.
bool _GetOpenFileName(ui_filepicker_context_t *ctx)
Show a file picker in open mode.
bool _GetSaveFileName(ui_filepicker_context_t *ctx)
Show a file picker in save mode.
struct ui_filepicker_context_s ui_filepicker_context_t
The file picker context type.
Definition filepicker.h:53
The file picker context.
Definition filepicker.h:58
void * unk_0x44
Unknown.
Definition filepicker.h:164
void * unk_0x18
Unknown.
Definition filepicker.h:100
char unk_0x4b
Unknown.
Definition filepicker.h:176
char unk_0x4c
Unknown.
Definition filepicker.h:180
unsigned short path_max_cu
Max size of each path in code units.
Definition filepicker.h:131
short unk_0x52
Unknown.
Definition filepicker.h:201
unsigned short status
Status of the file picker.
Definition filepicker.h:197
const char * type_list
List of accepted file types.
Definition filepicker.h:82
char unk_0x4f
Unknown.
Definition filepicker.h:192
unsigned int flags
Flags.
Definition filepicker.h:152
int unk_0x28
Unknown.
Definition filepicker.h:116
char unk_0x4d
Unknown.
Definition filepicker.h:184
char unk_0x4e
Unknown.
Definition filepicker.h:188
unsigned short unk_0x32
Unknown.
Definition filepicker.h:135
short unk_0x48
Unknown.
Definition filepicker.h:168
char * unk_0x20
Unknown.
Definition filepicker.h:108
unsigned short current_path_idx
Used by _GetNextFileName() to track current index of path being read.
Definition filepicker.h:139
char unk_0x4a
Unknown.
Definition filepicker.h:172
int unk_0x40
Unknown.
Definition filepicker.h:160
unsigned short npaths
Number of paths expected.
Definition filepicker.h:148
void * unk_0x4
Unknown.
Definition filepicker.h:67
int * unk_0x3c
Unknown.
Definition filepicker.h:156
short unk_0x2c
Unknown.
Definition filepicker.h:120
size_t ctx_size
Context size.
Definition filepicker.h:63
void * unk_0x1c
Unknown.
Definition filepicker.h:104
char * start_path
Start path.
Definition filepicker.h:96
int unk_0xc
Unknown.
Definition filepicker.h:86
void * error_text
Seems to be used to store some kind of error text.
Definition filepicker.h:112
void * paths
Paths buffer.
Definition filepicker.h:91
unsigned short type_list_max_size
Max size of the type list.
Definition filepicker.h:124