LIBGUI:reorg

This commit is contained in:
burniouf 2022-10-11 08:20:24 +02:00
parent a66047ccd5
commit 8e2918de4d
7 changed files with 60 additions and 17 deletions

Binary file not shown.

View File

@ -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

View File

@ -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

View File

@ -18,8 +18,8 @@ NEW
.PS "guiShowWnd"
.DA #LIBGUI.WND.Show
.PS "GetMsg"
.DA #LIBGUI.GetMsg
.PS "guiGetMsg"
.DA #LIBGUI.MSG.Get
.DA #0
*--------------------------------------

View File

@ -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

View File

@ -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

30
ROOT/ctest/testgui.c..txt Normal file
View File

@ -0,0 +1,30 @@
NEW
AUTO 3,1
#include <libgui.h>
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