From 69f9c8ac053de7793c31c87572c9e044ae8369ee Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 20 Dec 2024 20:45:11 +0530 Subject: Minor refactor --- src/Chelleport/AppShell.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Chelleport/AppShell.hs') diff --git a/src/Chelleport/AppShell.hs b/src/Chelleport/AppShell.hs index e8cd3ab..28007f7 100644 --- a/src/Chelleport/AppShell.hs +++ b/src/Chelleport/AppShell.hs @@ -1,4 +1,4 @@ -module Chelleport.AppShell where +module Chelleport.AppShell (setupAppShell, MonadAppShell (..)) where import Chelleport.Draw (colorBackground) import Chelleport.Types @@ -26,6 +26,14 @@ instance (MonadIO m) => MonadAppShell (AppM m) where X11.closeDisplay $ ctxX11Display ctx exitSuccess +type Update state appAction = state -> appAction -> IO (state, Maybe appAction) + +type EventHandler state appAction = state -> SDL.Event -> Maybe appAction + +type View state = state -> IO () + +type Initializer state = IO state + setupAppShell :: DrawContext -> Initializer state -> -- cgit v1.3.1