# define LOGFONT FATTRS
# define LOWORD SHORT1FROMMP
# define HIWORD SHORT2FROMMP
-#endif
+#endif // __WXMSW__
typedef unsigned long WXCOLORREF;
typedef void * WXRGNDATA;
typedef void * WXMSG;
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;
#if wxUSE_HTML
-#include "helpfrm.h"
+#include "wx/html/helpfrm.h"
class WXDLLEXPORT wxHtmlHelpController : public wxEvtHandler
{
#if wxUSE_HTML
-#include "helpdata.h"
+#include "wx/html/helpdata.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/config.h"
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();
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__
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());
}
{
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);
}
}
-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);
}
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;
}
--- /dev/null
+#
+# 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
+
/* 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
#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
* 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: */
#define GLOBAL(type) type
/* a reference to a GLOBAL function: */
#define EXTERN(type) extern type
-#endif
+//#endif
return FALSE;
};
-bool wxDropTarget::OnData(
- wxCoord x
-, wxCoord y
-)
-{
- //TODO:
- return FALSE;
-};
-
wxDragResult wxDropTarget::OnData(
wxCoord x
, wxCoord y
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
//-------------------------------------------------------------------------
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
..\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 \
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.
textctrl.obj \
thread.obj \
timer.obj \
-# toolbar.obj \
+ toolbar.obj \
tooltip.obj \
utils.obj \
utilsexc.obj \
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)
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
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
$**;
<<
+$(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
$(COMTEMPTGT2) \
$(COMTEMPTGT3) \
$(GENTEMPTGT) \
+ $(HTMLTEMPTGT) \
$(NONESTEMPTGT) \
$(OS2TEMPTGT1) \
$(OS2TEMPTGT2) \
del $(COMTEMPTGT2)
del $(COMTEMPTGT3)
del $(GENTEMPTGT)
+ del $(HTMLTEMPTGT)
del $(NONESTEMPTGT)
del $(OS2TEMPTGT1)
del $(OS2TEMPTGT2)
-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
--- /dev/null
+#
+# 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
+
* 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
* <MaximumIterations> colormap reads and sorts may be needed, and as
* many as <MaximumIterations> * <ColormapSize> attempted allocations
/*
* 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)
}
#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)
}
}
}
+#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 */
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);
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) {
#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 */
};
static int numTheRGBRecords = 234;
+#endif
/*
* 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) {
#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;
#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
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);
}
/* 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);
}
/* 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;
return (r);
}
-static int
+static int
rgbFromHex(char *hex, int *r, int *g, int *b)
{
int len;
}
/* Color related functions */
-int
+int
XParseColor(Display *d, Colormap *cmap, char *name, XColor *color)
{
int r, g, b; /* only 8 bit values used */
}
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;
}
-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)
{
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)
{
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;
}
-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);
}
}
#ifdef FOR_MSW
+#if defined(__OS2__)
+#define INCL_OS2
+#include<os2.h>
+#else
#include "windows.h" /* MS windows GDI types */
+#endif
/*
* minimal portability layer between ansi and KR C
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 */
#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:
* 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 */
XpmInfo *info));
#endif // _MSC_VER
-
+
#ifdef __cplusplus
} /* for C++ V2.0 */
#endif