From: David Webster Date: Mon, 25 Oct 1999 20:03:39 +0000 (+0000) Subject: no message X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/16a12a3d27d3d3e2557bcde15365245ef2675bb4?ds=sidebyside no message git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 818540cede..f488e306e7 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1565,7 +1565,7 @@ typedef long WXLPARAM; # define LOGFONT FATTRS # define LOWORD SHORT1FROMMP # define HIWORD SHORT2FROMMP -#endif +#endif // __WXMSW__ typedef unsigned long WXCOLORREF; typedef void * WXRGNDATA; typedef void * WXMSG; @@ -1583,6 +1583,7 @@ typedef unsigned long WXMSGID; typedef void* WXRESULT; typedef int (*WXFARPROC)(); // some windows handles not defined by PM +typedef unsigned long COLORREF; typedef unsigned long HANDLE; typedef unsigned long HICON; typedef unsigned long HFONT; diff --git a/include/wx/html/helpctrl.h b/include/wx/html/helpctrl.h index c2051ae8c9..acb0b04d7f 100644 --- a/include/wx/html/helpctrl.h +++ b/include/wx/html/helpctrl.h @@ -20,7 +20,7 @@ #if wxUSE_HTML -#include "helpfrm.h" +#include "wx/html/helpfrm.h" class WXDLLEXPORT wxHtmlHelpController : public wxEvtHandler { diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h index d83d5c4f86..b523856ce9 100644 --- a/include/wx/html/helpfrm.h +++ b/include/wx/html/helpfrm.h @@ -20,7 +20,7 @@ #if wxUSE_HTML -#include "helpdata.h" +#include "wx/html/helpdata.h" #include "wx/window.h" #include "wx/frame.h" #include "wx/config.h" diff --git a/include/wx/os2/dnd.h b/include/wx/os2/dnd.h index 68be65518f..e72f3e9e9e 100644 --- a/include/wx/os2/dnd.h +++ b/include/wx/os2/dnd.h @@ -64,7 +64,6 @@ public: virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); virtual bool OnDrop(wxCoord x, wxCoord y); - virtual bool OnData(wxCoord x, wxCoord y); virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult); virtual bool GetData(); @@ -76,49 +75,5 @@ protected: DRAGTRANSFER* m_pDragTransfer; }; -// ---------------------------------------------------------------------------- -// A simple wxDropTarget derived class for text data: you only need to -// override OnDropText() to get something working -// ---------------------------------------------------------------------------- - -class WXDLLEXPORT wxTextDropTarget : public wxDropTarget -{ -public: - wxTextDropTarget(); - virtual ~wxTextDropTarget(); - - virtual bool OnDropText( wxCoord x - ,wxCoord y - ,const wxString& rText - ) = 0; - - virtual bool OnData( wxCoord x - ,wxCoord y - ); - virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult); -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class WXDLLEXPORT wxFileDropTarget : public wxDropTarget -{ -public: - wxFileDropTarget(); - virtual ~wxFileDropTarget(); - - // parameters are the number of files and the array of file names - virtual bool OnDropFiles( wxCoord x - ,wxCoord y - ,const wxArrayString& rFilenames - ) = 0; - - virtual bool OnData( wxCoord x - ,wxCoord y - ); - virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult); -}; - #endif //__OS2DNDH__ diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index e363bd6b76..a71fcb47a7 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -386,12 +386,12 @@ void wxPreviewControlBar::CreateButtons() m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM, wxPoint(x, y), wxSize(100, -1)); - + // Yes, this look stupid, but this is because gcc gives up otherwise. int n = WXSIZEOF(choices); +// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now for ( int i = 0; i < n; i++ ) m_zoomControl->Append(choices[i]); - SetZoomControl(m_printPreview->GetZoom()); } @@ -402,6 +402,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom) { char buf[20]; sprintf(buf, "%d%%", zoom); +// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now if (m_zoomControl) m_zoomControl->SetStringSelection(buf); } diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index e558e2fb8a..150984d981 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -68,7 +68,7 @@ static wxString SafeFileName(const wxString& s) } -static int IndexCompareFunc(const void *a, const void *b) +static int LINKAGEMODE IndexCompareFunc(const void *a, const void *b) { return strcmp(((wxHtmlContentsItem*)a) -> m_Name, ((wxHtmlContentsItem*)b) -> m_Name); } @@ -549,7 +549,11 @@ bool wxHtmlSearchStatus::Search() if (! m_Active) { // sanity check. Illegal use, but we'll try to prevent a crash anyway - wxASSERT(0); +#if !defined(__VISAGECPP__) +wxASSERT(0); +#else +wxASSERT(m_Active); +#endif return FALSE; } diff --git a/src/jpeg/MAKEFILE.VA b/src/jpeg/MAKEFILE.VA new file mode 100644 index 0000000000..b25a74a591 --- /dev/null +++ b/src/jpeg/MAKEFILE.VA @@ -0,0 +1,300 @@ +# +# File: makefile.vc +# Author: David Webster +# Created: 1999 +# Updated: +# Copyright: c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds os2jpeg.lib library for OS/2 3.0/4.0 + +# Suffixes +OBJSUFF=obj +SRCSUFF=cpp + +OS2FLAGS=/c /W3 /DOS232 /D__VISAGECPP__ /D__WXPM__ /Ss /Q /N100 +OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 +OS2LIBFLAGS=/NOL /NOE +OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB + +# Change WXDIR or WXWIN to wherever wxWindows is found +WXDIR = h:\dev\wx2\wxWindows + +OS2JPEGDIR=$(WXDIR)\src\jpeg +OS2JPEGINC=$(WINJPEGDIR) +OS2JPEGLIB=$(WXDIR)\lib\os2jpeg.lib + +TEMP1TGT=$(WXDIR)\lib\os2jpeg1.lib +TEMP2TGT=$(WXDIR)\lib\os2jpeg2.lib + +INC=-I$(WXDIR)\src\jpeg -I$(WXDIR)\Include +!ifndef FINAL +FINAL=0 +!endif + +!if "$(NOPCH)" == "1" +PCH= +PRECOMP= +MAKEPRECOMP= +!else +PCH=$(WXLIBNAME).pch +PRECOMP=/Si$(PCH) +MAKEPRECOMP=/Fi$(PCH) +!endif + +!if "$(FINAL)" == "0" +D=Debug +OPT = +DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb +LINK_DEBUG_FLAGS=/DEBUG +CRTFLAG=/Gm /Gd +!else +# /O1 - smallest code +# /O2 - fastest code +D=Release +OPT = /O+ /Oc /G5 +DEBUG_FLAGS= +LINK_DEBUG_FLAGS=/RELEASE +CRTFLAG=/Gm /Gd +!endif + +!if [md $(OS2JPEGDIR)\$D] +!endif + +CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) + +{..\jpeg}.c{..\jpeg\$D}.obj: + @echo $< + icc @<< +$(CPPFLAGS) /Fo$@ /Tp $< +<< + +SYSDEPMEM= ..\jpeg\$D\jmemnobs.obj + +# library object files common to compression and decompression +COMOBJECTS= \ + ..\jpeg\$D\jcomapi.obj \ + ..\jpeg\$D\jutils.obj \ + ..\jpeg\$D\jerror.obj \ + ..\jpeg\$D\jmemmgr.obj \ + $(SYSDEPMEM) + +COMLIBOBJS= \ + jcomapi.obj \ + jutils.obj \ + jerror.obj \ + jmemmgr.obj \ + jmemnobs + +# compression library object files +CLIBOBJECTS= \ + ..\jpeg\$D\jcapimin.obj \ + ..\jpeg\$D\jcapistd.obj \ + ..\jpeg\$D\jctrans.obj \ + ..\jpeg\$D\jcparam.obj \ + ..\jpeg\$D\jdatadst.obj \ + ..\jpeg\$D\jcinit.obj \ + ..\jpeg\$D\jcmaster.obj \ + ..\jpeg\$D\jcmarker.obj \ + ..\jpeg\$D\jcmainct.obj \ + ..\jpeg\$D\jcprepct.obj \ + ..\jpeg\$D\jccoefct.obj \ + ..\jpeg\$D\jccolor.obj \ + ..\jpeg\$D\jcsample.obj \ + ..\jpeg\$D\jchuff.obj \ + ..\jpeg\$D\jcphuff.obj \ + ..\jpeg\$D\jcdctmgr.obj \ + ..\jpeg\$D\jfdctfst.obj \ + ..\jpeg\$D\jfdctflt.obj \ + ..\jpeg\$D\jfdctint.obj + +CLIBLIBOBJS= \ + jcapimin.obj \ + jcapistd.obj \ + jctrans.obj \ + jcparam.obj \ + jdatadst.obj \ + jcinit.obj \ + jcmaster.obj \ + jcmarker.obj \ + jcmainct.obj \ + jcprepct.obj \ + jccoefct.obj \ + jccolor.obj \ + jcsample.obj \ + jchuff.obj \ + jcphuff.obj \ + jcdctmgr.obj \ + jfdctfst.obj \ + jfdctflt.obj \ + jfdctint.obj + +# decompression library object files +DLIBOBJECTS= \ + ..\jpeg\$D\jdapimin.obj \ + ..\jpeg\$D\jdapistd.obj \ + ..\jpeg\$D\jdtrans.obj \ + ..\jpeg\$D\jdatasrc.obj \ + ..\jpeg\$D\jdmaster.obj \ + ..\jpeg\$D\jdinput.obj \ + ..\jpeg\$D\jdmarker.obj \ + ..\jpeg\$D\jdhuff.obj \ + ..\jpeg\$D\jdphuff.obj \ + ..\jpeg\$D\jdmainct.obj \ + ..\jpeg\$D\jdcoefct.obj \ + ..\jpeg\$D\jdpostct.obj \ + ..\jpeg\$D\jddctmgr.obj \ + ..\jpeg\$D\jidctfst.obj \ + ..\jpeg\$D\jidctflt.obj \ + ..\jpeg\$D\jidctint.obj \ + ..\jpeg\$D\jidctred.obj \ + ..\jpeg\$D\jdsample.obj \ + ..\jpeg\$D\jdcolor.obj \ + ..\jpeg\$D\jquant1.obj \ + ..\jpeg\$D\jquant2.obj \ + ..\jpeg\$D\jdmerge.obj + +DLIBLIBOBJS= \ + jdapimin.obj \ + jdapistd.obj \ + jdtrans.obj \ + jdatasrc.obj \ + jdmaster.obj \ + jdinput.obj \ + jdmarker.obj \ + jdhuff.obj \ + jdphuff.obj \ + jdmainct.obj \ + jdcoefct.obj \ + jdpostct.obj \ + jddctmgr.obj \ + jidctfst.obj \ + jidctflt.obj \ + jidctint.obj \ + jidctred.obj \ + jdsample.obj \ + jdcolor.obj \ + jquant1.obj \ + jquant2.obj \ + jdmerge.obj + +# These objectfiles are included in libjpeg.lib +OBJECTS= $(COMOBJECTS) $(CLIBOBJECTS) $(DLIBOBJECTS) + +# object files for sample applications (excluding library files) +COBJECTS= \ + ..\jpeg\$D\cjpeg.obj \ + ..\jpeg\$D\rdppm.obj \ + ..\jpeg\$D\rdgif.obj \ + ..\jpeg\$D\rdtarga.obj \ + ..\jpeg\$D\rdrle.obj \ + ..\jpeg\$D\rdbmp.obj \ + ..\jpeg\$D\rdswitch.obj \ + ..\jpeg\$D\cdjpeg.obj + +DOBJECTS= \ + ..\jpeg\$D\djpeg.obj \ + ..\jpeg\$D\wrppm.obj \ + ..\jpeg\$D\wrgif.obj \ + ..\jpeg\$D\wrtarga.obj \ + ..\jpeg\$D\wrrle.obj \ + ..\jpeg\$D\wrbmp.obj \ + ..\jpeg\$D\rdcolmap.obj \ + ..\jpeg\$D\cdjpeg.obj + +TROBJECTS= \ + ..\jpeg\$D\jpegtran.obj \ + ..\jpeg\$D\rdswitch.obj \ + ..\jpeg\$D\cdjpeg.obj \ + ..\jpeg\$D\transupp.obj + +all: $(OBJECTS) $(OS2JPEGLIB) + +$(COMLIBOBJS): + copy ..\jpeg\$D\jcomapi.obj + copy ..\jpeg\$D\jutils.obj + copy ..\jpeg\$D\jerror.obj + copy ..\jpeg\$D\jmemmgr.obj + copy ..\jpeg\$D\jmemnobs.obj + +$(CLIBLIBOBJS): + copy ..\jpeg\$D\jcapimin.obj + copy ..\jpeg\$D\jcapistd.obj + copy ..\jpeg\$D\jctrans.obj + copy ..\jpeg\$D\jcparam.obj + copy ..\jpeg\$D\jdatadst.obj + copy ..\jpeg\$D\jcinit.obj + copy ..\jpeg\$D\jcmaster.obj + copy ..\jpeg\$D\jcmarker.obj + copy ..\jpeg\$D\jcmainct.obj + copy ..\jpeg\$D\jcprepct.obj + copy ..\jpeg\$D\jccoefct.obj + copy ..\jpeg\$D\jccolor.obj + copy ..\jpeg\$D\jcsample.obj + copy ..\jpeg\$D\jchuff.obj + copy ..\jpeg\$D\jcphuff.obj + copy ..\jpeg\$D\jcdctmgr.obj + copy ..\jpeg\$D\jfdctfst.obj + copy ..\jpeg\$D\jfdctflt.obj + copy ..\jpeg\$D\jfdctint.obj + +$(DLIBLIBOBJS): + copy ..\jpeg\$D\jdapimin.obj + copy ..\jpeg\$D\jdapistd.obj + copy ..\jpeg\$D\jdtrans.obj + copy ..\jpeg\$D\jdatasrc.obj + copy ..\jpeg\$D\jdmaster.obj + copy ..\jpeg\$D\jdinput.obj + copy ..\jpeg\$D\jdmarker.obj + copy ..\jpeg\$D\jdhuff.obj + copy ..\jpeg\$D\jdphuff.obj + copy ..\jpeg\$D\jdmainct.obj + copy ..\jpeg\$D\jdcoefct.obj + copy ..\jpeg\$D\jdpostct.obj + copy ..\jpeg\$D\jddctmgr.obj + copy ..\jpeg\$D\jidctfst.obj + copy ..\jpeg\$D\jidctflt.obj + copy ..\jpeg\$D\jidctint.obj + copy ..\jpeg\$D\jidctred.obj + copy ..\jpeg\$D\jdsample.obj + copy ..\jpeg\$D\jdcolor.obj + copy ..\jpeg\$D\jquant1.obj + copy ..\jpeg\$D\jquant2.obj + copy ..\jpeg\$D\jdmerge.obj + +$(WXDIR)\lib\os2jpeg1.lib: \ + $(COMLIBOBJS) \ + $(CLIBLIBOBJS) + touch $(WXDIR)\lib\os2jpeg1.lib + del $(WXDIR)\lib\os2jpeg1.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + +$(WXDIR)\lib\os2jpeg2.lib: $(DLIBLIBOBJS) + touch $(WXDIR)\lib\os2jpeg2.lib + del $(WXDIR)\lib\os2jpeg2.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + +$(WXDIR)\lib\os2jpeg.lib: \ + $(TEMP1TGT) \ + $(TEMP2TGT) + touch $(WXDIR)\lib\os2jpeg.lib + del $(WXDIR)\lib\os2jpeg.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + del *.obj + del $(TEMP1TGT) + del $(TEMP2TGT) + +clean: + del *.obj + del *.exe + del *.lib + +cleanall: clean + diff --git a/src/jpeg/jconfig.h b/src/jpeg/jconfig.h index 2bf765bb68..83d28b7bdb 100644 --- a/src/jpeg/jconfig.h +++ b/src/jpeg/jconfig.h @@ -13,9 +13,9 @@ /* use wxWindows' configure */ #include "wx/setup.h" -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT #undef void #undef const @@ -29,8 +29,8 @@ #undef CHAR_IS_UNSIGNED #endif -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H #undef NEED_BSD_STRINGS #undef NEED_SYS_TYPES_H #undef NEED_FAR_POINTERS diff --git a/src/jpeg/jmorecfg.h b/src/jpeg/jmorecfg.h index 54e85ec823..3a774dc7fb 100644 --- a/src/jpeg/jmorecfg.h +++ b/src/jpeg/jmorecfg.h @@ -186,16 +186,16 @@ typedef unsigned int JDIMENSION; * or code profilers that require it. */ -#if defined(__VISAGECPP__) -/* a function called through method pointers: */ -#define METHODDEF(type) static type _Optlink -/* a function used only in its module: */ -#define LOCAL(type) static type _Optlink -/* a function referenced thru EXTERNs: */ -#define GLOBAL(type) type -/* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type _Optlink -#else +//#if defined(__VISAGECPP__) +///* a function called through method pointers: */ +//#define METHODDEF(type) static type _Optlink +///* a function used only in its module: */ +//#define LOCAL(type) static type _Optlink +///* a function referenced thru EXTERNs: */ +//#define GLOBAL(type) type +///* a reference to a GLOBAL function: */ +//#define EXTERN(type) extern type _Optlink +//#else /* a function called through method pointers: */ #define METHODDEF(type) static type /* a function used only in its module: */ @@ -204,7 +204,7 @@ typedef unsigned int JDIMENSION; #define GLOBAL(type) type /* a reference to a GLOBAL function: */ #define EXTERN(type) extern type -#endif +//#endif diff --git a/src/os2/dnd.cpp b/src/os2/dnd.cpp index c37a27db55..452c5a2abc 100644 --- a/src/os2/dnd.cpp +++ b/src/os2/dnd.cpp @@ -72,15 +72,6 @@ bool wxDropTarget::OnDrop( return FALSE; }; -bool wxDropTarget::OnData( - wxCoord x -, wxCoord y -) -{ - //TODO: - return FALSE; -}; - wxDragResult wxDropTarget::OnData( wxCoord x , wxCoord y @@ -105,42 +96,6 @@ bool wxDropTarget::IsAcceptable( return FALSE; }; -// ---------------------------------------------------------------------------- -// wxTextDropTarget -// ---------------------------------------------------------------------------- - -wxTextDropTarget::~wxTextDropTarget() -{ - // TODO: -} - -bool wxTextDropTarget::OnData( - wxCoord x -, wxCoord y -) -{ - // TODO: - return FALSE; -}; - -// ---------------------------------------------------------------------------- -// wxFileDropTarget -// ---------------------------------------------------------------------------- - -wxFileDropTarget::~wxFileDropTarget() -{ - // TODO: -} - -bool wxFileDropTarget::OnData( - wxCoord x -, wxCoord y -) -{ - // TODO: - return FALSE; -}; - //------------------------------------------------------------------------- // wxDropSource //------------------------------------------------------------------------- diff --git a/src/os2/makefile.va b/src/os2/makefile.va index 66f92909dd..e10f25fdc6 100644 --- a/src/os2/makefile.va +++ b/src/os2/makefile.va @@ -29,6 +29,7 @@ GENTEMPTGT=$(WXDIR)\lib\wxgen.lib NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib OS2TEMPTGT2=$(WXDIR)\lib\wxos22.lib +HTMLTEMPTGT=$(WXDIR)\lib\wxhtml.lib DUMMYOBJ=$D\dummy.obj !endif @@ -110,8 +111,8 @@ GENERICOBJS= \ ..\generic\$D\statusbr.obj \ ..\generic\$D\tabg.obj \ ..\generic\$D\textdlgg.obj \ - ..\generic\$D\treectrl.obj \ - ..\generic\$D\tipdlg.obj + ..\generic\$D\tipdlg.obj \ + ..\generic\$D\treectrl.obj # ..\generic\$D\gridg.obj \ # ..\generic\$D\notebook.obj \ @@ -145,8 +146,8 @@ GENLIBOBJS= \ statusbr.obj \ tabg.obj \ textdlgg.obj \ - treectrl.obj \ - tipdlg.obj + tipdlg.obj \ + treectrl.obj # These are generic things that don't need to be compiled on PM, # but sometimes it's useful to do so for testing purposes. @@ -497,7 +498,7 @@ OS2LIBOBJS2 = \ textctrl.obj \ thread.obj \ timer.obj \ -# toolbar.obj \ + toolbar.obj \ tooltip.obj \ utils.obj \ utilsexc.obj \ @@ -505,26 +506,47 @@ OS2LIBOBJS2 = \ window.obj HTMLOBJS = \ + ..\html\$D\helpdata.obj \ + ..\html\$D\helpfrm.obj \ ..\html\$D\htmlcell.obj \ - ..\html\$D\htmlfilter.obj \ - ..\html\$D\htmlhelp.obj \ - ..\html\$D\htmlhelp_io.obj \ - ..\html\$D\htmlparser.obj \ + ..\html\$D\htmlfilt.obj \ + ..\html\$D\htmlpars.obj \ ..\html\$D\htmltag.obj \ ..\html\$D\htmlwin.obj \ - ..\html\$D\htmlwinparser.obj \ - ..\html\$D\mod_fonts.obj \ - ..\html\$D\mod_hline.obj \ - ..\html\$D\mod_image.obj \ - ..\html\$D\mod_layout.obj \ - ..\html\$D\mod_links.obj \ - ..\html\$D\mod_list.obj \ - ..\html\$D\mod_pre.obj \ - ..\html\$D\mod_tables.obj \ - ..\html\$D\search.obj + ..\html\$D\htmprint.obj \ + ..\html\$D\m_fonts.obj \ + ..\html\$D\m_hline.obj \ + ..\html\$D\m_image.obj \ + ..\html\$D\m_layout.obj \ + ..\html\$D\m_links.obj \ + ..\html\$D\m_list.obj \ + ..\html\$D\m_pre.obj \ + ..\html\$D\m_tables.obj \ + ..\html\$D\search.obj \ + ..\html\$D\winpars.obj + +HTMLLIBOBJS = \ + helpdata.obj \ + helpfrm.obj \ + htmlcell.obj \ + htmlfilt.obj \ + htmlpars.obj \ + htmltag.obj \ + htmlwin.obj \ + htmprint.obj \ + m_fonts.obj \ + m_hline.obj \ + m_image.obj \ + m_layout.obj \ + m_links.obj \ + m_list.obj \ + m_pre.obj \ + m_tables.obj \ + search.obj \ + winpars.obj # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS) +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(NONESSENTIALOBJS) $(OS2OBJS) # Normal, static library all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) @@ -680,8 +702,28 @@ $(GENLIBOBJS): copy ..\generic\$D\statusbr.obj copy ..\generic\$D\tabg.obj copy ..\generic\$D\textdlgg.obj - copy ..\generic\$D\treectrl.obj copy ..\generic\$D\tipdlg.obj + copy ..\generic\$D\treectrl.obj + +$(HTMLLIBOBJS): + copy ..\html\$D\helpdata.obj + copy ..\html\$D\helpfrm.obj + copy ..\html\$D\htmlcell.obj + copy ..\html\$D\htmlfilt.obj + copy ..\html\$D\htmlpars.obj + copy ..\html\$D\htmltag.obj + copy ..\html\$D\htmlwin.obj + copy ..\html\$D\htmprint.obj + copy ..\html\$D\m_fonts.obj + copy ..\html\$D\m_hline.obj + copy ..\html\$D\m_image.obj + copy ..\html\$D\m_layout.obj + copy ..\html\$D\m_links.obj + copy ..\html\$D\m_list.obj + copy ..\html\$D\m_pre.obj + copy ..\html\$D\m_tables.obj + copy ..\html\$D\search.obj + copy ..\html\$D\winpars.obj $(OS2LIBOBJS1): copy ..\os2\$D\accel.obj @@ -753,7 +795,7 @@ $(OS2LIBOBJS2): copy ..\os2\$D\textctrl.obj copy ..\os2\$D\thread.obj copy ..\os2\$D\timer.obj -# copy ..\os2\$D\toolbar.obj + copy ..\os2\$D\toolbar.obj copy ..\os2\$D\tooltip.obj copy ..\os2\$D\utils.obj copy ..\os2\$D\utilsexc.obj @@ -823,6 +865,13 @@ $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS) $**; << +$(WXDIR)\lib\wxhtml.lib: $(HTMLLIBOBJS) + touch $(WXDIR)\lib\wxhtml.lib + del $(WXDIR)\lib\wxhtml.lib + ilib $(LIBFLAGS) $@ @<< + $**; +<< + $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS) touch $(WXDIR)\lib\wxnones.lib del $(WXDIR)\lib\wxnones.lib @@ -851,6 +900,7 @@ $(WXDIR)\lib\wx.lib: \ $(COMTEMPTGT2) \ $(COMTEMPTGT3) \ $(GENTEMPTGT) \ + $(HTMLTEMPTGT) \ $(NONESTEMPTGT) \ $(OS2TEMPTGT1) \ $(OS2TEMPTGT2) \ @@ -864,6 +914,7 @@ $(WXDIR)\lib\wx.lib: \ del $(COMTEMPTGT2) del $(COMTEMPTGT3) del $(GENTEMPTGT) + del $(HTMLTEMPTGT) del $(NONESTEMPTGT) del $(OS2TEMPTGT1) del $(OS2TEMPTGT2) @@ -931,9 +982,10 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm -erase $(COMMDIR)\lex_yy.c -erase $(OS2DIR)\$D\*.obj -rmdir $(D) - -rmdir ole\$(D) -rmdir ..\generic\$(D) -rmdir ..\common\$(D) + -rmdir ..\html\$(D) + -rmdir ..\os2\$(D) cleanall: clean diff --git a/src/xpm/MAKEFILE.VA b/src/xpm/MAKEFILE.VA new file mode 100644 index 0000000000..f4bd88233c --- /dev/null +++ b/src/xpm/MAKEFILE.VA @@ -0,0 +1,106 @@ +# +# File: makefile.vc +# Author: David Webster +# Created: 1999 +# Updated: +# Copyright: c) 1993, AIAI, University of Edinburgh +# +# "%W% %G%" +# +# Makefile : Builds os2xpm.lib library for OS/2 3.0/4.0 + +# Suffixes +OBJSUFF=obj +SRCSUFF=cpp + +OS2FLAGS=/c /W3 /DOS232 /D__VISAGECPP__ /Dwx_msw /Ss /Q /N100 +OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 +OS2LIBFLAGS=/NOL /NOE +OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB + +# Change WXDIR or WXWIN to wherever wxWindows is found +WXDIR = h:\dev\wx2\wxWindows + +OS2XPMDIR=$(WXDIR)\src\xpm +OS2XPMINC=$(WINXPMDIR) +OS2XPMLIB=$(WXDIR)\lib\os2xpm.lib + +INC=-I$(WXDIR)\src\xpm -I$(OS2XPMINC) + +!ifndef FINAL +FINAL=0 +!endif + +!if "$(NOPCH)" == "1" +PCH= +PRECOMP= +MAKEPRECOMP= +!else +PCH=$(WXLIBNAME).pch +PRECOMP=/Si$(PCH) +MAKEPRECOMP=/Fi$(PCH) +!endif + +!if "$(FINAL)" == "0" +D=Debug +OPT = +DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb +LINK_DEBUG_FLAGS=/DEBUG +CRTFLAG=/Gm /Gd +!else +# /O1 - smallest code +# /O2 - fastest code +D=Release +OPT = /O+ /Oc /G5 +DEBUG_FLAGS= +LINK_DEBUG_FLAGS=/RELEASE +CRTFLAG=/Gm /Gd +!endif + +!if [md $(OS2XPMDIR)\$D] +!endif + + +CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) + +{..\xpm}.c{..\xpm\$D}.obj: + @echo $< + icc @<< +$(CPPFLAGS) /Fo$@ /Tp $< +<< + +OBJECTS = \ + ..\xpm\$D\crbuffri.obj \ + ..\xpm\$D\crdatfri.obj \ + ..\xpm\$D\create.obj \ + ..\xpm\$D\crifrbuf.obj \ + ..\xpm\$D\crifrdat.obj \ + ..\xpm\$D\data.obj \ + ..\xpm\$D\hashtab.obj \ + ..\xpm\$D\misc.obj \ + ..\xpm\$D\parse.obj \ + ..\xpm\$D\rdftodat.obj \ + ..\xpm\$D\rdftoi.obj \ + ..\xpm\$D\rgb.obj \ + ..\xpm\$D\scan.obj \ + ..\xpm\$D\simx.obj \ + ..\xpm\$D\wrffrdat.obj \ + ..\xpm\$D\wrffrp.obj \ + ..\xpm\$D\wrffri.obj + +all: $(OS2XPMLIB) + +$(WXDIR)\lib\os2xpm.lib: $(OBJECTS) + touch $(WXDIR)\lib\os2xpm.lib + del $(WXDIR)\lib\os2xpm.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + +clean: + del *.obj + del *.exe + del *.lib + +cleanall: clean + diff --git a/src/xpm/create.c b/src/xpm/create.c index 71d33caadb..1b1e592182 100644 --- a/src/xpm/create.c +++ b/src/xpm/create.c @@ -222,17 +222,17 @@ SetCloseColor(Display *display, Colormap colormap, Visual *visual, XColor *col, * occurred, so we try the next closest color, and so on, until no more * colors are within closeness of the target. If we knew that the * colormap had changed, we could skip this sequence. - * + * * If _none_ of the colors within closeness of the target can be allocated, * then we can finally be pretty sure that the colormap has actually * changed. In this case we try to allocate the original color (again), * then try the closecolor stuff (again)... - * + * * In theory it would be possible for an infinite loop to occur if another * process kept changing the colormap every time we sorted it, so we set * a maximum on the number of iterations. After this many tries, we use * XGrabServer() to ensure that the colormap remains unchanged. - * + * * This approach gives particularly bad worst case performance - as many as * colormap reads and sorts may be needed, and as * many as * attempted allocations @@ -668,10 +668,10 @@ XpmCreateImageFromXpmImage(Display *display, XpmImage *image, /* * set the ximage data - * + * * In case depth is 1 or bits_per_pixel is 4, 6, 8, 24 or 32 use * optimized functions, otherwise use slower but sure general one. - * + * */ if (ximage->depth == 1) @@ -1432,6 +1432,7 @@ XpmCreatePixmapFromXpmImage(Display *display, Drawable d, XpmImage *image, } #else /* FOR_MSW part follows */ +#if !defined(__VISAGECPP__) static void MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int height, unsigned int *pixelindex, Pixel *pixels) @@ -1457,5 +1458,35 @@ MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int h } } } +#else +void MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int height, + unsigned int *pixelindex, Pixel *pixels) +{ + unsigned int *data = pixelindex; + unsigned int x, y; +// TODO: +/* + SelectObject(*dc, image->bitmap); + if (image->depth == 1) + { + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + SetPixel(*dc, x, y, (pixels[*(data++)] ? RGB(255,255,255) : 0)); + } + } + } + else + { + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + SetPixel(*dc, x, y, pixels[*(data++)]); + } + } + } +*/ + return; +} +#endif // __VISAGECPP__ + #endif /* FOR_MSW */ diff --git a/src/xpm/rgb.c b/src/xpm/rgb.c index 38b180dd20..efca96467d 100644 --- a/src/xpm/rgb.c +++ b/src/xpm/rgb.c @@ -193,10 +193,12 @@ xpmGetRgbName(xpmRgbName rgbn[], int rgbn_max, int red, int green, int blue) i = 0; while (i < numTheRGBRecords) { rgbVal = theRGBRecords[i].rgb; +#if !defined(__VISAGECPP__) if (GetRValue(rgbVal) == red && GetGValue(rgbVal) == green && GetBValue(rgbVal) == blue) return (theRGBRecords[i].name); +#endif i++; } return (NULL); @@ -247,9 +249,11 @@ xpmGetRGBfromName(char *inname, int *r, int *g, int *b) cmp = strcasecmp(name, theRGBRecords[middle].name); if (cmp == 0) { rgbVal = theRGBRecords[middle].rgb; +#if !defined(__VISAGECPP__) *r = GetRValue(rgbVal); *g = GetGValue(rgbVal); *b = GetBValue(rgbVal); +#endif free(name); return (1); } else if (cmp < 0) { diff --git a/src/xpm/rgbtab.h b/src/xpm/rgbtab.h index 39e8d27c9c..75b0f51aa2 100644 --- a/src/xpm/rgbtab.h +++ b/src/xpm/rgbtab.h @@ -47,6 +47,13 @@ typedef struct { #define myRGB(r,g,b) \ ((unsigned long)r<<16|(unsigned long)g<<8|(unsigned long)b) */ + +/* Need an RBG conversion confunction here for OS/2 */ +#if defined(__VISAGECPP__) +/* Bogus stuff to make it compile for now */ +static rgbRecord theRGBRecords[] = { {"AliceBlue", 0L}, {"AntiqueWhite", 1L}, NULL }; +static int numTheRGBRecords = 2; +#else #define myRGB(r,g,b) RGB(r,g,b) /* MSW has this macro */ @@ -290,3 +297,4 @@ static rgbRecord theRGBRecords[] = }; static int numTheRGBRecords = 234; +#endif diff --git a/src/xpm/scan.c b/src/xpm/scan.c index b08783c952..16c1d2e674 100644 --- a/src/xpm/scan.c +++ b/src/xpm/scan.c @@ -240,10 +240,10 @@ XpmCreateXpmImageFromImage(Display *display, XImage *image, XImage *shapeimage, /* * scan the image data - * + * * In case depth is 1 or bits_per_pixel is 4, 6, 8, 24 or 32 use optimized * functions, otherwise use slower but sure general one. - * + * */ if (image) { @@ -369,8 +369,8 @@ ScanOtherColors(Display *display, XpmColor *colors, int ncolors, Pixel *pixels, #ifndef FOR_MSW xpmRgbName rgbn[MAX_RGBNAMES]; #else - xpmRgbName *rgbn = NULL; -#endif + xpmRgbName *rgbn = NULL; +#endif int rgbn_max = 0; unsigned int i, j, c, i2; XpmColor *color; @@ -490,7 +490,7 @@ ScanOtherColors(Display *display, XpmColor *colors, int ncolors, Pixel *pixels, #ifndef FOR_MSW sprintf(buf, "#%04X%04X%04X", xcolor->red, xcolor->green, xcolor->blue); -#else +#else sprintf(buf, "#%02x%02x%02x", xcolor->red, xcolor->green, xcolor->blue); #endif @@ -792,12 +792,14 @@ MSWGetImagePixels(Display *display, XImage *image, unsigned int width, unsigned iptr = pmap->pixelindex; for (y = 0; y < height; y++) { +#if !defined(__VISAGECPP__) /* fixme for OS/2 */ for (x = 0; x < width; x++, iptr++) { /* bitmap must be selected !!! ??? */ pixel = GetPixel(*display, x, y); if (storePixel(pixel, pmap, iptr)) return (XpmNoMemory); } +#endif } return (XpmSuccess); } diff --git a/src/xpm/simx.c b/src/xpm/simx.c index 78bf77b0fc..b3e3fb1369 100644 --- a/src/xpm/simx.c +++ b/src/xpm/simx.c @@ -120,13 +120,15 @@ XDefaultScreen(Display *d) /* I get only 1 plane but 8 bits per pixel, so I think BITSPIXEL should be depth */ -int +int XDefaultDepth(Display *display, Screen *screen) { int d, b; +#if !defined(__VISAGECPP__) /* fisme for OS/2 */ b = GetDeviceCaps(*display, BITSPIXEL); d = GetDeviceCaps(*display, PLANES); +#endif return (b); } @@ -138,7 +140,7 @@ XDefaultColormap(Display *display, Screen *screen) /* convert hex color names, wrong digits (not a-f,A-F,0-9) are treated as zero */ -static int +static int hexCharToInt(char c) { int r; @@ -155,7 +157,7 @@ hexCharToInt(char c) return (r); } -static int +static int rgbFromHex(char *hex, int *r, int *g, int *b) { int len; @@ -185,7 +187,7 @@ rgbFromHex(char *hex, int *r, int *g, int *b) } /* Color related functions */ -int +int XParseColor(Display *d, Colormap *cmap, char *name, XColor *color) { int r, g, b; /* only 8 bit values used */ @@ -203,7 +205,9 @@ XParseColor(Display *d, Colormap *cmap, char *name, XColor *color) } if (okay) { +#if !defined(__VISAGECPP__) /* fixme for OS/2 */ color->pixel = RGB(r, g, b); +#endif color->red = (BYTE) r; color->green = (BYTE) g; color->blue = (BYTE) b; @@ -213,14 +217,14 @@ XParseColor(Display *d, Colormap *cmap, char *name, XColor *color) } -int +int XAllocColor(Display *d, Colormap *cmap, XColor *color) { /* colormap not used yet so color->pixel is the real COLORREF (RBG) and not an index in some colormap as in X */ return (1); } -void +void XQueryColors(Display *display, Colormap *colormap, XColor *xcolors, int ncolors) { @@ -229,14 +233,16 @@ XQueryColors(Display *display, Colormap *colormap, XColor *xc = xcolors; int i; +#if !defined(__VISAGECPP__) /* fixme for OS/2 */ for (i = 0; i < ncolors; i++, xc++) { xc->red = GetRValue(xc->pixel); xc->green = GetGValue(xc->pixel); xc->blue = GetBValue(xc->pixel); } +#endif return; } -int +int XFreeColors(Display *d, Colormap cmap, unsigned long pixels[], int npixels, unsigned long planes) { @@ -255,8 +261,10 @@ XCreateImage(Display *d, Visual *v, if (img) { /* *img = CreateCompatibleBitmap(*d, width, height); */ +#if !defined(__VISAGECPP__) /* fixme for OS/2 */ img->bitmap = CreateBitmap(width, height, 1 /* plane */ , depth /* bits per pixel */ , NULL); +#endif img->width = width; img->height = height; img->depth = depth; @@ -265,18 +273,20 @@ XCreateImage(Display *d, Visual *v, } -void +void XImageFree(XImage *img) { if (img) { XpmFree(img); } } -void +void XDestroyImage(XImage *img) { if (img) { +#if !defined(__VISAGECPP__) /* fixme for OS/2 */ DeleteObject(img->bitmap); /* check return ??? */ +#endif XImageFree(img); } } diff --git a/src/xpm/simx.h b/src/xpm/simx.h index 23e8a1a297..ced9b39157 100644 --- a/src/xpm/simx.h +++ b/src/xpm/simx.h @@ -39,7 +39,12 @@ #ifdef FOR_MSW +#if defined(__OS2__) +#define INCL_OS2 +#include +#else #include "windows.h" /* MS windows GDI types */ +#endif /* * minimal portability layer between ansi and KR C @@ -72,7 +77,12 @@ typedef void *Visual; /* not used yet, is for GRAY, COLOR, typedef void *Colormap; /* should be COLORPALETTE, not done * yet */ +#if !defined(__OS2__) typedef COLORREF Pixel; +#else +typedef unsigned long COLORREF; +typedef unsigned long Pixel; +#endif #define PIXEL_ALREADY_TYPEDEFED /* to let xpm.h know about it */ diff --git a/src/xpm/xpm34.h b/src/xpm/xpm34.h index 1f7c046197..94071dec63 100644 --- a/src/xpm/xpm34.h +++ b/src/xpm/xpm34.h @@ -43,6 +43,10 @@ #if (defined(_WINDOWS) || defined(__WXMSW__) || defined(WIN32)) && !defined(FOR_MSW) #define FOR_MSW #endif +/* Piggyback on MSW for now */ +#if (defined(__OS2__) || defined(__WXPM__) || defined(OS232)) && !defined(FOR_MSW) +#define FOR_MSW +#endif /* * first some identification numbers: @@ -271,7 +275,7 @@ extern "C" { * arguments to be corrupted espec. in XpmWriteFileFromXpmImage. * So, define all prototypes explicitly. */ -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__OS2__) /* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */ @@ -511,7 +515,7 @@ extern "C" { XpmInfo *info)); #endif // _MSC_VER - + #ifdef __cplusplus } /* for C++ V2.0 */ #endif