summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h')
-rw-r--r--plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h b/plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h
new file mode 100644
index 0000000000..1011e5d551
--- /dev/null
+++ b/plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h
@@ -0,0 +1,102 @@
+#ifndef _CLCDOUTPUTMANAGER_H_
+#define _CLCDOUTPUTMANAGER_H_
+
+#include "CLCDGfx.h"
+#include "CLCDScreen.h"
+#include "CLCDConnection.h"
+#include "CLCDDevice.h"
+
+class CLCDOutputManager
+{
+friend CLCDConnection;
+friend class CLCDConnectionLogitech;
+
+public:
+ // constructor
+ CLCDOutputManager();
+ // destructor
+ ~CLCDOutputManager();
+
+ // Get the OutputManager Instance
+ static CLCDOutputManager *GetInstance();
+
+ // Initializes the Outputmanager
+ virtual bool Initialize(tstring strAppletName,bool bAutostart=false, bool bConfigDialog=false);
+ // return wether the Outputmanager is initialized
+ virtual bool IsInitialized();
+
+ // Deinitializes the Outputmanager
+ virtual bool Shutdown();
+ // Updates the Outputmanager
+ virtual bool Update();
+
+ // Add a screen to the managers list
+ bool AddScreen(CLCDScreen *pScreen);
+ // Removes a screen from the managers list
+ bool RemoveScreen(CLCDScreen *pScreen);
+
+ // Activates the specified screen
+ bool ActivateScreen(CLCDScreen *pScreen);
+ // Deactivates the active screen
+ bool DeactivateScreen();
+ // returns the active scren
+ CLCDScreen *GetActiveScreen();
+
+ // returns the active lcdconnection
+ CLCDConnection *GetLCDConnection();
+
+ // specifies the button repeat delay
+ void SetButtonRepeatDelay(DWORD dwDelay);
+
+ // starts a screen transition
+ void StartTransition(ETransitionType eTransition = TRANSITION_RANDOM,LPRECT rect = NULL);
+
+ // called by CLCDConnection when connected to a device
+ void OnDeviceConnected();
+ // called by CLCDConnection when disconnected from a device
+ void OnDeviceDisconnected();
+
+ // Called by the LCDManager to open a config dialog
+ static DWORD WINAPI configDialogCallback(IN int connection,IN const PVOID pContext);
+protected:
+ void InitializeGfxObject();
+ void DeinitializeGfxObject();
+
+ // Called when the connection state has changed
+ virtual void OnConnectionChanged(int iConnectionState);
+
+ // Called when the LCD has been plugged in
+ virtual void OnLCDConnected();
+ // Called when the LCD has been unplugged
+ virtual void OnLCDDisconnected();
+
+ // Called when an LCD button is pressed
+ virtual void OnLCDButtonDown(int iButton);
+ // Called when an LCD button is released
+ virtual void OnLCDButtonUp(int iButton);
+ // Called when an LCD button is repeated
+ virtual void OnLCDButtonRepeated(int iButton);
+
+ virtual void OnScreenExpired(CLCDScreen *pScreen);
+ virtual void OnScreenDeactivated(CLCDScreen *pScreen);
+
+ // Called when a config dialog is requested
+ virtual DWORD OnConfigDialogRequest(int connection, const PVOID pContext);
+ CLCDGfx *m_pGfx;
+private:
+ DWORD m_dwLastUpdate;
+ DWORD m_dwButtonRepeatDelay;
+ bool m_bInitialized;
+ static CLCDOutputManager* m_pInstance;
+ bool *m_pbButtonStates;
+ DWORD *m_pdwButtonRepeatTimers;
+ DWORD *m_pdwButtonRepeatStarts;
+ tstring m_strAppletName;
+ CLCDConnection *m_pLcdConnection;
+
+
+ vector<CLCDScreen*> m_Screens;
+ CLCDScreen *m_pActiveScreen;
+};
+
+#endif \ No newline at end of file