--------------------------------------------------- 
-- FBA Tutorials
--
-- Tutorial / 17 / FBA Events
--
--------------------------------------------------- 
--
-- You can create some special optional functions
-- that FBA will call automatically; these functions
-- are common events you can use for any purposes.
--
-- onstylusmove 
--   called by FBA when you move your mouse/stylus on your screen
-- onstylusup
--   called by FBA when you release your mouse/stylus from your screen
-- onstylusdown
--   called by FBA when you click your mouse/stylus on your screen
-- onbuttondown
--   called by FBA when you press a key on your keyboard or device
-- onbuttonup
--   called by FBA when you release a key from your keyboard or device
-- onlostfocus
--   called by FBA when your application lose the focus (on windows this happens
--   when you click on another application; on PPC this happens when you receive
--   a call, or when the low battery popup appears!)
--   On the PPC version, when your application is not focused, the onmainloop 
--   won't be called, in order to save CPU !
--   The sound engine will be paused when your application lose focus.
-- ongotfocus
--  called by FBA when your application receive the focus again. The sound
--  engine will be resume when your application receive the focus.
--
--------------------------------------------------- 

function onmainloop()
end

function onstylusdown(x,y)
        debug("Mouse pressed at: " .. x .. "," ..y)
end

function onstylusup(x,y)
        debug("Mouse released at: " .. x .. "," ..y)
end

function onstylusmove(x,y)
        debug("Mouse move at: " .. x .. "," ..y)
end

function onbuttondown(button)
        debug("Key pressed: " .. button)
end

function onbuttonup(button)
        debug("Key released: " .. button)
end

function onlostfocus()
        debug("application lost focus")
end

function ongotfocus()
        debug("application got focus")
end
