summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/SmileyBase.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-05-18 22:02:50 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-05-18 22:02:50 +0000
commitf920ef497f3299ae24fe783ce03bdd93b419f764 (patch)
treebdaa9197c08d29ab141a6adfdd6cc0a68ddd3996 /plugins/SmileyAdd/SmileyBase.h
parent6c3b0571f0678da0512069869afaa284c054377e (diff)
plugins folders renaming
git-svn-id: http://svn.miranda-ng.org/main/trunk@60 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/SmileyBase.h')
-rw-r--r--plugins/SmileyAdd/SmileyBase.h127
1 files changed, 127 insertions, 0 deletions
diff --git a/plugins/SmileyAdd/SmileyBase.h b/plugins/SmileyAdd/SmileyBase.h
new file mode 100644
index 0000000000..3cdf244007
--- /dev/null
+++ b/plugins/SmileyAdd/SmileyBase.h
@@ -0,0 +1,127 @@
+/*
+Miranda SmileyAdd Plugin
+Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2
+of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+#include <oleidl.h>
+#include <tchar.h>
+
+#define OLEIVERB_SETOWNER (-24)
+
+EXTERN_C const IID IID_ITooltipData;
+
+class ITooltipData : public IUnknown
+{
+public:
+ STDMETHOD(SetTooltip) (BSTR bstrHint) PURE;
+ STDMETHOD(GetTooltip) (BSTR * bstrHint) PURE;
+};
+
+
+EXTERN_C const IID IID_ISmileyAddSmiley;
+
+class ISmileyBase :
+ public IOleObject, public IViewObject2, public ITooltipData
+{
+protected:
+ IOleAdviseHolder* m_spAdviseHolder;
+ IAdviseSink* m_spAdviseSink;
+ IOleClientSite* m_spClientSite;
+ DWORD m_advf;
+ LONG m_lRefCount;
+
+ SIZEL m_sizeExtent;
+ SIZEL m_sizeExtentHiM;
+ RECT m_orect;
+
+ TCHAR* m_smltxt;
+ HWND m_hwnd;
+
+ bool m_visible;
+ bool m_dirAniAllow;
+
+public:
+ ISmileyBase(void);
+ virtual ~ISmileyBase(void);
+
+ void OnClose(void);
+ void SendOnViewChange(void);
+
+ bool QueryHitPointSpecial(int x, int y, HWND hwnd, TCHAR** smltxt);
+ void SetHint(TCHAR* smltxt);
+
+ virtual void SetPosition(HWND hwnd, LPCRECT lpRect);
+
+ //
+ // IUnknown members
+ //
+ STDMETHOD_(ULONG, AddRef)(void);
+ STDMETHOD_(ULONG, Release)(void);
+ STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
+
+ //
+ // IOleObject members
+ //
+ STDMETHOD(SetClientSite)(IOleClientSite *pClientSite);
+ STDMETHOD(GetClientSite)(IOleClientSite **ppClientSite);
+ STDMETHOD(SetHostNames)(LPCOLESTR /* szContainerApp */, LPCOLESTR /* szContainerObj */);
+ STDMETHOD(Close)(DWORD /* dwSaveOption */);
+ STDMETHOD(SetMoniker)(DWORD /* dwWhichMoniker */, IMoniker* /* pmk */);
+ STDMETHOD(GetMoniker)(DWORD /* dwAssign */, DWORD /* dwWhichMoniker */, IMoniker** /* ppmk */);
+ STDMETHOD(InitFromData)(IDataObject* /* pDataObject */, BOOL /* fCreation */, DWORD /* dwReserved */);
+ STDMETHOD(GetClipboardData)(DWORD /* dwReserved */, IDataObject** /* ppDataObject */);
+ STDMETHOD(DoVerb)(LONG /*iVerb*/, LPMSG /* pMsg */, IOleClientSite* /* pActiveSite */, LONG /* lindex */,
+ HWND /*hwndParent*/, LPCRECT /*lprcPosRect*/);
+ STDMETHOD(EnumVerbs)(IEnumOLEVERB** /*ppEnumOleVerb*/);
+ STDMETHOD(Update)(void);
+ STDMETHOD(IsUpToDate)(void);
+ STDMETHOD(GetUserClassID)(CLSID *pClsid);
+ STDMETHOD(GetUserType)(DWORD /*dwFormOfType*/, LPOLESTR* /*pszUserType*/);
+ STDMETHOD(SetExtent)(DWORD /*dwDrawAspect*/, SIZEL* /*psizel*/);
+ STDMETHOD(GetExtent)(DWORD dwDrawAspect, SIZEL *psizel);
+ STDMETHOD(Advise)(IAdviseSink *pAdvSink, DWORD *pdwConnection);
+ STDMETHOD(Unadvise)(DWORD dwConnection);
+ STDMETHOD(EnumAdvise)(IEnumSTATDATA **ppEnumAdvise);
+ STDMETHOD(GetMiscStatus)(DWORD dwAspect, DWORD *pdwStatus);
+ STDMETHOD(SetColorScheme)(LOGPALETTE* /* pLogpal */);
+
+ //
+ // IViewObject members
+ //
+ STDMETHOD(SetAdvise)(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink);
+ STDMETHOD(GetAdvise)(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink);
+ STDMETHOD(Freeze)(DWORD, long, void*, DWORD*);
+ STDMETHOD(Unfreeze)(DWORD);
+ STDMETHOD(GetColorSet)(DWORD, long, void*, DVTARGETDEVICE*, HDC,
+ LOGPALETTE**);
+
+ //
+ // IViewObject2 members
+ //
+ STDMETHOD(GetExtent)(DWORD aspect, long, DVTARGETDEVICE*, SIZEL* pSize);
+
+ //
+ // ITooltipData members
+ //
+ STDMETHOD(SetTooltip)(BSTR bstrHint);
+ STDMETHOD(GetTooltip)(BSTR * bstrHint);
+
+};
+
+int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt);
+void CloseSmileys(void);
+