summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-10-29 18:17:04 +0000
committerRobert Pösel <robyer@seznam.cz>2013-10-29 18:17:04 +0000
commit4d01f5f5096cb4d22c4a7ba17cc82977c7f5f19b (patch)
tree9353d79ddff12a1c2ced3e300d61a516f2572fb5 /plugins/MirandaG15/LCDFramework/src/CLCDOutputManager.h
parent2307fd7414d16d4ff936607a215e9a2ca0294741 (diff)
Adopted MirandaG15 plugin
First compilable version and 32-bit only. git-svn-id: http://svn.miranda-ng.org/main/trunk@6681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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