]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some makefiles, cured some wxMotif bugs
authorJulian Smart <julian@anthemion.co.uk>
Sun, 10 Jan 1999 23:28:36 +0000 (23:28 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 10 Jan 1999 23:28:36 +0000 (23:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
distrib/msw/generic.rsp
docs/bugs.txt
docs/motif/todo.txt
samples/bombs/makefile.unx
samples/image/makefile.unx [new file with mode: 0644]
samples/notebook/test.cpp
src/common/image.cpp
src/common/socket.cpp
src/generic/sashwin.cpp
src/make.env
src/motif/frame.cpp
src/motif/makefile.unx
src/png/makefile.unx [new file with mode: 0644]
src/zlib/makefile.unx

index 8febedb3af65a1c7c7187de7eb4458ebfc928dcf..290a5fc84d72f31b25e7c558d7c0d4cb16ddcd9b 100644 (file)
@@ -199,6 +199,7 @@ utils/glcanvas/win/*.xpm
 utils/glcanvas/win/*.txt
 utils/glcanvas/win/*.ico
 utils/glcanvas/win/*.bmp
+
 utils/glcanvas/src/*.h
 utils/glcanvas/src/*.cpp
 utils/glcanvas/src/*.def
@@ -209,6 +210,12 @@ utils/glcanvas/src/*.xpm
 utils/glcanvas/src/*.txt
 utils/glcanvas/src/*.ico
 utils/glcanvas/src/*.bmp
+
+utils/glcanvas/motif/*.h
+utils/glcanvas/motif/*.cpp
+utils/glcanvas/motif/makefile*
+utils/glcanvas/motif/*.txt
+
 utils/glcanvas/samples/cube/*.h
 utils/glcanvas/samples/cube/*.cpp
 utils/glcanvas/samples/cube/*.def
index 915dad071240bf0c4f3809768a4812d40a39c574..fad57c2cfeb273339783df52c3913811db7d0b1a 100644 (file)
@@ -10,16 +10,6 @@ wxMSW:
 wxMotif:
 --------
 
-- wxNotebook and property list frame do not appear properly when
-  first shown.
-  Workaround: resize the window (manually or programmatically) to
-  make the window appear.
-  This also happens with other windows, e.g. the sizer
-  dialog in the layout sample.
-
-- wxSashWindow borders aren't repainted properly if the sashtest
-  sample is exposed (after being under another window).
-
 - If a popup wxMenu is destroyed after its parent window has been
   destroyed, we get the message "Object XXX does not have windowed
   ancestor".
@@ -33,6 +23,8 @@ wxMotif:
 
 - Setting the size of a hidden window may show that window.
 
+- Motif-specific wxImage functions not yet implemented.
+
 General:
 --------
 
index 639beb44aa02b4c0e59b489e945cb159058e1d82..3eacb1b8c71c4b357eea56fe1e13a06f5cb00b6b 100644 (file)
@@ -35,19 +35,19 @@ High Priority
   painting a tiled bitmap, then a slight flicker might be seen unless
   X can be persuaded not to repaint the window background by default.
 
-- wxNotebook bug: why doesn't the notebook sample appear until the
-  user resizes the window again? But it's OK for MDI. Strange.
-
 - wxSpinButton
 
 - Miscellaneous events.
 
 - Get wxGLCanvas from 1.68 working.
 
+- Implement missing wxImage functions for Motif.
+
 Low Priority
 ------------
 
-- Visuals: how to select an appropriate one?
+- Visuals: how to select an appropriate one? See Thomas Runge's
+  visual patch for 1.68 -- should be straightforward to port to 2.0.
 
 - Work out why XFreeFont in font.cpp produces a segv. This is
   currently commented out, which presumably causes a memory leak.
index 340c83b5178663c9af43d3c3b1754f1351b91f59..118dabbfd4ea390636bc50e0d47f8babb2e59d71 100644 (file)
@@ -13,5 +13,5 @@ PROGRAM=bombs
 
 OBJECTS = bombs.o bombs1.o game.o
 
-include ../../../src/makeprog.env
+include ../../src/makeprog.env
 
diff --git a/samples/image/makefile.unx b/samples/image/makefile.unx
new file mode 100644 (file)
index 0000000..3612350
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.unx
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+# Copyright:   (c) 1998 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for image example (UNIX).
+
+PROGRAM=image
+
+OBJECTS=$(PROGRAM).o
+
+include ../../src/makeprog.env
+
index 7ee1dfb3e86db99c27bb2d3cddd76c4916534462..4070a935bd20c305ae892b16a087c189aad8b0ce 100644 (file)
@@ -44,9 +44,11 @@ bool MyApp::OnInit(void)
   frame = new MyFrame((wxFrame*) NULL, -1, (char *) "Notebook", wxPoint(-1, -1), wxSize(365, 390), wxDEFAULT_FRAME_STYLE);
 
   // Problem with generic wxNotebook implementation whereby it doesn't size properly unless
-  // you set the size again (to a different size than before, since SetSize is optimized)
-#if defined(__WXMOTIF__) || defined(__WIN16__)
-  frame->SetSize(-1, -1, 370, 390);
+  // you set the size again
+#if defined(__WIN16__)
+  int width, height;
+  frame->GetSize(& width, & height);
+  frame->SetSize(-1, -1, width, height);
 #endif
 
   return TRUE;
index 858a80a0cc7edb12ebf8e756c17e2fea2610401f..1b8d810a207ca70f92f6ac2a4a512b9f038ecd06 100644 (file)
@@ -1542,3 +1542,18 @@ wxImage::wxImage( const wxBitmap &bitmap )
 }
 
 #endif
+
+// TODO
+
+#ifdef __WXMOTIF__
+wxBitmap wxImage::ConvertToBitmap() const
+{
+  wxFAIL_MSG("Sorry, wxImage::ConvertToBitmap isn't implemented for wxMotif yet.");
+  return wxNullBitmap;
+}
+
+wxImage::wxImage( const wxBitmap &bitmap )
+{
+  wxFAIL_MSG("Sorry, wxImage::wxImage(const wxBitmap&) isn't implemented for wxMotif yet.");
+}
+#endif
index 0862ac067087da29bc07a0ea7665b6966b262eb1..9b7fbe2ecdc16cd299b098af653f872ead6ce8a0 100644 (file)
@@ -514,7 +514,12 @@ void wxSocketBase::Discard()
 // Under glibc 2.0.7, socketbits.h declares socklen_t to be unsigned int
 // and it uses *socklen_t as the 3rd parameter. Robert.
 
-#ifdef __LINUX__
+// JACS - How can we detect this?
+// Meanwhile, if your compiler complains about socklen_t,
+// switch lines below.
+
+#if defined(__LINUX__)
+// #if 0
 #define wxSOCKET_INT socklen_t
 #else
 #define wxSOCKET_INT int
index 831085a907b2fa3a9b158b97639756ac35556b55..2553c9f70044d3224dd4d0d565983729c941e3e3 100644 (file)
@@ -96,10 +96,8 @@ void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
 
-#if 0
-    if ( m_borderSize > 0 )
-        DrawBorders(dc);
-#endif
+    //    if ( m_borderSize > 0 )
+    DrawBorders(dc);
 
     DrawSashes(dc);
 }
index 44017fcc5715c41cbdf99bd2b9d463f470659553..4e72c8d2d205bdc961be3770596315f6bf334cb2 100644 (file)
@@ -101,10 +101,10 @@ stubs:
        make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
 
 motif:
-       make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm'
+       make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm'
 
 gtk:
-       make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lX11 -lm -pthread'
+       make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread'
 
 cleanstubs:
        make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
index d018baa2a250d7d1de6c90d74546d25559732deb..17b414f5a2516fbc6f301b1b42e0d9d987ee4155 100644 (file)
@@ -479,12 +479,11 @@ void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags)
   if (!(height == -1 && width == -1))
   {
     PreResize();
- /* JACS: not sure if this is necessary
+
     wxSizeEvent sizeEvent(wxSize(width, height), GetId());
     sizeEvent.SetEventObject(this);
 
     GetEventHandler()->ProcessEvent(sizeEvent);
-  */
   }
 }
 
index 28d029c18550d0e97239046705898d9bc1021156..31386a99c3a34663bbadac2d8561d03f0dd63c5d 100644 (file)
@@ -30,6 +30,7 @@ LIB_CPP_SRC=\
  ../common/helpbase.cpp \
  ../common/intl.cpp \
  ../common/ipcbase.cpp \
+ ../common/image.cpp \
  ../common/layout.cpp \
  ../common/list.cpp \
  ../common/log.cpp \
@@ -180,7 +181,7 @@ LIB_C_SRC=\
 # already have a zlib library installed on our system
 # (or we wish to statically link them for some reason)
 EXTRA_C_SRC=\
-  xmcombo/xmcombo.c # $(ZLIB_SRC)
+  xmcombo/xmcombo.c
 
 EXTRA_CPP_SRC=\
 
@@ -192,7 +193,7 @@ EXTRA_CPP_SRC=\
 #  mdi/lib/XsOutline.C\
 #  mdi/lib/XsResizeOutline.C
 
-all:    $(WXLIB)
+all:    $(WXLIB) png zlib
 
 # Define library objects
 OBJECTS=\
@@ -224,6 +225,18 @@ $(WXLIB) : $(OBJECTS)
 combobox/combobox.o: combobox/combobox.c
        $(CCC) -c $(CFLAGS) -o $@ combobox/combobox.c
 
-clean:
+zlib:
+       cd ../zlib; make -f makefile.unx motif
+
+png:
+       cd ../png; make -f makefile.unx motif
+
+clean: cleanzlib cleanpng
        rm -f $(OBJECTS) $(WXLIB)
 
+cleanzlib:
+       cd ../zlib; make -f makefile.unx cleanmotif
+
+cleanpng:
+       cd ../png; make -f makefile.unx cleanmotif
+
diff --git a/src/png/makefile.unx b/src/png/makefile.unx
new file mode 100644 (file)
index 0000000..095d6ea
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# File:                makefile.unx
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+# Copyright:   (c) 1998
+#
+#
+# Makefile for PNG library, Unix
+
+include ../make.env
+
+TARGETLIB=../../lib/libpng.a
+
+LIB_C_SRC = png.c pngread.c pngrtran.c pngrutil.c \
+ pngpread.c pngtrans.c pngwrite.c pngwtran.c pngwutil.c \
+ pngerror.c pngmem.c pngwio.c pngrio.c pngget.c pngset.c
+
+all:    $(TARGETLIB)
+
+# Define library objects
+OBJECTS=\
+ $(LIB_C_SRC:.c=.o)
+
+$(TARGETLIB) : $(OBJECTS)
+       ar $(AROPTIONS) $@ $(OBJECTS)
+       $(RANLIB) $@
+
+clean:
+       rm -f $(OBJECTS) $(TARGETLIB)
index 7062ba8ec8bbdf185d4242cf4bf5ae9592508533..5dc486830eb12380077aa772adc62df05515510a 100644 (file)
 #
 # File:                makefile.unx
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
+# Copyright:   (c) 1998
 #
-# "%W% %G%"
 #
-# Makefile for tree library and example (UNIX).
-# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system.
+# Makefile for PNG library, Unix
 
-WXDIR = ../..
+include ../make.env
 
-# All common UNIX compiler flags and options are now in
-# this central makefile.
-include $(WXDIR)/src/make.env
+TARGETLIB=../../lib/libzlib.a
 
-ZLIBDIR = $(WXDIR)/utils/zlib
-ZLIBLIB = $(WXDIR)/lib/libzlib$(GUISUFFIX).a
+LIB_C_SRC = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \
+  trees.c zutil.c inflate.c infblock.c inftrees.c infcodes.c \
+  infutil.c inffast.c 
 
-SOURCES =      adler32.c deflate.c infblock.c inflate.c zutil.c compress.c \
-               infcodes.c inftrees.c trees.c \
-               crc32.c gzio.c inffast.c infutil.c uncompr.c
-OBJECTS =      $(OBJDIR)/adler32.$(OBJSUFF) $(OBJDIR)/deflate.$(OBJSUFF) \
-               $(OBJDIR)/infblock.$(OBJSUFF) $(OBJDIR)/inflate.$(OBJSUFF) \
-               $(OBJDIR)/zutil.$(OBJSUFF) $(OBJDIR)/trees.$(OBJSUFF) \
-               $(OBJDIR)/compress.$(OBJSUFF) $(OBJDIR)/infcodes.$(OBJSUFF) \
-               $(OBJDIR)/inftrees.$(OBJSUFF) $(OBJDIR)/crc32.$(OBJSUFF) \
-               $(OBJDIR)/gzio.$(OBJSUFF) $(OBJDIR)/inffast.$(OBJSUFF) \
-               $(OBJDIR)/infutil.$(OBJSUFF) $(OBJDIR)/uncompr.$(OBJSUFF)
+all:    $(TARGETLIB)
 
-# Default
+# Define library objects
+OBJECTS=\
+ $(LIB_C_SRC:.c=.o)
 
-.SUFFIXES:
-
-all:   $(OBJDIR) $(ZLIBLIB)
-
-demo:
-
-$(ZLIBLIB): $(OBJECTS)
-       rm -f $@
+$(TARGETLIB) : $(OBJECTS)
        ar $(AROPTIONS) $@ $(OBJECTS)
        $(RANLIB) $@
 
-motif:
-       $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
-
-xview:
-       $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)'
-
-demo_motif:
-       $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
-
-demo_ol:
-       cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)'
-       $(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)'
-
-hp:
-       $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
-           XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
-           LDLIBS='$(HPLDLIBS)'
-
-demo_hp:
-       $(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
-           XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
-           LDLIBS='$(HPLDLIBS)'
-
-$(OBJDIR):
-       mkdir $(OBJDIR)
-
-$(OBJDIR)/adler32.$(OBJSUFF):  adler32.c
-       $(CC) -c $(CPPFLAGS) -o $@ adler32.c
-
-$(OBJDIR)/deflate.$(OBJSUFF):  deflate.c
-       $(CC) -c $(CPPFLAGS) -o $@ deflate.c
-
-$(OBJDIR)/infblock.$(OBJSUFF): infblock.c
-       $(CC) -c $(CPPFLAGS) -o $@ infblock.c
-
-$(OBJDIR)/inflate.$(OBJSUFF):  inflate.c
-       $(CC) -c $(CPPFLAGS) -o $@ inflate.c
-
-$(OBJDIR)/zutil.$(OBJSUFF):    zutil.c
-       $(CC) -c $(CPPFLAGS) -o $@ zutil.c
-
-$(OBJDIR)/compress.$(OBJSUFF): compress.c
-       $(CC) -c $(CPPFLAGS) -o $@ compress.c
-
-$(OBJDIR)/infcodes.$(OBJSUFF): infcodes.c
-       $(CC) -c $(CPPFLAGS) -o $@ infcodes.c
-
-$(OBJDIR)/inftrees.$(OBJSUFF): inftrees.c
-       $(CC) -c $(CPPFLAGS) -o $@ inftrees.c
-
-$(OBJDIR)/trees.$(OBJSUFF):    trees.c
-       $(CC) -c $(CPPFLAGS) -o $@ trees.c
-
-$(OBJDIR)/crc32.$(OBJSUFF):    crc32.c
-       $(CC) -c $(CPPFLAGS) -o $@ crc32.c
-
-$(OBJDIR)/gzio.$(OBJSUFF):     gzio.c
-       $(CC) -c $(CPPFLAGS) -o $@ gzio.c
-
-$(OBJDIR)/inffast.$(OBJSUFF):  inffast.c
-       $(CC) -c $(CPPFLAGS) -o $@ inffast.c
-
-$(OBJDIR)/infutil.$(OBJSUFF):  infutil.c
-       $(CC) -c $(CPPFLAGS) -o $@ infutil.c
-
-$(OBJDIR)/uncompr.$(OBJSUFF):  uncompr.c
-       $(CC) -c $(CPPFLAGS) -o $@ uncompr.c
-
-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) $(OBJDIR)/*.$(OBJSUFF) $(ZLIBLIB) 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
+clean:
+       rm -f $(OBJECTS) $(TARGETLIB)