MSW fixes; added wxUSE_XPM to wxUniv's setup.h so now widgets sample works

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2001-07-03 10:03:13 +00:00
parent 748fbf95a8
commit bd52bee106
8 changed files with 138 additions and 87 deletions

View File

@ -3,36 +3,46 @@ wxMicroWindows port
Julian Smart 2001-07-02
This is a snapshot of my experimental port of wxWindows to
MicroWindows. Widgets are supplied by the wxUniversal project,
while the underlying port uses the Windows ports with small
modifications for the MicroWindows API.
This is a port of wxWindows to MicroWindows, under Linux.
Widgets are supplied by the wxUniversal project, while the
underlying port uses the Windows ports with small modifications
for the MicroWindows API.
There are many things missing from MicroWindows that will
make the port quite limited for the time being. I haven't
worked out how to create bitmaps, though there is a BMP to C
converter. There are no menus, no common dialogs, and only
one WIN32 app may be run at a time.
converter. There are no common dialogs (we will use generic ones),
and only one WIN32 app may be run at a time.
Some things can no doubt be worked around, and/or MicroWindows
itself tweaked. Lots of wxWin functionality is just switched off or
commented out.
Note that you can gain confidence in the WIN32/wxUniversal
combination by compiling wxUniversal under Windows using VC++,
using src/wxvc_universal.dsp. You can compile the minimal
and widgets samples in wxUniversal mode using the
UnivDebug and UnivRelease targets. Most of the code is shared
between this combination, and the wxMicroWindows port.
Installation
============
First install MicroWindows - untar it, change config to
use X11 and any other options you feel fit, apply
microwindows.patches to fix PeekMessage, and compile
(type 'make' from within the src directory).
MicroWindows:
Untar the wxMicroWindows port, and change the TOP variable at the
top of src/microwin/Makefile to reflect where MicroWindows is installed.
Type 'make all' from src/microwin. To clean, use cleanwx and NOT clean
since that will clean MicroWindows itself.
- unarchive MicroWindows 0.89pre7
- change 'config' to use X11 and any other options you feel fit,
such as verbose compilation
- cd to src/mwin and apply microwindows.patches (from wxWindows:
docs/microwin/microwindows.patches) to fix PeekMessage
- compile by typing 'make' from within the MicroWindows src directory
wxMicroWindows:
- untar the wxMicroWindows port/download from CVS
- and change the TOP variable at the top of src/msw/makefile.mic
to reflect where MicroWindows is installed
- type 'make all' from src/msw. To clean, use cleanwx and NOT clean
since that will clean MicroWindows itself
- to make the sample, cd into samples/minimal, edit the TOP variable,
and type 'make all'
To make the sample, cd into samples/minimal, edit the TOP variable,
and type 'make all'.
Running 'minimal' runs the virtual MicroWindows desktop
and the minimal sample, since in a MicroWindows WIN32 application
they are one and the same binary.
@ -40,15 +50,38 @@ they are one and the same binary.
Status
======
A frame comes up :-)
A frame comes up :-) The menus don't work properly just yet.
Notes
=====
Implementation Notes
====================
No ::GetKeyState (see microwin/private.h). Should probably use GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate GetKeyState this way.
wxMicroWindows is essentially the wxMSW port + wxUniversal
widgets. Lots of things in include/wx/univ/setup.h are switched
off to allow the port to compile. There are also #ifdefs
switching off further functionality, such as most wxBitmap
functions, pending proper implementation.
There are some WIN32 API functions not implemented by MicroWindows
that are instead stubbed out in include/wx/msw/microwin.c,
and 'implemented' in src/msw/microwin.c. Some of these functions
are important, some less so. They will need to be implemented
in due course. But implementing missing functionality in this way
is preferably to proliferating many #ifdefs in the
wxMSW/wxMicroWindows port itself.
Things missing from MicroWindows that need to be worked around
==============================================================
No ::GetKeyState (see include/wx/msw/private.h). Should probably use
GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate
GetKeyState this way.
No ::CreateBitmap or BITMAPINFO. But BMPs can be converted
to C using convbmp, then need to use Gr... functions.
We MUST implement creation from XPMs, since wxUniversal
makes use of XPMs, or else create our own bitmaps for
drawing radioboxes, checkboxes etc.: see renderers
in src/univ.
No ::DestroyIcon, ::DestroyCursor - use ::DestroyObject instead?
Also no LoadCursor, LoadImage. So how do we make cursors? No ::SetCursor.
@ -56,10 +89,13 @@ Also no LoadCursor, LoadImage. So how do we make cursors? No ::SetCursor.
wxDC: no ::GetTextColor, ::GetBkColor, ::IntersectClipRect,
::GetClipBox
No ::SetMenu, so no menus or menubars.
No ::SetMenu, so no menus or menubars (now implemented by
wxUniversal).
No ::GetObject so we can't get LOGFONT from an HFONT
in wxSystemSettings.
in wxSystemSettings (worked around by passing HFONT to
the wxFont constructor).
No ::CreateDialog so how do we create dialogs? Simulate
one with a frame I guess.
one with a frame...

View File

@ -140,6 +140,7 @@
#define wxUSE_SPLINES 0
#define wxUSE_DRAG_AND_DROP 0
#define wxUSE_XPM_IN_MSW 1
#define wxUSE_XPM 1
#define wxUSE_IMAGE_LOADING_IN_MSW 1
#define wxUSE_RESOURCE_LOADING_IN_MSW 0
#define wxUSE_WX_RESOURCES 0

View File

@ -588,8 +588,12 @@ int wxGIFDecoder::ReadGIF()
/* fill in the data */
m_f->Read(buf, 9);
pimg->left = buf[0] + 256 * buf[1];
pimg->top = buf[2] + 256 * buf[3];
/*
pimg->left = buf[4] + 256 * buf[5];
pimg->top = buf[4] + 256 * buf[5];
*/
pimg->w = buf[4] + 256 * buf[5];
pimg->h = buf[6] + 256 * buf[7];
interl = ((buf[8] & 0x40)? 1 : 0);

View File

@ -31,10 +31,11 @@
#if wxUSE_NOTEBOOK
#ifndef WX_PRECOMP
#include "wx/notebook.h"
#include "wx/imaglist.h"
#endif //WX_PRECOMP
#include "wx/imaglist.h"
#include "wx/notebook.h"
// ============================================================================
// implementation
// ============================================================================

View File

@ -66,12 +66,11 @@
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#endif
// No: don't necessarily use OLE clipboard with data object
#if 0
#if wxUSE_OLE
// use OLE clipboard
#define wxUSE_OLE_CLIPBOARD 1
#endif
#else // !wxUSE_DATAOBJ
// use Win clipboard API
#define wxUSE_OLE_CLIPBOARD 0

View File

@ -1203,10 +1203,12 @@ void wxDataObject::SetAutoDelete()
{
}
#ifdef __WXDEBUG__
const wxChar *wxDataObject::GetFormatName(wxDataFormat format)
{
return NULL;
}
#endif
#endif

View File

@ -7,19 +7,19 @@
CFG=wxvc_dll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE
!MESSAGE NMAKE /f "wxvc_dll.mak".
!MESSAGE
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE
!MESSAGE NMAKE /f "wxvc_dll.mak" CFG="wxvc_dll - Win32 Debug"
!MESSAGE
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE
!MESSAGE "wxvc_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "wxvc_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@ -81,7 +81,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"../lib/wx23_2d.dll" /pdbtype:sept
!ENDIF
!ENDIF
# Begin Target
@ -104,11 +104,11 @@ SOURCE=.\common\clipcmn.cpp
# End Source File
# Begin Source File
SOURCE=.\common\cmdproc.cpp
SOURCE=.\common\cmdline.cpp
# End Source File
# Begin Source File
SOURCE=.\common\cmdline.cpp
SOURCE=.\common\cmdproc.cpp
# End Source File
# Begin Source File
@ -379,6 +379,10 @@ SOURCE=.\common\mstream.cpp
# End Source File
# Begin Source File
SOURCE=.\common\nbkbase.cpp
# End Source File
# Begin Source File
SOURCE=.\common\object.cpp
# End Source File
# Begin Source File
@ -1395,7 +1399,7 @@ SOURCE=.\jpeg\jcapimin.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1412,7 +1416,7 @@ SOURCE=.\jpeg\jcapistd.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1429,7 +1433,7 @@ SOURCE=.\jpeg\jccoefct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1446,7 +1450,7 @@ SOURCE=.\jpeg\jccolor.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1463,7 +1467,7 @@ SOURCE=.\jpeg\jcdctmgr.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1480,7 +1484,7 @@ SOURCE=.\jpeg\jchuff.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1497,7 +1501,7 @@ SOURCE=.\jpeg\jcinit.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1514,7 +1518,7 @@ SOURCE=.\jpeg\jcmainct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1531,7 +1535,7 @@ SOURCE=.\jpeg\jcmarker.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1548,7 +1552,7 @@ SOURCE=.\jpeg\jcmaster.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1565,7 +1569,7 @@ SOURCE=.\jpeg\jcomapi.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1582,7 +1586,7 @@ SOURCE=.\jpeg\jcparam.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1599,7 +1603,7 @@ SOURCE=.\jpeg\jcphuff.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1616,7 +1620,7 @@ SOURCE=.\jpeg\jcprepct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1633,7 +1637,7 @@ SOURCE=.\jpeg\jcsample.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1650,7 +1654,7 @@ SOURCE=.\jpeg\jctrans.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1667,7 +1671,7 @@ SOURCE=.\jpeg\jdapimin.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1684,7 +1688,7 @@ SOURCE=.\jpeg\jdapistd.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1701,7 +1705,7 @@ SOURCE=.\jpeg\jdatadst.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1718,7 +1722,7 @@ SOURCE=.\jpeg\jdatasrc.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1735,7 +1739,7 @@ SOURCE=.\jpeg\jdcoefct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1752,7 +1756,7 @@ SOURCE=.\jpeg\jdcolor.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1769,7 +1773,7 @@ SOURCE=.\jpeg\jddctmgr.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1786,7 +1790,7 @@ SOURCE=.\jpeg\jdhuff.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1803,7 +1807,7 @@ SOURCE=.\jpeg\jdinput.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1820,7 +1824,7 @@ SOURCE=.\jpeg\jdmainct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1837,7 +1841,7 @@ SOURCE=.\jpeg\jdmarker.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1854,7 +1858,7 @@ SOURCE=.\jpeg\jdmaster.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1871,7 +1875,7 @@ SOURCE=.\jpeg\jdmerge.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1888,7 +1892,7 @@ SOURCE=.\jpeg\jdphuff.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1905,7 +1909,7 @@ SOURCE=.\jpeg\jdpostct.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1922,7 +1926,7 @@ SOURCE=.\jpeg\jdsample.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1939,7 +1943,7 @@ SOURCE=.\jpeg\jdtrans.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1956,7 +1960,7 @@ SOURCE=.\jpeg\jerror.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1973,7 +1977,7 @@ SOURCE=.\jpeg\jfdctflt.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -1990,7 +1994,7 @@ SOURCE=.\jpeg\jfdctfst.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2007,7 +2011,7 @@ SOURCE=.\jpeg\jfdctint.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2024,7 +2028,7 @@ SOURCE=.\jpeg\jidctflt.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2041,7 +2045,7 @@ SOURCE=.\jpeg\jidctfst.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2058,7 +2062,7 @@ SOURCE=.\jpeg\jidctint.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2075,7 +2079,7 @@ SOURCE=.\jpeg\jidctred.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2092,7 +2096,7 @@ SOURCE=.\jpeg\jmemmgr.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2109,7 +2113,7 @@ SOURCE=.\jpeg\jmemnobs.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2126,7 +2130,7 @@ SOURCE=.\jpeg\jquant1.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2143,7 +2147,7 @@ SOURCE=.\jpeg\jquant2.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -2160,7 +2164,7 @@ SOURCE=.\jpeg\jutils.c
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
!ENDIF
# End Source File
# End Group

View File

@ -376,6 +376,10 @@ SOURCE=.\common\mstream.cpp
# End Source File
# Begin Source File
SOURCE=.\common\nbkbase.cpp
# End Source File
# Begin Source File
SOURCE=.\common\object.cpp
# End Source File
# Begin Source File
@ -889,7 +893,7 @@ SOURCE=.\msw\dragimag.cpp
# Begin Source File
SOURCE=.\msw\dummy.cpp
# ADD CPP /D "__WXUNIVERSAL__" /Yc"wx/wxprec.h"
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File