GEMLIB
0.44.0
|
file selector functions More...
Macros | |
#define | fslx_close(a) mt_fslx_close(a,aes_global) |
#define | fslx_do(a, b, c, d, e, f, g, h, i, j, k, l, m) mt_fslx_do(a,b,c,d,e,f,g,h,i,j,k,l,m,aes_global) |
#define | fslx_evnt(a, b, c, d, e, f, g, h) mt_fslx_evnt(a,b,c,d,e,f,g,h,aes_global) |
#define | fslx_getnxtfile(a, b) mt_fslx_getnxtfile(a,b,aes_global) |
#define | fslx_open(a, b, c, d, e, f, g, h, i, j, k, l, m) mt_fslx_open(a,b,c,d,e,f,g,h,i,j,k,l,m,aes_global) |
#define | fslx_set_flags(a, b) mt_fslx_set_flags(a,b,aes_global) |
#define | SORTBYNAME 0 |
#define | SORTBYDATE 1 |
#define | SORTBYSIZE 2 |
#define | SORTBYTYPE 3 |
#define | SORTBYNONE 4 |
#define | SORTDEFAULT -1 |
#define | DOSMODE 1 |
#define | NFOLLOWSLKS 2 |
#define | GETMULTI 8 |
#define | SHOW8P3 1 |
Typedefs | |
typedef short __CDECL(* | XFSL_FILTER) (char *path, char *name, GEMLIB_XATTR *xattr) |
Functions | |
short | mt_fslx_close (void *fsd, short *global) |
void * | mt_fslx_do (char *title, char *path, short pathlen, char *fname, short fnamelen, char *patterns, XFSL_FILTER filter, char *paths, short *sort_mode, short flags, short *button, short *nfiles, char **pattern, short *global) |
short | mt_fslx_evnt (void *fsd, EVNT *events, char *path, char *fname, short *button, short *nfiles, short *sort_mode, char **pattern, short *global) |
short | mt_fslx_getnxtfile (void *fsd, char *fname, short *global) |
void * | mt_fslx_open (char *title, short x, short y, short *handle, char *path, short pathlen, char *fname, short fnamelen, char *patterns, XFSL_FILTER filter, char *paths, short sort_mode, short flags, short *global) |
short | mt_fslx_set_flags (short flags, short *oldval, short *global) |
file selector functions
This File Selector library availability can be found calling mt_appl_getinfo(7). Bit 3 of ap_gout1
, if equal to 1, says that mt_flsx_xx() functions are available.
#define DOSMODE 1 |
TODO
#define fslx_close | ( | a | ) | mt_fslx_close(a,aes_global) |
single-thread version of mt_fslx_close()
#define fslx_do | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i, | |||
j, | |||
k, | |||
l, | |||
m | |||
) | mt_fslx_do(a,b,c,d,e,f,g,h,i,j,k,l,m,aes_global) |
single-thread version of mt_fslx_do()
#define fslx_evnt | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | mt_fslx_evnt(a,b,c,d,e,f,g,h,aes_global) |
single-thread version of mt_fslx_evnt()
#define fslx_getnxtfile | ( | a, | |
b | |||
) | mt_fslx_getnxtfile(a,b,aes_global) |
single-thread version of mt_fslx_getnxtfile()
#define fslx_open | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i, | |||
j, | |||
k, | |||
l, | |||
m | |||
) | mt_fslx_open(a,b,c,d,e,f,g,h,i,j,k,l,m,aes_global) |
single-thread version of mt_fslx_open()
#define fslx_set_flags | ( | a, | |
b | |||
) | mt_fslx_set_flags(a,b,aes_global) |
single-thread version of mt_fslx_set_flags()
#define GETMULTI 8 |
TODO
#define NFOLLOWSLKS 2 |
TODO
#define SHOW8P3 1 |
TODO
#define SORTBYDATE 1 |
TODO
#define SORTBYNAME 0 |
TODO
#define SORTBYNONE 4 |
TODO
#define SORTBYSIZE 2 |
TODO
#define SORTBYTYPE 3 |
TODO
#define SORTDEFAULT -1 |
TODO
typedef short __CDECL(* XFSL_FILTER) (char *path, char *name, GEMLIB_XATTR *xattr) |
TODO
short mt_fslx_close | ( | void * | fsd, |
short * | global_aes | ||
) |
Close file selector window or file selector dialog
fsd | Descriptor that was passed at the successful opening of a file selector window. |
global_aes | global AES array |
The corresponding descriptor is cleared and the file selector window or dialog is closed.
void* mt_fslx_do | ( | char * | title, |
char * | path, | ||
short | pathlen, | ||
char * | fname, | ||
short | fnamelen, | ||
char * | patterns, | ||
XFSL_FILTER | filter, | ||
char * | paths, | ||
short * | sort_mode, | ||
short | flags, | ||
short * | button, | ||
short * | nfiles, | ||
char ** | pattern, | ||
short * | global_aes | ||
) |
File selector dialog
title | |
path | |
pathlen | |
fname | |
fnamelen | |
patterns | |
filter | |
paths | |
sort_mode | [option CHECK_NULLPTR] sort_mode may be NULL |
flags | |
button | [option CHECK_NULLPTR] button may be NULL |
nfiles | [option CHECK_NULLPTR] nfiles may be NULL |
pattern | [option CHECK_NULLPTR] pattern may be NULL |
global_aes | global AES array |
This function is a combination of mt_fslx_open() and mt_fslx_evnt(), but uses a dialog box without a window.
see mt_fslx_open() and mt_fslx_evnt() for more details.
short mt_fslx_evnt | ( | void * | fsd, |
EVNT * | events, | ||
char * | path, | ||
char * | fname, | ||
short * | button, | ||
short * | nfiles, | ||
short * | sort_mode, | ||
char ** | pattern, | ||
short * | global_aes | ||
) |
Service file selector window
fsd | Descriptor that was passed at a successful opening of a file selector window. |
events | EVENT structure as for wdlg_evnt and fnts_evnt. The events are serviced by the dialog if they are intended for the associated window. |
path | Pointer to the selected path if the dialog was quit successfully, i.e. by a click on the OK button or by double- clicking on a file. |
fname | Pointer to the selected filename if the dialog was quit successfully, i.e. by a click on the OK button or by double- clicking on a file. |
button | [option CHECK_NULLPTR] button may be NULL |
nfiles | [option CHECK_NULLPTR] nfiles may be NULL |
sort_mode | [option CHECK_NULLPTR] sort_mode may be NULL |
pattern | [option CHECK_NULLPTR] pattern may be NULL |
global_aes | global AES array |
Events, i.e. mouse clicks, messages and keypresses are passed on to the file selector window and serviced by it if appropriate. When an event has been serviced then the corresponding bit in the EVENT structure will be cleared.
short mt_fslx_getnxtfile | ( | void * | fsd, |
char * | fname, | ||
short * | global_aes | ||
) |
Examine further selected files
fsd | Descriptor that was passed at a successful opening of a file selector window |
fname | see below |
global_aes | global AES array |
fname
is unchanged.fname
was copied.void* mt_fslx_open | ( | char * | title, |
short | x, | ||
short | y, | ||
short * | handle, | ||
char * | path, | ||
short | pathlen, | ||
char * | fname, | ||
short | fnamelen, | ||
char * | patterns, | ||
XFSL_FILTER | filter, | ||
char * | paths, | ||
short | sort_mode, | ||
short | flags, | ||
short * | global_aes | ||
) |
Open file selector window
title | Window title of file selector, may be NULL |
x | |
y | Screen coordinates of the upper left corner of the window. For x=y=-1 the window will be centred. |
handle | Window handle after successful opening [option CHECK_NULLPTR] handle may be NULL |
path | Complete path, starts with drive and ends with '\' |
pathlen | Length of path buffer, i.e. maximum pathlength + 1 (for EOS) |
fname | Buffer for the filename |
fnamelen | Length of filename buffer, i.e. maximum length of filename + 1 (for EOS) |
patterns | Filemask, e.g. "*.TXT" or "*.PRG,*.APP". The alternatively selectable masks are separated by EOS and terminated by EOS,EOS. |
filter | May be NULL. The filter function is called before the mask comparison. If it returns 0 then the file is invalid, if 1 is returned then the filename will be displayed. |
paths | Path "history" e.g. "C:\\BIN\\" etc. The alternatively selectable paths are separated by EOS and terminated by EOS,EOS. |
sort_mode | Sort mode for the display. The modes are:
|
flags | Various settings:
|
global_aes | global AES array |
The corresponding descriptor will be created and the file selector window opened.
short mt_fslx_set_flags | ( | short | flags, |
short * | oldval, | ||
short * | global_aes | ||
) |
Global system settings
flags | Various flags, at present only:
|
oldval | Previous value [option CHECK_NULLPTR] oldval may be NULL |
global_aes | global AES array |
This function is used (e.g. by MAGXDESK) in order to set the switch "Show TOS Files as '8+3'" for the file selector as well.