From c77821d0b4b3ae09e47ce6d6ca9d6b21dbb56d30 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 4 Nov 2013 08:59:15 +0000 Subject: LCDFramework project removed, integrated to MirandaG15 project git-svn-id: http://svn.miranda-ng.org/main/trunk@6767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../src/LCDFramework/CLCDOutputManager.h | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h (limited to 'plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h') diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h new file mode 100644 index 0000000000..1011e5d551 --- /dev/null +++ b/plugins/MirandaG15/src/LCDFramework/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 m_Screens; + CLCDScreen *m_pActiveScreen; +}; + +#endif \ No newline at end of file -- cgit v1.2.3