From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/omBrowser/travelLogHelper.h | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Src/omBrowser/travelLogHelper.h (limited to 'Src/omBrowser/travelLogHelper.h') diff --git a/Src/omBrowser/travelLogHelper.h b/Src/omBrowser/travelLogHelper.h new file mode 100644 index 00000000..316a2a9e --- /dev/null +++ b/Src/omBrowser/travelLogHelper.h @@ -0,0 +1,62 @@ +#ifndef NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER +#define NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include +#include "./browserInternal.h" +#include "./ifc_menucustomizer.h" +#include "./ifc_travelloghelper.h" +#include "./obj_ombrowser.h" +#include + +interface IWebBrowser2; + +#define MPIID_TRAVELLOGHELPER 10 +#define MPIID_MENUCUSTOMIZER 20 + + +class TravelLogHelper : public MultiPatch, + public MultiPatch + +{ +protected: + TravelLogHelper(IWebBrowser2 *pWeb2); + ~TravelLogHelper(); + +public: + static HRESULT CreateInstance(IWebBrowser2 *pWeb2, TravelLogHelper **instance); + +public: + /* Dispatchable */ + size_t AddRef(); + size_t Release(); + int QueryInterface(GUID interface_guid, void **object); + + /* ifc_travelloghelper */ + HRESULT QueryStorage(ITravelLogStg **ppLog); + HRESULT ShowPopup(UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm); + + /* ifc_menucustomizer */ + INT CustomDraw(HMENU menuInstance, INT action, HDC hdc, LPARAM param); + +protected: + BOOL DrawIcon(HMENU menuInstance, HDC hdc, DRAWITEMSTRUCT *pdis); + +protected: + RECVS_MULTIPATCH;; + +protected: + ULONG ref; + IWebBrowser2 *pWeb2; + HBITMAP bitmap; + BITMAPINFOHEADER header; + void *pixelData; + BOOL firstFwd; + ULONG entriesCount; + LONG backEntry; +}; + +#endif //NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER \ No newline at end of file -- cgit