void create_mainmenu(void);
void create_run_dialog(void);
void mainmenu_run_dialog(void *unused);
+void mainmenu_app_terminal(void *unused);
+void mainmenu_app_textedit(void *unused);
// === GLOBALS ===
tHWND gSidebar;
tAxWin3_Widget *gRunInput;
int giScreenWidth;
int giScreenHeight;
+char **gEnvion;
// === CODE ===
int systembutton_fire(tAxWin3_Widget *Widget)
return 0;
}
-int main(int argc, char *argv[])
+int main(int argc, char *argv[], char **envp)
{
+ gEnvion = envp;
// Connect to AxWin3 Server
AxWin3_Connect(NULL);
void mainmenu_app_textedit(void *unused)
{
- _SysDebug("TODO: Launch text editor");
-// spawn("/Acess/Apps/AxWin/3.0/ate");
+ const char *args[] = {"ate",NULL};
+// _SysDebug("TODO: Launch text editor");
+ _SysSpawn("/Acess/Apps/AxWin/3.0/ate", args, (const char **)gEnvion, 0, NULL);
}
void mainmenu_app_terminal(void *unused)
extern int waittid(int id, int *status);
extern int clone(int flags, void *stack);
extern int execve(char *path, char **argv, char **envp);
-extern int _SysSpawn(const char *Path, const char **argv, const char **envp, int nFDs, int *FDs);
+extern int _SysSpawn(const char *Path, const char **argv, const char **envp, int nFDs, int *FDs, struct s_sys_spawninfo *info);
extern int gettid(void);
extern int getpid(void);
extern int _SysSetFaultHandler(int (*Handler)(int));
typedef struct s_sysFInfo t_sysFInfo;
typedef struct s_sysACL t_sysACL;
+struct s_sys_spawninfo
+{
+ unsigned int flags;
+ unsigned int uid;
+ unsigned int gid;
+};
+
extern void FD_ZERO(fd_set *fdsetp);
extern void FD_CLR(int fd, fd_set *fdsetp);
extern void FD_SET(int fd, fd_set *fdsetp);