avr: more work on gui2
- decreased complexitiy by removing guicntl - changed fonts to allow for storing bitmaps in ressource segment - add fonts to ressources for display node c03 - added some safety features (check pointers, add magic field to objects etc) - moved style.asm to device folder
This commit is contained in:
@@ -25,6 +25,9 @@ testApp_ramdata:
|
||||
.byte GUIAPP_SD_SIZE
|
||||
|
||||
|
||||
testRootWin_ramdata:
|
||||
.byte WIDGET_SD_SIZE
|
||||
|
||||
testWin_ramdata:
|
||||
.byte WIDGET_SD_SIZE
|
||||
|
||||
@@ -50,62 +53,75 @@ testWinBodyImg3_ramdata:
|
||||
|
||||
.cseg
|
||||
|
||||
testCntrl:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.dw testApp_flashdata*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testCntrl_signalmap*2 ; signal map
|
||||
|
||||
testCntrl_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(GuiCntlr_OnCreate), HIGH(GuiCntlr_OnCreate)
|
||||
.db 0, GUIAPP_SIGNAL_RAISE, LOW(GuiCntlr_OnRaise), HIGH(GuiCntlr_OnRaise)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
testApp_flashdata:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw testCntrl*2 ; parent
|
||||
.dw 0 ; first child
|
||||
.dw testCntrl*2 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testApp_signalmap*2 ; signal map
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.dw 0 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testApp_signalmap*2 ; signal map
|
||||
; GUIAPP
|
||||
.dw testApp_ramdata ; SDRAM data
|
||||
.dw testWin_flashdata*2 ; root widget
|
||||
.dw 0 ; root timer
|
||||
.dw testApp_ramdata ; SDRAM data
|
||||
.dw testRootWin_flashdata*2 ; root widget
|
||||
|
||||
testApp_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_TIMER, LOW(GuiApp_OnTimer), HIGH(GuiApp_OnTimer)
|
||||
.db 0, WIDGET_SIGNAL_TOUCH, LOW(GuiApp_OnTouch), HIGH(GuiApp_OnTouch)
|
||||
.db 0, OBJECT_SIGNAL_RECVMSG, LOW(GuiApp_OnMsgReceived), HIGH(GuiApp_OnMsgReceived)
|
||||
.db 0, WIDGET_SIGNAL_SHOW, LOW(GuiApp_OnShow), HIGH(GuiApp_OnShow)
|
||||
.db 0, WIDGET_SIGNAL_HIDE, LOW(GuiApp_OnHide), HIGH(GuiApp_OnHide)
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(GuiApp_OnCreate), HIGH(GuiApp_OnCreate)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
testRootWin_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.dw testWin_flashdata*2 ; first child
|
||||
.dw testApp_flashdata*2 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testRootWin_signalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db 0, 0 ; opts lo, hi
|
||||
.dw 0 ; X
|
||||
.dw 0 ; Y
|
||||
.dw DISPLAY_WIDTH ; W
|
||||
.dw DISPLAY_HEIGHT ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
; .dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw DISPLAY_COLOR_YELLOW
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw testRootWin_ramdata ; ptr to SDRAM
|
||||
testRootWin_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(Widget_OnCreate), HIGH(Widget_OnCreate)
|
||||
.db 0, WIDGET_SIGNAL_DRAW, LOW(Widget_OnDraw), HIGH(Widget_OnDraw)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
|
||||
testWin_flashdata:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw testRootWin_flashdata*2 ; parent
|
||||
.dw testWinHeader_flashdata*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testWin_signalmap*2 ; signal map
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testWin_signalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db 0, 0 ; opts lo, hi
|
||||
.dw 0 ; X
|
||||
.dw 0 ; Y
|
||||
.dw DISPLAY_WIDTH ; W
|
||||
.dw DISPLAY_HEIGHT ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw testWin_ramdata ; ptr to SDRAM
|
||||
.db 0, 0 ; opts lo, hi
|
||||
.dw 0 ; X
|
||||
.dw 0 ; Y
|
||||
.dw DISPLAY_WIDTH ; W
|
||||
.dw DISPLAY_HEIGHT ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw testWin_ramdata ; ptr to SDRAM
|
||||
testWin_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(Widget_OnCreate), HIGH(Widget_OnCreate)
|
||||
.db 0, WIDGET_SIGNAL_DRAW, LOW(Widget_OnDraw), HIGH(Widget_OnDraw)
|
||||
@@ -114,6 +130,7 @@ testWin_signalmap:
|
||||
|
||||
testWinHeader_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw testWinBody_flashdata*2 ; next
|
||||
.dw testWin_flashdata*2 ; parent
|
||||
.dw 0 ; first child
|
||||
@@ -144,6 +161,7 @@ testWinHeader_signalmap:
|
||||
|
||||
testWinBody_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw testWin_flashdata*2 ; parent
|
||||
.dw testWinBodyImg1_flashdata*2 ; first child
|
||||
@@ -171,6 +189,7 @@ testWinBody_signalmap:
|
||||
|
||||
testWinBodyImg1_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw testWinBodyImg2_flashdata*2 ; next
|
||||
.dw testWinBody_flashdata*2 ; parent
|
||||
.dw 0 ; first child
|
||||
@@ -199,6 +218,7 @@ testWinBodyImg1_signalmap:
|
||||
|
||||
testWinBodyImg2_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw testWinBodyImg3_flashdata*2 ; next
|
||||
.dw testWinBody_flashdata*2 ; parent
|
||||
.dw 0 ; first child
|
||||
@@ -227,6 +247,7 @@ testWinBodyImg2_signalmap:
|
||||
|
||||
testWinBodyImg3_flashdata:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw testWinBody_flashdata*2 ; parent
|
||||
.dw 0 ; first child
|
||||
|
||||
Reference in New Issue
Block a user