Added some makefiles, cured some wxMotif bugs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-10 23:28:36 +00:00
parent 247aba1065
commit ee4c6942b4
14 changed files with 123 additions and 148 deletions

View 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

View 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:
--------

View 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.

View File

@@ -13,5 +13,5 @@ PROGRAM=bombs
OBJECTS = bombs.o bombs1.o game.o
include ../../../src/makeprog.env
include ../../src/makeprog.env

View File

@@ -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

View 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;

View 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

View 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

View File

@@ -96,10 +96,8 @@ void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
#if 0
if ( m_borderSize > 0 )
// if ( m_borderSize > 0 )
DrawBorders(dc);
#endif
DrawSashes(dc);
}

View 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'

View 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);
*/
}
}

View 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

30
src/png/makefile.unx Normal file
View File

@@ -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)

View File

@@ -1,133 +1,30 @@
#
# 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)