Skip to content

Commit

Permalink
Add some swi functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cad0gan committed May 5, 2024
1 parent 272ca1a commit af04f2a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions swilib/include/swilib/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ __swi_begin(0x010)
int sys_mkdir(const char *dirname, uint32_t *err)
__swi_end(0x010, sys_mkdir, (dirname, err));

/**
* @copydoc sys_mkdir
* */
__swi_begin(0x3B7)
int sys_mkdir_ws(const WSHDR *dirname, uint32_t *err)
__swi_end(0x3B7, sys_mkdir_ws, (dirname, err));

/**
* Remove directory.
* @param dirname path to the directory
Expand Down Expand Up @@ -361,6 +368,13 @@ __swi_begin(0x091)
int isdir(const char *path, uint32_t *err)
__swi_end(0x091, isdir, (path, err));

/**
* @copydoc isdir
* */
__swi_begin(0x3BC)
int isdir_ws(const WSHDR *path, uint32_t *err)
__swi_end(0x3BC, isdir_ws, (path, err));

/**
* Check if a file or directory exists.
* @param path path to the file or directory
Expand Down
10 changes: 10 additions & 0 deletions swilib/include/swilib/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ __swi_begin(0x050)
int MsgBoxOkCancel(int flags, int message, void (*callback)(int canceled))
__swi_end(0x050, MsgBoxOkCancel, (flags, message, callback));

/**
* Show wait popup.
* @param flags
* @param message id from the langpack or pointer to the C-string
* @return GUI_ID
* */
__swi_begin(0x3C0)
int ShowWaitBox(int flags, int message)
__swi_end(0x3C0, ShowWaitBox, (flags, message));

/**
* Create custom Popup.
* @param flags see #PopupDialogFlags
Expand Down

0 comments on commit af04f2a

Please sign in to comment.