Skip to content

Commit

Permalink
Merge pull request #10 from cad0gan/master
Browse files Browse the repository at this point in the history
Add constants & swi functions
  • Loading branch information
Azq2 authored May 5, 2024
2 parents 683f8bf + af04f2a commit 26087d6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swilib/include/swilib/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ enum DefaultLgpID {
LGP_NULL = 0x7FFF, /**< Empty LGP */
#endif
LGP_DOIT_PIC = 0x7FFFC0FB, /**< OK icon */
LGP_CHANGE_PIC = 0x7FFFC10D, /**< Change icon */
LGP_SAVE_PIC = 0x7FFFC113, /**< Save icon */
};

/**
Expand Down
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 26087d6

Please sign in to comment.