gui2: added generic button class
this gives child elements a button behavior.
This commit is contained in:
@@ -182,7 +182,7 @@ GuiApp_PreventScreenSaver_ret:
|
||||
; @param Y address of object in SDRAM
|
||||
; @param X byte address of widget grabbing touch events
|
||||
; @return CFLAG set if grabbed, cleared otherwise
|
||||
; @clobbers R16, R17, Y
|
||||
; @clobbers R16, R17
|
||||
|
||||
GuiApp_GrabTouchEvents:
|
||||
ldd r16, Y+GUIAPP_OFFS_TOUCHWIDGET_LO
|
||||
@@ -356,8 +356,8 @@ GuiApp_OnDestroy:
|
||||
; @clobbers any, !Y
|
||||
|
||||
GuiApp_OnTimer:
|
||||
; rcall guiAppCheckTouch ; (any, !Y)
|
||||
; rcall guiAppSendTimerEvents ; (any, !Y)
|
||||
rcall guiAppCheckTouch ; (any, !Y)
|
||||
rcall guiAppSendTimerEvents ; (any, !Y)
|
||||
rcall guiAppCheckSendGuiEvents ; (any, !Y)
|
||||
sec
|
||||
ret
|
||||
@@ -372,6 +372,8 @@ GuiApp_OnTimer:
|
||||
; @param X pointer to message received in SDRAM
|
||||
|
||||
GuiApp_OnMsgReceived:
|
||||
rcall guiAppSendRootMsgEvents
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
|
||||
@@ -381,6 +383,7 @@ GuiApp_OnMsgReceived:
|
||||
; @routine GuiApp_OnTouch
|
||||
;
|
||||
; @param Y address of object in SDRAM
|
||||
; @param X pointer to touch object (see @ref WIDGET_TOUCH_OFFS_X_LO)
|
||||
; @clobbers any, !Y
|
||||
|
||||
GuiApp_OnTouch:
|
||||
@@ -629,6 +632,7 @@ guiAppCheckSendGuiEvents_done:
|
||||
; Send touch events to current window or grabbing widget.
|
||||
;
|
||||
; @param Y ptr to GUIAPP
|
||||
; @param X pointer to touch object (see @ref WIDGET_TOUCH_OFFS_X_LO)
|
||||
; @clobbers any, !Y
|
||||
|
||||
guiAppSendTouchEvents:
|
||||
@@ -677,7 +681,7 @@ guiAppSendTouchEvents_done:
|
||||
; @clobbers any, !Y
|
||||
|
||||
guiAppSendRootMsgEvents:
|
||||
ldi r16, WIDGET_SIGNAL_TOUCH
|
||||
ldi r16, OBJECT_SIGNAL_RECVMSG
|
||||
clr r17
|
||||
ldi r20, (1<<OBJECT_OPTS_MSGRECV_BIT)
|
||||
ldi r21, (1<<OBJECT_OPTS_MSGRECV_BIT)
|
||||
@@ -757,7 +761,8 @@ GuiApp_DefaultSignalmap:
|
||||
; header
|
||||
.dw Object_DefaultSignalmap*2 ; next table to use
|
||||
; entries
|
||||
.db 0, OBJECT_SIGNAL_TIMER, LOW(GuiApp_OnTimer), HIGH(GuiApp_OnTimer)
|
||||
.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_DESTROY, LOW(GuiApp_OnDestroy), HIGH(GuiApp_OnDestroy)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user