Template app.

This commit is contained in:
2023-08-24 23:41:18 +01:00
parent 9fa8fba957
commit e9cc8deff8
7 changed files with 814 additions and 0 deletions

37
src/source/main.brs Normal file
View File

@@ -0,0 +1,37 @@
sub Main(aa as Object)
print "in Main()"
'Indicate this is a Roku SceneGraph application'
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
di = CreateObject("roDeviceInfo")
di.setMessagePort(m.port)
hs= CreateObject("roHdmiStatus")
hs.setMessagePort(m.port)
'Create a scene and load /components/mainscene.xml'
scene = screen.CreateScene("MainScene")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed()
print "Screen is closed. End of Main()"
return
end if
end if
if msgType = "roHdmiStatusEvent"
?"--------------------------"
?"hdmi status event received"
end if
if msgType = "roDeviceInfoEvent"
?"--------------------------"
?"device info event received"
end if
end while
end sub