diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 11440fa1..bc961c92 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/INC/LIBGUI.I.txt b/INC/LIBGUI.I.txt index d08a079a..562d85da 100644 --- a/INC/LIBGUI.I.txt +++ b/INC/LIBGUI.I.txt @@ -14,7 +14,7 @@ LIBGUI.WND.New .EQ 22 LIBGUI.WND.Destroy .EQ 24 LIBGUI.WND.Show .EQ 26 LIBGUI.WND.Paint .EQ 28 -LIBGUI.GetMsg .EQ 30 +LIBGUI.MSG.Get .EQ 30 *-------------------------------------- C.BLACK .EQ 0 C16.D.BLUE .EQ 1 diff --git a/INCLUDE/libgui.h.txt b/INCLUDE/libgui.h.txt index 65c1719f..61174bd3 100644 --- a/INCLUDE/libgui.h.txt +++ b/INCLUDE/libgui.h.txt @@ -1,15 +1,18 @@ NEW AUTO 3,1 -#define CUR_T_ARROW 0 -#define CUR_T_MOVE 2 -#define CUR_T_RESIZEX 4 -#define CUR_T_RESIZEY 6 -#define CUR_T_RESIZEXY1 8 -#define CUR_T_RESIZEXY2 10 -#define CUR_T_CROSS 12 -#define CUR_T_TEXT 14 -#define CUR_T_WAIT 16 +#define C_BLACK 0 +#define C_WHITE 255 + +#define PTR_T_ARROW 0 +#define PTR_T_MOVE 2 +#define PTR_T_RESIZEX 4 +#define PTR_T_RESIZEY 6 +#define PTR_T_RESIZEXY1 8 +#define PTR_T_RESIZEXY2 10 +#define PTR_T_CROSS 12 +#define PTR_T_TEXT 14 +#define PTR_T_WAIT 16 #define WND_F_RESIZE 1 #define WND_F_MOVE 2 @@ -30,6 +33,16 @@ NEW #define WND_P_pTITLE 24 #define WND_P_pMBAR 26 #define WND_P_pSTATUS 28 +#define WND_P_pICON 30 + +#define WND_P_BGCOLOR 32 +#define WND_P_pBGBM 34 +#define WND_P_pPTR 36 + +#define MSG_T_KEY 0 +#define MSG_T_XY 2 +#define MSG_T_ID 2 +#define MSG_T_WND 6 typedef short int HWND; @@ -54,7 +67,7 @@ void guiShowWnd(HWND); void* guiSetProp(HWND,short int,void*); void* guiGetProp(HWND,short int); -void GetMsg(MSG*); +int fastcall guiGetMsg(MSG*); MAN TEXT include/libgui.h diff --git a/LIB/LIBGUI.O.S.txt b/LIB/LIBGUI.O.S.txt index 28e374e2..71c685d4 100644 --- a/LIB/LIBGUI.O.S.txt +++ b/LIB/LIBGUI.O.S.txt @@ -18,8 +18,8 @@ NEW .PS "guiShowWnd" .DA #LIBGUI.WND.Show - .PS "GetMsg" - .DA #LIBGUI.GetMsg + .PS "guiGetMsg" + .DA #LIBGUI.MSG.Get .DA #0 *-------------------------------------- diff --git a/LIB/LIBGUI.S.EVT.txt b/LIB/LIBGUI.S.MSG.txt similarity index 88% rename from LIB/LIBGUI.S.EVT.txt rename to LIB/LIBGUI.S.MSG.txt index 8d6e3d48..533903f5 100644 --- a/LIB/LIBGUI.S.EVT.txt +++ b/LIB/LIBGUI.S.MSG.txt @@ -1,7 +1,7 @@ NEW AUTO 3,1 *-------------------------------------- -EVT.GetMsg stz MSG+S.MSG.T +MSG.Get stz MSG+S.MSG.T lda A2osX.ASCREEN GUI screen active ? cmp DCB.GFX+S.DCB.GFX.DEVID @@ -80,6 +80,6 @@ EVT.GetMsg stz MSG+S.MSG.T rts *-------------------------------------- MAN -SAVE usr/src/lib/libgui.s.evt +SAVE usr/src/lib/libgui.s.msg LOAD usr/src/lib/libgui.s ASM diff --git a/LIB/LIBGUI.S.txt b/LIB/LIBGUI.S.txt index 9c3534d1..956744a0 100644 --- a/LIB/LIBGUI.S.txt +++ b/LIB/LIBGUI.S.txt @@ -134,7 +134,7 @@ CS.START cld .DA WND.Destroy .DA WND.Show .DA WND.Paint - .DA EVT.GetMsg + .DA MSG.Get *-------------------------------------- L.WND.fPaint .DA WND.fPaint *-------------------------------------- @@ -367,11 +367,11 @@ OBJ.SetX2Y2 >STYA ZPPtr1 .INB usr/src/lib/libgui.s.clip .INB usr/src/lib/libgui.s.cur .INB usr/src/lib/libgui.s.draw - .INB usr/src/lib/libgui.s.evt .INB usr/src/lib/libgui.s.fon .INB usr/src/lib/libgui.s.mbar .INB usr/src/lib/libgui.s.menu .INB usr/src/lib/libgui.s.mou + .INB usr/src/lib/libgui.s.msg .INB usr/src/lib/libgui.s.obj .INB usr/src/lib/libgui.s.pat .INB usr/src/lib/libgui.s.sysbar diff --git a/ROOT/ctest/testgui.c..txt b/ROOT/ctest/testgui.c..txt new file mode 100644 index 00000000..9c3b2e5c --- /dev/null +++ b/ROOT/ctest/testgui.c..txt @@ -0,0 +1,30 @@ +NEW + AUTO 3,1 +#include + +MSG msg; +int bQuit=0; + +int main(int argc, char *argv[]) + { + short int hWND = guiNewWnd(WND_F_RESIZE+WND_F_MOVE+WND_F_CLOSE+WND_F_MAX+WND_F_MIN, + 20,40,200,140); + guiSetProp(hWND, WND_P_pTITLE, "Window title"); + guiSetProp(hWND, WND_P_pSTATUS, "Status bar"); +// guiSetProp(hWND, WND_P_BGCOLOR, C.WHITE); + + guiShowWnd(hWND); + + do { + if (guiGetMsg(&msg)) + { + switch msg.type { + case MSG_T_WND: + break; + } + } while (!bQuit) + + guiDestroyWnd(hWND); + } +MAN +TEXT root/ctest/testgui.c