From bbf1f0e5cffb8c01696eb26e254857a61f017d70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Wed, 20 May 1998 14:21:00 +0000 Subject: [PATCH] now MSW stuff is complete git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/ctl3d/ctl3d.h | 61 ++ include/wx/msw/ole/droptgt.h | 113 +++ include/wx/msw/ole/oleutils.h | 145 ++++ include/wx/msw/ole/uuid.h | 91 +++ samples/joytest/chart.ico | Bin 0 -> 766 bytes samples/joytest/gun.wav | Bin 0 -> 26838 bytes samples/joytest/joytest.cpp | 171 ++++ samples/joytest/joytest.def | 8 + samples/joytest/joytest.h | 51 ++ samples/joytest/joytest.ico | Bin 0 -> 766 bytes samples/joytest/joytest.rc | 5 + samples/joytest/makefile.b32 | 64 ++ samples/joytest/makefile.bcc | 75 ++ samples/joytest/makefile.dos | 63 ++ samples/joytest/makefile.g95 | 35 + samples/joytest/makefile.nt | 63 ++ samples/joytest/makefile.sc | 37 + samples/joytest/makefile.unx | 55 ++ samples/joytest/makefile.wat | 43 + samples/joytest/mondrian.ico | Bin 0 -> 766 bytes samples/mfc/makefile.b32 | 71 ++ samples/mfc/makefile.bcc | 76 ++ samples/mfc/makefile.dos | 89 +++ samples/mfc/makefile.nt | 66 ++ samples/mfc/makefile.wat | 47 ++ samples/mfc/mfctest.cpp | 408 ++++++++++ samples/mfc/mfctest.def | 21 + samples/mfc/mfctest.h | 66 ++ samples/mfc/mfctest.ico | Bin 0 -> 766 bytes samples/mfc/mfctest.rc | 108 +++ samples/mfc/resource.h | 18 + samples/mfc/stdafx.h | 12 + samples/nativdlg/aiai.ico | Bin 0 -> 766 bytes samples/nativdlg/dialog1.rc | 142 ++++ samples/nativdlg/makefile.b32 | 64 ++ samples/nativdlg/makefile.bcc | 74 ++ samples/nativdlg/makefile.dos | 86 ++ samples/nativdlg/makefile.g95 | 36 + samples/nativdlg/makefile.nt | 63 ++ samples/nativdlg/makefile.sc | 35 + samples/nativdlg/makefile.unx | 76 ++ samples/nativdlg/makefile.vms | 38 + samples/nativdlg/makefile.wat | 42 + samples/nativdlg/nativdlg.cpp | 130 +++ samples/nativdlg/nativdlg.def | 9 + samples/nativdlg/nativdlg.h | 47 ++ samples/nativdlg/nativdlg.rc | 4 + samples/nativdlg/resource.h | 25 + samples/ownerdrw/bell.bmp | Bin 0 -> 370 bytes samples/ownerdrw/makefile.b32 | 64 ++ samples/ownerdrw/makefile.dos | 65 ++ samples/ownerdrw/makefile.g95 | 37 + samples/ownerdrw/makefile.nt | 64 ++ samples/ownerdrw/mondrian.ico | Bin 0 -> 766 bytes samples/ownerdrw/nosound.bmp | Bin 0 -> 370 bytes samples/ownerdrw/ownerdrw.cpp | 293 +++++++ samples/ownerdrw/ownerdrw.def | 8 + samples/ownerdrw/ownerdrw.rc | 6 + samples/ownerdrw/sound.bmp | Bin 0 -> 370 bytes samples/regtest/key1.ico | Bin 0 -> 318 bytes samples/regtest/key2.ico | Bin 0 -> 318 bytes samples/regtest/key3.ico | Bin 0 -> 318 bytes samples/regtest/makefile.g95 | 37 + samples/regtest/makefile.nt | 64 ++ samples/regtest/registry.ico | Bin 0 -> 1078 bytes samples/regtest/regtest.cpp | 834 ++++++++++++++++++++ samples/regtest/regtest.rc | 9 + samples/regtest/value1.ico | Bin 0 -> 318 bytes samples/regtest/value2.ico | Bin 0 -> 318 bytes samples/taskbar/makefile.b32 | 64 ++ samples/taskbar/makefile.bcc | 73 ++ samples/taskbar/makefile.dos | 65 ++ samples/taskbar/makefile.g95 | 37 + samples/taskbar/makefile.nt | 64 ++ samples/taskbar/mondrian.ico | Bin 0 -> 766 bytes samples/taskbar/tbtest.cpp | 120 +++ samples/taskbar/tbtest.def | 8 + samples/taskbar/tbtest.h | 50 ++ samples/taskbar/tbtest.rc | 3 + src/msw/ctl3d/borland/makefile.b32 | 25 + src/msw/ctl3d/borland/makefile.bcc | 25 + src/msw/ctl3d/ctl3d.dll | Bin 0 -> 20964 bytes src/msw/ctl3d/ctl3d32.dll | Bin 0 -> 26623 bytes src/msw/ctl3d/ctl3dv2.dll | Bin 0 -> 27620 bytes src/msw/ctl3d/msvc/ctl3d.h | 61 ++ src/msw/ctl3d/msvc/ctl3d.lib | Bin 0 -> 2560 bytes src/msw/ctl3d/msvc/ctl3dv2.lib | Bin 0 -> 2560 bytes src/msw/ctl3d/readme.txt | 31 + src/msw/ctl3d/wat32/import32.zip | Bin 0 -> 22993 bytes src/msw/ctl3d/wat386/ctl3d.h | 61 ++ src/msw/ctl3d/wat386/ctl3d32.c | 285 +++++++ src/msw/ctl3d/wat386/ctl3d32.lnk | 1 + src/msw/ctl3d/wat386/ctl3d32.obj | Bin 0 -> 6699 bytes src/msw/ctl3d/wat386/ctl3d32.txt | 11 + src/msw/ctl3d/wat386/makefile.wat | 23 + src/msw/ole/droptgt.cpp | 459 +++++++++++ src/msw/ole/oleutils.cpp | 193 +++++ src/msw/ole/uuid.cpp | 153 ++++ utils/nplugin/docs/notes.txt | 32 + utils/nplugin/lib/dummy | 1 + utils/nplugin/samples/gui/gui.cpp | 186 +++++ utils/nplugin/samples/gui/gui.h | 59 ++ utils/nplugin/samples/gui/makefile.nt | 70 ++ utils/nplugin/samples/gui/npgui32.def | 9 + utils/nplugin/samples/gui/npgui32.rc | 44 ++ utils/nplugin/samples/simple/makefile.nt | 70 ++ utils/nplugin/samples/simple/npsimple32.def | 9 + utils/nplugin/samples/simple/npsimple32.rc | 44 ++ utils/nplugin/samples/simple/simple.cpp | 174 ++++ utils/nplugin/src/makefile.nt | 78 ++ utils/nplugin/src/npapi.h | 258 ++++++ utils/nplugin/src/npapp.cpp | 277 +++++++ utils/nplugin/src/npapp.h | 91 +++ utils/nplugin/src/npframe.cpp | 293 +++++++ utils/nplugin/src/npframe.h | 81 ++ utils/nplugin/src/npshell.cpp | 278 +++++++ utils/nplugin/src/npupp.h | 799 +++++++++++++++++++ utils/nplugin/src/npwin.cpp | 186 +++++ 118 files changed, 9265 insertions(+) create mode 100644 include/wx/msw/ctl3d/ctl3d.h create mode 100644 include/wx/msw/ole/droptgt.h create mode 100644 include/wx/msw/ole/oleutils.h create mode 100644 include/wx/msw/ole/uuid.h create mode 100644 samples/joytest/chart.ico create mode 100644 samples/joytest/gun.wav create mode 100644 samples/joytest/joytest.cpp create mode 100644 samples/joytest/joytest.def create mode 100644 samples/joytest/joytest.h create mode 100644 samples/joytest/joytest.ico create mode 100644 samples/joytest/joytest.rc create mode 100644 samples/joytest/makefile.b32 create mode 100644 samples/joytest/makefile.bcc create mode 100644 samples/joytest/makefile.dos create mode 100644 samples/joytest/makefile.g95 create mode 100644 samples/joytest/makefile.nt create mode 100644 samples/joytest/makefile.sc create mode 100644 samples/joytest/makefile.unx create mode 100644 samples/joytest/makefile.wat create mode 100644 samples/joytest/mondrian.ico create mode 100644 samples/mfc/makefile.b32 create mode 100644 samples/mfc/makefile.bcc create mode 100644 samples/mfc/makefile.dos create mode 100644 samples/mfc/makefile.nt create mode 100644 samples/mfc/makefile.wat create mode 100644 samples/mfc/mfctest.cpp create mode 100644 samples/mfc/mfctest.def create mode 100644 samples/mfc/mfctest.h create mode 100644 samples/mfc/mfctest.ico create mode 100644 samples/mfc/mfctest.rc create mode 100644 samples/mfc/resource.h create mode 100644 samples/mfc/stdafx.h create mode 100644 samples/nativdlg/aiai.ico create mode 100644 samples/nativdlg/dialog1.rc create mode 100644 samples/nativdlg/makefile.b32 create mode 100644 samples/nativdlg/makefile.bcc create mode 100644 samples/nativdlg/makefile.dos create mode 100644 samples/nativdlg/makefile.g95 create mode 100644 samples/nativdlg/makefile.nt create mode 100644 samples/nativdlg/makefile.sc create mode 100644 samples/nativdlg/makefile.unx create mode 100644 samples/nativdlg/makefile.vms create mode 100644 samples/nativdlg/makefile.wat create mode 100644 samples/nativdlg/nativdlg.cpp create mode 100644 samples/nativdlg/nativdlg.def create mode 100644 samples/nativdlg/nativdlg.h create mode 100644 samples/nativdlg/nativdlg.rc create mode 100644 samples/nativdlg/resource.h create mode 100644 samples/ownerdrw/bell.bmp create mode 100644 samples/ownerdrw/makefile.b32 create mode 100644 samples/ownerdrw/makefile.dos create mode 100644 samples/ownerdrw/makefile.g95 create mode 100644 samples/ownerdrw/makefile.nt create mode 100644 samples/ownerdrw/mondrian.ico create mode 100644 samples/ownerdrw/nosound.bmp create mode 100644 samples/ownerdrw/ownerdrw.cpp create mode 100644 samples/ownerdrw/ownerdrw.def create mode 100644 samples/ownerdrw/ownerdrw.rc create mode 100644 samples/ownerdrw/sound.bmp create mode 100644 samples/regtest/key1.ico create mode 100644 samples/regtest/key2.ico create mode 100644 samples/regtest/key3.ico create mode 100644 samples/regtest/makefile.g95 create mode 100644 samples/regtest/makefile.nt create mode 100644 samples/regtest/registry.ico create mode 100644 samples/regtest/regtest.cpp create mode 100644 samples/regtest/regtest.rc create mode 100644 samples/regtest/value1.ico create mode 100644 samples/regtest/value2.ico create mode 100644 samples/taskbar/makefile.b32 create mode 100644 samples/taskbar/makefile.bcc create mode 100644 samples/taskbar/makefile.dos create mode 100644 samples/taskbar/makefile.g95 create mode 100644 samples/taskbar/makefile.nt create mode 100644 samples/taskbar/mondrian.ico create mode 100644 samples/taskbar/tbtest.cpp create mode 100644 samples/taskbar/tbtest.def create mode 100644 samples/taskbar/tbtest.h create mode 100644 samples/taskbar/tbtest.rc create mode 100644 src/msw/ctl3d/borland/makefile.b32 create mode 100644 src/msw/ctl3d/borland/makefile.bcc create mode 100644 src/msw/ctl3d/ctl3d.dll create mode 100644 src/msw/ctl3d/ctl3d32.dll create mode 100644 src/msw/ctl3d/ctl3dv2.dll create mode 100644 src/msw/ctl3d/msvc/ctl3d.h create mode 100644 src/msw/ctl3d/msvc/ctl3d.lib create mode 100644 src/msw/ctl3d/msvc/ctl3dv2.lib create mode 100644 src/msw/ctl3d/readme.txt create mode 100644 src/msw/ctl3d/wat32/import32.zip create mode 100644 src/msw/ctl3d/wat386/ctl3d.h create mode 100644 src/msw/ctl3d/wat386/ctl3d32.c create mode 100644 src/msw/ctl3d/wat386/ctl3d32.lnk create mode 100644 src/msw/ctl3d/wat386/ctl3d32.obj create mode 100644 src/msw/ctl3d/wat386/ctl3d32.txt create mode 100644 src/msw/ctl3d/wat386/makefile.wat create mode 100644 src/msw/ole/droptgt.cpp create mode 100644 src/msw/ole/oleutils.cpp create mode 100644 src/msw/ole/uuid.cpp create mode 100644 utils/nplugin/docs/notes.txt create mode 100644 utils/nplugin/lib/dummy create mode 100644 utils/nplugin/samples/gui/gui.cpp create mode 100644 utils/nplugin/samples/gui/gui.h create mode 100644 utils/nplugin/samples/gui/makefile.nt create mode 100644 utils/nplugin/samples/gui/npgui32.def create mode 100644 utils/nplugin/samples/gui/npgui32.rc create mode 100644 utils/nplugin/samples/simple/makefile.nt create mode 100644 utils/nplugin/samples/simple/npsimple32.def create mode 100644 utils/nplugin/samples/simple/npsimple32.rc create mode 100644 utils/nplugin/samples/simple/simple.cpp create mode 100644 utils/nplugin/src/makefile.nt create mode 100644 utils/nplugin/src/npapi.h create mode 100644 utils/nplugin/src/npapp.cpp create mode 100644 utils/nplugin/src/npapp.h create mode 100644 utils/nplugin/src/npframe.cpp create mode 100644 utils/nplugin/src/npframe.h create mode 100644 utils/nplugin/src/npshell.cpp create mode 100644 utils/nplugin/src/npupp.h create mode 100644 utils/nplugin/src/npwin.cpp diff --git a/include/wx/msw/ctl3d/ctl3d.h b/include/wx/msw/ctl3d/ctl3d.h new file mode 100644 index 0000000000..de7e67aa50 --- /dev/null +++ b/include/wx/msw/ctl3d/ctl3d.h @@ -0,0 +1,61 @@ +/*----------------------------------------------------------------------- +| CTL3D.DLL +| +| Adds 3d effects to Windows controls +| +| See ctl3d.doc for info +| +-----------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" { +#endif + + +BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD); +BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD); +WORD WINAPI Ctl3dGetVer(void); +BOOL WINAPI Ctl3dEnabled(void); +HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG); // ARCHAIC, use Ctl3dCtlColorEx +HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam); +BOOL WINAPI Ctl3dColorChange(void); +BOOL WINAPI Ctl3dSubclassCtl(HWND); +LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM); + +BOOL WINAPI Ctl3dAutoSubclass(HANDLE); + +BOOL WINAPI Ctl3dRegister(HANDLE); +BOOL WINAPI Ctl3dUnregister(HANDLE); + +//begin DBCS: far east short cut key support +VOID WINAPI Ctl3dWinIniChange(void); +//end DBCS + + +/* Ctl3dSubclassDlg3d flags */ +#define CTL3D_BUTTONS 0x0001 +#define CTL3D_LISTBOXES 0x0002 +#define CTL3D_EDITS 0x0004 +#define CTL3D_COMBOS 0x0008 +#define CTL3D_STATICTEXTS 0x0010 +#define CTL3D_STATICFRAMES 0x0020 + +#define CTL3D_NODLGWINDOW 0x00010000 +#define CTL3D_ALL 0xffff + +#define WM_DLGBORDER (WM_USER+3567) +/* WM_DLGBORDER *(int FAR *)lParam return codes */ +#define CTL3D_NOBORDER 0 +#define CTL3D_BORDER 1 + +#define WM_DLGSUBCLASS (WM_USER+3568) +/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */ +#define CTL3D_NOSUBCLASS 0 +#define CTL3D_SUBCLASS 1 + +/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ +#define CTL3D_3DCHECK 26567 + + +#ifdef __cplusplus +} +#endif diff --git a/include/wx/msw/ole/droptgt.h b/include/wx/msw/ole/droptgt.h new file mode 100644 index 0000000000..518a39cd5c --- /dev/null +++ b/include/wx/msw/ole/droptgt.h @@ -0,0 +1,113 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ole/droptgt.h +// Purpose: declaration of the wxDropTarget class +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.03.98 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// prolog +// ============================================================================ +#ifndef _OLEDROPTGT_H +#define _OLEDROPTGT_H + +#ifdef __GNUG__ +#pragma interface "droptgt.h" +#endif + +#if !USE_DRAG_AND_DROP + #error "You should #define USE_DRAG_AND_DROP to 1 to compile this file!" +#endif //WX_DRAG_DROP + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- +class wxIDropTarget; +struct IDataObject; + +typedef unsigned short wxDataFormat; + +// ---------------------------------------------------------------------------- +// An instance of the class wxDropTarget may be associated with any wxWindow +// derived object via SetDropTarget() function. If this is done, the virtual +// methods of wxDropTarget are called when something is dropped on the window. +// +// Note that wxDropTarget is an abstract base class (ABC) and you should derive +// your own class from it implementing pure virtual function in order to use it +// (all of them, including protected ones which are called by the class itself) +// ---------------------------------------------------------------------------- +class WXDLLEXPORT wxDropTarget +{ +public: + // ctor & dtor + wxDropTarget(); + virtual ~wxDropTarget(); + + // normally called by wxWindow on window creation/destruction, but might be + // called `manually' as well. Register() returns true on success. + bool Register(WXHWND hwnd); + void Revoke(WXHWND hwnd); + + // do we accept this kind of data? + virtual bool IsAcceptedData(IDataObject *pIDataSource) const; + + // called when mouse enters/leaves the window: might be used to give + // some visual feedback to the user + virtual void OnEnter() { } + virtual void OnLeave() { } + + // this function is called when data is dropped. + // (x, y) are the coordinates of the drop + virtual bool OnDrop(long x, long y, const void *pData) = 0; + +protected: + // Override these to indicate what kind of data you support: the first + // format to which data can be converted is used. The classes below show + // how it can be done in the simplest cases. + // how many different (clipboard) formats do you support? + virtual size_t GetFormatCount() const = 0; + // return the n-th supported format + virtual wxDataFormat GetFormat(size_t n) const = 0; + +private: + wxIDropTarget *m_pIDropTarget; // the pointer to COM interface +}; + +// ---------------------------------------------------------------------------- +// A simple wxDropTarget derived class for text data: you only need to +// override OnDropText() to get something working +// ---------------------------------------------------------------------------- +class WXDLLEXPORT wxTextDropTarget : public wxDropTarget +{ +public: + virtual bool OnDrop(long x, long y, const void *pData); + virtual bool OnDropText(long x, long y, const char *psz) = 0; + +protected: + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +// ---------------------------------------------------------------------------- +// A drop target which accepts files (dragged from File Manager or Explorer) +// ---------------------------------------------------------------------------- +class WXDLLEXPORT wxFileDropTarget : public wxDropTarget +{ +public: + virtual bool OnDrop(long x, long y, const void *pData); + + // params: the number of files and the array of file names + virtual bool OnDropFiles(long x, long y, + size_t nFiles, const char * const aszFiles[]) = 0; + +protected: + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +// ============================================================================ +#endif //_OLEDROPTGT_H \ No newline at end of file diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h new file mode 100644 index 0000000000..1430abbbe2 --- /dev/null +++ b/include/wx/msw/ole/oleutils.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: oleutils.h +// Purpose: OLE helper routines, OLE debugging support &c +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.02.1998 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _OLEUTILS_H +#define _OLEUTILS_H + +#ifdef __GNUG__ +#pragma interface "oleutils.h" +#endif + +// ============================================================================ +// General purpose functions and macros +// ============================================================================ + +// ---------------------------------------------------------------------------- +// misc helper functions/macros +// ---------------------------------------------------------------------------- + +// release the interface pointer (if !NULL) +inline void ReleaseInterface(IUnknown *pIUnk) +{ + if ( pIUnk != NULL ) + pIUnk->Release(); +} + +// release the interface pointer (if !NULL) and make it NULL +#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; }; + +// return TRUE if the iid is in the array +bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); + +// ============================================================================ +// IUnknown implementation helpers +// ============================================================================ + +/* + The most dumb implementation of IUnknown methods. We don't support + aggregation nor containment, but for 99% of cases this simple + implementation is quite enough. + + Usage is trivial: here is all you should have + 1) DECLARE_IUNKNOWN_METHOS in your (IUnknown derived!) class declaration + 2) BEGIN/END_IID_TABLE with ADD_IID in between for all interfaces you + support (at least all for which you intent to return 'this' from QI, + i.e. you should derive from IFoo if you have ADD_IID(Foo)) somewhere else + 3) IMPLEMENT_IUNKNOWN_METHOS somewhere also + + These macros are quite simple: AddRef and Release are trivial and QI does + lookup in a static member array of IIDs and returns 'this' if it founds + the requested interface in it or E_NOINTERFACE if not. + */ + +// declare the methods and the member variable containing reference count +// you must also define the ms_aIids array somewhere with BEGIN_IID_TABLE +// and friends (see below) +#define DECLARE_IUNKNOWN_METHODS \ + public: \ + STDMETHODIMP QueryInterface(REFIID, void **); \ + STDMETHODIMP_(ULONG) AddRef(); \ + STDMETHODIMP_(ULONG) Release(); \ + private: \ + static const IID *ms_aIids[]; \ + ULONG m_cRef + +// macros for declaring supported interfaces +// NB: you should write ADD_INTERFACE(Foo) and not ADD_INTERFACE(IID_IFoo)! +#define BEGIN_IID_TABLE(cname) const IID *cname::ms_aIids[] = { +#define ADD_IID(iid) &IID_I##iid, +#define END_IID_TABLE } + +// implementation is as straightforward as possible +// Parameter: classname - the name of the class +#define IMPLEMENT_IUNKNOWN_METHODS(classname) \ + STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \ + { \ + wxLogQueryInterface(#classname, riid); \ + \ + if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ + *ppv = this; \ + AddRef(); \ + \ + return S_OK; \ + } \ + else { \ + *ppv = NULL; \ + \ + return (HRESULT) E_NOINTERFACE; \ + } \ + } \ + \ + STDMETHODIMP_(ULONG) classname::AddRef() \ + { \ + wxLogAddRef(#classname, m_cRef); \ + \ + return ++m_cRef; \ + } \ + \ + STDMETHODIMP_(ULONG) classname::Release() \ + { \ + wxLogRelease(#classname, m_cRef); \ + \ + if ( --m_cRef == 0 ) { \ + delete this; \ + return 0; \ + } \ + else \ + return m_cRef; \ + } + +// ============================================================================ +// Debugging support +// ============================================================================ + +#ifdef __DEBUG__ + +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// All OLE specific log functions have DebugTrace level (as LogTrace) +// ---------------------------------------------------------------------------- + +// tries to translate riid into a symbolic name, if possible +void wxLogQueryInterface(const char *szInterface, REFIID riid); + +// these functions print out the new value of reference counter +void wxLogAddRef (const char *szInterface, ULONG cRef); +void wxLogRelease(const char *szInterface, ULONG cRef); + +#else //!DEBUG + #define wxLogQueryInterface(szInterface, riid) + #define wxLogAddRef(szInterface, cRef) + #define wxLogRelease(szInterface, cRef) +#endif //DEBUG + +#endif //_OLEUTILS_H \ No newline at end of file diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h new file mode 100644 index 0000000000..a970267997 --- /dev/null +++ b/include/wx/msw/ole/uuid.h @@ -0,0 +1,91 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ole/uuid.h +// Purpose: encapsulates an UUID with some added helper functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.07.97 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +// +// Notes: you should link your project with RPCRT4.LIB! +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _OLEUUID_H +#define _OLEUUID_H + +#ifdef __GNUG__ +#pragma interface "uuid.h" +#endif + +// ------------------------------------------------------------------ +// UUID (Universally Unique IDentifier) definition +// ------------------------------------------------------------------ + +// ----- taken from RPC.H +#ifndef UUID_DEFINED // in some cases RPC.H will be already + #ifdef __WIN32__ // included, so avoid redefinition + typedef struct + { + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; + } UUID; // UUID = GUID = CLSID = LIBID = IID + #else // WIN16 + #error "Don't know about UUIDs on this platform" + #endif // WIN32 +#endif // UUID_DEFINED + +#ifndef GUID_DEFINED + typedef UUID GUID; + #define UUID_DEFINED // prevent redefinition +#endif // GUID_DEFINED + +typedef unsigned char uchar; + +// ------------------------------------------------------------------ +// a class to store UUID and it's string representation +// ------------------------------------------------------------------ + +// uses RPC functions to create/convert Universally Unique Identifiers +class Uuid +{ +private: + UUID m_uuid; + uchar *m_pszUuid; // this string is alloc'd and freed by RPC + char *m_pszCForm; // this string is allocated in Set/Create + + void UuidToCForm(); + + // function used to set initial state by all ctors + void Init() { m_pszUuid = NULL; m_pszCForm = NULL; } + +public: + // ctors & dtor + Uuid() { Init(); } + Uuid(const char *pc) { Init(); Set(pc); } + Uuid(const UUID &uuid) { Init(); Set(uuid); } + ~Uuid(); + + // copy ctor and assignment operator needed for this class + Uuid(const Uuid& uuid); + Uuid& operator=(const Uuid& uuid); + + // create a brand new UUID + void Create(); + + // set value of UUID + bool Set(const char *pc); // from a string, returns true if ok + void Set(const UUID& uuid); // from another UUID (never fails) + + // accessors + operator const UUID*() const { return &m_uuid; } + operator const char*() const { return (char *)(m_pszUuid); } + + // return string representation of the UUID in the C form + // (as in DEFINE_GUID macro) + const char *CForm() const { return m_pszCForm; } +}; + +#endif // _OLEUUID_H \ No newline at end of file diff --git a/samples/joytest/chart.ico b/samples/joytest/chart.ico new file mode 100644 index 0000000000000000000000000000000000000000..16d4a585fd3246e7a8dc43c45e010c006e643dd6 GIT binary patch literal 766 zcmc&wF%H5o40I7AQkYn&nArFNzsi_=qf@@p2UOx4jHOFdsgk)%D>cxHj+|r1*R$Ou zA_c50k3u|mA}8!ucnQD53)v%zcxdbJ5TSTKZiq7qFu*Pe;O)q})Br9M@2fs2xG_OluNwM{ zcSECEB^`=VZ-!Clq`-NP$D|`q^P8EoNK<|GI(*Wt>lv#s7a1^aS#Q-v=NLJDsYfc- TMvJ?z=wHXdA%Ehd{14;}SbUVL literal 0 HcmV?d00001 diff --git a/samples/joytest/gun.wav b/samples/joytest/gun.wav new file mode 100644 index 0000000000000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Ly3`q}}nvFWkD;Y;1~eV_UPbxHbGqSZPu zzT~8OwJ{WUmJ(Yn+(a^`W}1m*7-m3A+5L-t&L?~~sh>koAEXI{GX z;@dx7>k(@G0nL7QtbfUw*Is@5=j~C-uiH1g=@&-yrb}bzzo+|u%BiuQ#t->sEs^ol zJpN%p{qZ~W^S1$XgrKkW{`$*re*aS@`5oAJ^TRhU__2>Lvmd+5f3f|&LB9X5$NK{g zKYI0R2KJZ!9QCUX-Z1e$=k#km|Cm4j(n){!dHMT?A9IL*BwGC`0)5kPzB~Fq*E1Po tzSG|H+JDCLGUFd#MgNR5`WN)-?-;=7#E(Bn{5ALwG+zAi-^m`|`oHdJTl4?` literal 0 HcmV?d00001 diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp new file mode 100644 index 0000000000..6ec7c6fa53 --- /dev/null +++ b/samples/joytest/joytest.cpp @@ -0,0 +1,171 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: joytest.cpp +// Purpose: Joystick sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include +#include + +#include "joytest.h" + +MyFrame *frame = NULL; + +IMPLEMENT_APP(MyApp) + +// For drawing lines in a canvas +long xpos = -1; +long ypos = -1; + +int winNumber = 1; + +// Initialise this in OnInit, not statically +bool MyApp::OnInit(void) +{ + wxJoystick stick(wxJOYSTICK1); + if (!stick.IsOk()) + { + wxMessageBox("No joystick detected!"); + return FALSE; + } + m_fire.Create("gun.wav"); + + m_maxX = stick.GetXMax(); + m_maxY = stick.GetYMax(); + + // Create the main frame window + + frame = new MyFrame(NULL, "Joystick Demo", wxPoint(0, 0), wxSize(500, 400), + wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); + + // Give it an icon (this is ignored in MDI mode: uses resources) +#ifdef __WINDOWS__ + frame->SetIcon(wxIcon("joyicon")); +#endif +#ifdef __X__ + frame->SetIcon(wxIcon("joyicon.xbm")); +#endif + + // Make a menubar + wxMenu *file_menu = new wxMenu; + + file_menu->Append(JOYTEST_QUIT, "&Exit"); + + wxMenu *help_menu = new wxMenu; + help_menu->Append(JOYTEST_ABOUT, "&About"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + menu_bar->Append(help_menu, "&Help"); + + // Associate the menu bar with the frame + frame->SetMenuBar(menu_bar); + + frame->CreateStatusBar(); + + frame->Show(TRUE); + + SetTopWindow(frame); + + return TRUE; +} + +BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) + EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent) +END_EVENT_TABLE() + +// Define a constructor for my canvas +MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): + wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER) +{ + wxJoystick joystick(wxJOYSTICK1); + joystick.SetCapture(this); +} + +MyCanvas::~MyCanvas(void) +{ + wxJoystick joystick(wxJOYSTICK1); + joystick.ReleaseCapture(); +} + +void MyCanvas::OnJoystickEvent(wxJoystickEvent& event) +{ + wxClientDC dc(this); + + wxPoint pt(event.GetPosition()); + + // Scale to canvas size + int cw, ch; + GetSize(&cw, &ch); + + pt.x = (long) (((double)pt.x/(double)wxGetApp().m_maxX) * cw); + pt.y = (long) (((double)pt.y/(double)wxGetApp().m_maxY) * ch); + + if (xpos > -1 && ypos > -1 && event.IsMove() && event.ButtonIsDown()) + { + dc.SetPen(*wxBLACK_PEN); + dc.DrawLine(xpos, ypos, pt.x, pt.y); + } + xpos = pt.x; + ypos = pt.y; + + char buf[100]; + if (event.ButtonDown()) + sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y); + else + sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y); + frame->SetStatusText(buf); + + if (event.ButtonDown() && wxGetApp().m_fire.IsOk()) + { + wxGetApp().m_fire.Play(); + } +} + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(JOYTEST_QUIT, MyFrame::OnQuit) +END_EVENT_TABLE() + +MyFrame::MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, +const long style): + wxFrame(parent, -1, title, pos, size, style) +{ + canvas = new MyCanvas(this); +} + +MyFrame::~MyFrame(void) +{ +} + +void MyFrame::OnQuit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void MyFrame::OnActivate(wxActivateEvent& event) +{ + if (event.GetActive() && canvas) + canvas->SetFocus(); +} + +bool MyFrame::OnClose(void) +{ + return TRUE; +} \ No newline at end of file diff --git a/samples/joytest/joytest.def b/samples/joytest/joytest.def new file mode 100644 index 0000000000..501f2b229a --- /dev/null +++ b/samples/joytest/joytest.def @@ -0,0 +1,8 @@ +NAME Joytest +DESCRIPTION 'Joystick Test Program' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 6000 +STACKSIZE 48000 diff --git a/samples/joytest/joytest.h b/samples/joytest/joytest.h new file mode 100644 index 0000000000..68c4f68075 --- /dev/null +++ b/samples/joytest/joytest.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: joytest.cpp +// Purpose: Joystick sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// Define a new application +class MyApp: public wxApp +{ + public: + bool OnInit(void); + + // Joystick max values + int m_maxX; + int m_maxY; + + wxWave m_fire; +}; + +DECLARE_APP(MyApp) + +class MyCanvas: public wxScrolledWindow +{ + public: + MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); + ~MyCanvas(void); + void OnJoystickEvent(wxJoystickEvent& event); + + DECLARE_EVENT_TABLE() +}; + +class MyFrame: public wxFrame +{ + public: + MyCanvas *canvas; + MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); + ~MyFrame(void); + bool OnClose(void); + void OnActivate(wxActivateEvent& event); + void OnQuit(wxCommandEvent& event); + +DECLARE_EVENT_TABLE() +}; + +#define JOYTEST_QUIT 1 +#define JOYTEST_ABOUT 2 diff --git a/samples/joytest/joytest.ico b/samples/joytest/joytest.ico new file mode 100644 index 0000000000000000000000000000000000000000..2dc1bde40cf921731fb2f7c6534054c6fb8d96d1 GIT binary patch literal 766 zcmah{IgY|W5G*e%tq=i3o32BCvHXmAf>Zy(`6TlchZ{QF05Mc`&y2+((WbBJ>H`DN z@#*^mB!3^kH~o>?Q%}?mpR_<=?X?6JSqZ@%EkkNRN{NMRALOiv%14mQONo@Vuu~f2 zR1r@bqoxHgHqbgO7{>y8VLOh4a849H4Zzj{FAJP(g5{I-n)O_*F$%SIE3<<+Nj^dZ zMrsmnqFCH}{&VhK#xlN*^s!HQyVC2cT_ZcBoK?PWy+p6H9A{2%_%Scn3ie-MC5TR` zfM>p7Bv6> literal 0 HcmV?d00001 diff --git a/samples/joytest/joytest.rc b/samples/joytest/joytest.rc new file mode 100644 index 0000000000..8138605789 --- /dev/null +++ b/samples/joytest/joytest.rc @@ -0,0 +1,5 @@ +aaaa ICON "mondrian.ico" +joyicon ICON "mondrian.ico" + +#include "wx/msw/wx.rc" + diff --git a/samples/joytest/makefile.b32 b/samples/joytest/makefile.b32 new file mode 100644 index 0000000000..d889d44cee --- /dev/null +++ b/samples/joytest/makefile.b32 @@ -0,0 +1,64 @@ +# +# File: makefile.b32 +# Author: Patrick Halke +# Created: 1995 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds 32bit MDI example. + +# WXWIN and BCCDIR are set by parent make + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makeb32.env + +WXLIBDIR = $(WXDIR)\lib +WXLIB = $(WXLIBDIR)\wx32.lib +LIBS=$(WXLIB) cw32 import32 + +TARGET=joytest + +!if "$(FINAL)" == "0" +LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +OBJECTS = joytest.obj + +$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res + tlink32 $(LINKFLAGS) @&&! +c0w32.obj $(OBJECTS) +$(TARGET) +nul +$(LIBS) +$(TARGET).def +! + brc32 -K $(TARGET).res + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +joytest.obj: joytest.$(SRCSUFF) joytest.h + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + + diff --git a/samples/joytest/makefile.bcc b/samples/joytest/makefile.bcc new file mode 100644 index 0000000000..230ea4abbe --- /dev/null +++ b/samples/joytest/makefile.bcc @@ -0,0 +1,75 @@ +# +# File: makefile.bcc +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds joytest example (DOS). + +!if "$(BCCDIR)" == "" +!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 +!endif + +!if "$(WXWIN)" == "" +!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx +!endif + +!ifndef FINAL +FINAL=0 +!endif + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makebcc.env + +THISDIR = $(WXDIR)\samples\joytest +WXLIB = $(WXDIR)\lib\wx.lib +LIBS=$(WXLIB) mathwl cwl import +INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw +CFG=$(WXDIR)\src\wxwin.cfg + +!if "$(FINAL)" == "0" +LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -O2 +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +HEADERS = joytest.h +SOURCES = joytest.$(SRCSUFF) +OBJECTS = joytest.obj + +joytest: joytest.exe + +all: joytest.exe + +joytest.exe: $(WXLIB) joytest.obj joytest.def joytest.res + tlink $(LINKFLAGS) @&&! +c0wl.obj joytest.obj +joytest +nul +$(LIBS) +joytest.def +! + rc -30 -K joytest.res + +.$(SRCSUFF).obj: + bcc $(CPPFLAGS) -c {$< } + +joytest.obj: joytest.$(SRCSUFF) + +joytest.res : joytest.rc $(WXDIR)\include\msw\wx.rc + rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa joytest + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws diff --git a/samples/joytest/makefile.dos b/samples/joytest/makefile.dos new file mode 100644 index 0000000000..b2ddbcf9f5 --- /dev/null +++ b/samples/joytest/makefile.dos @@ -0,0 +1,63 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds joytest example (DOS). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\makemsc.env + +THISDIR = $(WXDIR)\samples\joytest +INC=/I$(WXDIR)\include + +HEADERS = joytest.h +SOURCES = joytest.$(SRCSUFF) +OBJECTS = joytest.obj + +all: joytest.exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.dos + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.dos clean + cd $(THISDIR) + + +joytest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) joytest.obj joytest.def joytest.res + link $(LINKFLAGS) @<< +$(WXDIR)\src\msw\dummy.obj joytest.obj, +joytest, +NUL, +$(LIBS), +joytest.def +; +<< + rc -K joytest.res + +joytest.obj: joytest.h joytest.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +joytest.res : joytest.rc $(WXDIR)\include\wx\msw\wx.rc + rc -r /i$(WXDIR)\include joytest + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/joytest/makefile.g95 b/samples/joytest/makefile.g95 new file mode 100644 index 0000000000..8eef77f7cf --- /dev/null +++ b/samples/joytest/makefile.g95 @@ -0,0 +1,35 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for joytest example (UNIX). + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/makeg95.env + +OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF) $(OBJDIR)/joytest_resources.$(OBJSUFF) + +all: $(OBJDIR) joytest$(GUISUFFIX) + +$(OBJDIR): + mkdir $(OBJDIR) + +joytest$(GUISUFFIX): $(OBJECTS) $(WXLIB) + $(CC) $(LDFLAGS) -o joytest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) + +$(OBJDIR)/joytest.$(OBJSUFF): joytest.$(SRCSUFF) joytest.h + $(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF) + +$(OBJDIR)/joytest_resources.o: joytest.rc + $(RESCOMP) -i joytest.rc -o $(OBJDIR)/joytest_resources.o $(RESFLAGS) + +clean: + rm -f $(OBJECTS) joytest$(GUISUFFIX).exe core *.res *.rsc diff --git a/samples/joytest/makefile.nt b/samples/joytest/makefile.nt new file mode 100644 index 0000000000..ca7ec0c46a --- /dev/null +++ b/samples/joytest/makefile.nt @@ -0,0 +1,63 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds joytest example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) +WXUSINGDLL=0 + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\samples\joytest +PROGRAM=joytest + +OBJECTS = $(PROGRAM).obj + +$(PROGRAM): $(PROGRAM).exe + +all: wx $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.nt clean + cd $(THISDIR) + +$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res + $(link) @<< +-out:$(PROGRAM).exe +$(LINKFLAGS) +$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res +$(LIBS) +<< + + +$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc + + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/joytest/makefile.sc b/samples/joytest/makefile.sc new file mode 100644 index 0000000000..bcdcb11d54 --- /dev/null +++ b/samples/joytest/makefile.sc @@ -0,0 +1,37 @@ +; Last change: JS 12 Apr 98 10:45 am +# Symantec C++ makefile for joytest example +# NOTE that peripheral libraries are now dealt in main wxWindows makefile. + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makesc.env + +WXLIB = $(WXDIR)\lib\wx.lib +INCDIR = $(WXDIR)\include +MSWINC = $(INCDIR)\msw +BASEINC = $(INCDIR)\base + +CC=sc +RC=rc +CFLAGS = -o -ml -W -Dwx_msw +LDFLAGS = -ml -W + +INCLUDE=$(BASEINC);$(MSWINC) + +LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib + +.$(SRCSUFF).obj: + *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< + +.rc.res: + *$(RC) -r -I$(INCLUDE) $< + +joytest.exe: joytest.obj joytest.def joytest.res + *$(CC) $(LDFLAGS) -o$@ joytest.obj joytest.def $(LIBS) + *$(RC) -k joytest.res + +clean: + -del *.obj + -del *.exe + -del *.res + -del *.map + -del *.rws diff --git a/samples/joytest/makefile.unx b/samples/joytest/makefile.unx new file mode 100644 index 0000000000..c4156423ac --- /dev/null +++ b/samples/joytest/makefile.unx @@ -0,0 +1,55 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for joytest example (UNIX). + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/make.env + +OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF) + +.SUFFIXES: + +all: $(OBJDIR) joytest$(GUISUFFIX) + +wx: +# cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx +motif: + $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= + +xview: + $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' + +hp: + $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ + XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' + +$(OBJDIR): + mkdir $(OBJDIR) + +joytest$(GUISUFFIX): $(OBJDIR)/joytest.$(OBJSUFF) $(WXLIB) + $(CC) $(LDFLAGS) -o joytest$(GUISUFFIX) $(OBJDIR)/joytest.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) + +$(OBJDIR)/joytest.$(OBJSUFF): joytest.$(SRCSUFF) joytest.h + $(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF) + +clean_motif: + $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany + +clean_ol: + $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany + +clean_hp: + $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany + +cleanany: + rm -f $(OBJECTS) joytest$(GUISUFFIX) core diff --git a/samples/joytest/makefile.wat b/samples/joytest/makefile.wat new file mode 100644 index 0000000000..d009dcb6a8 --- /dev/null +++ b/samples/joytest/makefile.wat @@ -0,0 +1,43 @@ +# +# Makefile for WATCOM +# +# Created by D.Chubraev, chubraev@iem.ee.ethz.ch +# 8 Nov 1994 +# + +WXDIR = ..\.. + +!include $(WXDIR)\src\makewat.env + +WXLIB = $(WXDIR)\lib +NAME = joytest +LNK = $(name).lnk +OBJS = $(name).obj + +all: $(name).exe + +$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib + wlink @$(LNK) + $(BINDCOMMAND) $(name).res + +$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc + $(RC) $(RESFLAGS1) $(name).rc + +$(LNK) : makefile.wat + %create $(LNK) + @%append $(LNK) debug all + @%append $(LNK) system $(LINKOPTION) + @%append $(LNK) $(MINDATA) + @%append $(LNK) $(MAXDATA) + @%append $(LNK) $(STACK) + @%append $(LNK) name $(name) + @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib + @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i + @for %i in ($(OBJS)) do @%append $(LNK) file %i + +thing: .SYMBOLIC + echo $(WATLIBDIR) + +clean: .SYMBOLIC + -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex + diff --git a/samples/joytest/mondrian.ico b/samples/joytest/mondrian.ico new file mode 100644 index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0ZShowWindow( m_nCmdShow ); + m_pMainWnd->UpdateWindow(); +*/ + + if (wxTheApp && wxTheApp->GetTopWindow()) + { + m_pMainWnd = new CDummyWindow((HWND) wxTheApp->GetTopWindow()->GetHWND()); + } + + return TRUE; +} + +int CTheApp::ExitInstance() +{ + wxApp::CleanUp(); + + return CWinApp::ExitInstance(); +} + +// Override this to provide wxWindows message loop +// compatibility + +BOOL CTheApp::PreTranslateMessage(MSG *msg) +{ + if (wxTheApp && wxTheApp->ProcessMessage((WXMSG*) msg)) + return TRUE; + else + return CWinApp::PreTranslateMessage(msg); +} + +BOOL CTheApp::OnIdle(LONG lCount) +{ + if (wxTheApp) + return wxTheApp->ProcessIdle(); + else + return FALSE; +} + +/********************************************************************* + * wxWindows elements + ********************************************************************/ + +bool MyApp::OnInit(void) +{ + // Don't exit app when the top level frame is deleted +// SetExitOnFrameDelete(FALSE); + + // Create a red pen + red_pen = new wxPen("RED", 3, wxSOLID); + + // Create a small font + small_font = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL); + + wxFrame* frame = CreateFrame(); + return TRUE; +} + +wxFrame *MyApp::CreateFrame(void) +{ + MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300), + wxDEFAULT_FRAME); + + subframe->SetTitle("wxWindows canvas frame"); + + // Give it a status line + subframe->CreateStatusBar(); + + // Make a menubar + wxMenu *file_menu = new wxMenu; + + file_menu->Append(HELLO_NEW, "&New MFC Window"); + file_menu->Append(HELLO_QUIT, "&Close"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + + // Associate the menu bar with the frame + subframe->SetMenuBar(menu_bar); + + int width, height; + subframe->GetClientSize(&width, &height); + + MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); + wxCursor *cursor = new wxCursor(wxCURSOR_PENCIL); + canvas->SetCursor(cursor); + subframe->canvas = canvas; + + // Give it scrollbars +// canvas->SetScrollbars(20, 20, 50, 50, 4, 4); + + subframe->Show(TRUE); + // Return the main frame window + return subframe; +} + +BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) + EVT_PAINT(MyCanvas::OnPaint) + EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) +END_EVENT_TABLE() + +// Define a constructor for my canvas +MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): + wxScrolledWindow(parent, -1, pos, size) +{ +} + +// Define the repainting behaviour +void MyCanvas::OnPaint(wxPaintEvent& event) +{ + wxPaintDC dc(this); + + dc.SetFont(small_font); + dc.SetPen(wxGREEN_PEN); + dc.DrawLine(0, 0, 200, 200); + dc.DrawLine(200, 0, 0, 200); + + dc.SetBrush(wxCYAN_BRUSH); + dc.SetPen(wxRED_PEN); + dc.DrawRectangle(100, 100, 100, 50); + dc.DrawRoundedRectangle(150, 150, 100, 50, 20); + + dc.DrawEllipse(250, 250, 100, 50); + dc.DrawSpline(50, 200, 50, 100, 200, 10); + dc.DrawLine(50, 230, 200, 230); + dc.DrawText("This is a test string", 50, 230); +} + +// This implements a tiny doodling program! Drag the mouse using +// the left button. +void MyCanvas::OnMouseEvent(wxMouseEvent& event) +{ + wxClientDC dc(this); + dc.SetPen(wxBLACK_PEN); + long x, y; + event.Position(&x, &y); + if (xpos > -1 && ypos > -1 && event.Dragging()) + { + dc.DrawLine(xpos, ypos, x, y); + } + xpos = x; + ypos = y; +} + +BEGIN_EVENT_TABLE(MyChild, wxFrame) + EVT_MENU(HELLO_QUIT, MyChild::OnQuit) + EVT_MENU(HELLO_NEW, MyChild::OnNew) + EVT_ACTIVATE(MyChild::OnActivate) +END_EVENT_TABLE() + +MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style): + wxFrame(frame, -1, title, pos, size, style) +{ + canvas = NULL; +} + +MyChild::~MyChild(void) +{ +} + +void MyChild::OnQuit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void MyChild::OnNew(wxCommandEvent& event) +{ + CMainWindow *mainWin = new CMainWindow(); + mainWin->ShowWindow( TRUE ); + mainWin->UpdateWindow(); +} + +void MyChild::OnActivate(wxActivateEvent& event) +{ + if (event.GetActive() && canvas) + canvas->SetFocus(); +} + +Bool MyChild::OnClose(void) +{ + return TRUE; +} + + +// Dummy MFC window for specifying a valid main window to MFC, using +// a wxWindows HWND. +CDummyWindow::CDummyWindow(HWND hWnd):CWnd() +{ + Attach(hWnd); +} + +// Don't let the CWnd destructor delete the HWND +CDummyWindow::~CDummyWindow(void) +{ + Detach(); +} + diff --git a/samples/mfc/mfctest.def b/samples/mfc/mfctest.def new file mode 100644 index 0000000000..7c741d1059 --- /dev/null +++ b/samples/mfc/mfctest.def @@ -0,0 +1,21 @@ +; hello.def : Declares the module parameters for the application. +; +; This is a part of the Microsoft Foundation Classes C++ library. +; Copyright (C) 1992 Microsoft Corporation +; All rights reserved. +; +; This source code is only intended as a supplement to the +; Microsoft Foundation Classes Reference and Microsoft +; WinHelp documentation provided with the library. +; See these sources for detailed information regarding the +; Microsoft Foundation Classes product. + +NAME Hello +DESCRIPTION 'Hello Microsoft Foundation Classes Windows Application' + +EXETYPE WINDOWS + +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE + +HEAPSIZE 1024 diff --git a/samples/mfc/mfctest.h b/samples/mfc/mfctest.h new file mode 100644 index 0000000000..038a08cad2 --- /dev/null +++ b/samples/mfc/mfctest.h @@ -0,0 +1,66 @@ +// hello.h : Declares the class interfaces for the application. +// Hello is a simple program which consists of a main window +// and an "About" dialog which can be invoked by a menu choice. +// It is intended to serve as a starting-point for new +// applications. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#ifndef __MFCTEST_H__ +#define __MFCTEST_H__ + +///////////////////////////////////////////////////////////////////////////// + +// CMainWindow: +// See hello.cpp for the code to the member functions and the message map. +// +class CMainWindow : public CFrameWnd +{ +public: + CMainWindow(); + + //{{AFX_MSG( CMainWindow ) + afx_msg void OnPaint(); + afx_msg void OnAbout(); + afx_msg void OnTest(); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +// A dummy CWnd pointing to a wxWindow's HWND +class CDummyWindow: public CWnd +{ + public: + CDummyWindow(HWND hWnd); + ~CDummyWindow(void); +}; + +///////////////////////////////////////////////////////////////////////////// + +// CTheApp: +// See hello.cpp for the code to the InitInstance member function. +// +class CTheApp : public CWinApp +{ +public: + BOOL InitInstance(); + int ExitInstance(); + + // Override this to provide wxWindows message loop + // compatibility + BOOL PreTranslateMessage(MSG *msg); + BOOL OnIdle(LONG lCount); +}; + +///////////////////////////////////////////////////////////////////////////// + +#endif // __MFCTEST_H__ diff --git a/samples/mfc/mfctest.ico b/samples/mfc/mfctest.ico new file mode 100644 index 0000000000000000000000000000000000000000..331b675b63ea5c7aebc8502a2b459568cedd7564 GIT binary patch literal 766 zcmc(cF%H5o3`KttW2G`NcjOoxEl0}@dJV=Npi+6?4xs}hQk~jy`s~C`q=7NdH(6d6 z>CXH>XY`2$s)6q)1hh-NvO=qy5Co z`COXnu|8>Zg}pwwJLvWQpL4=z|CL)s`uVx+ykXyP)c3_vA9z%I33Im=o8yxL-kcGw dBql_1DBSqSBlEx`(MPoWeAkv98#(wac>^wsLdgIC literal 0 HcmV?d00001 diff --git a/samples/mfc/mfctest.rc b/samples/mfc/mfctest.rc new file mode 100644 index 0000000000..7c5da8b070 --- /dev/null +++ b/samples/mfc/mfctest.rc @@ -0,0 +1,108 @@ +//Microsoft App Studio generated resource script. +// +#include "wx/msw/wx.rc" +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + + +///////////////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + + +////////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +AFX_IDI_STD_FRAME ICON DISCARDABLE "MFCTEST.ICO" + +////////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +MAINMENU MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Test wxWindows", IDM_TEST + END + POPUP "&Help" + BEGIN + MENUITEM "&About Hello...\tF1", IDM_ABOUT + END +END + + +////////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +MAINACCELTABLE ACCELERATORS MOVEABLE PURE +BEGIN + VK_F1, IDM_ABOUT, VIRTKEY +END + + +////////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +ABOUTBOX DIALOG DISCARDABLE 34, 22, 144, 75 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Hello" +FONT 8, "Helv" +BEGIN + CTEXT "Microsoft Windows",IDC_STATIC,0,5,144,8 + CTEXT "Microsoft Foundation Classes",IDC_STATIC,0,14,144,8 + CTEXT "Hello, Windows!",IDC_STATIC,0,23,144,8 + CTEXT "Version 2.0",IDC_STATIC,0,36,144,8 + DEFPUSHBUTTON "OK",IDOK,56,53,32,14,WS_GROUP +END + +#ifdef APSTUDIO_INVOKED +////////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +///////////////////////////////////////////////////////////////////////////////////// +#endif // APSTUDIO_INVOKED + + +#ifndef APSTUDIO_INVOKED +//////////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/samples/mfc/resource.h b/samples/mfc/resource.h new file mode 100644 index 0000000000..e20ad76cbb --- /dev/null +++ b/samples/mfc/resource.h @@ -0,0 +1,18 @@ +//{{NO_DEPENDENCIES}} +// App Studio generated include file. +// Used by HELLO.RC +// +#define IDM_ABOUT 100 +#define IDM_TEST 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS + +#define _APS_NEXT_RESOURCE_VALUE 110 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 112 +#endif +#endif diff --git a/samples/mfc/stdafx.h b/samples/mfc/stdafx.h new file mode 100644 index 0000000000..5b9f153634 --- /dev/null +++ b/samples/mfc/stdafx.h @@ -0,0 +1,12 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include diff --git a/samples/nativdlg/aiai.ico b/samples/nativdlg/aiai.ico new file mode 100644 index 0000000000000000000000000000000000000000..a3db6563cc0b9f4588e1e994fe54b90a3cb1d6c1 GIT binary patch literal 766 zcmc(bJ930T3`Bcft}@v=+L+MC@X_W5#I6lE$3$=(hlEfB4Zbw(l3|27cf@{)u1o%88L{R;n8d60briz)7fioa{V~VK) z)$t4e1%j>c0*T7ZEBuvb0Ndch+2BCx7U^mZHa?iIh11ZPGV>8*oPzc{HmcjEM7U^( z*rd)gSRm_`KJo;dxt={X3#3|q&kYE;ul$En1WJC3UOX%3ev8= */ +#else +#include +/* #include */ +#endif + +#include "resource.h" + +#ifndef __MINGW32__ +#include +#endif + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +// #include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +dialog1 DIALOG DISCARDABLE 0, 0, 271, 172 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Test Dialog" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",wxID_OK,214,7,50,14 + PUSHBUTTON "Cancel",wxID_CANCEL,214,24,50,14 + GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158 + EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL + LTEXT "wxStaticText",IDC_STATIC,13,25,42,8 + CONTROL "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,14,47,57,10 + COMBOBOX IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON, + 141,47,64,10 + LISTBOX IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + SCROLLBAR IDC_SCROLLBAR1,111,71,76,11 + CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,10,116,100,15 + CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90, + 10,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + dialog1, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 264 + TOPMARGIN, 7 + BOTTOMMARGIN, 165 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/samples/nativdlg/makefile.b32 b/samples/nativdlg/makefile.b32 new file mode 100644 index 0000000000..7c55473a6a --- /dev/null +++ b/samples/nativdlg/makefile.b32 @@ -0,0 +1,64 @@ +# +# File: makefile.b32 +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds 32bit nativdlg example. + +# WXWIN and BCCDIR are set by parent make + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makeb32.env + +WXLIBDIR = $(WXDIR)\lib +WXLIB = $(WXLIBDIR)\wx32.lib +LIBS=$(WXLIB) cw32 import32 + +TARGET=nativdlg + +!if "$(FINAL)" == "0" +LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +OBJECTS = nativdlg.obj + +$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res + tlink32 $(LINKFLAGS) @&&! +c0w32.obj $(OBJECTS) +$(TARGET) +nul +$(LIBS) +$(TARGET).def +! + brc32 -K $(TARGET).res + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +nativdlg.obj: nativdlg.$(SRCSUFF) nativdlg.h # dialog1.wxr + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + brc32 -r /D__WINDOWS__ /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + + diff --git a/samples/nativdlg/makefile.bcc b/samples/nativdlg/makefile.bcc new file mode 100644 index 0000000000..19ad9c2a44 --- /dev/null +++ b/samples/nativdlg/makefile.bcc @@ -0,0 +1,74 @@ +# +# File: makefile.bcc +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds resource example (DOS). + +!if "$(BCCDIR)" == "" +!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 +!endif + +!if "$(WXWIN)" == "" +!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx +!endif + +WXDIR = $(WXWIN) +THISDIR = $(WXDIR)\samples\resource +WXLIB = $(WXDIR)\lib\wx.lib + +LIBS=$(WXLIB) mathwl cwl import +INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw +CFG=$(WXDIR)\src\wxwin.cfg + +!ifndef FINAL +FINAL=0 +!endif + +!if "$(FINAL)" == "0" +LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -O2 +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +HEADERS = resource.h +SOURCES = resource.cc +OBJECTS = resource.obj + +resource: resource.exe + +all: resource.exe + +resource.exe: $(WXLIB) resource.obj resource.def resource.res + tlink $(LINKFLAGS) @&&! +c0wl.obj resource.obj +resource +nul +$(LIBS) +resource.def +! + rc -30 -K resource.res + +.cc.obj: + bcc $(CPPFLAGS) -c {$< } + +resource.obj: resource.cc + +resource.res : resource.rc $(WXDIR)\include\msw\wx.rc + rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws diff --git a/samples/nativdlg/makefile.dos b/samples/nativdlg/makefile.dos new file mode 100644 index 0000000000..6096ca810c --- /dev/null +++ b/samples/nativdlg/makefile.dos @@ -0,0 +1,86 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds resource example (DOS). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info. + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\makemsc.env + +THISDIR = $(WXDIR)\samples\resource +WXLIB = $(WXDIR)\lib\wx.lib +LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem +INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw +DUMMY=$(WXDIR)\src\msw\dummy.obj + +# Set this to nothing if using MS C++ 7 +ZOPTION=/Z7 + +!ifndef FINAL +FINAL=0 +!endif + +PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch + +!if "$(FINAL)" == "0" +CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw +LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256 +!else +CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw +LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256 +!endif + +HEADERS = resource.h +SOURCES = resource.$(SRCSUFF) +OBJECTS = resource.obj + +resource: resource.exe + +all: wx resource.exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.dos FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.dos clean + cd $(THISDIR) + + +resource.exe: $(DUMMY) $(WXLIB) resource.obj resource.def resource.res + link $(LINKFLAGS) @<< +$(DUMMY) resource.obj, +resource, +NUL, +$(LIBS), +resource.def +; +<< + rc -31 -K resource.res + +resource.obj: resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY) + cl @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +resource.res : resource.rc $(WXDIR)\include\msw\wx.rc + rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/nativdlg/makefile.g95 b/samples/nativdlg/makefile.g95 new file mode 100644 index 0000000000..018f915f18 --- /dev/null +++ b/samples/nativdlg/makefile.g95 @@ -0,0 +1,36 @@ +# +# File: makefile.g95 +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for nativdlg example (UNIX). + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/makeg95.env + +OBJECTS=$(OBJDIR)/nativdlg.$(OBJSUFF) $(OBJDIR)/nativdlg_resources.$(OBJSUFF) + +all: $(OBJDIR) nativdlg$(GUISUFFIX) + +$(OBJDIR): + mkdir $(OBJDIR) + +$(OBJDIR)/nativdlg.$(OBJSUFF): nativdlg.$(SRCSUFF) nativdlg.h + $(CC) -c $(CPPFLAGS) -o $@ nativdlg.$(SRCSUFF) + +nativdlg$(GUISUFFIX): $(OBJECTS) $(WXLIB) + $(CC) $(LDFLAGS) -o nativdlg$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) + +$(OBJDIR)/nativdlg_resources.o: nativdlg.rc + $(RESCOMP) -i nativdlg.rc -o $(OBJDIR)/nativdlg_resources.o $(RESFLAGS) + +clean: + rm -f $(OBJECTS) nativdlg$(GUISUFFIX).exe core *.rsc *.res + diff --git a/samples/nativdlg/makefile.nt b/samples/nativdlg/makefile.nt new file mode 100644 index 0000000000..08261497f8 --- /dev/null +++ b/samples/nativdlg/makefile.nt @@ -0,0 +1,63 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds nativdlg example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\samples\nativdlg +PROGRAM=nativdlg + +OBJECTS = $(PROGRAM).obj + +$(PROGRAM): $(PROGRAM).exe + +all: wx $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.nt clean + cd $(THISDIR) + +$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res + $(link) @<< +-out:$(PROGRAM).exe +$(LINKFLAGS) +$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res +$(LIBS) +<< + + +$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc dialog1.rc + $(rc) -r /i$(WXDIR)\include /D__WINDOWS__ -fo$@ $(PROGRAM).rc + + +clean: + -erase *.obj + -erase *.sbr + -erase *.exe + -erase *.res + -erase *.map + -erase *.pdb + diff --git a/samples/nativdlg/makefile.sc b/samples/nativdlg/makefile.sc new file mode 100644 index 0000000000..235c8f8bc1 --- /dev/null +++ b/samples/nativdlg/makefile.sc @@ -0,0 +1,35 @@ +# Symantec C++ makefile for hello example +# NOTE that peripheral libraries are now dealt in main wxWindows makefile. + +WXDIR = $(WXWIN) +WXLIB = $(WXDIR)\lib\wx.lib +INCDIR = $(WXDIR)\include +MSWINC = $(INCDIR)\msw +BASEINC = $(INCDIR)\base + +CC=sc +RC=rc +CFLAGS = -o -ml -W -Dwx_msw +LDFLAGS = -ml -W + +INCLUDE=$(BASEINC);$(MSWINC) + +LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib + +.cc.obj: + *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< + +.rc.res: + *$(RC) -r -I$(INCLUDE) $< + +hello.exe: hello.obj hello.def hello.res + *$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS) + *$(RC) -k hello.res + +clean: + -del *.obj + -del *.exe + -del *.res + -del *.map + -del *.rws + diff --git a/samples/nativdlg/makefile.unx b/samples/nativdlg/makefile.unx new file mode 100644 index 0000000000..1967b5e242 --- /dev/null +++ b/samples/nativdlg/makefile.unx @@ -0,0 +1,76 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for resource example (UNIX). + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/make.env + +OBJECTS=$(OBJDIR)/resource.$(OBJSUFF) + +.SUFFIXES: + +all: $(OBJDIR) resource$(GUISUFFIX) + +wxmotif: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif + +wxxview: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview + +wxhp: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp + +# For SGI, include -lPW on your LDLIBS +motif: wxmotif + $(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= + +xview: wxxview + $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)' + +hp: wxhp + $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \ + XINCLUDE='$(HPXINCLUDE)' \ + XLIB='$(HPXLIB)' \ + XVIEW_LINK='' \ + LDLIBS='$(HPLDLIBS)' + +$(OBJDIR): + mkdir $(OBJDIR) + +resource$(GUISUFFIX): $(OBJDIR)/resource.$(OBJSUFF) $(WXLIB) + $(CC) $(LDFLAGS) -o resource$(GUISUFFIX) $(OBJDIR)/resource.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) + +$(OBJDIR)/resource.$(OBJSUFF): resource.$(SRCSUFF) resource.h + $(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF) + +clean_motif: + $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany + +clean_ol: + $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany + +clean_hp: + $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany + +cleanany: + rm -f $(OBJECTS) resource$(GUISUFFIX) core + +wxclean_ol: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol + +wxclean_motif: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif + +wxclean_hp: + cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp + diff --git a/samples/nativdlg/makefile.vms b/samples/nativdlg/makefile.vms new file mode 100644 index 0000000000..1ef109fbeb --- /dev/null +++ b/samples/nativdlg/makefile.vms @@ -0,0 +1,38 @@ +#************************************************************************ +# Makefile for HELLO under VMS +# by Stefan Hammes +# (incomplete) update history: +# 11.04.95 +#************************************************************************ + +#************************************************************************ +# Definition section +# (cave: definitions and includes must begin with ',') +#************************************************************************ + +APPOPTS = +APPDEFS = +APPINCS = + +#************************************************************************ +# Module section +#************************************************************************ + +# Name of main module +MAIN = hello + +# Object modules of the application. +OBJS = hello.obj + +.include [--.src]makevms.env + +# main dependency +$(MAIN).exe : $(MAIN).$(OBJ) + $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option + - purge *.exe + +#************************************************************************ +# Header file depedencies following +#************************************************************************ +hello.obj : hello.cc hello.h + diff --git a/samples/nativdlg/makefile.wat b/samples/nativdlg/makefile.wat new file mode 100644 index 0000000000..0ad7f98a89 --- /dev/null +++ b/samples/nativdlg/makefile.wat @@ -0,0 +1,42 @@ +# +# Makefile for WATCOM +# +# Created by D.Chubraev, chubraev@iem.ee.ethz.ch +# 8 Nov 1994 +# + +WXDIR = ..\.. + +!include $(WXDIR)\src\makewat.env + +WXLIB = $(WXDIR)\lib +NAME = hello +LNK = $(name).lnk +OBJS = $(name).obj + +PRECOMP= + +all: $(name).exe + +$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib + wlink @$(LNK) + $(BINDCOMMAND) $(name).res + +$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc + $(RC) $(RESFLAGS1) $(name).rc + +$(LNK) : makefile.wat + %create $(LNK) + @%append $(LNK) debug all + @%append $(LNK) system $(LINKOPTION) + @%append $(LNK) $(MINDATA) + @%append $(LNK) $(MAXDATA) + @%append $(LNK) $(STACK) + @%append $(LNK) name $(name) + @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib + @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i + @for %i in ($(OBJS)) do @%append $(LNK) file %i + +clean: .SYMBOLIC + -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex + diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp new file mode 100644 index 0000000000..32d24f893c --- /dev/null +++ b/samples/nativdlg/nativdlg.cpp @@ -0,0 +1,130 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: nativdlg.cpp +// Purpose: Native Windows dialog sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include "wx/resource.h" + +#include +#include "nativdlg.h" +#include "resource.h" + +// Declare two frames +MyFrame *frame = NULL; + +IMPLEMENT_APP(MyApp) + +// Testing of ressources +MyApp::MyApp() +{ +} + +bool MyApp::OnInit(void) +{ + // Create the main frame window + frame = new MyFrame(NULL, -1, "wxWindows Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250)); + + // Give it a status line + frame->CreateStatusBar(2); + + // Make a menubar + wxMenu *file_menu = new wxMenu; + + file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource"); + file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + + // Associate the menu bar with the frame + frame->SetMenuBar(menu_bar); + + // Make a panel + frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame"); + frame->Show(TRUE); + + // Return the main frame window + SetTopWindow(frame); + + return TRUE; +} + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit) + EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1) +END_EVENT_TABLE() + +// Define my frame constructor +MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size): + wxFrame(parent, id, title, pos, size) +{ + panel = NULL; +} + +void MyFrame::OnQuit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void MyFrame::OnTest1(wxCommandEvent& event) +{ + MyDialog *dialog = new MyDialog; + if (dialog->LoadNativeDialog(this, dialog1)) + { +/* + wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog); + if (text) + text->SetValue("wxWindows resource demo"); +*/ + dialog->SetModal(TRUE); + dialog->ShowModal(); + } + dialog->Close(TRUE); +} + +bool MyFrame::OnClose(void) +{ + Show(FALSE); + + return TRUE; +} + +BEGIN_EVENT_TABLE(MyDialog, wxDialog) + EVT_BUTTON(wxID_OK, MyDialog::OnOk) + EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel) +END_EVENT_TABLE() + + +void MyDialog::OnOk(wxCommandEvent& event) +{ + EndModal(wxID_OK); +} + +void MyDialog::OnCancel(wxCommandEvent& event) +{ + EndModal(wxID_CANCEL); +} + + diff --git a/samples/nativdlg/nativdlg.def b/samples/nativdlg/nativdlg.def new file mode 100644 index 0000000000..49791b5e6c --- /dev/null +++ b/samples/nativdlg/nativdlg.def @@ -0,0 +1,9 @@ +NAME Resource +DESCRIPTION 'Resource' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 1024 +STACKSIZE 16192 + diff --git a/samples/nativdlg/nativdlg.h b/samples/nativdlg/nativdlg.h new file mode 100644 index 0000000000..25688ea5fc --- /dev/null +++ b/samples/nativdlg/nativdlg.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: nativdlg.h +// Purpose: Native Windows dialog sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma interface +#endif + +// Define a new application +class MyApp: public wxApp +{ + public: + MyApp(void) ; + bool OnInit(void); +}; + +class MyFrame: public wxFrame +{ + public: + wxWindow *panel; + MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size); + bool OnClose(void); + void OnQuit(wxCommandEvent& event); + void OnTest1(wxCommandEvent& event); + + DECLARE_EVENT_TABLE() +}; + +class MyDialog : public wxDialog +{ + public: + void OnOk(wxCommandEvent& event); + void OnCancel(wxCommandEvent& event); + + DECLARE_EVENT_TABLE() +}; + +#define RESOURCE_QUIT 4 +#define RESOURCE_TEST1 2 + diff --git a/samples/nativdlg/nativdlg.rc b/samples/nativdlg/nativdlg.rc new file mode 100644 index 0000000000..db18d163f2 --- /dev/null +++ b/samples/nativdlg/nativdlg.rc @@ -0,0 +1,4 @@ +#include "wx/msw/wx.rc" + +#include "dialog1.rc" + diff --git a/samples/nativdlg/resource.h b/samples/nativdlg/resource.h new file mode 100644 index 0000000000..a71bf8475c --- /dev/null +++ b/samples/nativdlg/resource.h @@ -0,0 +1,25 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by dialog1.rc +// +#define dialog1 101 +#define IDC_EDIT1 1000 +#define IDC_CHECK1 1001 +#define IDC_COMBO1 1003 +#define IDC_RADIO1 1005 +#define IDC_LIST1 1006 +#define IDC_SCROLLBAR1 1007 +#define IDC_SLIDER1 1008 +#define IDC_SPIN1 1009 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1010 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/samples/ownerdrw/bell.bmp b/samples/ownerdrw/bell.bmp new file mode 100644 index 0000000000000000000000000000000000000000..279b827162f2b745c005fc802938a84f0ce5890a GIT binary patch literal 370 zcmb7*HZ}&$B zw=fcw0f;p=!k7u@ps`;V%cT)}F?J!_0&p#!2&% vld<$VEqU&p<3Ns5`Nf_+KG?%$w#sLQx8`|ei8_4vBY&s8ZsYZro@o37zjK0f literal 0 HcmV?d00001 diff --git a/samples/ownerdrw/makefile.b32 b/samples/ownerdrw/makefile.b32 new file mode 100644 index 0000000000..771353702f --- /dev/null +++ b/samples/ownerdrw/makefile.b32 @@ -0,0 +1,64 @@ +# +# File: makefile.bcc +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds ownerdrw example (DOS). + +# WXWIN and BCCDIR are set by parent make + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makeb32.env + +WXLIBDIR = $(WXDIR)\lib +WXINC = $(WXDIR)\include\msw +WXLIB = $(WXLIBDIR)\wx32.lib +LIBS=$(WXLIB) cw32 import32 + +TARGET=ownerdrw + +!if "$(FINAL)" == "0" +LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +OBJECTS = ownerdrw.obj + +$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res + tlink32 $(LINKFLAGS) @&&! +c0w32.obj $(OBJECTS) +$(TARGET) +nul +$(LIBS) +$(TARGET).def +! + brc32 -K $(TARGET).res + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +ownerdrw.obj: ownerdrw.$(SRCSUFF) + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + diff --git a/samples/ownerdrw/makefile.dos b/samples/ownerdrw/makefile.dos new file mode 100644 index 0000000000..71c72681ac --- /dev/null +++ b/samples/ownerdrw/makefile.dos @@ -0,0 +1,65 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds ownerdrw example (DOS). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\makemsc.env + +THISDIR = $(WXDIR)\samples\ownerdrw + +!ifndef FINAL +FINAL=0 +!endif + +HEADERS = +SOURCES = ownerdrw.$(SRCSUFF) +OBJECTS = ownerdrw.obj + +all: ownerdrw.exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.dos FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.dos clean + cd $(THISDIR) + +ownerdrw.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) ownerdrw.obj ownerdrw.def ownerdrw.res + link $(LINKFLAGS) @<< +ownerdrw.obj $(WXDIR)\src\msw\dummy.obj, +ownerdrw, +NUL, +$(LIBS), +ownerdrw.def +; +<< + rc -K ownerdrw.res + +ownerdrw.obj: ownerdrw.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +ownerdrw.res : ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc + rc -r /i$(WXDIR)\include ownerdrw + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/ownerdrw/makefile.g95 b/samples/ownerdrw/makefile.g95 new file mode 100644 index 0000000000..c821885cc3 --- /dev/null +++ b/samples/ownerdrw/makefile.g95 @@ -0,0 +1,37 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for ownerdrw example (UNIX). + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/makeg95.env + +OBJECTS = $(OBJDIR)/ownerdrw.$(OBJSUFF) $(OBJDIR)/ownerdrw_resources.$(OBJSUFF) + +all: $(OBJDIR) ownerdrw$(GUISUFFIX)$(EXESUFF) + +wx: + +$(OBJDIR): + mkdir $(OBJDIR) + +ownerdrw$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) + $(CC) $(LDFLAGS) -o ownerdrw$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) + +$(OBJDIR)/ownerdrw.$(OBJSUFF): ownerdrw.$(SRCSUFF) + $(CC) -c $(CPPFLAGS) -o $@ ownerdrw.$(SRCSUFF) + +$(OBJDIR)/ownerdrw_resources.o: ownerdrw.rc + $(RESCOMP) -i ownerdrw.rc -o $(OBJDIR)/ownerdrw_resources.o $(RESFLAGS) + +clean: + rm -f $(OBJECTS) ownerdrw$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/ownerdrw/makefile.nt b/samples/ownerdrw/makefile.nt new file mode 100644 index 0000000000..5976dadeb2 --- /dev/null +++ b/samples/ownerdrw/makefile.nt @@ -0,0 +1,64 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds ownerdrw example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +WXUSINGDLL=0 + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\samples\ownerdrw +PROGRAM=ownerdrw + +OBJECTS = $(PROGRAM).obj + +$(PROGRAM): $(PROGRAM).exe + +all: wx $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.nt clean + cd $(THISDIR) + +$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res + $(link) @<< +-out:$(PROGRAM).exe +$(LINKFLAGS) +$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res +$(LIBS) +<< + + +$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc + + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/ownerdrw/mondrian.ico b/samples/ownerdrw/mondrian.ico new file mode 100644 index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Zq|zPkz&Y5tOT>ViEgNe#Und7c3jaG4fmA29pB?wt*V}zU*n{yx zKhe+h2?s{t6>%>VfET5V#7IPIjad&pE_xTydDLRCui=mL)_3-O6xqmmjX@V%1&+p1 z@j_)yir0!H1u@@~GXa#7@&T5DG I*kKgF8+G_}MF0Q* literal 0 HcmV?d00001 diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp new file mode 100644 index 0000000000..2e039f2926 --- /dev/null +++ b/samples/ownerdrw/ownerdrw.cpp @@ -0,0 +1,293 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ownerdrw.cpp +// Purpose: Owner-draw sample, for Windows +// Author: Vadim Zeitlin +// Modified by: +// Created: 13.11.97 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// headers & declarations +// ============================================================================ + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "wx/ownerdrw.h" +#include "wx/menuitem.h" +#include "wx/msw/checklst.h" + +// Define a new application type +class OwnerDrawnApp: public wxApp +{ +public: + bool OnInit(); +}; + +// Define a new frame type +class OwnerDrawnFrame : public wxFrame +{ +public: + // ctor & dtor + OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h); + ~OwnerDrawnFrame(); + + // notifications + void OnQuit (wxCommandEvent& event); + void OnAbout (wxCommandEvent& event); + void OnListboxSelect (wxCommandEvent& event); + void OnCheckboxToggle (wxCommandEvent& event); + void OnListboxDblClick (wxCommandEvent& event); + bool OnClose () { return TRUE; } + + DECLARE_EVENT_TABLE() + +private: + void InitMenu(); + + wxCheckListBox *m_pListBox; +}; + +enum +{ + Menu_Quit = 1, + Menu_First = 100, + Menu_Test1, Menu_Test2, Menu_Test3, + Menu_Bitmap, Menu_Bitmap2, + Menu_Submenu, Menu_Sub1, Menu_Sub2, Menu_Sub3, + Control_First = 1000, + Control_Listbox, Control_Listbox2, +}; + +BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame) + EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit) + EVT_LISTBOX(Control_Listbox, OwnerDrawnFrame::OnListboxSelect) + EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle) + EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, + OwnerDrawnFrame::OnListboxDblClick) +END_EVENT_TABLE() + +IMPLEMENT_APP(OwnerDrawnApp); + +// init our app: create windows +bool OwnerDrawnApp::OnInit(void) +{ + OwnerDrawnFrame *pFrame = new OwnerDrawnFrame(NULL, "wxWindows Ownerdraw Sample", + 50, 50, 450, 340); + SetTopWindow(pFrame); + + return TRUE; +} + +// create the menu bar for the main frame +void OwnerDrawnFrame::InitMenu() +{ + // Make a menubar + wxMenu *file_menu = new wxMenu, + *sub_menu = new wxMenu; + + // vars used for menu construction + wxMenuItem *pItem; + wxFont fontLarge(18, wxROMAN, wxNORMAL, wxBOLD, FALSE), + fontUlined(12, wxDEFAULT, wxNORMAL, wxNORMAL, TRUE), + fontItalic(12, wxMODERN, wxITALIC, wxBOLD, FALSE), + // should be at least of the size of bitmaps + fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE); + + // sorry for my artistic skills... + wxBitmap bmpBell("bell"), bmpSound("sound"), bmpNoSound("nosound"); + + // construct submenu + pItem = new wxMenuItem(sub_menu, Menu_Sub1, "Submenu &first", "large", TRUE); + pItem->SetFont(fontLarge); + sub_menu->Append(pItem); + + pItem = new wxMenuItem(sub_menu, Menu_Sub2, "Submenu &second", "italic", TRUE); + pItem->SetFont(fontItalic); + sub_menu->Append(pItem); + + pItem = new wxMenuItem(sub_menu, Menu_Sub3, "Submenu &third", "underlined", TRUE); + pItem->SetFont(fontUlined); + sub_menu->Append(pItem); + + // construct menu + pItem = new wxMenuItem(file_menu, Menu_Test1, "&Uncheckable", "red item"); + pItem->SetFont(*wxITALIC_FONT); + pItem->SetTextColour(wxColor(255, 0, 0)); + pItem->SetMarginWidth(23); + file_menu->Append(pItem); + + pItem = new wxMenuItem(file_menu, Menu_Test2, "&Checkable", "checkable item", TRUE); + pItem->SetFont(*wxSMALL_FONT); + file_menu->Append(pItem); + file_menu->Check(Menu_Test2, TRUE); + + pItem = new wxMenuItem(file_menu, Menu_Test3, "&Disabled", "disabled item"); + pItem->SetFont(*wxNORMAL_FONT); + file_menu->Append(pItem); + file_menu->Enable(Menu_Test3, FALSE); + + file_menu->AppendSeparator(); + + pItem = new wxMenuItem(file_menu, Menu_Bitmap, "&Bell", "check/uncheck me!", TRUE); + pItem->SetFont(fontBmp); + pItem->SetBitmaps(bmpBell); + file_menu->Append(pItem); + + pItem = new wxMenuItem(file_menu, Menu_Bitmap2, "So&und", "icon changes!", TRUE); + pItem->SetFont(fontBmp); + pItem->SetBitmaps(bmpSound, bmpNoSound); + file_menu->Append(pItem); + + file_menu->AppendSeparator(); + + pItem = new wxMenuItem(file_menu, Menu_Submenu, "&Sub menu", "", TRUE, sub_menu); + pItem->SetFont(*wxSWISS_FONT); + file_menu->Append(pItem); + + file_menu->AppendSeparator(); + file_menu->Append(Menu_Quit, "&Quit", "Normal item"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + SetMenuBar(menu_bar); +} + +// main frame constructor +OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h) + : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) +{ + // set the icon + SetIcon(wxIcon("mondrian")); + + // create the menu + InitMenu(); + + // make a panel with some controls + wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0), + wxSize(400, 200), wxTAB_TRAVERSAL); + + // check list box + static const char* aszChoices[] = { "Hello", "world", "and", + "goodbye", "cruel", "world", + "-------", "owner-drawn", "listbox" }; + + wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)]; + uint ui; + for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ ) + astrChoices[ui] = aszChoices[ui]; + + m_pListBox = new wxCheckListBox + ( + pPanel, // parent + Control_Listbox, // control id + wxPoint(10, 10), // listbox poistion + wxSize(200, 200), // listbox size + WXSIZEOF(aszChoices), // number of strings + astrChoices // array of strings + ); + + delete [] astrChoices; + + for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) { + m_pListBox->GetItem(ui)->SetBackgroundColour(wxColor(200, 200, 200)); + } + + m_pListBox->Check(2); + + // normal (but owner-drawn) listbox + static const char* aszColors[] = { "Red", "Blue", "Pink", + "Green", "Yellow", + "Black", "Violet" }; + struct { uint r, g, b; } aColors[] = { {255,0,0}, {0,0,255}, {255,128,192}, + {0,255,0}, {255,255,128}, + {0,0,0}, {128,0,255} }; + astrChoices = new wxString[WXSIZEOF(aszColors)]; + for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ ) + astrChoices[ui] = aszColors[ui]; + + wxListBox *pListBox = new wxListBox + ( + pPanel, // parent + Control_Listbox2, // control id + wxPoint(220, 10), // listbox poistion + wxDefaultSize, // listbox size + WXSIZEOF(aszColors), // number of strings + astrChoices, // array of strings + wxLB_OWNERDRAW, // owner-drawn + wxDefaultValidator, // + wxListBoxNameStr + ); + + for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ ) { + pListBox->GetItem(ui)->SetTextColour(wxColor(aColors[ui].r, + aColors[ui].g, + aColors[ui].b)); + // yellow on white is horrible... + if ( ui == 4 ) + pListBox->GetItem(ui)->SetBackgroundColour(wxColor(0, 0, 0)); + + } + + // create the status line + const int widths[] = { -1, 60 }; + CreateStatusBar(2); + SetStatusWidths(2, widths); + SetStatusText("no selection", 0); + + Show(TRUE); +} + +OwnerDrawnFrame::~OwnerDrawnFrame() +{ +} + +void OwnerDrawnFrame::OnQuit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void OwnerDrawnFrame::OnAbout(wxCommandEvent& event) +{ + wxMessageDialog dialog(this, "Demo of owner-drawn controls\n" + "About wxOwnerDrawn", wxYES_NO | wxCANCEL); + dialog.ShowModal(); +} + +void OwnerDrawnFrame::OnListboxSelect(wxCommandEvent& event) +{ + wxString strSelection; + uint nSel = event.GetSelection(); + strSelection.sprintf("item %d selected (%schecked)", nSel, + m_pListBox->IsChecked(nSel) ? "" : "not "); + SetStatusText(strSelection); +} + +void OwnerDrawnFrame::OnListboxDblClick(wxCommandEvent& event) +{ + wxString strSelection; + strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection()); + wxMessageDialog dialog(this, strSelection); + dialog.ShowModal(); +} + +void OwnerDrawnFrame::OnCheckboxToggle(wxCommandEvent& event) +{ + wxString strSelection; + uint nItem = event.GetInt(); + strSelection.sprintf("item %d was %schecked", nItem, + m_pListBox->IsChecked(nItem) ? "" : "un"); + SetStatusText(strSelection); +} \ No newline at end of file diff --git a/samples/ownerdrw/ownerdrw.def b/samples/ownerdrw/ownerdrw.def new file mode 100644 index 0000000000..6f2236cfe5 --- /dev/null +++ b/samples/ownerdrw/ownerdrw.def @@ -0,0 +1,8 @@ +NAME OWNERDRW +DESCRIPTION 'Owner-draw sample' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 4048 +STACKSIZE 16000 diff --git a/samples/ownerdrw/ownerdrw.rc b/samples/ownerdrw/ownerdrw.rc new file mode 100644 index 0000000000..bbc00bdf4b --- /dev/null +++ b/samples/ownerdrw/ownerdrw.rc @@ -0,0 +1,6 @@ +mondrian ICON "mondrian.ico" +bell BITMAP "bell.bmp" +sound BITMAP "sound.bmp" +nosound BITMAP "nosound.bmp" +#include "wx/msw/wx.rc" + diff --git a/samples/ownerdrw/sound.bmp b/samples/ownerdrw/sound.bmp new file mode 100644 index 0000000000000000000000000000000000000000..26f5f1883e29c465f0243ccff4ba2766b980229e GIT binary patch literal 370 zcma)#K@I{T5CogVWPO1C!FTN4zYq`Vk(=M*VVkfu;|Q8;vI5gn44r1a-jaOX(F=8= z&Q#I?l@`}6DH2Deyc-It)=IaB=0~j=QEVF_kG}LLKf`E^u%iV8dx9~Z{F&2#nOj6; Xd)eh_c=Y<>_}B8WjGS#|+C9N5tAudn literal 0 HcmV?d00001 diff --git a/samples/regtest/key1.ico b/samples/regtest/key1.ico new file mode 100644 index 0000000000000000000000000000000000000000..57a5209acb6245bba40312a49354d5784d7291f0 GIT binary patch literal 318 zcmZvXF%H5o6hmEsXeQK&nURw*cZ2b7?ba*xC>)_13`n2n6qX97wi7#vQmJ8dT_@wx zNGCgVa)yoes1#NI360B$)ljCI=NWgA^;4#2km1O(K_SfSxvMv%QV}XQFa!lB3dO`a xM!bvzrs;59{rGjMt$F6t?hEd?Mqsb-6QYGX-pju~NX_L(vSq^;>o@y-_5&Q8M8W_7 literal 0 HcmV?d00001 diff --git a/samples/regtest/key2.ico b/samples/regtest/key2.ico new file mode 100644 index 0000000000000000000000000000000000000000..082ff472913fcc457f7325b084398f0f24b65d0a GIT binary patch literal 318 zcma)%I}*bn3`CcSir>%&<7zcW1I(35UP>FQ>q*3$VM Th7P2&H;exE3xAQlcm2`{Aev48 literal 0 HcmV?d00001 diff --git a/samples/regtest/key3.ico b/samples/regtest/key3.ico new file mode 100644 index 0000000000000000000000000000000000000000..0cbb4c3360d74049def5417d7bf4a34ebf862c11 GIT binary patch literal 318 zcmaJ-yAHxI5OX9XGG=0C_u0uV!}!G9|%Z6ZcbJqdhhaX#85;y5+yF#{6ZZ7+9EuWKa+50emf_d(&<^)AOqRzi2|is+&s`-YP0 zv@i;E?9Z7$pTnW$kw_zV()R~Z`*tVt8Gkq|{Gk!K--$es>%kY$$Ol%8y|*oh@Rbl2 z$4V%d%LT7Osb48YBfv*fy8LC&IpsX$w56vw$LQm1*Tkl8{I|X)Mu&AJ*_Bt_#%R|> zt#=%@@~S)IoGb;4Zrpaj=xiy@`0WDdW=JM)I`tG@8=_n1Y|hv7t@E{E(hd_>b6Fd9 zQL`;q^ASF0DoLyjheQ^t8+@D%ZK|vrFl~4as;?V3rZSfEY8$`$a1AwT*Ar`Ox!clF zDP5#pZ=|&4fxOpSPrrBd?EOyXpnI!Laf=q;BL87wV>$#U@Cc5e1ADOh2joQcBRFzQ zcfr5GX>s~N-A{nMl=Avi%G8u%q~u)#o&fnh@&sOs&bdy054JfE#J4Rl<0#B@b*zN{ zHRscu{mc>1DGoa1{F{C@Jo`CY!IQTRKU!~f-^7w?-Z<6Uc%KYjMxRU=Nu1B29V{6c mWl{%g)h|pFO6t?XcVK@TVaIRb{eSCuH$REwkN6|_D)I}O#V85@ literal 0 HcmV?d00001 diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp new file mode 100644 index 0000000000..c9396bf398 --- /dev/null +++ b/samples/regtest/regtest.cpp @@ -0,0 +1,834 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: registry.cpp +// Purpose: wxRegKey class demo +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.04.98 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "wx/log.h" +#include "wx/treectrl.h" +#include "wx/msw/registry.h" + +// ---------------------------------------------------------------------------- +// application type +// ---------------------------------------------------------------------------- +class RegApp : public wxApp +{ +public: + bool OnInit(void); +}; + +// ---------------------------------------------------------------------------- +// image list with registry icons +// ---------------------------------------------------------------------------- +class RegImageList : public wxImageList +{ +public: + enum Icon + { + Root, + ClosedKey, + OpenedKey, + TextValue, + BinaryValue, + }; + + RegImageList(); +}; + +// ---------------------------------------------------------------------------- +// our control +// ---------------------------------------------------------------------------- +class RegTreeCtrl : public wxTreeCtrl +{ +public: + // ctor & dtor + RegTreeCtrl(wxWindow *parent, wxWindowID id); + virtual ~RegTreeCtrl(); + + // notifications + void OnDeleteItem (wxTreeEvent& event); + void OnItemExpanding(wxTreeEvent& event); + void OnSelChanged (wxTreeEvent& event); + + void OnRightClick (wxMouseEvent& event); + void OnChar (wxKeyEvent& event); + + // forwarded notifications (by the frame) + void OnMenuTest(); + + // operations + void DeleteSelected(); + void CreateNewKey(const wxString& strName); + void CreateNewTextValue(const wxString& strName); + void CreateNewBinaryValue(const wxString& strName); + + // information + bool IsKeySelected() const; + + DECLARE_EVENT_TABLE(); + +private: + // array of children of the node + struct TreeNode; + WX_DEFINE_ARRAY(TreeNode *, TreeChildren); + + // structure describing a registry key/value + struct TreeNode + { + RegTreeCtrl *m_pTree; // must be !NULL + TreeNode *m_pParent; // NULL only for the root node + long m_id; // the id of the tree control item + wxString m_strName; // name of the key/value + TreeChildren m_aChildren; // array of subkeys/values + bool m_bKey; // key or value? + wxRegKey *m_pKey; // only may be !NULL if m_bKey == true + long m_lDummy; // dummy subkey (to make expansion possible) + + // ctor + TreeNode() { m_lDummy = 0; } + + // trivial accessors + long Id() const { return m_id; } + bool IsRoot() const { return m_pParent == NULL; } + bool IsKey() const { return m_bKey; } + TreeNode *Parent() const { return m_pParent; } + + // notifications + bool OnExpand(); + void OnCollapse(); + + // operations + void Refresh() { OnCollapse(); OnExpand(); } + void AddDummy(); + void DestroyChildren(); + const char *FullName() const; + + // get the associated key: make sure the pointer is !NULL + wxRegKey& Key() { if ( !m_pKey ) OnExpand(); return *m_pKey; } + + // dtor deletes all children + ~TreeNode(); + }; + + wxMenu *m_pMenuPopup; + TreeNode *m_pRoot; + wxImageList *m_imageList; + + TreeNode *GetNode(const wxTreeEvent& event) + { return (TreeNode *)GetItemData(event.m_item.m_itemId); } + +public: + // create a new node and insert it to the tree + TreeNode *InsertNewTreeNode(TreeNode *pParent, + const wxString& strName, + int idImage = RegImageList::ClosedKey, + const wxString *pstrValue = NULL); + // add standard registry keys + void AddStdKeys(); +}; + +// ---------------------------------------------------------------------------- +// the main window of our application +// ---------------------------------------------------------------------------- +class RegFrame : public wxFrame +{ +public: + // ctor & dtor + RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h); + virtual ~RegFrame(void); + + // callbacks + void OnQuit (wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnTest (wxCommandEvent& event); + + void OnExpand (wxCommandEvent& event); + void OnCollapse(wxCommandEvent& event); + void OnToggle (wxCommandEvent& event); + + void OnDelete (wxCommandEvent& event); + void OnNewKey (wxCommandEvent& event); + void OnNewText (wxCommandEvent& event); + void OnNewBinary(wxCommandEvent& event); + + bool OnClose () { return TRUE; } + + DECLARE_EVENT_TABLE(); + +private: + RegTreeCtrl *m_treeCtrl; +}; + +// ---------------------------------------------------------------------------- +// various ids +// ---------------------------------------------------------------------------- + +enum +{ + Menu_Quit = 100, + Menu_About, + Menu_Test, + Menu_Expand, + Menu_Collapse, + Menu_Toggle, + Menu_New, + Menu_NewKey, + Menu_NewText, + Menu_NewBinary, + Menu_Delete, + + Ctrl_RegTree = 200, +}; + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(RegFrame, wxFrame) + EVT_MENU(Menu_Test, RegFrame::OnTest) + EVT_MENU(Menu_About, RegFrame::OnAbout) + EVT_MENU(Menu_Quit, RegFrame::OnQuit) + EVT_MENU(Menu_Expand, RegFrame::OnExpand) + EVT_MENU(Menu_Collapse, RegFrame::OnCollapse) + EVT_MENU(Menu_Toggle, RegFrame::OnToggle) + EVT_MENU(Menu_Delete, RegFrame::OnDelete) + EVT_MENU(Menu_NewKey, RegFrame::OnNewKey) + EVT_MENU(Menu_NewText, RegFrame::OnNewText) + EVT_MENU(Menu_NewBinary,RegFrame::OnNewBinary) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl) + EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem) + EVT_TREE_ITEM_EXPANDING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding) + EVT_TREE_SEL_CHANGED (Ctrl_RegTree, RegTreeCtrl::OnSelChanged) + + EVT_CHAR (RegTreeCtrl::OnChar) + EVT_RIGHT_DOWN(RegTreeCtrl::OnRightClick) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// create the "registry operations" menu +wxMenu *CreateRegistryMenu() +{ + wxMenu *pMenuNew = new wxMenu; + pMenuNew->Append(Menu_NewKey, "&Key", "Create a new key"); + pMenuNew->AppendSeparator(); + pMenuNew->Append(Menu_NewText, "&Text value", "Create a new text value"); + pMenuNew->Append(Menu_NewBinary, "&Binary value", "Create a new binary value"); + + wxMenu *pMenuReg = new wxMenu; + pMenuReg->Append(Menu_New, "&New", pMenuNew); + pMenuReg->Append(Menu_Delete, "&Delete...", "Delete selected key/value"); + pMenuReg->AppendSeparator(); + pMenuReg->Append(Menu_Expand, "&Expand", "Expand current key"); + pMenuReg->Append(Menu_Collapse, "&Collapse", "Collapse current key"); + pMenuReg->Append(Menu_Toggle, "&Toggle", "Toggle current key"); + + return pMenuReg; +} + +// ---------------------------------------------------------------------------- +// application class +// ---------------------------------------------------------------------------- +IMPLEMENT_APP(RegApp) + +// `Main program' equivalent, creating windows and returning main app frame +bool RegApp::OnInit() +{ + // create the main frame window and show it + RegFrame *frame = new RegFrame(NULL, "wxRegKey Test", 50, 50, 600, 350); + frame->Show(true); + + SetTopWindow(frame); + + return true; +} + +// ---------------------------------------------------------------------------- +// RegFrame +// ---------------------------------------------------------------------------- + +RegFrame::RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h) + : wxFrame(parent, -1, title, wxPoint(x, y), wxSize(w, h)) +{ + // this reduces flicker effects + SetBackgroundColour(wxColour(255, 255, 255)); + + // set the icon + // ------------ + SetIcon(wxIcon("app_icon")); + + // create menu + // ----------- + wxMenu *pMenuFile = new wxMenu; + pMenuFile->Append(Menu_Test, "Te&st", "Test key creation"); + pMenuFile->AppendSeparator(); + pMenuFile->Append(Menu_About, "&About...", "Show an extraordinarly beautiful dialog"); + pMenuFile->AppendSeparator(); + pMenuFile->Append(Menu_Quit, "E&xit", "Quit this program"); + + wxMenuBar *pMenu = new wxMenuBar; + pMenu->Append(pMenuFile, "&File"); + pMenu->Append(CreateRegistryMenu(), "&Registry"); + SetMenuBar(pMenu); + + // create child controls + // --------------------- + m_treeCtrl = new RegTreeCtrl(this, Ctrl_RegTree); + + // create the status line + // ---------------------- + int aWidths[2]; + aWidths[0] = 200; + aWidths[1] = -1; + CreateStatusBar(2); + SetStatusWidths(2, aWidths); +} + +RegFrame::~RegFrame(void) +{ +} + +void RegFrame::OnQuit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void RegFrame::OnAbout(wxCommandEvent& event) +{ + wxMessageDialog dialog(this, "wxRegistry sample\n(c) 1998 Vadim Zeitlin", + "About wxRegistry", wxOK); + + dialog.ShowModal(); +} + +void RegFrame::OnTest(wxCommandEvent& event) +{ + m_treeCtrl->OnMenuTest(); +} + +void RegFrame::OnExpand(wxCommandEvent& event) +{ + m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_EXPAND); +} + +void RegFrame::OnCollapse(wxCommandEvent& event) +{ + m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_COLLAPSE); +} + +void RegFrame::OnToggle(wxCommandEvent& event) +{ + m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_TOGGLE); +} + +void RegFrame::OnDelete(wxCommandEvent& event) +{ + m_treeCtrl->DeleteSelected(); +} + +void RegFrame::OnNewKey(wxCommandEvent& event) +{ + if ( m_treeCtrl->IsKeySelected() ) { + m_treeCtrl->CreateNewKey( + wxGetTextFromUser("Enter the name of the new key")); + } +} + +void RegFrame::OnNewText(wxCommandEvent& event) +{ + if ( m_treeCtrl->IsKeySelected() ) { + m_treeCtrl->CreateNewTextValue( + wxGetTextFromUser("Enter the name for the new text value")); + } +} + +void RegFrame::OnNewBinary(wxCommandEvent& event) +{ + if ( m_treeCtrl->IsKeySelected() ) { + m_treeCtrl->CreateNewBinaryValue( + wxGetTextFromUser("Enter the name for the new binary value")); + } +} + +// ---------------------------------------------------------------------------- +// RegImageList +// ---------------------------------------------------------------------------- +RegImageList::RegImageList() : wxImageList(16, 16, TRUE) +{ + // should be in sync with enum RegImageList::RegIcon + static const char *aszIcons[] = { "key1","key2","key3","value1","value2" }; + wxString str = "icon_"; + for ( uint n = 0; n < WXSIZEOF(aszIcons); n++ ) { + Add(wxIcon(str + aszIcons[n], wxBITMAP_TYPE_ICO_RESOURCE)); + } +} + +// ---------------------------------------------------------------------------- +// RegTreeCtrl +// ---------------------------------------------------------------------------- + +// create a new tree item and insert it into the tree +RegTreeCtrl::TreeNode *RegTreeCtrl::InsertNewTreeNode(TreeNode *pParent, + const wxString& strName, + int idImage, + const wxString *pstrValue) +{ + // create new item & insert it + TreeNode *pNewNode = new TreeNode; + pNewNode->m_pTree = this; + pNewNode->m_pParent = pParent; + pNewNode->m_strName = strName; + pNewNode->m_bKey = pstrValue == NULL; + pNewNode->m_pKey = NULL; + pNewNode->m_id = InsertItem(pParent ? pParent->m_id : 0, + pNewNode->IsKey() ? strName : *pstrValue, + idImage); + + wxASSERT_MSG( pNewNode->m_id, "can't create tree control item!"); + + // save the pointer in the item + if ( !SetItemData(pNewNode->m_id, (long)pNewNode) ) { + wxFAIL_MSG("can't store item's data in tree control!"); + } + + // add it to the list of parent's children + if ( pParent != NULL ) { + pParent->m_aChildren.Add(pNewNode); + } + + // force the [+] button (@@@ not very elegant...) + if ( pNewNode->IsKey() ) + pNewNode->AddDummy(); + + return pNewNode; +} + +RegTreeCtrl::RegTreeCtrl(wxWindow *parent, wxWindowID id) + : wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, + wxTR_HAS_BUTTONS | wxSUNKEN_BORDER) +{ + // create the image list + // --------------------- + m_imageList = new RegImageList; + SetImageList(m_imageList, wxIMAGE_LIST_NORMAL); + + // create root keys + // ---------------- + m_pRoot = InsertNewTreeNode(NULL, "Registry Root", RegImageList::Root); + + // create popup menu + // ----------------- + m_pMenuPopup = CreateRegistryMenu(); +} + +RegTreeCtrl::~RegTreeCtrl() +{ + delete m_pMenuPopup; + delete m_pRoot; + delete m_imageList; +} + +void RegTreeCtrl::AddStdKeys() +{ + for ( uint ui = 0; ui < wxRegKey::nStdKeys; ui++ ) { + InsertNewTreeNode(m_pRoot, wxRegKey::GetStdKeyName(ui)); + } +} + +// ---------------------------------------------------------------------------- +// notifications +// ---------------------------------------------------------------------------- + +void RegTreeCtrl::OnRightClick(wxMouseEvent& event) +{ + int iFlags; + long lId = HitTest(wxPoint(event.GetX(), event.GetY()), iFlags); + if ( iFlags & wxTREE_HITTEST_ONITEMLABEL ) { + // popup menu only if an item was clicked + wxASSERT( lId != 0 ); + SelectItem(lId); + PopupMenu(m_pMenuPopup, event.GetX(), event.GetY()); + } +} + + +void RegTreeCtrl::OnDeleteItem(wxTreeEvent& event) +{ +} + +// test the key creation functions +void RegTreeCtrl::OnMenuTest() +{ + long lId = GetSelection(); + TreeNode *pNode = (TreeNode *)GetItemData(lId); + + wxCHECK( pNode != NULL ); + + if ( pNode->IsRoot() ) { + wxLogError("Can't create a subkey under the root key."); + return; + } + if ( !pNode->IsKey() ) { + wxLogError("Can't create a subkey under a value!"); + return; + } + + wxRegKey key1(pNode->Key(), "key1"); + if ( key1.Create() ) { + wxRegKey key2a(key1, "key2a"), key2b(key1, "key2b"); + if ( key2a.Create() && key2b.Create() ) { + // put some values under the newly created keys + key1.SetValue("first_term", "10"); + key1.SetValue("second_term", "7"); + key2a = "this is the unnamed value"; + key2b.SetValue("sum", 17); + + // refresh tree + pNode->Refresh(); + wxLogStatus("Test keys successfully added."); + return; + } + } + + wxLogError("Creation of test keys failed."); +} + +void RegTreeCtrl::OnChar(wxKeyEvent& event) +{ + if ( event.KeyCode() == WXK_DELETE ) + DeleteSelected(); + else + wxTreeCtrl::OnChar(event); +} + +void RegTreeCtrl::OnSelChanged(wxTreeEvent& event) +{ + wxFrame *pFrame = (wxFrame *)(wxWindow::GetParent()); + pFrame->SetStatusText(GetNode(event)->FullName(), 1); +} + +void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event) +{ + TreeNode *pNode = GetNode(event); + bool bExpanding = event.m_code == wxTREE_EXPAND_EXPAND; + + // expansion might take some time + wxSetCursor(*wxHOURGLASS_CURSOR); + wxLogStatus("Working..."); + wxYield(); // to give the status line a chance to refresh itself + + if ( pNode->IsKey() ) { + if ( bExpanding ) { + // expanding: add subkeys/values + if ( !pNode->OnExpand() ) + return; + } + else { + // collapsing: clean up + pNode->OnCollapse(); + } + + // change icon for non root key + if ( !pNode->IsRoot() ) { + int idIcon = bExpanding ? RegImageList::OpenedKey + : RegImageList::ClosedKey; + SetItemImage(pNode->Id(), idIcon, idIcon); + } + } + + wxLogStatus("Ok"); + wxSetCursor(*wxSTANDARD_CURSOR); +} + +// ---------------------------------------------------------------------------- +// TreeNode implementation +// ---------------------------------------------------------------------------- +bool RegTreeCtrl::TreeNode::OnExpand() +{ + // remove dummy item + if ( m_lDummy != 0 ) + m_pTree->DeleteItem(m_lDummy); + + if ( IsRoot() ) { + // we're the root key + m_pTree->AddStdKeys(); + return true; + } + + if ( Parent()->IsRoot() ) { + // we're a standard key + m_pKey = new wxRegKey(m_strName); + } + else { + // we're a normal key + m_pKey = new wxRegKey(*(Parent()->m_pKey), m_strName); + } + + if ( !m_pKey->Open() ) { + m_lDummy = 0; + wxLogError("The key '%s' can't be opened.", FullName()); + return false; + } + + // enumeration variables + long l; + wxString str; + bool bCont; + + // enumerate all subkeys + bCont = m_pKey->GetFirstKey(str, l); + while ( bCont ) { + m_pTree->InsertNewTreeNode(this, str, RegImageList::ClosedKey); + bCont = m_pKey->GetNextKey(str, l); + } + + // enumerate all values + bCont = m_pKey->GetFirstValue(str, l); + while ( bCont ) { + wxString strItem; + if (str.IsEmpty()) + strItem = ""; + else + strItem = str; + strItem += " = "; + + // determine the appropriate icon + RegImageList::Icon icon; + switch ( m_pKey->GetValueType(str) ) { + case wxRegKey::Type_String: + case wxRegKey::Type_Expand_String: + case wxRegKey::Type_Multi_String: + { + wxString strValue; + icon = RegImageList::TextValue; + m_pKey->QueryValue(str, strValue); + strItem += strValue; + } + break; + + case wxRegKey::Type_None: + // @@ handle the error... + icon = RegImageList::BinaryValue; + break; + + case wxRegKey::Type_Dword: + { + char szBuf[128]; + long l; + m_pKey->QueryValue(str, &l); + sprintf(szBuf, "%lx", l); + strItem += szBuf; + } + + // fall through + + default: + icon = RegImageList::BinaryValue; + } + + m_pTree->InsertNewTreeNode(this, str, icon, &strItem); + bCont = m_pKey->GetNextValue(str, l); + } + + return true; +} + +void RegTreeCtrl::TreeNode::OnCollapse() +{ + bool bHasChildren = !m_aChildren.IsEmpty(); + DestroyChildren(); + if ( bHasChildren ) + AddDummy(); + else + m_lDummy = 0; + + delete m_pKey; + m_pKey = NULL; +} + +void RegTreeCtrl::TreeNode::AddDummy() +{ + // insert dummy item forcing appearance of [+] button + m_lDummy = m_pTree->InsertItem(Id(), ""); +} + +void RegTreeCtrl::TreeNode::DestroyChildren() +{ + // destroy all children + uint nCount = m_aChildren.Count(); + for ( uint n = 0; n < nCount; n++ ) { + long lId = m_aChildren[n]->Id(); + delete m_aChildren[n]; + m_pTree->DeleteItem(lId); + } + + m_aChildren.Empty(); +} + +RegTreeCtrl::TreeNode::~TreeNode() +{ + DestroyChildren(); + + delete m_pKey; +} + +const char *RegTreeCtrl::TreeNode::FullName() const +{ + static wxString s_strName; + + if ( IsRoot() ) { + return "Registry Root"; + } + else { + // our own registry key might not (yet) exist or we might be a value, + // so just use the parent's and concatenate + s_strName = Parent()->FullName(); + s_strName << '\\' << m_strName; + + return s_strName; + } +} + +// ---------------------------------------------------------------------------- +// operations on RegTreeCtrl +// ---------------------------------------------------------------------------- + +void RegTreeCtrl::DeleteSelected() +{ + long lCurrent = GetSelection(), + lParent = GetParent(lCurrent); + + if ( lParent == 0 ) { + wxLogError("Can't delete root key."); + return; + } + + TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent), + *pParent = (TreeNode *)GetItemData(lParent); + + wxCHECK ( pCurrent && pParent ); + + if ( pParent->IsRoot() ) { + wxLogError("Can't delete standard key."); + return; + } + + if ( pCurrent->IsKey() ) { + if ( wxMessageBox("Do you really want to delete this key?", + "Confirmation", + wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) { + return; + } + + // must close key before deleting it + pCurrent->OnCollapse(); + + if ( pParent->Key().DeleteKey(pCurrent->m_strName) ) + pParent->Refresh(); + } + else { + if ( wxMessageBox("Do you really want to delete this value?", + "Confirmation", + wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) { + return; + } + + if ( pParent->Key().DeleteValue(pCurrent->m_strName) ) + pParent->Refresh(); + } +} + +void RegTreeCtrl::CreateNewKey(const wxString& strName) +{ + long lCurrent = GetSelection(); + TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); + + wxCHECK( pCurrent != NULL ); + + wxASSERT( pCurrent->IsKey() ); // check must have been done before + + if ( pCurrent->IsRoot() ) { + wxLogError("Can't create a new key under the root key."); + return; + } + + wxRegKey key(pCurrent->Key(), strName); + if ( key.Create() ) + pCurrent->Refresh(); +} + +void RegTreeCtrl::CreateNewTextValue(const wxString& strName) +{ + long lCurrent = GetSelection(); + TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); + + wxCHECK( pCurrent != NULL ); + + wxASSERT( pCurrent->IsKey() ); // check must have been done before + + if ( pCurrent->IsRoot() ) { + wxLogError("Can't create a new value under the root key."); + return; + } + + if ( pCurrent->Key().SetValue(strName, "") ) + pCurrent->Refresh(); +} + +void RegTreeCtrl::CreateNewBinaryValue(const wxString& strName) +{ + long lCurrent = GetSelection(); + TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); + + wxCHECK( pCurrent != NULL ); + + wxASSERT( pCurrent->IsKey() ); // check must have been done before + + if ( pCurrent->IsRoot() ) { + wxLogError("Can't create a new value under the root key."); + return; + } + + if ( pCurrent->Key().SetValue(strName, 0) ) + pCurrent->Refresh(); +} + +bool RegTreeCtrl::IsKeySelected() const +{ + long lCurrent = GetSelection(); + TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); + + wxCHECK_RET( pCurrent != NULL, false ); + + return pCurrent->IsKey(); +} \ No newline at end of file diff --git a/samples/regtest/regtest.rc b/samples/regtest/regtest.rc new file mode 100644 index 0000000000..8d688bba6f --- /dev/null +++ b/samples/regtest/regtest.rc @@ -0,0 +1,9 @@ +#include "wx/msw/wx.rc" + +app_icon ICON "registry.ico" +icon_key1 ICON "key1.ico" +icon_key2 ICON "key2.ico" +icon_key3 ICON "key3.ico" +icon_value1 ICON "value1.ico" +icon_value2 ICON "value2.ico" + diff --git a/samples/regtest/value1.ico b/samples/regtest/value1.ico new file mode 100644 index 0000000000000000000000000000000000000000..d03a5d07629452d96cc127801a9e84007d98649b GIT binary patch literal 318 zcma)2F%kkH3|z*WxhqL?t(HEI4m;C%9be)pK0!LWxB*Wa3pZpp$xavsATVN#aGV3M zx-xxoVg^iPKs)~;I&P{CA+toSmFkA|12eCf3?Dh|SiD%0&iMkAbfcNGr9vgX+Js;) p?Z}f#lcDzMuifX8y!XTukI~ z@kqeUmF3Bum2f2k5`0FS_)w$^nHH@zst+tK%-pefJaQVC-ONR%`UJGRIIPu*uE%z) oU1_5q8aelfqHIR~qmc_V)>OJKSONn30Q-A9;!out;li4LFUas}=l}o! literal 0 HcmV?d00001 diff --git a/samples/taskbar/makefile.b32 b/samples/taskbar/makefile.b32 new file mode 100644 index 0000000000..497d91192b --- /dev/null +++ b/samples/taskbar/makefile.b32 @@ -0,0 +1,64 @@ +# +# File: makefile.bcc +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds tab example + +# WXWIN and BCCDIR are set by parent make + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makeb32.env + +WXLIBDIR = $(WXDIR)\lib +WXINC = $(WXDIR)\include\msw +WXLIB = $(WXLIBDIR)\wx32.lib +LIBS=$(WXLIB) cw32 import32 ole2w32 + +TARGET=tbtest + +!if "$(FINAL)" == "0" +LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS = +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +OBJECTS = tbtest.obj + +$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res + tlink32 $(LINKFLAGS) @&&! +c0w32.obj $(OBJECTS) +$(TARGET) +nul +$(LIBS) +$(TARGET).def +! + brc32 -K $(TARGET).res + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +tbtest.obj: tbtest.$(SRCSUFF) + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + diff --git a/samples/taskbar/makefile.bcc b/samples/taskbar/makefile.bcc new file mode 100644 index 0000000000..aa2c61b4a8 --- /dev/null +++ b/samples/taskbar/makefile.bcc @@ -0,0 +1,73 @@ +# +# File: makefile.bcc +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds tbtest example (DOS). + +!if "$(BCCDIR)" == "" +!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 +!endif + +!if "$(WXWIN)" == "" +!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx +!endif + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makebcc.env + +THISDIR = $(WXDIR)\samples\taskbar +WXLIB = $(WXDIR)\lib\wx.lib +LIBS=$(WXLIB) mathwl cwl import +INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw +CFG=$(WXDIR)\src\wxwin.cfg + +!ifndef FINAL +FINAL=0 +!endif + +!if "$(FINAL)" == "0" +LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -Od +DEBUG_FLAGS= -v +!else +LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib +OPT = -O2 +DEBUG_FLAGS= +!endif +CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) + +OBJECTS = tbtest.obj + +tbtest: tbtest.exe + +all: tbtest.exe + +tbtest.exe: $(WXLIB) tbtest.obj tbtest.def tbtest.res + tlink $(LINKFLAGS) @&&! +c0wl.obj tbtest.obj +tbtest +nul +$(LIBS) +tbtest.def +! + rc -31 -K tbtest.res + +.$(SRCSUFF).obj: + bcc $(CPPFLAGS) -c {$< } + +tbtest.obj: tbtest.$(SRCSUFF) + +tbtest.res : tbtest.rc $(WXDIR)\include\msw\wx.rc + rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa tbtest + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws diff --git a/samples/taskbar/makefile.dos b/samples/taskbar/makefile.dos new file mode 100644 index 0000000000..1872f14856 --- /dev/null +++ b/samples/taskbar/makefile.dos @@ -0,0 +1,65 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds taskbar example (DOS). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\makemsc.env + +THISDIR = $(WXDIR)\samples\taskbar + +!ifndef FINAL +FINAL=0 +!endif + +HEADERS = +SOURCES = tbtest.$(SRCSUFF) +OBJECTS = tbtest.obj + +all: tbtest.exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.dos FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.dos clean + cd $(THISDIR) + +tbtest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) tbtest.obj tbtest.def tbtest.res + link $(LINKFLAGS) @<< +tbtest.obj $(WXDIR)\src\msw\dummy.obj, +tbtest, +NUL, +$(LIBS), +tbtest.def +; +<< + rc -K tbtest.res + +tbtest.obj: tbtest.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +tbtest.res : tbtest.rc $(WXDIR)\include\wx\msw\wx.rc + rc -r /i$(WXDIR)\include tbtest + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/taskbar/makefile.g95 b/samples/taskbar/makefile.g95 new file mode 100644 index 0000000000..a26fef6cd7 --- /dev/null +++ b/samples/taskbar/makefile.g95 @@ -0,0 +1,37 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile for taskbar example + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/makeg95.env + +OBJECTS = $(OBJDIR)/tbtest.$(OBJSUFF) $(OBJDIR)/tbtest_resources.$(OBJSUFF) + +all: $(OBJDIR) tbtest$(GUISUFFIX)$(EXESUFF) + +wx: + +$(OBJDIR): + mkdir $(OBJDIR) + +tbtest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) + $(CC) $(LDFLAGS) -o tbtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) + +$(OBJDIR)/tbtest.$(OBJSUFF): tbtest.$(SRCSUFF) + $(CC) -c $(CPPFLAGS) -o $@ tbtest.$(SRCSUFF) + +$(OBJDIR)/tbtest_resources.o: tbtest.rc + $(RESCOMP) -i tbtest.rc -o $(OBJDIR)/tbtest_resources.o $(RESFLAGS) + +clean: + rm -f $(OBJECTS) tbtest$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/taskbar/makefile.nt b/samples/taskbar/makefile.nt new file mode 100644 index 0000000000..459749a077 --- /dev/null +++ b/samples/taskbar/makefile.nt @@ -0,0 +1,64 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds tab example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +WXUSINGDLL=0 + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\samples\taskbar +PROGRAM=tbtest + +OBJECTS = $(PROGRAM).obj + +$(PROGRAM): $(PROGRAM).exe + +all: wx $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.nt clean + cd $(THISDIR) + +$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res + $(link) @<< +-out:$(PROGRAM).exe +$(LINKFLAGS) +$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res +$(LIBS) +<< + + +$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc + + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/samples/taskbar/mondrian.ico b/samples/taskbar/mondrian.ico new file mode 100644 index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0ZShow(TRUE); + + return TRUE; +} + +BEGIN_EVENT_TABLE(MyDialog, wxDialog) + EVT_BUTTON(wxID_OK, MyDialog::OnOK) + EVT_BUTTON(wxID_EXIT, MyDialog::OnExit) +END_EVENT_TABLE() + +MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size, const long windowStyle): + wxDialog(parent, id, title, pos, size, windowStyle) +{ + Init(); +} + +void MyDialog::OnOK(wxCommandEvent& event) +{ + Show(FALSE); +} + +void MyDialog::OnExit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void MyDialog::OnCloseWindow(wxCloseEvent& event) +{ + Destroy(); +} + +void MyDialog::Init(void) +{ + int dialogWidth = 365; + int dialogHeight = 290; + + wxStaticText* stat = new wxStaticText(this, -1, "Press OK to hide me, Exit to quit.", + wxPoint(10, 20)); + + wxStaticText* stat2 = new wxStaticText(this, -1, "Double-click on the taskbar icon to show me again.", + wxPoint(10, 40)); + + wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(100, 230), wxSize(80, 25)); + wxButton *exitButton = new wxButton(this, wxID_EXIT, "Exit", wxPoint(185, 230), wxSize(80, 25)); + okButton->SetDefault(); + this->Centre(wxBOTH); +} + +// Overridables +void MyTaskBarIcon::OnMouseMove(void) +{ +} + +void MyTaskBarIcon::OnLButtonDown(void) +{ +} + +void MyTaskBarIcon::OnLButtonUp(void) +{ +} + +void MyTaskBarIcon::OnRButtonDown(void) +{ +} + +void MyTaskBarIcon::OnRButtonUp(void) +{ +} + +void MyTaskBarIcon::OnLButtonDClick(void) +{ + dialog->Show(TRUE); +} + +void MyTaskBarIcon::OnRButtonDClick(void) +{ +} + + diff --git a/samples/taskbar/tbtest.def b/samples/taskbar/tbtest.def new file mode 100644 index 0000000000..db80cc854b --- /dev/null +++ b/samples/taskbar/tbtest.def @@ -0,0 +1,8 @@ +NAME TBTest +DESCRIPTION 'wxTaskBarIcon test' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 1024 +STACKSIZE 16192 diff --git a/samples/taskbar/tbtest.h b/samples/taskbar/tbtest.h new file mode 100644 index 0000000000..a1a01e3a56 --- /dev/null +++ b/samples/taskbar/tbtest.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: tbtest.h +// Purpose: wxTaskBarIcon sample +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// RCS-ID: $Id$ +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +class MyTaskBarIcon: public wxTaskBarIcon +{ +public: + MyTaskBarIcon() {}; + + virtual void OnMouseMove(void); + virtual void OnLButtonDown(void); + virtual void OnLButtonUp(void); + virtual void OnRButtonDown(void); + virtual void OnRButtonUp(void); + virtual void OnLButtonDClick(void); + virtual void OnRButtonDClick(void); +}; + + +// Define a new application +class MyApp: public wxApp +{ +public: + bool OnInit(void); +protected: + MyTaskBarIcon m_taskBarIcon; +}; + +class MyDialog: public wxDialog +{ +public: + MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE); + + void OnOK(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); + void OnCloseWindow(wxCloseEvent& event); + void Init(void); + +DECLARE_EVENT_TABLE() +}; + + diff --git a/samples/taskbar/tbtest.rc b/samples/taskbar/tbtest.rc new file mode 100644 index 0000000000..a05f21065a --- /dev/null +++ b/samples/taskbar/tbtest.rc @@ -0,0 +1,3 @@ +mondrian_icon ICON "mondrian.ico" +#include "wx/msw/wx.rc" + diff --git a/src/msw/ctl3d/borland/makefile.b32 b/src/msw/ctl3d/borland/makefile.b32 new file mode 100644 index 0000000000..1783689b82 --- /dev/null +++ b/src/msw/ctl3d/borland/makefile.b32 @@ -0,0 +1,25 @@ +# +# File: makefile.b32 +# Author: Andre Beltman +# Created: 1995 +# Updated: +# Copyright: (c) 1995, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Imports 32bit ctl3d library for Windows 95 +# and Borland C++ 4.x + +WXDIR = $(WXWIN) +WXLIB = $(WXDIR)\lib + +LIBTARGET= $(WXLIB)\ctl3d32.lib + +all: $(LIBTARGET) + +$(LIBTARGET): + erase $(LIBTARGET) + implib $(LIBTARGET) ..\ctl3d32.dll + +clean: + -erase $(LIBTARGET) diff --git a/src/msw/ctl3d/borland/makefile.bcc b/src/msw/ctl3d/borland/makefile.bcc new file mode 100644 index 0000000000..6a0bcdb158 --- /dev/null +++ b/src/msw/ctl3d/borland/makefile.bcc @@ -0,0 +1,25 @@ +# +# File: makefile.b32 +# Author: Andre Beltman +# Created: 1995 +# Updated: +# Copyright: (c) 1995, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Imports ctl3d library +# and Borland C++ 4.x + +WXDIR = $(WXWIN) +WXLIB = $(WXDIR)\lib + +LIBTARGET= $(WXLIB)\ctl3dv2.lib + +all: $(LIBTARGET) + +$(LIBTARGET): + erase $(LIBTARGET) + implib $(LIBTARGET) ..\ctl3dv2.dll + +clean: + -erase $(LIBTARGET) diff --git a/src/msw/ctl3d/ctl3d.dll b/src/msw/ctl3d/ctl3d.dll new file mode 100644 index 0000000000000000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g%rmCY^jQzPJi?N<0F0{kGr7 z15u%6d0D?f(npQ3wmmn|&JbrKCBH=1Mn|wTdAt>2t0Cj9ZHfP_cx%d1i{om1Mq^5U zcr_Z)!38mGQAN>@j#;S(1MKj^&&3I!e`O5$`X;uY{}mNkdebI+{kKdY9X{dx$ls21 zdX&uK;2X9}!lyRFM|=_aLbU$|>Yaci-#7{BeMlSN;A9|u)*^9VHw{6S2asQm`UjB~ zA?G*w>boqrkbLysQ*n zNCo~F3&BpiAF!3BC0jO?tf?p|wy!T)y~$ouUS3viV||FuXso=lbV>!B7*R^HLtWg5 zW}pav&ZBhQluczI#=g07)26cW3f?nnic9cir}j1M>gUG)fBS!f0}=$F8o&Q@KREPd z3V!dwFDW1T`EKMY!H}#SZ{!XFzeP@tJMma+AUkQ)CTq@ z)a>p|K&imPtecqDX^q75s|1$NNu@fTZJlT|0MGtGc+hA7p3|IB=u6hH{Y$IBwH}9P_kp^>xT{<+)`^K zzo-QOa^Xo-EhY{nw@Mmm5~zb)B#HW3yjAjyzRqryH1n~014hET73`+=mEbX%Y*5J(Qeuzle$&^!cFb)%{_@J$1T_}q_&i!88$&$WR)A((v( zdc)|e7HEi`omE&$i7>VDE6QPjC>u7GEG%7H2Ga{=>C@9^q)*S8PAyY$5QINSwrO?gw{urN zUBdeRwqSNyIjj}fFZ}PHO~FABVVPI5c}@9-O}sR_Vq?ZUJO1l`hR~iZ{zl$r;JpI} zU2{V^URGSWrh=oyU+Wu0(J1_3G#$nuiQP9jee(3l g>FAX)$LjJBlZJ!81?8(tH*XZ9k1<~(hKGLsFFx8ar~m)} literal 0 HcmV?d00001 diff --git a/src/msw/ctl3d/ctl3d32.dll b/src/msw/ctl3d/ctl3d32.dll new file mode 100644 index 0000000000000000000000000000000000000000..a4d26ed9232e1ff1805ce699f41e999d60017f0a GIT binary patch literal 26623 zcmeHw4SZD9weOyfkRi#B8E|5w1{trDHcG&m%p~)b2?+@pCFta9LM;lBOqfhVl1|PT zq)`(mK;j{lXT7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y^}H6YTaUe+~`3YlA^Mr%A%^GYUodW(XygP zivA7O#8hl4zNWaN_#cap6dx;ov-sWOiQ+GdHIC^Hy(8Okk)znLz;UhP+m2O^HIADc zw>WNh3^*QhJnwkbG3q$xJn8(*dB*8m}D~t~XpGt`A*fu0OjbTwl7h?hLoVeZD)_{SWSZ_k6eA z?RJ;B7rU$7weDr^8zA+NyVHG>yT^UId%*nz_uX7mf8l=E{TQsuGw%KF7u-kO$J{5} z@492|Ke|72|JBVr(>z(8S)Lrv#U8Wgau2pdG7+rW;{KE^mipQq^NqGhpMv7lgQ_33LDK4IRWH+U>6BxzI>3mNY4MQ>RbY(mh z%QRBldoypP@iR0OV~@*^$}3Ucq4d?DY(U(c;wf~2UL(cP@dA%uRHn&{(?jz?G56b* zb`9PSQOrJ056Pcm@fR!YB=d2Ue}Rr9qcoOf++t$vXLu%F@nwd(>=MABoqx>3rfV!_ z#*Xqf%2X=)Td_g#mqjJeOL2b-I+M(_EZuknlkXx>T%-^9Eo}BHz~euRk#5BIWBh;l zLhZx{z6WDh;x6lhhT;3MNo9P`#mGIPi{SBn7<-M%A{pqMnXL_U0hS(DZYCswDVWjsTuR$JAYtCP<2l@$k zEEBY68iz|UzQP~YgV9jN@P<^rh=wwh=cB(4&!AUB?@?0Q>77c249;mjg2K;$k9ei| nruQw?C}WwTeVS$%i}yI5QHAlRtF}OR^fLr>=`f%2Q!@V#Wj+fD literal 0 HcmV?d00001 diff --git a/src/msw/ctl3d/ctl3dv2.dll b/src/msw/ctl3d/ctl3dv2.dll new file mode 100644 index 0000000000000000000000000000000000000000..7db141d43faf23bba0e6bd7699700c002a020a72 GIT binary patch literal 27620 zcmeHwe|%KcweLQ2W+uZVpGgQm1cWdmq-X$v&?sW~oe5M7fxrZ{22sKfg@ooOVjF^E z!;FU@^;xdY?e$8r+S~SWz1D{VcrpAaL7*0p(iE+w!Qu=_(=?`GOyivUU3;H1b0!J2 zz3;ux=l#*>oc(L)aZA^pwf&znDLQS2Cf(81mw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{&xHtS_l3URzv- z-D}nQ)y2-oo^npM!=*_Tr=ytm$;Bn5m21~I%Qvlhyx6&>v&r?@;FGApXVeLH z$~}OsEGgc+30vUe)y{Rrt2Q}{%gRd2?5qbKRF#!gmQ1XGOGD&3F)Gx=R8#{+*sqtY zow%tK#5l_mXdE8kNy>*bkk`wY&Fg(0 zaa9e+r?kxby_;0EeY1Cqm;S=uO~4dQX_=31Pe%O&@0LUO3xu}=gdrtrXu-#|)JD5^ z%bWNMglh?gdAESdT5ovEcKmt6&4h*}+qN7^OiT=fIS8|D@!D)Qz<4)r-s}zUNv?gq zJsG(I53_AzYP&5S&wnPf&JTf^1i@Q5f3!PJGmiRY^lKB!r+694>7!NSFPD;MUu7PJ2{{}End35VZeRnfy)T1C1x z(0jd^0wcSiq70^|YyF1eg(YiB85@PX$ zqt1Ub{M%PV-z4Xh>C>l9!~^&3aNs|P<(HMNu6(?LqwSBfQJ_nM(Me-dCuB~UFnI!} dZ7lG(SCvH>Hkg^&va(erHUIjsUMHL5B^?;NfIOG5%;UVP^5tW=cIEfW3xptMf5{Qd0 zNEV-hFT(fX2;YG5%x=7E`^W{sN_oxt_urY>+1dQ816P47P$RCPIvY)pw197wO8UJv zi2UC2M-^YUPwA(DxQ<<(f8|E++%=Lr%$YXfD=6pNXfi*&oG*N5vl;p;BoA1mFd<6h zMdnGI=Si%brwQS!7T-Xf*Qd8Z=!X=+U0&R_3b|vFl7o03d(4jlXYRX8B!`S!Mxkp( zn)0Xp=fwvfoM7eJ{u>jbL)&GvMY2-xS!VtL60(rYA z?Ai*c|Ga;1-4%tAROYv;(J|Km?*fJ&LhG5UBf(%m!q{EW`&1%0mQH5}th`Zu6byr}6u zuai&R literal 0 HcmV?d00001 diff --git a/src/msw/ctl3d/msvc/ctl3dv2.lib b/src/msw/ctl3d/msvc/ctl3dv2.lib new file mode 100644 index 0000000000000000000000000000000000000000..9d409891423d0bbb831ccbfd315c78189b17f174 GIT binary patch literal 2560 zcmeHJ%Wl(95IrF+1=_TE6oh!Dhy|)xAkqbkEPy0Dq##9&+N@YOi4`olHcDR!{kz z`RU{DReZ_b%igbHoAobUb?Pn=-(;LF6MO|__$KO%AD>TWzO!2O{RQGSlN1!fL{^9; zk&P#^ay%&nU)At?sPXx9>xF(u9^B@`O{pL^a^yM!(JpovKM0(u@6Hk5Vz?m`^rnpl zGW+@P-a98)xTgJ@LU<@)ng4YDa}`X2`Dhu=I{Ep!P;gs0F3TVJKbU(;BS`%>q{48? zW{3zs^j0N!Ln`>o1$-U5z3^-rY6jfl2wGxcxMDIy4eX7Tqr90$aF+>exiD<&42k`m zzhienZX^|~=U=3P-O;g043qO2e-bP+hV*<(E*#Wxl0Cw=(BSu;ovToK0Pz8PP}B%V zT{yD(qrOQhz^uPiD5!>@B>S5EWCT~*-~(da{#-6BO`Ro+-`G`S_0gx|)#E2p!O~R8 zedqY?qsji0sV|n!nLBd4Kq0=z0Vq)k)4t8L_9+rRi6!wSF6n%RO8Bn+hEMV{@q*WZ zCk?9SN7o43HDUYtHIMb*`;DT*7o{h;Zgg;nA<*YvT}*zf_7xd{5@j3Y$P$@2I z+6Ly1rcR~_xt3{r>pILOMJv)=I&Eu-+%F9Eht`;WR5CW7q;-~$tfyte32 bit modes +borland/ ; Makefiles for making import libraries for Borland + diff --git a/src/msw/ctl3d/wat32/import32.zip b/src/msw/ctl3d/wat32/import32.zip new file mode 100644 index 0000000000000000000000000000000000000000..69f318ccbd57f63d280ea7bd996529795ce21f6a GIT binary patch literal 22993 zcmeFYW0Ni2wys^XT%#(=wr$(SEZeqi+qP|MmTlX%?W!}^*?T=}$By?8yb))7$&r~Y zBBNzoz2)6|znh#C2q-cT5D+BLjh6u4r!2fuItUODJ`@lT;O|uh5dmQt5n3fRr7Pt= zn@v{uF6ddl$!b8ssHJT*;q}nj9~xGAgFGE4x-PjzvoTr`0I{)1s+XrJxp`u9AZq)Q z91f~R!o&8YCzDc+wad!|7ko=dXh$wv-Hwl%uD=b}2@$%s`yLCpSypIQ*n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|(2F;cUf*4)mSq9;Zh41y}pmOpI?)(OV3U8EhMBUfI+_e*Q zMI8yeT&ENmijyO=b6!vcWL4bCcATy`{mNVm3(K|Kq)+A7LRZ>8O3ghMJ#G3+>@UXEcOQG5rrw{~qc z^ZjBqLy3TCF#IX%{Z~~_SxWJ-ycUPFlooq`x01#aj&5!hZhj4W5M)o`zJhyw3-K|V zd^f!VA(-g)MSltH776J8x4mAB4?+XcUw&O2SMJvcR3 zAka!R>{75GvobDh0O9CF1fUg$Qihy53Plbquc z{&U5Q7ytWz;J*d$KdO%F(QlF|Tn$i7_P+yMRFkg{@b9c$wke>LOP6frLquNNIOLQwz3BwD{X3k3Q<;EQZd literal 0 HcmV?d00001 diff --git a/src/msw/ctl3d/wat386/ctl3d.h b/src/msw/ctl3d/wat386/ctl3d.h new file mode 100644 index 0000000000..de7e67aa50 --- /dev/null +++ b/src/msw/ctl3d/wat386/ctl3d.h @@ -0,0 +1,61 @@ +/*----------------------------------------------------------------------- +| CTL3D.DLL +| +| Adds 3d effects to Windows controls +| +| See ctl3d.doc for info +| +-----------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" { +#endif + + +BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD); +BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD); +WORD WINAPI Ctl3dGetVer(void); +BOOL WINAPI Ctl3dEnabled(void); +HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG); // ARCHAIC, use Ctl3dCtlColorEx +HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam); +BOOL WINAPI Ctl3dColorChange(void); +BOOL WINAPI Ctl3dSubclassCtl(HWND); +LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM); + +BOOL WINAPI Ctl3dAutoSubclass(HANDLE); + +BOOL WINAPI Ctl3dRegister(HANDLE); +BOOL WINAPI Ctl3dUnregister(HANDLE); + +//begin DBCS: far east short cut key support +VOID WINAPI Ctl3dWinIniChange(void); +//end DBCS + + +/* Ctl3dSubclassDlg3d flags */ +#define CTL3D_BUTTONS 0x0001 +#define CTL3D_LISTBOXES 0x0002 +#define CTL3D_EDITS 0x0004 +#define CTL3D_COMBOS 0x0008 +#define CTL3D_STATICTEXTS 0x0010 +#define CTL3D_STATICFRAMES 0x0020 + +#define CTL3D_NODLGWINDOW 0x00010000 +#define CTL3D_ALL 0xffff + +#define WM_DLGBORDER (WM_USER+3567) +/* WM_DLGBORDER *(int FAR *)lParam return codes */ +#define CTL3D_NOBORDER 0 +#define CTL3D_BORDER 1 + +#define WM_DLGSUBCLASS (WM_USER+3568) +/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */ +#define CTL3D_NOSUBCLASS 0 +#define CTL3D_SUBCLASS 1 + +/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ +#define CTL3D_3DCHECK 26567 + + +#ifdef __cplusplus +} +#endif diff --git a/src/msw/ctl3d/wat386/ctl3d32.c b/src/msw/ctl3d/wat386/ctl3d32.c new file mode 100644 index 0000000000..67f845071e --- /dev/null +++ b/src/msw/ctl3d/wat386/ctl3d32.c @@ -0,0 +1,285 @@ +/* + * File: ctl3d32.c + * Purpose: 32bit interface to CTL3D functions for Watcom C/C++ + * Author: Patrick Halke + * Created: 1995 + * Updated: + * Copyright: (c) 1995 + */ + +#include + +#include + +#include "ctl3d.h" + +#if defined(__WINDOWS_386__) + +#ifdef __cplusplus +extern "C" { +#endif + +#undef FAR +#define FAR + +#define INDIR_INT INDIR_WORD +#define INDIR_UINT INDIR_WORD +#define INDIR_WPARAM INDIR_UINT +#define INDIR_LPARAM INDIR_DWORD +#define INDIR_LONG INDIR_DWORD +#define INDIR_ULONG INDIR_DWORD + +#ifdef STRICT +#define INDIR_HANDLE INDIR_PTR +#define INDIR_HWND INDIR_PTR +#define INDIR_HDC INDIR_PTR +#else +#define INDIR_HANDLE INDIR_UINT +#define INDIR_HWND INDIR_UINT +#define INDIR_HDC INDIR_UINT +#endif + +typedef struct tagCTL3DFUNCTIONS { + HINSTANCE dll; + /* Function Handles */ + HINDIR _Ctl3dSubclassDlg; + HINDIR _Ctl3dSubclassDlgEx; + HINDIR _Ctl3dGetVer; + HINDIR _Ctl3dEnabled; + HINDIR _Ctl3dCtlColor; + HINDIR _Ctl3dCtlColorEx; + HINDIR _Ctl3dColorChange; + HINDIR _Ctl3dSubclassCtl; + HINDIR _Ctl3dDlgFramePaint; + HINDIR _Ctl3dAutoSubclass; + HINDIR _Ctl3dRegister; + HINDIR _Ctl3dUnregister; + HINDIR _Ctl3dWinIniChange; +} CTL3DFUNCTIONS; + +static CTL3DFUNCTIONS Ctl3dFunc = { 0 }; + +static BOOL load_functions( CTL3DFUNCTIONS* functions ) +{ + FARPROC proc; + HINSTANCE dll; + + dll = LoadLibrary( "CTL3D.DLL" ); + if( dll < HINSTANCE_ERROR ) { + return( FALSE ); + } + + /* Function thunks */ + + proc = GetProcAddress(dll, "Ctl3dSubclassDlg"); + functions->_Ctl3dSubclassDlg = GetIndirectFunctionHandle( proc, + INDIR_HWND, + INDIR_WORD, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dSubclassDlgEx" ); + functions->_Ctl3dSubclassDlgEx = GetIndirectFunctionHandle( proc, + INDIR_HWND, + INDIR_DWORD, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dGetVer" ); + functions->_Ctl3dGetVer = GetIndirectFunctionHandle( proc, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dEnabled" ); + functions->_Ctl3dEnabled = GetIndirectFunctionHandle( proc, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dCtlColor" ); + functions->_Ctl3dCtlColor = GetIndirectFunctionHandle( proc, + INDIR_HDC, + INDIR_LONG, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dCtlColorEx" ); + functions->_Ctl3dCtlColorEx = GetIndirectFunctionHandle( proc, + INDIR_UINT, + INDIR_WPARAM, + INDIR_LPARAM, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dColorChange" ); + functions->_Ctl3dColorChange = GetIndirectFunctionHandle( proc, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dSubclassCtl" ); + functions->_Ctl3dSubclassCtl = GetIndirectFunctionHandle( proc, + INDIR_HWND, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dDlgFramePaint" ); + functions->_Ctl3dDlgFramePaint = GetIndirectFunctionHandle( proc, + INDIR_HWND, + INDIR_UINT, + INDIR_WPARAM, + INDIR_LPARAM, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dAutoSubclass" ); + functions->_Ctl3dAutoSubclass = GetIndirectFunctionHandle( proc, + INDIR_HANDLE, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dRegister" ); + functions->_Ctl3dRegister = GetIndirectFunctionHandle( proc, + INDIR_HANDLE, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dUnregister" ); + functions->_Ctl3dUnregister = GetIndirectFunctionHandle( proc, + INDIR_HANDLE, + INDIR_ENDLIST ); + + proc = GetProcAddress( dll, "Ctl3dWinIniChange" ); + functions->_Ctl3dWinIniChange = GetIndirectFunctionHandle( proc, + INDIR_ENDLIST ); + + functions->dll = dll; + return( TRUE ); +} + +static void unload_functions( CTL3DFUNCTIONS * functions ) +{ + FreeLibrary( functions->dll ); + functions->dll = 0; +} + +/* Function Definitions */ + +BOOL WINAPI Ctl3dSubclassDlg(HWND hwnd, WORD w) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlg, + hwnd, w); +} + +BOOL WINAPI Ctl3dSubclassDlgEx(HWND hwnd, DWORD dw) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlgEx, + hwnd, dw); +} + +WORD WINAPI Ctl3dGetVer(void) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (WORD)InvokeIndirectFunction(Ctl3dFunc._Ctl3dGetVer); +} + +BOOL WINAPI Ctl3dEnabled(void) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dEnabled); +} + +HBRUSH WINAPI Ctl3dCtlColor(HDC hdc, LONG l) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColor, + hdc, l); +} + +HBRUSH WINAPI Ctl3dCtlColorEx(UINT ui, WPARAM wp, LPARAM lp) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColorEx, + ui, wp, lp); +} + +BOOL WINAPI Ctl3dColorChange(void) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dColorChange); +} + +BOOL WINAPI Ctl3dSubclassCtl(HWND hwnd) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassCtl, + hwnd); +} + +LONG WINAPI Ctl3dDlgFramePaint(HWND hwnd, UINT ui, WPARAM wp, LPARAM lp) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (LONG)InvokeIndirectFunction(Ctl3dFunc._Ctl3dDlgFramePaint, + hwnd, ui, wp, lp); +} + +BOOL WINAPI Ctl3dAutoSubclass(HANDLE hnd) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dAutoSubclass, + hnd); +} + +BOOL WINAPI Ctl3dRegister(HANDLE hnd) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dRegister, + hnd); +} + +BOOL WINAPI Ctl3dUnregister(HANDLE hnd) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return FALSE; + + return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dUnregister, + hnd); +} + +VOID WINAPI Ctl3dWinIniChange(void) +{ + if (!Ctl3dFunc.dll) + if (!load_functions(&Ctl3dFunc)) + return; + + InvokeIndirectFunction(Ctl3dFunc._Ctl3dWinIniChange); +} + +#ifdef __cplusplus +} +#endif + +#endif // __WINDOWS_386__ diff --git a/src/msw/ctl3d/wat386/ctl3d32.lnk b/src/msw/ctl3d/wat386/ctl3d32.lnk new file mode 100644 index 0000000000..2ada8d2a55 --- /dev/null +++ b/src/msw/ctl3d/wat386/ctl3d32.lnk @@ -0,0 +1 @@ ++-ctl3d32.obj diff --git a/src/msw/ctl3d/wat386/ctl3d32.obj b/src/msw/ctl3d/wat386/ctl3d32.obj new file mode 100644 index 0000000000000000000000000000000000000000..2fe304562567eadf6b2bb277e5d5920a5796537b GIT binary patch literal 6699 zcmbVR4Ro7T8GgSnX_Ee&CQI9NTgRwdQwAK$)(T^DQ<8k&*JS&egd|;7DU_^DmyRx- zNje4|p)!ybHhw%%f1pYM?yliq zOgm`m3z2wt_j=c~ou=;Z8IA0Fn_F)yk|mItzJR7)-!S;{>a!T@chhZ9rsy-Pnua$I z=JyR=H$0db+?yI7pBV1S?4NEoq|2+M*NtTd@&Cxgb@{H$#b;C*f=92V)w ztb=TV+x=N)gG;p*=@C{Q;t5`3?xool+Q>SD8CUT5tXglCUYm83O;P>vfxg;~ z4xm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_n zGx{;`SM)pJtHd7vExipalLO9ujaq@fr#9g0^d8`!h~58ZiUI#ZgTTMiwZMPSjlef) z8u(9|1-?ZO0{=x{0{(}-3p`0L0ww9EK&%SrEq;e=8SKVRFB|5ApHN~d$$y8D{N^!@ zI&r?24UAQ59a_Jta+)vt3OdirRxTRuurXZqcjsC!n|oR{^MlpvWt&f{VtnxalV1y; zhfVxixTE+u**}W6&DNC7__Q?bhk@#WmXv%d+n%CrBje*OZt12%YPZ<$T7Ni@2;n^x z7p1AG#Vo5f^pr7^=fRsTUYZIy;d(3%)e1r z3(S}4YMwC)zek_mrlZAsNO}fQIe*$XKpL; zH2gl*D_OdWrTE;E_&#l)zg{_3-{U7)s?^z-+8c@|)EMto zqt5n+O(yS7qedn}VfCpe5L@?u{yXdnZ9oPuD^Q-{KD{-?^P9{x5Z>mO20c literal 0 HcmV?d00001 diff --git a/src/msw/ctl3d/wat386/ctl3d32.txt b/src/msw/ctl3d/wat386/ctl3d32.txt new file mode 100644 index 0000000000..8e6b8b6e6b --- /dev/null +++ b/src/msw/ctl3d/wat386/ctl3d32.txt @@ -0,0 +1,11 @@ +Using this package should be no big problem. You only need to change your +wx_setup.h for including the CTL3D stuff, compile ctl3d32.c and add +ctl3d32.obj to wx.lib (or just link it with your application). + +Please send bug reports to 'patrick@zaphod.ruhr.de'. + + +Good luck + +- patrick + diff --git a/src/msw/ctl3d/wat386/makefile.wat b/src/msw/ctl3d/wat386/makefile.wat new file mode 100644 index 0000000000..1f0858491a --- /dev/null +++ b/src/msw/ctl3d/wat386/makefile.wat @@ -0,0 +1,23 @@ +CC = wcc386 +CXX = wpp386 +LIB = wlib +IFLAGS = -i=..\\..\\include\\base;..\\..\\include\\msw +CFLAGS = $(IFLAGS) -zq -zW -w1 -d2 -ot -3 -dwx_msw + +WXDIR = ..\\.. +LIBTARGET = $(WXDIR)\\lib\\wx.lib + +C_SRCS = ctl3d32.c + +OBJECTS = $(C_SRCS:.c=.obj) $(CC_SRCS:.cc=.obj) + +.c.obj: + $(CC) $(CFLAGS) $< + +.cc.obj: + $(CXX) $(CFLAGS) $< + +all: $(OBJECTS) $(LIBTARGET) + +$(LIBTARGET): $(OBJECTS) + $(LIB) /P=256 $(LIBTARGET) @ctl3d32.lnk diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp new file mode 100644 index 0000000000..7ff89237d5 --- /dev/null +++ b/src/msw/ole/droptgt.cpp @@ -0,0 +1,459 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ole/droptgt.cpp +// Purpose: wxDropTarget implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifdef __GNUG__ +#pragma implementation "droptgt.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#define IN_WX_MAIN_CPP +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) +#pragma hdrstop +#endif + +#include + +#if USE_DRAG_AND_DROP + +#include + +#ifdef __WIN32__ +#ifndef __GNUWIN32__ +#include // for DROPFILES structure +#endif +#else +#include +#endif + +#include + +#ifndef __WIN32__ +#include +#include +#endif + +#include + +// ---------------------------------------------------------------------------- +// IDropTarget interface: forward all interesting things to wxDropTarget +// (the name is unfortunate, but wx_I_DropTarget is not at all the same thing +// as wxDropTarget which is 'public' class, while this one is private) +// ---------------------------------------------------------------------------- + +class wxIDropTarget : public IDropTarget +{ +public: + wxIDropTarget(wxDropTarget *p); + ~wxIDropTarget(); + + // IDropTarget methods + STDMETHODIMP DragEnter(LPDATAOBJECT, DWORD, POINTL, LPDWORD); + STDMETHODIMP DragOver(DWORD, POINTL, LPDWORD); + STDMETHODIMP DragLeave(void); + STDMETHODIMP Drop(LPDATAOBJECT, DWORD, POINTL, LPDWORD); + + // @@ we assume that if QueryGetData() returns S_OK, than we can really + // get data in this format, so we remember here the format for which + // QueryGetData() succeeded + void SetSupportedFormat(wxDataFormat cfFormat) { m_cfFormat = cfFormat; } + + DECLARE_IUNKNOWN_METHODS; + +protected: + IDataObject *m_pIDataObject; // !NULL between DragEnter and DragLeave/Drop + wxDropTarget *m_pTarget; // the real target (we're just a proxy) + + wxDataFormat m_cfFormat; // the format in which to ask for data + +private: + static inline DWORD GetDropEffect(DWORD flags); +}; + +// ============================================================================ +// wxIDropTarget implementation +// ============================================================================ + +// Name : static wxDropTarget::GetDropEffect +// Purpose : determine the drop operation from keyboard/mouse state. +// Returns : DWORD combined from DROPEFFECT_xxx constants +// Params : [in] DWORD flags kbd & mouse flags as passed to +// IDropTarget methods +// Notes : We do "move" normally and "copy" if is pressed, +// which is the standard behaviour (currently there is no +// way to redefine it) +DWORD wxIDropTarget::GetDropEffect(DWORD flags) +{ + return flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE; +} + +wxIDropTarget::wxIDropTarget(wxDropTarget *pTarget) +{ + m_cRef = 0; + m_pTarget = pTarget; + m_cfFormat = 0; + m_pIDataObject = NULL; +} + +wxIDropTarget::~wxIDropTarget() +{ +} + +BEGIN_IID_TABLE(wxIDropTarget) + ADD_IID(Unknown) + ADD_IID(DropTarget) +END_IID_TABLE; + +IMPLEMENT_IUNKNOWN_METHODS(wxIDropTarget) + +#if 0 + STDMETHODIMP wxIDropTarget::QueryInterface(REFIID riid, void **ppv) + { +// wxLogQueryInterface(wxIDropTarget, riid); + + if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { + *ppv = this; + AddRef(); + + return S_OK; + } + else { + *ppv = NULL; + + return (HRESULT) E_NOINTERFACE; + } + } + + STDMETHODIMP_(ULONG) wxIDropTarget::AddRef() + { + wxLogAddRef(wxIDropTarget, m_cRef); + + return ++m_cRef; + } + + STDMETHODIMP_(ULONG) wxIDropTarget::Release() + { + wxLogRelease(wxIDropTarget, m_cRef); + + if ( --m_cRef == 0 ) { + delete this; + return 0; + } + else + return m_cRef; + } +#endif + +// Name : wxIDropTarget::DragEnter +// Purpose : Called when the mouse enters the window (dragging something) +// Returns : S_OK +// Params : [in] IDataObject *pIDataSource : source data +// [in] DWORD grfKeyState : kbd & mouse state +// [in] POINTL pt : mouse coordinates +// [out]DWORD *pdwEffect : effect flag +// Notes : +STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource, + DWORD grfKeyState, + POINTL pt, + DWORD *pdwEffect) +{ + wxLogDebug("IDropTarget::DragEnter"); + + wxASSERT( m_pIDataObject == NULL ); + + if ( !m_pTarget->IsAcceptedData(pIDataSource) ) { + // we don't accept this kind of data + *pdwEffect = DROPEFFECT_NONE; + + return S_OK; + } + + // @@ should check the point also? + + *pdwEffect = GetDropEffect(grfKeyState); + + // get hold of the data object + m_pIDataObject = pIDataSource; + m_pIDataObject->AddRef(); + + // give some visual feedback + m_pTarget->OnEnter(); + + return S_OK; +} + +// Name : wxIDropTarget::DragOver +// Purpose : Indicates that the mouse was moved inside the window represented +// by this drop target. +// Returns : S_OK +// Params : [in] DWORD grfKeyState kbd & mouse state +// [in] POINTL pt mouse coordinates +// [out]LPDWORD pdwEffect effect flag +// Notes : We're called on every WM_MOUSEMOVE, so this function should be +// very efficient. +STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState, + POINTL pt, + LPDWORD pdwEffect) +{ + // there are too many of them... wxLogDebug("IDropTarget::DragOver"); + + *pdwEffect = m_pIDataObject == NULL ? DROPEFFECT_NONE + : GetDropEffect(grfKeyState); + return S_OK; +} + +// Name : wxIDropTarget::DragLeave +// Purpose : Informs the drop target that the operation has left its window. +// Returns : S_OK +// Notes : good place to do any clean-up +STDMETHODIMP wxIDropTarget::DragLeave() +{ + wxLogDebug("IDropTarget::DragLeave"); + + // remove the UI feedback + m_pTarget->OnLeave(); + + // release the held object + RELEASE_AND_NULL(m_pIDataObject); + + return S_OK; +} + +// Name : wxIDropTarget::Drop +// Purpose : Instructs the drop target to paste data that was just now +// dropped on it. +// Returns : S_OK +// Params : [in] IDataObject *pIDataSource the data to paste +// [in] DWORD grfKeyState kbd & mouse state +// [in] POINTL pt where the drop occured? +// [ouy]DWORD *pdwEffect operation effect +// Notes : +STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource, + DWORD grfKeyState, + POINTL pt, + DWORD *pdwEffect) +{ + wxLogDebug("IDropTarget::Drop"); + + // @@ I don't know why there is this parameter, but so far I assume + // that it's the same we've already got in DragEnter + wxASSERT( m_pIDataObject == pIDataSource ); + + STGMEDIUM stm; + *pdwEffect = DROPEFFECT_NONE; + + // should be set by SetSupportedFormat() call + wxASSERT( m_cfFormat != 0 ); + + FORMATETC fmtMemory; + fmtMemory.cfFormat = m_cfFormat; + fmtMemory.ptd = NULL; + fmtMemory.dwAspect = DVASPECT_CONTENT; + fmtMemory.lindex = -1; + fmtMemory.tymed = TYMED_HGLOBAL; // @@@@ to add other media + + HRESULT hr = pIDataSource->GetData(&fmtMemory, &stm); + if ( SUCCEEDED(hr) ) { + if ( stm.hGlobal != NULL ) { + if ( m_pTarget->OnDrop(pt.x, pt.y, GlobalLock(stm.hGlobal)) ) + *pdwEffect = GetDropEffect(grfKeyState); + //else: DROPEFFECT_NONE + + GlobalUnlock(stm.hGlobal); + ReleaseStgMedium(&stm); + } + } + else + { + // wxLogApiError("GetData", hr); + } + + // release the held object + RELEASE_AND_NULL(m_pIDataObject); + + return S_OK; +} + +// ============================================================================ +// wxDropTarget implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// ctor/dtor +// ---------------------------------------------------------------------------- + +wxDropTarget::wxDropTarget() +{ + // create an IDropTarget implementation which will notify us about + // d&d operations. + m_pIDropTarget = new wxIDropTarget(this); + m_pIDropTarget->AddRef(); +} + +wxDropTarget::~wxDropTarget() +{ + ReleaseInterface(m_pIDropTarget); +} + +// ---------------------------------------------------------------------------- +// [un]register drop handler +// ---------------------------------------------------------------------------- + +bool wxDropTarget::Register(WXHWND hwnd) +{ + HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE); + if ( FAILED(hr) ) { + // wxLogApiError("CoLockObjectExternal", hr); + return FALSE; + } + + hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget); + if ( FAILED(hr) ) { + ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE); + + // wxLogApiError("RegisterDragDrop", hr); + return FALSE; + } + + return TRUE; +} + +void wxDropTarget::Revoke(WXHWND hwnd) +{ + HRESULT hr = ::RevokeDragDrop((HWND) hwnd); + + if ( FAILED(hr) ) + { + // wxLogApiError("RevokeDragDrop", hr); + } + + ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE); +} + +// ---------------------------------------------------------------------------- +// determine if we accept data of this type +// ---------------------------------------------------------------------------- +bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const +{ + // this strucutre describes a data of any type (first field will be + // changing) being passed through global memory block. + static FORMATETC s_fmtMemory = { + 0, + NULL, + DVASPECT_CONTENT, + -1, + TYMED_HGLOBAL + }; + + // cycle thorugh all supported formats + for ( size_t n = 0; n < GetFormatCount(); n++ ) { + s_fmtMemory.cfFormat = GetFormat(n); + // @ don't use SUCCEEDED macro here: QueryGetData returns 1 (whatever it + // means) for file drag and drop + if ( pIDataSource->QueryGetData(&s_fmtMemory) == S_OK ) { + // remember this format: we'll later ask for data in it + m_pIDropTarget->SetSupportedFormat(s_fmtMemory.cfFormat); + return TRUE; + } + } + + return FALSE; +} + +// ============================================================================ +// wxTextDropTarget +// ============================================================================ + +bool wxTextDropTarget::OnDrop(long x, long y, const void *pData) +{ + return OnDropText(x, y, (const char *)pData); +} + +size_t wxTextDropTarget::GetFormatCount() const +{ + return 1; +} + +wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const +{ + return CF_TEXT; +} + +// ============================================================================ +// wxFileDropTarget +// ============================================================================ + +bool wxFileDropTarget::OnDrop(long x, long y, const void *pData) +{ + // the documentation states that the first member of DROPFILES structure + // is a "DWORD offset of double NUL terminated file list". What they mean by + // this (I wonder if you see it immediately) is that the list starts at + // ((char *)&(pDropFiles.pFiles)) + pDropFiles.pFiles. We're also advised to + // use DragQueryFile to work with this structure, but not told where and how + // to get HDROP. + HDROP hdrop = (HDROP)pData; // @@ it works, but I'm not sure about it + + // get number of files (magic value -1) + UINT nFiles = ::DragQueryFile(hdrop, -1, NULL, 0); + + // for each file get the length, allocate memory and then get the name + char **aszFiles = new char *[nFiles]; + UINT len, n; + for ( n = 0; n < nFiles; n++ ) { + // +1 for terminating NUL + len = ::DragQueryFile(hdrop, n, NULL, 0) + 1; + + aszFiles[n] = new char[len]; + + UINT len2 = ::DragQueryFile(hdrop, n, aszFiles[n], len); + if ( len2 != len - 1 ) { + wxLogDebug("In wxFileDropTarget::OnDrop DragQueryFile returned %d " + "characters, %d expected.", len2, len - 1); + } + } + + bool bResult = OnDropFiles(x, y, nFiles, (const char**) aszFiles); + + // free memory + for ( n = 0; n < nFiles; n++ ) { + delete [] aszFiles[n]; + } + delete [] aszFiles; + + return bResult; +} + +size_t wxFileDropTarget::GetFormatCount() const +{ + return 1; +} + +wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const +{ +#ifdef __WIN32__ + return CF_HDROP; +#else + // TODO: how to implement this in WIN16? + return CF_TEXT; +#endif +} + +#endif + // USE_DRAG_AND_DROP diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp new file mode 100644 index 0000000000..39165f2aac --- /dev/null +++ b/src/msw/ole/oleutils.cpp @@ -0,0 +1,193 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ole/oleutils.cpp +// Purpose: implementation of OLE helper functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.02.98 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifdef __GNUG__ +#pragma implementation "oleutils.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#define IN_WX_MAIN_CPP +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) +#pragma hdrstop +#endif + +#include + +#if USE_DRAG_AND_DROP + +#include + +#include + +// OLE +#include +#include + +#ifndef __BORLANDC__ +#include +#endif + +// ============================================================================ +// Implementation +// ============================================================================ + +// return TRUE if the iid is in the array +bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount) +{ + for ( size_t i = 0; i < nCount; i++ ) { + if ( riid == *aIids[i] ) + return TRUE; + } + + return FALSE; +} + +// ---------------------------------------------------------------------------- +// Debug support +// ---------------------------------------------------------------------------- + +#ifdef __DEBUG__ + +const char *GetIidName(REFIID riid) +{ + // an association between symbolic name and numeric value of an IID + struct KNOWN_IID { + const IID *pIid; + const char *szName; + }; + + // construct the table containing all known interfaces + #define ADD_KNOWN_IID(name) { &IID_I##name, #name } + + static const KNOWN_IID aKnownIids[] = { + ADD_KNOWN_IID(AdviseSink), + ADD_KNOWN_IID(AdviseSink2), + ADD_KNOWN_IID(BindCtx), + ADD_KNOWN_IID(ClassFactory), + ADD_KNOWN_IID(ContinueCallback), + ADD_KNOWN_IID(EnumOleDocumentViews), + ADD_KNOWN_IID(OleCommandTarget), + ADD_KNOWN_IID(OleDocument), + ADD_KNOWN_IID(OleDocumentSite), + ADD_KNOWN_IID(OleDocumentView), + ADD_KNOWN_IID(Print), + ADD_KNOWN_IID(DataAdviseHolder), + ADD_KNOWN_IID(DataObject), + ADD_KNOWN_IID(Debug), + ADD_KNOWN_IID(DebugStream), + ADD_KNOWN_IID(DfReserved1), + ADD_KNOWN_IID(DfReserved2), + ADD_KNOWN_IID(DfReserved3), + ADD_KNOWN_IID(Dispatch), + ADD_KNOWN_IID(DropSource), + ADD_KNOWN_IID(DropTarget), + ADD_KNOWN_IID(EnumCallback), + ADD_KNOWN_IID(EnumFORMATETC), + ADD_KNOWN_IID(EnumGeneric), + ADD_KNOWN_IID(EnumHolder), + ADD_KNOWN_IID(EnumMoniker), + ADD_KNOWN_IID(EnumOLEVERB), + ADD_KNOWN_IID(EnumSTATDATA), + ADD_KNOWN_IID(EnumSTATSTG), + ADD_KNOWN_IID(EnumString), + ADD_KNOWN_IID(EnumUnknown), + ADD_KNOWN_IID(EnumVARIANT), + ADD_KNOWN_IID(ExternalConnection), + ADD_KNOWN_IID(InternalMoniker), + ADD_KNOWN_IID(LockBytes), + ADD_KNOWN_IID(Malloc), + ADD_KNOWN_IID(Marshal), + ADD_KNOWN_IID(MessageFilter), + ADD_KNOWN_IID(Moniker), + ADD_KNOWN_IID(OleAdviseHolder), + ADD_KNOWN_IID(OleCache), + ADD_KNOWN_IID(OleCache2), + ADD_KNOWN_IID(OleCacheControl), + ADD_KNOWN_IID(OleClientSite), + ADD_KNOWN_IID(OleContainer), + ADD_KNOWN_IID(OleInPlaceActiveObject), + ADD_KNOWN_IID(OleInPlaceFrame), + ADD_KNOWN_IID(OleInPlaceObject), + ADD_KNOWN_IID(OleInPlaceSite), + ADD_KNOWN_IID(OleInPlaceUIWindow), + ADD_KNOWN_IID(OleItemContainer), + ADD_KNOWN_IID(OleLink), + ADD_KNOWN_IID(OleManager), + ADD_KNOWN_IID(OleObject), + ADD_KNOWN_IID(OlePresObj), + ADD_KNOWN_IID(OleWindow), + ADD_KNOWN_IID(PSFactory), + ADD_KNOWN_IID(ParseDisplayName), + ADD_KNOWN_IID(Persist), + ADD_KNOWN_IID(PersistFile), + ADD_KNOWN_IID(PersistStorage), + ADD_KNOWN_IID(PersistStream), + ADD_KNOWN_IID(ProxyManager), + ADD_KNOWN_IID(RootStorage), + ADD_KNOWN_IID(RpcChannel), + ADD_KNOWN_IID(RpcProxy), + ADD_KNOWN_IID(RpcStub), + ADD_KNOWN_IID(RunnableObject), + ADD_KNOWN_IID(RunningObjectTable), + ADD_KNOWN_IID(StdMarshalInfo), + ADD_KNOWN_IID(Storage), + ADD_KNOWN_IID(Stream), + ADD_KNOWN_IID(StubManager), + ADD_KNOWN_IID(Unknown), + ADD_KNOWN_IID(ViewObject), + ADD_KNOWN_IID(ViewObject2), + }; + + // don't clobber preprocessor name space + #undef ADD_KNOWN_IID + + // try to find the interface in the table + for ( uint ui = 0; ui < WXSIZEOF(aKnownIids); ui++ ) { + if ( riid == *aKnownIids[ui].pIid ) { + return aKnownIids[ui].szName; + } + } + + // unknown IID, just transform to string + static Uuid s_uuid; + s_uuid.Set(riid); + return s_uuid; +} + +void wxLogQueryInterface(const char *szInterface, REFIID riid) +{ + wxLogTrace("%s::QueryInterface (iid = %s)", szInterface, GetIidName(riid)); +} + +void wxLogAddRef(const char *szInterface, ULONG cRef) +{ + wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1); +} + +void wxLogRelease(const char *szInterface, ULONG cRef) +{ + wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1); +} + +#endif //DEBUG + +#endif + // USE_DRAG_AND_DROP diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp new file mode 100644 index 0000000000..31e73a27fd --- /dev/null +++ b/src/msw/ole/uuid.cpp @@ -0,0 +1,153 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: ole/uuid.cpp +// Purpose: implements Uuid class, see uuid.h for details +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.09.96 +// RCS-ID: $Id$ +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Declarations +// ============================================================================ + +#ifdef __GNUG__ +#pragma implementation "uuid.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#define IN_WX_MAIN_CPP +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) +#pragma hdrstop +#endif + +#include + +#if USE_DRAG_AND_DROP + +// standard headers +#include // UUID related functions + +#include + + + +// ============================================================================ +// Implementation +// ============================================================================ + +// length of UUID in C format +#define UUID_CSTRLEN 100 // real length is 66 + +// copy ctor +Uuid::Uuid(const Uuid& uuid) +{ + // bitwise copy Ok for UUIDs + m_uuid = uuid.m_uuid; + + // force the string to be allocated by RPC + // (we free it later with RpcStringFree) + UuidToString(&m_uuid, &m_pszUuid); + + // allocate new buffer + m_pszCForm = new char[UUID_CSTRLEN]; + // and fill it + memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN); +} + +// assignment operator +Uuid& Uuid::operator=(const Uuid& uuid) +{ + m_uuid = uuid.m_uuid; + + // force the string to be allocated by RPC + // (we free it later with RpcStringFree) + UuidToString(&m_uuid, &m_pszUuid); + + // allocate new buffer if not done yet + if ( !m_pszCForm ) + m_pszCForm = new char[UUID_CSTRLEN]; + + // and fill it + memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN); + + return *this; +} + +// dtor +Uuid::~Uuid() +{ + // this string must be allocated by RPC! + // (otherwise you get a debug breakpoint deep inside RPC DLL) + if ( m_pszUuid ) + RpcStringFree(&m_pszUuid); + + // perhaps we should just use a static buffer and not bother + // with new and delete? + if ( m_pszCForm ) + delete [] m_pszCForm; +} + +// update string representation of new UUID +void Uuid::Set(const UUID &uuid) +{ + m_uuid = uuid; + + // get string representation + UuidToString(&m_uuid, &m_pszUuid); + + // cache UUID in C format + UuidToCForm(); +} + +// create a new UUID +void Uuid::Create() +{ + UUID uuid; + + // can't fail + UuidCreate(&uuid); + + Set(uuid); +} + +// set the value +bool Uuid::Set(const char *pc) +{ + // get UUID from string + if ( UuidFromString((uchar *)pc, &m_uuid) != RPC_S_OK) + // failed: probably invalid string + return FALSE; + + // transform it back to string to normalize it + UuidToString(&m_uuid, &m_pszUuid); + + // update m_pszCForm + UuidToCForm(); + + return TRUE; +} + +// stores m_uuid in m_pszCForm in a format required by +// DEFINE_GUID macro: i.e. something like +// 0x7D8A2281L,0x4C61,0x11D0,0xBA,0xBD,0x00,0x00,0xC0,0x18,0xBA,0x27 +// m_pszUuid is of the form (no, it's not quite the same UUID :-) +// 6aadc650-67b0-11d0-bac8-0000c018ba27 +void Uuid::UuidToCForm() +{ + if ( m_pszCForm == NULL ) + m_pszCForm = new char[UUID_CSTRLEN]; + + wsprintf(m_pszCForm, "0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X," + "0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X", + m_uuid.Data1, m_uuid.Data2, m_uuid.Data3, + m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4], + m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]); +} + +#endif + // USE_DRAG_AND_DROP diff --git a/utils/nplugin/docs/notes.txt b/utils/nplugin/docs/notes.txt new file mode 100644 index 0000000000..ee3d1412ea --- /dev/null +++ b/utils/nplugin/docs/notes.txt @@ -0,0 +1,32 @@ +Notes about plugins + + + I have users that want to visit my pages with tclets, but they do not + have the plugin. What can I do? + + Add a pluginspage=http://www.sunlabs.com/tcl/plugin/ name=value + pair to the embed statement. This will cause Navigator to find + the plugin for your user and suggest they install it. The user + is then prompted to download and install the plugin, and then she + has to restart the browser and revisit your page. Very inconvenient + and only slightly better than giving your users the broken image + icon. Netscape says they are working on a more automatic solution. + + + + +14. Your demos work just fine, but when I visit my own pages with tclets in + them, at http://www.myserver.com/~mypages/mypage.html, I still get the + broken image icon. Why doesn't it work for me? + + This is likely because your web server -- the program that sends + the pages to your browser when you click on a URL -- is not + sending the right mime-type when it sends the '.tcl' file. You + can work around this by adding a type=application/x-tcl name=value + pair to the embed statement, which will cause Navigator to infer + that it should use the Tcl plugin anyways. A better solution is + to ask your system administrator to configure the web server to + send the mime type application/x-tcl when it sends files with a + '.tcl' extension. Nearly all web servers in the world nowadays + are already configured to do this, the only ones we are aware of + that do not are some older versions of Apache. diff --git a/utils/nplugin/lib/dummy b/utils/nplugin/lib/dummy new file mode 100644 index 0000000000..bfdf726d49 --- /dev/null +++ b/utils/nplugin/lib/dummy @@ -0,0 +1 @@ +I'm just here to force the creation of a LIB directory. diff --git a/utils/nplugin/samples/gui/gui.cpp b/utils/nplugin/samples/gui/gui.cpp new file mode 100644 index 0000000000..3ae118fda0 --- /dev/null +++ b/utils/nplugin/samples/gui/gui.cpp @@ -0,0 +1,186 @@ +/* + * File: simple.cpp + * Purpose: Minimal wxWindows plugin + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +/* static const char sccsid[] = "%W% %G%"; */ + +#ifdef __GNUG__ +#pragma implementation +#pragma interface +#endif + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include + +#include "NPApp.h" +#include "NPFrame.h" + +#define ID_HELLO 10 + +// Define a new application type +class MyApp: public wxPluginApp +{ public: + virtual wxFrame *OnInit(void); + virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); +}; + +// Define a new frame type +class MyFrame: public wxPluginFrame +{ public: + MyFrame(const wxPluginData& data); + + public: + // Let's paint directly onto the 'frame'; we don't need a subwindow + void OnPaint(wxPaintEvent& event); + void OnMouseEvent(wxMouseEvent& event); + void OnHello(wxCommandEvent& event); + + // Called when the file has been downloaded + virtual void OnNPNewFile(NPStream *stream, const wxString& fname); + + void CentreStrings(wxDC& dc); + + DECLARE_EVENT_TABLE() + + protected: + wxStringList m_strings; + float m_xpos; + float m_ypos; +}; + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_SIZE(MyFrame::OnSize) + EVT_PAINT(MyFrame::OnPaint) + EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent) + EVT_BUTTON(ID_HELLO, MyFrame::OnHello) +END_EVENT_TABLE() + +IMPLEMENT_APP(MyApp) + +// No app initialisation necessary, and for a plugin there is no +// top frame. +wxFrame *MyApp::OnInit(void) +{ + return NULL; +} + +// Called whenever a new plugin instance is called. We could check +// various things here in 'data' but we won't bother. +wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data) +{ + // Implicitly added to list of plugin frames + return new MyFrame(data); +} + +// My frame constructor +MyFrame::MyFrame(const wxPluginData& data): + wxPluginFrame(data) +{ + m_xpos = -1; + m_ypos = -1; + + wxMenuBar *menuBar = new wxMenuBar; + wxMenu *menu = new wxMenu; + menu->Append(1, "E&xit"); + menuBar->Append(menu, "&File"); + + SetMenuBar(menuBar); + + new wxTextCtrl(this, -1, "", wxPoint(10, 30), wxSize(200, 25), wxSUNKEN_BORDER); + new wxButton(this, ID_HELLO, "Hello", wxPoint(10, 70)); +} + +void MyFrame::OnPaint(wxPaintEvent& event) +{ + wxPaintDC dc(this); + + dc.SetBrush(*wxCYAN_BRUSH); + dc.SetPen(*wxRED_PEN); + + int w, h; + GetClientSize(&w, &h); + + dc.DrawRectangle(0, 0, w, h); + + wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL); + dc.SetFont(swissFont); + dc.SetBackgroundMode(wxTRANSPARENT); + + CentreStrings(dc); +} + +// Called when the file has been downloaded +void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname) +{ + ifstream str(fname); + char buf[201]; + + while ( !str.eof() ) + { + buf[0] = 0; + str.getline(buf, 200); + + if ( buf[0] != 0 ) + m_strings.Add(buf); + } + Refresh(); +} + +void MyFrame::CentreStrings(wxDC& dc) +{ + int y = 5; + int cw, ch; + GetClientSize(&cw, &ch); + + wxNode *node = m_strings.First(); + while ( node ) + { + char *s = (char *)node->Data(); + float w, h; + dc.GetTextExtent(s, &w, &h); + + int x = wxMax(0, (cw - w)/2); + dc.DrawText(s, x, y); + + y += h + (h/2); + + node = node->Next(); + } +} + +// This implements a tiny doodling program. Drag the mouse using +// the left button. +void MyFrame::OnMouseEvent(wxMouseEvent& event) +{ + float x, y; + event.Position(&x, &y); + wxClientDC dc(this); + + if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown()) + { + dc.SetPen(wxBLACK_PEN); + dc.SetBrush(wxTRANSPARENT_BRUSH); + dc.DrawLine(m_xpos, m_ypos, x, y); + } + m_xpos = x; + m_ypos = y; +} + +void MyFrame::OnHello(wxCommandEvent& event) +{ + wxMessageBox("Hello!"); +} diff --git a/utils/nplugin/samples/gui/gui.h b/utils/nplugin/samples/gui/gui.h new file mode 100644 index 0000000000..01e46d64b6 --- /dev/null +++ b/utils/nplugin/samples/gui/gui.h @@ -0,0 +1,59 @@ +/* + * File: gui.h + * Purpose: wxWindows plugin with a few GUI elements + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +#ifndef __GUIH__ +#define __GUIH__ + +// Define a new application type +class MyApp: public wxPluginApp +{ public: + virtual wxFrame *OnInit(void); + virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); +}; + +class MyApp; +class MyFrame; +class MyCanvas; + +class MyFrame: public wxPluginFrame +{ +public: + MyFrame(const wxPluginData& data); + virtual ~MyFrame(); + + void OldOnMenuCommand(int id); + +private: + wxMenu* fileMenu; + wxMenuBar* menuBar; + MyCanvas* leftCanvas; + MyCanvas* rightCanvas; + wxSplitterWindow* splitter; +}; + +class MyCanvas: public wxScrolledWindow +{ +public: + MyCanvas(wxWindow* parent, int x, int y, int w, int h); + virtual ~MyCanvas(); + + void OnPaint(wxPaintEvent& event); + +DECLARE_EVENT_TABLE() +}; + +// ID for the menu quit command +#define SPLIT_QUIT 1 +#define SPLIT_HORIZONTAL 2 +#define SPLIT_VERTICAL 3 +#define SPLIT_UNSPLIT 4 + + +#endif + diff --git a/utils/nplugin/samples/gui/makefile.nt b/utils/nplugin/samples/gui/makefile.nt new file mode 100644 index 0000000000..2487d04e37 --- /dev/null +++ b/utils/nplugin/samples/gui/makefile.nt @@ -0,0 +1,70 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1997 +# Updated: +# Copyright: (c) 1997, Julian Smart +# +# "%W% %G%" +# +# Makefile : Builds gui plugin example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +# Application is a DLL +DLL=1 + +EXTRAINC=/I$(WXDIR)\utils\nplugin\src + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\utils\nplugin\examples\gui +PROGRAM=npgui32 +PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib + +OBJECTS = gui.obj + +all: $(PROGRAM).dll + +$(PROGRAM): $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt dllnp FINAL=$(FINAL) + cd $(THISDIR) + +# Update the dynamic link library + +$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def + $(link) $(LINKFLAGS) \ + -out:$(PROGRAM).dll \ + -def:$(PROGRAM).def \ + $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \ + $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib + +gui.obj: gui.$(SRCSUFF) gui.h $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc + +copy: + copy npgui32.dll "c:\program files\Netscape\Navigator\program\plugins" + copy npgui32.dll "c:\program files\Internet Explorer\plugins" + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb + -erase *.dll + -erase *.exp + -erase *.lib + -erase *.ilk diff --git a/utils/nplugin/samples/gui/npgui32.def b/utils/nplugin/samples/gui/npgui32.def new file mode 100644 index 0000000000..1107bb98f5 --- /dev/null +++ b/utils/nplugin/samples/gui/npgui32.def @@ -0,0 +1,9 @@ +LIBRARY NPGUI32 + +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD SINGLE + +EXPORTS + NP_GetEntryPoints @1 + NP_Initialize @2 + NP_Shutdown @3 diff --git a/utils/nplugin/samples/gui/npgui32.rc b/utils/nplugin/samples/gui/npgui32.rc new file mode 100644 index 0000000000..cafee455df --- /dev/null +++ b/utils/nplugin/samples/gui/npgui32.rc @@ -0,0 +1,44 @@ +#include "wx/msw/wx.rc" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "Julian Smart\0" + VALUE "FileDescription", "wxWindows GUI example plugin file\0" + VALUE "FileVersion", "0.0.0.1\0" + VALUE "InternalName", "wxWindows GUI Plugin\0" + VALUE "LegalCopyright", "Copyright Julian Smart 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename","npgui32.dll\0" + VALUE "ProductName", "wxWindows GUI Plugin Sample\0" + VALUE "ProductVersion", "0.0.0.1\0" + VALUE "MIMEType", "wxgui/mime-type\0" + VALUE "FileExtents", "gui\0" + VALUE "FileOpenName", "wxWindows GUI (*.gui)\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + diff --git a/utils/nplugin/samples/simple/makefile.nt b/utils/nplugin/samples/simple/makefile.nt new file mode 100644 index 0000000000..66e55eee46 --- /dev/null +++ b/utils/nplugin/samples/simple/makefile.nt @@ -0,0 +1,70 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1997 +# Updated: +# Copyright: (c) 1997, Julian Smart +# +# "%W% %G%" +# +# Makefile : Builds simple plugin example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +# Application is a DLL +DLL=1 + +EXTRAINC=/I$(WXDIR)\utils\nplugin\src + +!include $(WXDIR)\src\ntwxwin.mak + +THISDIR = $(WXDIR)\utils\nplugin\smples\simple +PROGRAM=npsimple32 +PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib + +OBJECTS = simple.obj + +all: $(PROGRAM).dll + +$(PROGRAM): $(PROGRAM).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt dllnp FINAL=$(FINAL) + cd $(THISDIR) + +# Update the dynamic link library + +$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def + $(link) $(LINKFLAGS) \ + -out:$(PROGRAM).dll \ + -def:$(PROGRAM).def \ + $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \ + $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib + +simple.obj: simple.$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc + +copy: + copy npsimple32.dll "c:\program files\Netscape\Navigator\program\plugins" + copy npsimple32.dll "c:\program files\Internet Explorer\plugins" + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb + -erase *.dll + -erase *.exp + -erase *.lib + -erase *.ilk diff --git a/utils/nplugin/samples/simple/npsimple32.def b/utils/nplugin/samples/simple/npsimple32.def new file mode 100644 index 0000000000..e3af3116fe --- /dev/null +++ b/utils/nplugin/samples/simple/npsimple32.def @@ -0,0 +1,9 @@ +LIBRARY NPSIMPLE32 + +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD SINGLE + +EXPORTS + NP_GetEntryPoints @1 + NP_Initialize @2 + NP_Shutdown @3 diff --git a/utils/nplugin/samples/simple/npsimple32.rc b/utils/nplugin/samples/simple/npsimple32.rc new file mode 100644 index 0000000000..f2d4903226 --- /dev/null +++ b/utils/nplugin/samples/simple/npsimple32.rc @@ -0,0 +1,44 @@ +#include "wx/msw/wx.rc" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "Julian Smart\0" + VALUE "FileDescription", "wxWindows simple example plugin file\0" + VALUE "FileVersion", "0.0.0.1\0" + VALUE "InternalName", "wxWindows Simple Plugin\0" + VALUE "LegalCopyright", "Copyright Julian Smart 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename","npsimple32.dll\0" + VALUE "ProductName", "wxWindows Simple Plugin Sample\0" + VALUE "ProductVersion", "0.0.0.1\0" + VALUE "MIMEType", "wxsimple/mime-type\0" + VALUE "FileExtents", "smp\0" + VALUE "FileOpenName", "wxWindows Simple (*.smp)\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + diff --git a/utils/nplugin/samples/simple/simple.cpp b/utils/nplugin/samples/simple/simple.cpp new file mode 100644 index 0000000000..137e7b0585 --- /dev/null +++ b/utils/nplugin/samples/simple/simple.cpp @@ -0,0 +1,174 @@ +/* + * File: simple.cpp + * Purpose: Minimal wxWindows plugin + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +/* static const char sccsid[] = "%W% %G%"; */ + +#ifdef __GNUG__ +#pragma implementation +#pragma interface +#endif + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include + +#include "NPApp.h" +#include "NPFrame.h" + +// Define a new application type +class MyApp: public wxPluginApp +{ public: + virtual wxFrame *OnInit(void); + virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); +}; + +// Define a new frame type +class MyFrame: public wxPluginFrame +{ public: + MyFrame(const wxPluginData& data); + + public: + // Let's paint directly onto the 'frame'; we don't need a subwindow + void OnPaint(wxPaintEvent& event); + void OnDraw(wxDC& dc); + void OnMouseEvent(wxMouseEvent& event); + + // Called when the file has been downloaded + virtual void OnNPNewFile(NPStream *stream, const wxString& fname); + + void CentreStrings(wxDC& dc); + + DECLARE_EVENT_TABLE() + + protected: + wxStringList m_strings; + long m_xpos; + long m_ypos; +}; + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_SIZE(MyFrame::OnSize) + EVT_PAINT(MyFrame::OnPaint) + EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent) +END_EVENT_TABLE() + +IMPLEMENT_APP(MyApp) + +// No app initialisation necessary, and for a plugin there is no +// top frame. +wxFrame *MyApp::OnInit(void) +{ + return NULL; +} + +// Called whenever a new plugin instance is called. We could check +// various things here in 'data' but we won't bother. +wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data) +{ + // Implicitly added to list of plugin frames + return new MyFrame(data); +} + +// My frame constructor +MyFrame::MyFrame(const wxPluginData& data): + wxPluginFrame(data) +{ + m_xpos = -1; + m_ypos = -1; +} + +void MyFrame::OnPaint(wxPaintEvent& event) +{ + wxPaintDC dc(this); + + OnDraw(dc); +} + +void MyFrame::OnDraw(wxDC& dc) +{ + dc.SetBrush(*wxCYAN_BRUSH); + dc.SetPen(*wxRED_PEN); + + int w, h; + GetClientSize(&w, &h); + + dc.DrawRectangle(0, 0, w, h); + + wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL); + dc.SetFont(swissFont); + dc.SetBackgroundMode(wxTRANSPARENT); + + CentreStrings(dc); +} + +// Called when the file has been downloaded +void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname) +{ + ifstream str(fname); + char buf[201]; + + while ( !str.eof() ) + { + buf[0] = 0; + str.getline(buf, 200); + + if ( buf[0] != 0 ) + m_strings.Add(buf); + } + Refresh(); +} + +void MyFrame::CentreStrings(wxDC& dc) +{ + int y = 5; + int cw, ch; + GetClientSize(&cw, &ch); + + wxNode *node = m_strings.First(); + while ( node ) + { + char *s = (char *)node->Data(); + long w, h; + dc.GetTextExtent(s, &w, &h); + + int x = wxMax(0, (cw - w)/2); + dc.DrawText(s, x, y); + + y += h + (h/2); + + node = node->Next(); + } +} + +// This implements a tiny doodling program. Drag the mouse using +// the left button. +void MyFrame::OnMouseEvent(wxMouseEvent& event) +{ + long x, y; + event.Position(&x, &y); + wxClientDC dc(this); + + if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown()) + { + dc.SetPen(wxBLACK_PEN); + dc.SetBrush(wxTRANSPARENT_BRUSH); + dc.DrawLine(m_xpos, m_ypos, x, y); + } + m_xpos = x; + m_ypos = y; +} + diff --git a/utils/nplugin/src/makefile.nt b/utils/nplugin/src/makefile.nt new file mode 100644 index 0000000000..b3e4491221 --- /dev/null +++ b/utils/nplugin/src/makefile.nt @@ -0,0 +1,78 @@ +# +# File: makefile.nt +# Author: Julian Smart +# Created: 1993 +# Updated: +# Copyright: (c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds controls example (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +# Application is a DLL +DLL=1 + +!include $(WXDIR)\src\ntwxwin.mak + +PLUGINDIR = $(WXDIR)\utils\nplugin +THISDIR = $(PLUGINDIR)\src +LIBTARGET=$(PLUGINDIR)\lib\nplugin.lib + +OBJECTS = npwin.obj npshell.obj NPFrame.obj NPApp.obj + +all: $(LIBTARGET) + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.nt FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.nt clean + cd $(THISDIR) + +$(LIBTARGET): $(OBJECTS) + -erase $(LIBTARGET) + $(implib) @<< +-out:$(LIBTARGET) +-machine:$(CPU) +$(OBJECTS) +<< + +npwin.obj: npwin.cpp npapi.h npupp.h + $(cc) @<< +$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) +<< + +npshell.obj: npshell.cpp npapi.h NPApp.h NPFrame.h + $(cc) @<< +$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) +<< + +NPFrame.obj: NPFrame.cpp NPFrame.h NPApp.h npapi.h + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +NPApp.obj: NPApp.cpp NPApp.h NPFrame.h npapi.h + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb + -erase *.dll + -erase *.exp + -erase *.ilk + -erase $(LIBTARGET) diff --git a/utils/nplugin/src/npapi.h b/utils/nplugin/src/npapi.h new file mode 100644 index 0000000000..bbb631c3d4 --- /dev/null +++ b/utils/nplugin/src/npapi.h @@ -0,0 +1,258 @@ +/* + * npapi.h $Revision$ + * Netscape client plug-in API spec + */ + +#ifndef _NPAPI_H_ +#define _NPAPI_H_ + + +/* XXX this needs to get out of here */ +#if defined(__MWERKS__) +#ifndef XP_MAC +#define XP_MAC +#endif +#endif + + +/* + * Version constants + */ + +#define NP_VERSION_MAJOR 0 +#define NP_VERSION_MINOR 6 + + + +/* + * Basic types + */ + +#ifndef _UINT16 +typedef unsigned short uint16; +#endif +#ifndef _UINT32 +typedef unsigned long uint32; +#endif +#ifndef _INT16 +typedef short int16; +#endif +#ifndef _INT32 +typedef long int32; +#endif + +#ifndef FALSE +#define FALSE (0) +#endif +#ifndef TRUE +#define TRUE (1) +#endif +#ifndef NULL +#define NULL (0L) +#endif + +typedef unsigned char NPBool; +typedef void* NPEvent; +typedef int16 NPError; +typedef char* NPMIMEType; + + +/* + * NPP is a plug-in's opaque instance handle + */ +typedef struct _NPP +{ + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ +} NPP_t; + +typedef NPP_t* NPP; + + + +typedef struct _NPStream +{ + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ + const char* url; + uint32 end; + uint32 lastmodified; +} NPStream; + +typedef struct _NPByteRange +{ + int32 offset; /* negative offset means from the end */ + uint32 length; + struct _NPByteRange* next; +} NPByteRange; + + +typedef struct _NPSavedData +{ + int32 len; + void* buf; +} NPSavedData; + + + +typedef struct _NPRect +{ + uint16 top; + uint16 left; + uint16 bottom; + uint16 right; +} NPRect; + +typedef struct _NPWindow +{ + void* window; /* platform specific window handle */ + uint32 x; /* position of top left corner relative to a netscape page */ + uint32 y; + uint32 width; /* maximum window size */ + uint32 height; + NPRect clipRect; /* clipping rectangle in port coordinates */ +} NPWindow; + + + +typedef struct _NPFullPrint +{ + NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen printing */ + NPBool printOne; /* TRUE if plugin should print one copy to default printer */ + void* platformPrint; /* Platform-specific printing info */ +} NPFullPrint; + +typedef struct _NPEmbedPrint +{ + NPWindow window; + void* platformPrint; /* Platform-specific printing info */ +} NPEmbedPrint; + +typedef struct _NPPrint +{ + uint16 mode; /* NP_FULL or NP_EMBED */ + union + { + NPFullPrint fullPrint; /* if mode is NP_FULL */ + NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ + } print; +} NPPrint; + + + + +#ifdef XP_MAC + +/* + * Mac-specific structures and definitions. + */ + +#include +#include + +typedef struct NP_Port +{ + CGrafPtr port; /* Grafport */ + int32 portx; /* position inside the topmost window */ + int32 porty; +} NP_Port; + +/* + * Non-standard event types that can be passed to HandleEvent + */ +#define getFocusEvent (osEvt + 16) +#define loseFocusEvent (osEvt + 17) +#define adjustCursorEvent (osEvt + 18) + +#endif /* XP_MAC */ + + + + +#define NP_EMBED 1 +#define NP_FULL 2 +#define NP_BACKGROUND 3 + +#define NP_NORMAL 1 +#define NP_SEEK 2 +#define NP_ASFILE 3 + +#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) + + +/* + * Error and reason code definitions. + */ + +#define NP_NOERR 0 +#define NP_EINVAL 1 +#define NP_EABORT 2 + +#define NPERR_BASE 0 +#define NPERR_NO_ERROR (NPERR_BASE + 0) +#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) +#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) +#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) +#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) +#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) +#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) +#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) +#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) + +#define NPRES_BASE 0 +#define NPRES_NETWORK_ERR (NPRES_BASE + 0) +#define NPRES_USER_BREAK (NPRES_BASE + 1) +#define NPRES_DONE (NPRES_BASE + 3) + + + +/* + * Function prototypes. + * Functions beginning with 'NPP' are functions provided by the plugin that Netscape will call. + * Functions beginning with 'NPN' are functions provided by Netscape that the plugin will call. + */ + +#if defined(_WINDOWS) && !defined(__WIN32__) +#define NP_LOADDS _loadds +#else +#define NP_LOADDS +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +NPError NPP_Initialize(void); +void NPP_Shutdown(void); +NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); +NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); +NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); +NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); +NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason); +int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); +int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); +void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); +void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); +int16 NPP_HandleEvent(NPP instance, void* event); + +void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); +NPError NPN_GetURL(NPP instance, const char* url, const char* window); +NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); +NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); +NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream* stream); +int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); +NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason); +void NPN_Status(NPP instance, const char* message); +const char* NPN_UserAgent(NPP instance); +void* NPN_MemAlloc(uint32 size); +void NPN_MemFree(void* ptr); +uint32 NPN_MemFlush(uint32 size); +void NPN_ReloadPlugins(NPBool reloadPages); + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + + +#endif /* _NPAPI_H_ */ + diff --git a/utils/nplugin/src/npapp.cpp b/utils/nplugin/src/npapp.cpp new file mode 100644 index 0000000000..e9c43029c3 --- /dev/null +++ b/utils/nplugin/src/npapp.cpp @@ -0,0 +1,277 @@ +/* + * File: NPApp.cc + * Purpose: wxPluginApp implementation + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#include "NPApp.h" +#include "NPFrame.h" + +#include + +IMPLEMENT_ABSTRACT_CLASS(wxPluginApp, wxApp) + +wxPluginApp *wxGetPluginApp(void) +{ + if ( wxTheApp && wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) + return (wxPluginApp *)wxTheApp; + else + return NULL; +} + +wxPluginApp::wxPluginApp(void) +{ + m_data.m_argc = NULL; + m_data.m_argn = NULL; + m_data.m_argv = NULL; + m_data.m_type = 0; + m_data.m_instance = 0; + m_data.m_mode = 0; + m_data.m_window = 0; +} + +wxPluginApp::~wxPluginApp(void) +{ + if ( m_data.m_argn ) + delete[] m_data.m_argn; + if ( m_data.m_argv ) + delete[] m_data.m_argv; +} + +// Add a frame +void wxPluginApp::AddFrame(wxPluginFrame *frame) +{ + m_frames.Append(frame); +} + +// Remove a frame +void wxPluginApp::RemoveFrame(wxPluginFrame *frame) +{ + m_frames.DeleteObject(frame); +} + +// Find a frame given a NP instance +wxPluginFrame *wxPluginApp::FindFrame(NPP instance) +{ + wxNode *node = m_frames.First(); + while ( node ) + { + wxPluginFrame *frame = (wxPluginFrame *)node->Data(); + if ( frame->GetInstance() == instance ) + { + return frame; + } + node = node->Next(); + } + return NULL; +} + +void wxPluginApp::SetAttributeValues(const int n, char *argn[], char *argv[]) +{ + if ( m_data.m_argn ) + delete[] m_data.m_argn; + if ( m_data.m_argv ) + delete[] m_data.m_argv; + + m_data.m_argc = n; + + m_data.m_argn = new wxString[n]; + m_data.m_argv = new wxString[n]; + int i; + for ( i = 0; i < n ; i ++) + { + m_data.m_argn[i] = argn[i]; + m_data.m_argv[i] = argv[i]; + } +} + +/////////////////////////////////////////////////////////////// +// Netscape Plugin API calls routed via wxPluginApp + +NPError wxPluginApp::NPP_Destroy(NPP instance, NPSavedData** save) +{ + wxPluginFrame *frame = FindFrame(instance); + if ( frame ) + { + frame->OnClose(); + delete frame; + } + return NPERR_NO_ERROR; +} + +NPError wxPluginApp::NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason) +{ + return NPERR_NO_ERROR; +} + +/* +jref wxPluginApp::NPP_GetJavaClass(void) +{ + return 0; +} +*/ + +NPError wxPluginApp::NPP_Initialize(void) +{ + static int init = FALSE; + + if ( init == TRUE ) + MessageBox(NULL, "wxPluginApp::NPP_Initialize:\nabout to call wxEntry for 2nd time!!!", "wxPlugin", MB_OK); + + wxEntry((WXHINSTANCE) GetModuleHandle(NULL)); + + init = TRUE; + +// MessageBox(NULL, "wxPluginApp::NPP_Initialize: have called wxEntry", "wxPlugin", MB_OK); + return NPERR_NO_ERROR; +} + +NPError wxPluginApp::NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, + int16 argc, char* argn[], char* argv[], NPSavedData* saved) +{ +// MessageBox(NULL, "wxPluginApp::NPP_New", "wxPlugin", MB_OK); + + // Save values so frame can be created in first NPP_SetWindow + if ( m_data.m_instance != 0 ) + { + MessageBox(NULL, "wxPluginApp::NPP_New: whoops, 2 NPP_New calls in succession without NPP_SetWindow.\n Need to modify my code!", "wxPlugin", MB_OK); + return NPERR_NO_ERROR; + } + + m_data.m_instance = instance; + m_data.m_type = pluginType; + m_data.m_mode = mode; + + SetAttributeValues(argc, argn, argv); + + // Unfortunately, we may get a stream event before we've got a valid window + // handle, so we just have to go ahead and create a new instance. + wxPluginFrame *frame = OnNewInstance(m_data); + + m_data.m_instance = NULL; + m_data.m_window = NULL; + delete[] m_data.m_argv; + delete[] m_data.m_argn; + m_data.m_argv = NULL; + m_data.m_argn = NULL; + + return NPERR_NO_ERROR; +} + +NPError wxPluginApp::NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, + NPBool seekable, uint16* stype) +{ + // By default, we want to receive a file instead of a stream. + wxPluginFrame *frame = FindFrame(instance); + if ( frame ) + { + return frame->OnNPNewStream(type, stream, seekable, stype); + } + return NPERR_NO_ERROR; +} + +void wxPluginApp::NPP_Print(NPP instance, NPPrint* printInfo) +{ + if (instance == NULL) + return; + + wxPluginFrame *frame = FindFrame(instance); + if ( frame ) + { + frame->OnNPPrint(printInfo); + } +} + +NPError wxPluginApp::NPP_SetWindow(NPP instance, NPWindow* window) +{ +// MessageBox(NULL, "wxPluginApp::NPP_SetWindow", "wxPlugin", MB_OK); + + if ( window ) + wxDebugMsg("%d\n", (int) window->window); + + wxPluginFrame *frame = FindFrame(instance); + if ( frame ) + { + frame->SetNPWindow(window); + } + else + { +#if 0 + // No such frame: must make it. + if ( m_data.m_instance == NULL ) + { + MessageBox(NULL, "wxPluginApp::NPP_SetWindow: whoops, no data to create window. SetWindow called in funny order?", "wxPlugin", MB_OK); + return NPERR_NO_ERROR; + } + + if ( window->window == NULL ) + { + // We're receiving a NULL window before we've even received + // a valid window. Ignore this silly thing. + return NPERR_NO_ERROR; + } + + m_data.m_window = window; + m_data.m_instance = instance; + +// wxPluginFrame *frame = OnNewInstance(m_data); + + m_data.m_instance = NULL; + m_data.m_window = NULL; + delete[] m_data.m_argv; + delete[] m_data.m_argn; + m_data.m_argv = NULL; + m_data.m_argn = NULL; +#endif + } + return NPERR_NO_ERROR; +} + +void wxPluginApp::NPP_Shutdown(void) +{ + // Clean up wxWindows + CleanUp(); +} + +void wxPluginApp::NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname) +{ + wxPluginFrame *frame = FindFrame(instance); + if ( frame ) + { + wxString str(fname); + frame->OnNPNewFile(stream, str); + } +} + +/* +void wxPluginApp::NPP_URLNotify(NPP instance, const char* url, NPReason reason, + void* notifyData) +{ +} +*/ + +int32 wxPluginApp::NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, + void* buf) +{ + return len; // The number of bytes accepted +} + +static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile + // mode so we can take any size stream in our + // write call (since we ignore it) + +int32 wxPluginApp::NPP_WriteReady(NPP instance, NPStream* stream) +{ + return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write() +} + diff --git a/utils/nplugin/src/npapp.h b/utils/nplugin/src/npapp.h new file mode 100644 index 0000000000..238a612313 --- /dev/null +++ b/utils/nplugin/src/npapp.h @@ -0,0 +1,91 @@ +/* + * File: NPApp.h + * Purpose: wxPluginApp declaration + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +#ifndef __PLUGINAPP__ +#define __PLUGINAPP__ + +#include "wx/wx.h" +#include "npapi.h" + +class wxPluginFrame; + +// Data passed to OnNewInstance +class wxPluginData +{ +public: + NPP m_instance; + NPMIMEType m_type; + NPWindow* m_window; + int m_mode; + int m_argc; + wxString* m_argn; + wxString* m_argv; +}; + +class WXDLLEXPORT wxPluginApp: public wxApp +{ + DECLARE_ABSTRACT_CLASS(wxPluginApp) + +public: + wxPluginApp(void); + ~wxPluginApp(void); + + // Find a frame given a NP instance + wxPluginFrame *FindFrame(NPP instance); + + // Add a frame + void AddFrame(wxPluginFrame *frame); + + // Remove a frame + void RemoveFrame(wxPluginFrame *frame); + + // Set attribute/values for the last instance + void SetAttributeValues(const int n, char *argn[], char *argv[]); + + /////////////////////////////////////////////////////////////// + // Higher-level API than NP API + virtual wxPluginFrame *OnNewInstance(const wxPluginData& data) = 0; + + /////////////////////////////////////////////////////////////// + // Netscape Plugin API calls routed via wxPluginApp + + virtual NPError NPP_Destroy(NPP instance, NPSavedData** save); + virtual NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason); +// virtual jref NPP_GetJavaClass(void); + virtual NPError NPP_Initialize(void); + virtual NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, + int16 argc, char* argn[], char* argv[], NPSavedData* saved); + virtual NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, + NPBool seekable, uint16* stype); + virtual void NPP_Print(NPP instance, NPPrint* platformPrint); + virtual NPError NPP_SetWindow(NPP instance, NPWindow* window); + virtual void NPP_Shutdown(void); + virtual void NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname); +/* + virtual void NPP_URLNotify(NPP instance, const char* url, NPReason reason, + void* notifyData); +*/ + virtual int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, + void* buf); + virtual int32 NPP_WriteReady(NPP instance, NPStream* stream); + +protected: + + // List of plugin frames + wxList m_frames; + + // Temporary NPP_New arguments so we can wait until NPP_SetWindow is called + // before creating a frame + wxPluginData m_data; +}; + +wxPluginApp *wxGetPluginApp(void); + +#endif + diff --git a/utils/nplugin/src/npframe.cpp b/utils/nplugin/src/npframe.cpp new file mode 100644 index 0000000000..e3e3f63661 --- /dev/null +++ b/utils/nplugin/src/npframe.cpp @@ -0,0 +1,293 @@ +/* + * File: NPFrame.cc + * Purpose: wxPluginFrame implementation + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/frame.h" +#endif + +#include "wx/dcprint.h" + +#include "NPFrame.h" +#include "NPApp.h" + +#include + +extern wxList wxModelessWindows; +extern char wxFrameClassName[]; + +IMPLEMENT_DYNAMIC_CLASS(wxPluginFrame, wxFrame) + +wxPluginFrame::wxPluginFrame(void) +{ + m_npWindow = NULL; + m_npInstance = NULL; + m_nAttributes = 0; + m_names = NULL; + m_values = NULL; +} + +bool wxPluginFrame::Create(const wxPluginData& data) +{ + SetName("pluginFrame"); + + m_npWindow = NULL; + m_npInstance = NULL; + m_nAttributes = 0; + m_names = NULL; + m_values = NULL; + m_npWindow = data.m_window; + m_npInstance = data.m_instance; + + SetAttributeValues(data.m_argc, data.m_argn, data.m_argv); + SetNPWindow(data.m_window); + + wxModelessWindows.Append(this); + + if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) + { + ((wxPluginApp *)wxTheApp)->AddFrame(this); + } + return TRUE; +} + +wxPluginFrame::~wxPluginFrame(void) +{ + if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) + { + ((wxPluginApp *)wxTheApp)->RemoveFrame(this); + } + + if ( GetHWND() ) + UnsubclassWin(); + m_hWnd = 0; + + if ( m_names ) + delete[] m_names; + if ( m_values ) + delete[] m_values; +} + +// Get size *available for subwindows* i.e. excluding menu bar etc. +// For XView, this is the same as GetSize +void wxPluginFrame::GetClientSize(int *x, int *y) const +{ + if ( !m_hWnd ) + { + *x = 0; *y = 0; + return; + } + wxFrame::GetClientSize(x, y); +} + +// Set the client size (i.e. leave the calculation of borders etc. +// to wxWindows) +void wxPluginFrame::SetClientSize(const int width, const int height) +{ + if ( !m_hWnd ) + return ; + + wxFrame::SetClientSize(width, height); +} + +void wxPluginFrame::GetSize(int *width, int *height) const +{ + if ( !m_hWnd ) + { + *width = 0; *height = 0; + return; + } + wxFrame::GetSize(width, height); +} + +void wxPluginFrame::GetPosition(int *x, int *y) const +{ + if ( !m_hWnd ) + { + *x = 0; *y = 0; + return; + } + wxFrame::GetPosition(x, y); +} + +void wxPluginFrame::SetAttributeValues(const int n, const char *argn[], const char *argv[]) +{ + if ( m_names ) + delete[] m_names; + if ( m_values ) + delete[] m_values; + + m_nAttributes = n; + + m_names = new wxString[n]; + m_values = new wxString[n]; + int i; + for ( i = 0; i < n ; i ++) + { + m_names[i] = argn[i]; + m_values[i] = argv[i]; + } +} + +void wxPluginFrame::SetAttributeValues(const int n, const wxString* argn, const wxString* argv) +{ + if ( m_names ) + delete[] m_names; + if ( m_values ) + delete[] m_values; + + m_nAttributes = n; + + m_names = new wxString[n]; + m_values = new wxString[n]; + int i; + for ( i = 0; i < n ; i ++) + { + m_names[i] = argn[i]; + m_values[i] = argv[i]; + } +} + +void wxPluginFrame::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +{ + // Can't allow app to set the size. + return; +} + +// Sets and subclasses the platform-specific window handle +bool wxPluginFrame::SetNPWindow(NPWindow *window) +{ + if ( !window || !window->window) + { + if ( m_hWnd ) + { + wxMessageBox("Unsubclassing window prematurely"); + UnsubclassWin(); + m_hWnd = 0; + } + m_npWindow = NULL; + } + else + { + if ( m_hWnd ) + { + if ( m_hWnd == (WXHWND) window->window ) + { + // Does this mean a resize? + return TRUE; + } + } + + m_npWindow = window; + m_hWnd = (WXHWND) window->window; + SubclassWin(m_hWnd); + m_windowId = ::GetWindowLong((HWND) m_hWnd, GWL_ID); + } + return TRUE; +} + +NPError wxPluginFrame::OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype) +{ + *stype = NP_ASFILE; + return NPERR_NO_ERROR; +} + +void wxPluginFrame::OnNPNewFile(NPStream *stream, const wxString& fname) +{ +} + +void wxPluginFrame::OnNPPrint(NPPrint* printInfo) +{ + if (printInfo->mode == NP_FULL) + { + // + // *Developers*: If your plugin would like to take over + // printing completely when it is in full-screen mode, + // set printInfo->pluginPrinted to TRUE and print your + // plugin as you see fit. If your plugin wants Netscape + // to handle printing in this case, set printInfo->pluginPrinted + // to FALSE (the default) and do nothing. If you do want + // to handle printing yourself, printOne is true if the + // print button (as opposed to the print menu) was clicked. + // On the Macintosh, platformPrint is a THPrint; on Windows, + // platformPrint is a structure (defined in npapi.h) containing + // the printer name, port, etc. + // + void* platformPrint = printInfo->print.fullPrint.platformPrint; + NPBool printOne = printInfo->print.fullPrint.printOne; + + printInfo->print.fullPrint.pluginPrinted = FALSE; // Do the default + + } + else // If not fullscreen, we must be embedded + { + // + // *Developers*: If your plugin is embedded, or is full-screen + // but you returned false in pluginPrinted above, NPP_Print + // will be called with mode == NP_EMBED. The NPWindow + // in the printInfo gives the location and dimensions of + // the embedded plugin on the printed page. On the Macintosh, + // platformPrint is the printer port; on Windows, platformPrint + // is the handle to the printing device context. + // + NPWindow* printWindow = &(printInfo->print.embedPrint.window); + void* platformPrint = printInfo->print.embedPrint.platformPrint; + + HDC hDC = (HDC) platformPrint; + wxRectangle rect; + rect.x = printWindow->x; + rect.y = printWindow->y; + rect.width = printWindow->width; + rect.height = printWindow->height; + + int saveIt = ::SaveDC(hDC); + + wxPrinterDC *printerDC = new wxPrinterDC((WXHDC) hDC); + + OnPrint(*printerDC, rect); + + printerDC->SetHDC(0); + delete printerDC; + + ::RestoreDC(hDC, saveIt); + } + } + +void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRectangle& rect) +{ + // We must do some transformations here + RECT winRect; +/* + winRect.left = rect.x; + winRect.top = rect.y; + winRect.right = rect.x + rect.right; + winRect.bottom = rect.y + rect.height; +*/ + POINT winPoint[2]; + winPoint[0].x = rect.x; + winPoint[0].y = rect.y; + winPoint[1].x = rect.x + rect.width; + winPoint[1].y = rect.y + rect.height; + + if (!LPtoDP((HDC) dc.GetHDC(), winPoint, 2)) + wxMessageBox("LPtoDP failed."); + + OnDraw(dc); +} + +void wxPluginFrame::OnDraw(wxDC& dc) +{ +} + diff --git a/utils/nplugin/src/npframe.h b/utils/nplugin/src/npframe.h new file mode 100644 index 0000000000..23a45da355 --- /dev/null +++ b/utils/nplugin/src/npframe.h @@ -0,0 +1,81 @@ +/* + * File: NPFrame.h + * Purpose: wxPluginFrame declaration + * Author: Julian Smart + * Created: 1997 + * Updated: + * Copyright: (c) Julian Smart + */ + +#ifndef __PLUGINFRAME__ +#define __PLUGINFRAME__ + +#include "wx/frame.h" +#include "NPApp.h" +#include "npapi.h" + +WXDLLEXPORT extern const char *wxFrameNameStr; + +class wxPrinterDC; +class WXDLLEXPORT wxPluginFrame: public wxFrame +{ + DECLARE_DYNAMIC_CLASS(wxPluginFrame) + +public: + wxPluginFrame(void); + inline wxPluginFrame(const wxPluginData& data) + { + m_npWindow = NULL; + m_npInstance = NULL; + m_nAttributes = 0; + m_names = NULL; + m_values = NULL; + + Create(data); + } + + ~wxPluginFrame(void); + + bool Create(const wxPluginData& data); + + // Sets and subclasses the platform-specific window handle + virtual bool SetNPWindow(NPWindow *window); + inline NPWindow *GetNPWindow(void) { return m_npWindow; } + + void SetClientSize(const int width, const int height); + void GetClientSize(int *width, int *height) const; + + void GetSize(int *width, int *height) const ; + void GetPosition(int *x, int *y) const ; + void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + + // Accessors + inline int GetAttributeCount(void) const { return m_nAttributes; } + inline wxString GetAttributeName(const int n) { return m_names[n]; } + inline wxString GetAttributeValue(const int n) { return m_values[n]; } + + void SetAttributeValues(const int n, const char* argn[], const char *argv[]); + void SetAttributeValues(const int n, const wxString* argn, const wxString* argv); + inline void SetInstance(const NPP instance) { m_npInstance = instance; }; + inline NPP GetInstance(void) { return m_npInstance; } + + // Overridables: low-level + virtual NPError OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype); + virtual void OnNPNewFile(NPStream *stream, const wxString& fname); + virtual void OnNPPrint(NPPrint* printInfo); + + // Overridables: high-level + virtual void OnPrint(wxPrinterDC& dc, wxRectangle& rect); + virtual void OnDraw(wxDC& dc); + +protected: + + wxString* m_names; + wxString* m_values; + int m_nAttributes; + NPP m_npInstance; + NPWindow* m_npWindow; +}; + +#endif + diff --git a/utils/nplugin/src/npshell.cpp b/utils/nplugin/src/npshell.cpp new file mode 100644 index 0000000000..fa040054de --- /dev/null +++ b/utils/nplugin/src/npshell.cpp @@ -0,0 +1,278 @@ +//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +// +// npshell.cpp +// +// This file defines a "shell" plugin that plugin developers can use +// as the basis for a real plugin. This shell just provides empty +// implementations of all functions that the plugin can implement +// that will be called by Netscape (the NPP_xxx methods defined in +// npapi.h). +// +//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +#ifndef _NPAPI_H_ +#include "npapi.h" +#endif + +#include +#include +#include + +#include "NPApp.h" + +// +// Instance state information about the plugin. +// +// *Developers*: Use this struct to hold per-instance +// information that you'll need in the +// various functions in this file. +// +typedef struct _PluginInstance +{ + NPWindow* fWindow; + uint16 fMode; + +} PluginInstance; + + + +//------------------------------------------------------------------------------------ +// NPP_Initialize: +//------------------------------------------------------------------------------------ +NPError NPP_Initialize(void) +{ +// MessageBox(NULL, "NPP_Initialize", "NPTest", MB_OK); + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_Initialize(); + else + return NPERR_NO_ERROR; +} + + +//------------------------------------------------------------------------------------ +// NPP_Shutdown: +//------------------------------------------------------------------------------------ +void NPP_Shutdown(void) +{ +// MessageBox(NULL, "NPP_Shutdown", "wxPlugin", MB_OK); + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + app->NPP_Shutdown(); +} + + +//------------------------------------------------------------------------------------ +// NPP_New: +//------------------------------------------------------------------------------------ +NPError NP_LOADDS +NPP_New(NPMIMEType pluginType, + NPP instance, + uint16 mode, + int16 argc, + char* argn[], + char* argv[], + NPSavedData* saved) +{ +// MessageBox(NULL, "NPP_New", "NPTest", MB_OK); + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_New(pluginType, instance, mode, argc, argn, argv, saved); + else + return NPERR_NO_ERROR; +} + +//------------------------------------------------------------------------------------ +// NPP_Destroy: +//------------------------------------------------------------------------------------ +NPError NP_LOADDS +NPP_Destroy(NPP instance, NPSavedData** save) +{ +// MessageBox(NULL, "NPP_Destroy", "NPTest", MB_OK); + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_Destroy(instance, save); + else + return NPERR_NO_ERROR; +} + + +//------------------------------------------------------------------------------------ +// NPP_SetWindow: +//------------------------------------------------------------------------------------ +NPError NP_LOADDS +NPP_SetWindow(NPP instance, NPWindow* window) +{ +// MessageBox(NULL, "NPP_SetWindow", "NPTest", MB_OK); + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_SetWindow(instance, window); + else + return NPERR_NO_ERROR; +} + + +//------------------------------------------------------------------------------------ +// NPP_NewStream: +//------------------------------------------------------------------------------------ +NPError NP_LOADDS +NPP_NewStream(NPP instance, + NPMIMEType type, + NPStream *stream, + NPBool seekable, + uint16 *stype) +{ +// MessageBox(NULL, "NPP_NewStream", "NPTest", MB_OK); + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_NewStream(instance, type, stream, seekable, stype); + else + return NPERR_NO_ERROR; +} + + + +// +// *Developers*: +// These next 2 functions are directly relevant in a plug-in which handles the +// data in a streaming manner. If you want zero bytes because no buffer space +// is YET available, return 0. As long as the stream has not been written +// to the plugin, Navigator will continue trying to send bytes. If the plugin +// doesn't want them, just return some large number from NPP_WriteReady(), and +// ignore them in NPP_Write(). For a NP_ASFILE stream, they are still called +// but can safely be ignored using this strategy. +// + +static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile + // mode so we can take any size stream in our + // write call (since we ignore it) + +//------------------------------------------------------------------------------------ +// NPP_WriteReady: +//------------------------------------------------------------------------------------ +int32 NP_LOADDS +NPP_WriteReady(NPP instance, NPStream *stream) +{ + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_WriteReady(instance, stream); + else + return STREAMBUFSIZE; + + return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write() +} + + + +//------------------------------------------------------------------------------------ +// NPP_Write: +//------------------------------------------------------------------------------------ +int32 NP_LOADDS +NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) +{ + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_Write(instance, stream, offset, len, buffer); + else + return len; // The number of bytes accepted +} + + + +//------------------------------------------------------------------------------------ +// NPP_DestroyStream: +//------------------------------------------------------------------------------------ +NPError NP_LOADDS +NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) +{ + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + return app->NPP_DestroyStream(instance, stream, reason); + else + return NPERR_NO_ERROR; +} + + +//------------------------------------------------------------------------------------ +// NPP_StreamAsFile: +//------------------------------------------------------------------------------------ +void NP_LOADDS +NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) +{ + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + app->NPP_StreamAsFile(instance, stream, fname); +} + + + +//------------------------------------------------------------------------------------ +// NPP_Print: +//------------------------------------------------------------------------------------ +void NP_LOADDS +NPP_Print(NPP instance, NPPrint* printInfo) +{ + if (printInfo == NULL) // trap invalid parm + return; + if ( instance == NULL ) + return; + + wxPluginApp *app = wxGetPluginApp(); + if ( app ) + app->NPP_Print(instance, printInfo); +} + + +//------------------------------------------------------------------------------------ +// NPP_HandleEvent: +// Mac-only. +//------------------------------------------------------------------------------------ +int16 NPP_HandleEvent(NPP instance, void* event) +{ + NPBool eventHandled = FALSE; + if (instance == NULL) + return eventHandled; + + PluginInstance* This = (PluginInstance*) instance->pdata; + + // + // *Developers*: The "event" passed in is a Macintosh + // EventRecord*. The event.what field can be any of the + // normal Mac event types, or one of the following additional + // types defined in npapi.h: getFocusEvent, loseFocusEvent, + // adjustCursorEvent. The focus events inform your plugin + // that it will become, or is no longer, the recepient of + // key events. If your plugin doesn't want to receive key + // events, return false when passed at getFocusEvent. The + // adjustCursorEvent is passed repeatedly when the mouse is + // over your plugin; if your plugin doesn't want to set the + // cursor, return false. Handle the standard Mac events as + // normal. The return value for all standard events is currently + // ignored except for the key event: for key events, only return + // true if your plugin has handled that particular key event. + // + + return eventHandled; +} + diff --git a/utils/nplugin/src/npupp.h b/utils/nplugin/src/npupp.h new file mode 100644 index 0000000000..1c352d2245 --- /dev/null +++ b/utils/nplugin/src/npupp.h @@ -0,0 +1,799 @@ +/* + * npupp.h $Revision$ + * function call mecahnics needed by platform specific glue code. + */ + + +#ifndef _NPUPP_H_ +#define _NPUPP_H_ + +#ifndef GENERATINGCFM +#define GENERATINGCFM 0 +#endif + +#ifndef _NPAPI_H_ +#include "npapi.h" +#endif + +/****************************************************************************************** + plug-in function table macros + for each function in and out of the plugin API we define + typedef NPP_FooUPP + #define NewNPP_FooProc + #define CallNPP_FooProc + for mac, define the UPP magic for PPC/68K calling + *******************************************************************************************/ + + +/* NPP_Initialize */ + +#if GENERATINGCFM +typedef UniversalProcPtr NPP_InitializeUPP; + +enum { + uppNPP_InitializeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_InitializeProc(FUNC) \ + (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) +#define CallNPP_InitializeProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) + +#else + +typedef void (*NPP_InitializeUPP)(void); +#define NewNPP_InitializeProc(FUNC) \ + ((NPP_InitializeUPP) (FUNC)) +#define CallNPP_InitializeProc(FUNC) \ + (*(FUNC))() + +#endif + + +/* NPP_Shutdown */ + +#if GENERATINGCFM +typedef UniversalProcPtr NPP_ShutdownUPP; + +enum { + uppNPP_ShutdownProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_ShutdownProc(FUNC) \ + (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) +#define CallNPP_ShutdownProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) + +#else + +typedef void (*NPP_ShutdownUPP)(void); +#define NewNPP_ShutdownProc(FUNC) \ + ((NPP_ShutdownUPP) (FUNC)) +#define CallNPP_ShutdownProc(FUNC) \ + (*(FUNC))() + +#endif + + +/* NPP_New */ + +#if GENERATINGCFM +typedef UniversalProcPtr NPP_NewUPP; + +enum { + uppNPP_NewProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; + +#define NewNPP_NewProc(FUNC) \ + (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ + (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) +#else + +typedef NPError (*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); +#define NewNPP_NewProc(FUNC) \ + ((NPP_NewUPP) (FUNC)) +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + +#endif + + +/* NPP_Destroy */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_DestroyUPP; +enum { + uppNPP_DestroyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyProc(FUNC) \ + (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) +#else + +typedef NPError (*NPP_DestroyUPP)(NPP instance, NPSavedData** save); +#define NewNPP_DestroyProc(FUNC) \ + ((NPP_DestroyUPP) (FUNC)) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + + +/* NPP_SetWindow */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_SetWindowUPP; +enum { + uppNPP_SetWindowProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_SetWindowProc(FUNC) \ + (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) + +#else + +typedef NPError (*NPP_SetWindowUPP)(NPP instance, NPWindow* window); +#define NewNPP_SetWindowProc(FUNC) \ + ((NPP_SetWindowUPP) (FUNC)) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + + +/* NPP_NewStream */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_NewStreamUPP; +enum { + uppNPP_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_NewStreamProc(FUNC) \ + (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +#else + +typedef NPError (*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); +#define NewNPP_NewStreamProc(FUNC) \ + ((NPP_NewStreamUPP) (FUNC)) +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +#endif + + +/* NPP_DestroyStream */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_DestroyStreamUPP; +enum { + uppNPP_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyStreamProc(FUNC) \ + (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPErrorArg)) + +#else + +typedef NPError (*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason); +#define NewNPP_DestroyStreamProc(FUNC) \ + ((NPP_DestroyStreamUPP) (FUNC)) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \ + (*(FUNC))((NPParg), (NPStreamPtr), (NPErrorArg)) + +#endif + + +/* NPP_WriteReady */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_WriteReadyUPP; +enum { + uppNPP_WriteReadyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteReadyProc(FUNC) \ + (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) + +#else + +typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream); +#define NewNPP_WriteReadyProc(FUNC) \ + ((NPP_WriteReadyUPP) (FUNC)) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr)) + +#endif + + +/* NPP_Write */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_WriteUPP; +enum { + uppNPP_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteProc(FUNC) \ + (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + +#else + +typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); +#define NewNPP_WriteProc(FUNC) \ + ((NPP_WriteUPP) (FUNC)) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + +#endif + + +/* NPP_StreamAsFile */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_StreamAsFileUPP; +enum { + uppNPP_StreamAsFileProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_StreamAsFileProc(FUNC) \ + (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); +#define NewNPP_StreamAsFileProc(FUNC) \ + ((NPP_StreamAsFileUPP) (FUNC)) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPP_Print */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_PrintUPP; +enum { + uppNPP_PrintProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_PrintProc(FUNC) \ + (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) +#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) + +#else + +typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); +#define NewNPP_PrintProc(FUNC) \ + ((NPP_PrintUPP) (FUNC)) +#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ + (*(FUNC))((NPParg), (NPPrintArg)) + +#endif + + +/* NPP_HandleEvent */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_HandleEventUPP; +enum { + uppNPP_HandleEventProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int16))) +}; +#define NewNPP_HandleEventProc(FUNC) \ + (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) + +#else + +typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event); +#define NewNPP_HandleEventProc(FUNC) \ + ((NPP_HandleEventUPP) (FUNC)) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (*(FUNC))((NPParg), (voidPtr)) + +#endif + + + + +/* + * Netscape entry points + */ + + +/* NPN_GetUrl */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_GetURLUPP; +enum { + uppNPN_GetURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_GetURLProc(FUNC) \ + (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); +#define NewNPN_GetURLProc(FUNC) \ + ((NPN_GetURLUPP) (FUNC)) +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPN_PostUrl */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_PostURLUPP; +enum { + uppNPN_PostURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_PostURLProc(FUNC) \ + (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) +#else + +typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); +#define NewNPN_PostURLProc(FUNC) \ + ((NPN_PostURLUPP) (FUNC)) +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) +#endif + + +/* NPN_RequestRead */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_RequestReadUPP; +enum { + uppNPN_RequestReadProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_RequestReadProc(FUNC) \ + (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) + +#else + +typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); +#define NewNPN_RequestReadProc(FUNC) \ + ((NPN_RequestReadUPP) (FUNC)) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (*(FUNC))((stream), (range)) + +#endif + + +/* NPN_NewStream */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_NewStreamUPP; +enum { + uppNPN_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_NewStreamProc(FUNC) \ + (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (stream)) + +#else + +typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream); +#define NewNPN_NewStreamProc(FUNC) \ + ((NPN_NewStreamUPP) (FUNC)) +#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \ + (*(FUNC))((npp), (type), (stream)) + +#endif + + +/* NPN_Write */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_WriteUPP; +enum { + uppNPN_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPN_WriteProc(FUNC) \ + (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) + +#else + +typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); +#define NewNPN_WriteProc(FUNC) \ + ((NPN_WriteUPP) (FUNC)) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (*(FUNC))((npp), (stream), (len), (buffer)) + +#endif + + +/* NPN_DestroyStream */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_DestroyStreamUPP; +enum { + uppNPN_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_DestroyStreamProc(FUNC) \ + (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (err)) + +#else + +typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason); +#define NewNPN_DestroyStreamProc(FUNC) \ + ((NPN_DestroyStreamUPP) (FUNC)) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \ + (*(FUNC))((npp), (stream), (err)) + +#endif + + +/* NPN_Status */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_StatusUPP; +enum { + uppNPN_StatusProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) +}; + +#define NewNPN_StatusProc(FUNC) \ + (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) + +#else + +typedef void (*NPN_StatusUPP)(NPP instance, const char* message); +#define NewNPN_StatusProc(FUNC) \ + ((NPN_StatusUPP) (FUNC)) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (*(FUNC))((npp), (msg)) + +#endif + + +/* NPN_UserAgent */ +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_UserAgentUPP; +enum { + uppNPN_UserAgentProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) +}; + +#define NewNPN_UserAgentProc(FUNC) \ + (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture()) +#define CallNPN_UserAgentProc(FUNC, ARG1) \ + (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1)) + +#else + +typedef const char* (*NPN_UserAgentUPP)(NPP instance); +#define NewNPN_UserAgentProc(FUNC) \ + ((NPN_UserAgentUPP) (FUNC)) +#define CallNPN_UserAgentProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN_MemAlloc */ +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_MemAllocUPP; +enum { + uppNPN_MemAllocProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(void *))) +}; + +#define NewNPN_MemAllocProc(FUNC) \ + (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) + +#else + +typedef void* (*NPN_MemAllocUPP)(uint32 size); +#define NewNPN_MemAllocProc(FUNC) \ + ((NPN_MemAllocUPP) (FUNC)) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN__MemFree */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_MemFreeUPP; +enum { + uppNPN_MemFreeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) +}; + +#define NewNPN_MemFreeProc(FUNC) \ + (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) + +#else + +typedef void (*NPN_MemFreeUPP)(void* ptr); +#define NewNPN_MemFreeProc(FUNC) \ + ((NPN_MemFreeUPP) (FUNC)) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN_MemFlush */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_MemFlushUPP; +enum { + uppNPN_MemFlushProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) +}; + +#define NewNPN_MemFlushProc(FUNC) \ + (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) + +#else + +typedef uint32 (*NPN_MemFlushUPP)(uint32 size); +#define NewNPN_MemFlushProc(FUNC) \ + ((NPN_MemFlushUPP) (FUNC)) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + + +/* NPN_ReloadPlugins */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPN_ReloadPluginsUPP; +enum { + uppNPN_ReloadPluginsProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReloadPluginsProc(FUNC) \ + (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) + +#else + +typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); +#define NewNPN_ReloadPluginsProc(FUNC) \ + ((NPN_ReloadPluginsUPP) (FUNC)) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + + + +/****************************************************************************************** + * The actual plugin function table definitions + *******************************************************************************************/ + +typedef struct _NPPluginFuncs { + uint16 size; + uint16 version; + NPP_NewUPP newp; + NPP_DestroyUPP destroy; + NPP_SetWindowUPP setwindow; + NPP_NewStreamUPP newstream; + NPP_DestroyStreamUPP destroystream; + NPP_StreamAsFileUPP asfile; + NPP_WriteReadyUPP writeready; + NPP_WriteUPP write; + NPP_PrintUPP print; + NPP_HandleEventUPP event; +} NPPluginFuncs; + +typedef struct _NPNetscapeFuncs { + uint16 size; + uint16 version; + NPN_GetURLUPP geturl; + NPN_PostURLUPP posturl; + NPN_RequestReadUPP requestread; + NPN_NewStreamUPP newstream; + NPN_WriteUPP write; + NPN_DestroyStreamUPP destroystream; + NPN_StatusUPP status; + NPN_UserAgentUPP uagent; + NPN_MemAllocUPP memalloc; + NPN_MemFreeUPP memfree; + NPN_MemFlushUPP memflush; + NPN_ReloadPluginsUPP reloadplugins; +} NPNetscapeFuncs; + + + +#ifdef XP_MAC +/****************************************************************************************** + * Mac platform-specific plugin glue stuff + *******************************************************************************************/ + +/* + * Main entry point of the plugin. + * This routine will be called when the plugin is loaded. The function + * tables are passed in and the plugin fills in the NPPluginFuncs table + * and NPPShutdownUPP for Netscape's use. + */ + +#if GENERATINGCFM + +typedef UniversalProcPtr NPP_MainEntryUPP; +enum { + uppNPP_MainEntryProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_MainEntryProc(FUNC) \ + (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) + +#else + +typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); +#define NewNPP_MainEntryProc(FUNC) \ + ((NPP_MainEntryUPP) (FUNC)) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) + +#endif +#endif /* MAC */ + + +#ifdef _WINDOWS + +#ifdef __cplusplus +extern "C" { +#endif + +/* plugin meta member functions */ + +NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs); + +NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs); + +NPError WINAPI NP_Shutdown(); + +#ifdef __cplusplus +} +#endif + +#endif /* _WINDOWS */ + + +#endif /* _NPUPP_H_ */ + diff --git a/utils/nplugin/src/npwin.cpp b/utils/nplugin/src/npwin.cpp new file mode 100644 index 0000000000..f97ef498a7 --- /dev/null +++ b/utils/nplugin/src/npwin.cpp @@ -0,0 +1,186 @@ +/* npwin.cpp */ +#include "windows.h" + +#include "npapi.h" +#include "npupp.h" + +#ifdef __WIN32__ + #define NP_EXPORT +#else + #define NP_EXPORT _export +#endif + +static NPNetscapeFuncs* g_pNavigatorFuncs = NULL; + + +/* PLUGIN DLL entry points */ +/* These are the Windows specific DLL entry points, not the "normal" plugin + entry points. The "normal" ones are in NPSHELL.CPP +*/ + +/* fills in the func table used by Navigator to call entry points in + plugin DLL. Note that these entry points ensure that DS is loaded + by using the NP_LOADDS macro, when compiling for Win16 +*/ +NPError WINAPI NP_EXPORT NP_GetEntryPoints(NPPluginFuncs* pFuncs) +{ + /* trap a NULL ptr */ + if(pFuncs == NULL) + return NPERR_INVALID_FUNCTABLE_ERROR; + + /* if the plugin's function table is smaller than the plugin expects, + then they are incompatible, and should return an error */ + if(pFuncs->size < sizeof NPPluginFuncs) + return NPERR_INVALID_FUNCTABLE_ERROR; + + pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; + pFuncs->newp = NPP_New; + pFuncs->destroy = NPP_Destroy; + pFuncs->setwindow = NPP_SetWindow; + pFuncs->newstream = NPP_NewStream; + pFuncs->destroystream = NPP_DestroyStream; + pFuncs->asfile = NPP_StreamAsFile; + pFuncs->writeready = NPP_WriteReady; + pFuncs->write = NPP_Write; + pFuncs->print = NPP_Print; + pFuncs->event = NULL; /* reserved */ + + return NPERR_NO_ERROR; +} + +/* called immediately after the plugin DLL is loaded +*/ +NPError WINAPI NP_EXPORT NP_Initialize(NPNetscapeFuncs* pFuncs) +{ + /* trap a NULL ptr */ + if(pFuncs == NULL) + return NPERR_INVALID_FUNCTABLE_ERROR; + + g_pNavigatorFuncs = pFuncs; /* save it for future reference */ + + /* if the plugin's major ver level is lower than the Navigator's, + then they are incompatible, and should return an error */ + if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR) + return NPERR_INCOMPATIBLE_VERSION_ERROR; + + /* if the Navigator's function table is smaller than the plugin expects, + then they are incompatible, and should return an error */ + if(pFuncs->size < sizeof NPNetscapeFuncs) + return NPERR_INVALID_FUNCTABLE_ERROR; + + return NPP_Initialize(); +} + +/* called immediately before the plugin DLL is unloaded +*/ +NPError WINAPI NP_EXPORT NP_Shutdown() +{ + NPP_Shutdown(); + + g_pNavigatorFuncs = NULL; + + return NPERR_NO_ERROR; +} + + +/* NAVIGATOR Entry points */ + +/* These entry points expect to be called from within the plugin. The + noteworthy assumption is that DS has already been set to point to the + plugin's DLL data segment. Don't call these functions from outside + the plugin without ensuring DS is set to the DLLs data segment first, + typically using the NP_LOADDS macro +*/ + +/* returns the major/minor version numbers of the Plugin API for the plugin + and the Navigator +*/ +void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) +{ + *plugin_major = NP_VERSION_MAJOR; + *plugin_minor = NP_VERSION_MINOR; + *netscape_major = HIBYTE(g_pNavigatorFuncs->version); + *netscape_minor = LOBYTE(g_pNavigatorFuncs->version); +} + +/* causes the specified URL to be fetched and streamed in +*/ +NPError NPN_GetURL(NPP instance, const char *url, const char *window) +{ + return g_pNavigatorFuncs->geturl(instance, url, window); +} + +NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) +{ + return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file); +} + +/* Requests that a number of bytes be provided on a stream. Typically + this would be used if a stream was in "pull" mode. An optional + position can be provided for streams which are seekable. +*/ +NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) +{ + return g_pNavigatorFuncs->requestread(stream, rangeList); +} + +/* Creates a new stream of data from the plug-in to be interpreted + by Netscape in the current window. +*/ +NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream *stream) +{ + return g_pNavigatorFuncs->newstream(instance, type, stream); +} + +/* Provides len bytes of data. +*/ +int32 NPN_Write(NPP instance, NPStream *stream, + int32 len, void *buffer) +{ + return g_pNavigatorFuncs->write(instance, stream, len, buffer); +} + +/* Closes a stream object. +reason indicates why the stream was closed. +*/ +NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) +{ + return g_pNavigatorFuncs->destroystream(instance, stream, reason); +} + +/* Provides a text status message in the Netscape client user interface +*/ +void NPN_Status(NPP instance, const char *message) +{ + g_pNavigatorFuncs->status(instance, message); +} + +/* returns the user agent string of Navigator, which contains version info +*/ +const char* NPN_UserAgent(NPP instance) +{ + return g_pNavigatorFuncs->uagent(instance); +} + +/* allocates memory from the Navigator's memory space. Necessary so that + saved instance data may be freed by Navigator when exiting. +*/ +void* NPN_MemAlloc(uint32 size) +{ + return g_pNavigatorFuncs->memalloc(size); +} + +/* reciprocal of MemAlloc() above +*/ +void NPN_MemFree(void* ptr) +{ + g_pNavigatorFuncs->memfree(ptr); +} + +/* private function to Netscape. do not use! +*/ +void NPN_ReloadPlugins(NPBool reloadPages) +{ + g_pNavigatorFuncs->reloadplugins(reloadPages); +} + -- 2.45.2