X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=inline;f=Usermode%2FApplications%2Faxwin3_src%2FInterface%2Fmain.c;h=e39d9050f663d98a45325c7c4e3fb7d92fb7dadc;hb=f829eb1731bb6e0b9f29d285603731cb36edaeb3;hp=fee178ac184f5966eb73cbc6b56cb24b8a4f04f6;hpb=e8b89fea150a06598b9edd6a36d67fdc970a1219;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/Interface/main.c b/Usermode/Applications/axwin3_src/Interface/main.c index fee178ac..e39d9050 100644 --- a/Usermode/Applications/axwin3_src/Interface/main.c +++ b/Usermode/Applications/axwin3_src/Interface/main.c @@ -20,6 +20,9 @@ void create_sidebar(void); 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); +void update_time(void); // === GLOBALS === tHWND gSidebar; @@ -27,8 +30,12 @@ tAxWin3_Widget *gSidebarRoot; tHWND gSystemMenu; tHWND gRunDialog; tAxWin3_Widget *gRunInput; + +tAxWin3_Widget *gWindowList; +tAxWin3_Widget *gTimeDisplay; int giScreenWidth; int giScreenHeight; +char **gEnvion; // === CODE === int systembutton_fire(tAxWin3_Widget *Widget) @@ -38,8 +45,9 @@ 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); @@ -51,8 +59,8 @@ int main(int argc, char *argv[]) create_run_dialog(); AxWin3_RegisterAction(gSidebar, "Interface>Run", (tAxWin3_HotkeyCallback)mainmenu_run_dialog); -// AxWin3_RegisterAction(gSidebar, "Interface>Terminal", mainmenu_app_terminal); -// AxWin3_RegisterAction(gSidebar, "Interface>TextEdit", mainmenu_app_textedit); + AxWin3_RegisterAction(gSidebar, "Interface>Terminal", (tAxWin3_HotkeyCallback)mainmenu_app_terminal); + AxWin3_RegisterAction(gSidebar, "Interface>TextEdit", (tAxWin3_HotkeyCallback)mainmenu_app_textedit); // Idle loop AxWin3_MainLoop(); @@ -81,7 +89,7 @@ void create_sidebar(void) AxWin3_Widget_SetSize(ele, 4); // TODO: Program list - ele = AxWin3_Widget_AddWidget(gSidebarRoot, ELETYPE_BOX, ELEFLAG_VERTICAL, "ProgramList"); + gWindowList = AxWin3_Widget_AddWidget(gSidebarRoot, ELETYPE_BOX, ELEFLAG_VERTICAL, "ProgramList"); // - Plain