Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Petty
0acf57d2cf This commit was manufactured by cvs2svn to create tag 'wxPy-2-1-5'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPy-2-1-5@3935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 03:04:38 +00:00
5014 changed files with 382414 additions and 890281 deletions

View File

@@ -19,25 +19,10 @@ linux-gnu.system.cache
*.pro
*.opt
*.d
*.swp
*.swo
*.swq
Release
Debug
ReleaseDll
DebugDll
ReleaseUnicode
DebugUnicode
ReleaseUnicodeDll
DebugUnicodeDll
BaseRelease
BaseDebug
BaseReleaseDll
BaseDebugDll
BaseReleaseUnicode
BaseDebugUnicode
BaseReleaseUnicodeDll
BaseDebugUnicodeDll
ReleaseDLL
DebugDLL
robert
stamp-h.in
Makefile
@@ -46,12 +31,3 @@ setup.h
stamp-h
libtool
aclocal.m4
base
gtk
motif
win32
base-release
gtk-release
motif-release
win32-release
*tags

View File

@@ -16,32 +16,44 @@ varaibles and PATH entries.
Continue with item c) below.
b) If using the GNU Mingw32 or GNU Cygwin32 compilers
b) If using the GNU MinGW32 or GNU CygWin32 compilers
You can get Mingw32 from http://www.mingw.org
You'll need the compiler itself which is available from
Cygwin32 is available at http://www.cygwin.com
http://www.cygwin.com
The makefile might have small problems with Cygwin's tools
so it is recommended to use Mingw32 and its toolchain instead
if possible.
When using MingW32 you'll need GNU make which is a part
of the CygWin32 toolchain and is also available as a stand
alone port without the infamous Cygwin.dll from
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32
The makefile has small problems with Cygwin<69>s tools
so it is recommended not to use these (but MingGW32
and its make.exe).
-> Set your path so that it includes the directory
where your compiler and tools reside
-> If your are using an old Mingw32 version (gcc-2.95 or older),
you might need to fix some headers with the patches contained
in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE
PATCHES BY HAND! There are apparently a few different versions
of the headers floating around. Note that these patches are
not needed if you are using Mingw32 gcc-2.95.2 or newer.
-> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32).
If using MINGW32, also set the MINGW32VERSION variable
appropiately.
b-2) Using Mingw32 with gcc-2.95 and Anders Norlander's
Win32 headers
Using the newer gcc-2.95/Noralander header combination
will allow you to compile more of the MSW code, such
as OLE and Drag-n-Drop.
Instructions are similar to those for Regular Mingw32 except
->Get the compiler from
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95/
->patch the gcc headers with info in wxWin\Mingw32-gcc295.patches.
PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few
different versions of the headers floating around.
->copy wxWin\src\makeg295.env to wxWin\src\makeg95.env
c) Build instructions
-> Assumming that you installed the wxWindows sources
@@ -49,9 +61,9 @@ c) Build instructions
-> Copy c:\wxWin\include\wx\msw\setup0.h
to c:\wxWin\include\wx\msw\setup.h
-> Edit c:\wxWin\include\wx\msw\setup.h so that
most features are enabled (i.e. defined to 1), for example:
#define wxUSE_ODBC 0
#define wxUSE_SOCKETS 1
most features are enabled (i.e. defined to 1) with
#define wxUSE_ODBC 0
#define wxUSE_SOCKETS 0
#define wxUSE_HTML 1
#define wxUSE_THREADS 1
#define wxUSE_FS_INET 0
@@ -62,12 +74,15 @@ c) Build instructions
#define wxUSE_LIBJPEG 1
#define wxUSE_LIBPNG 1
and std iostreams are disabled with
and iostreams ares disabled with
#define wxUSE_STD_IOSTREAM 0
note: ODBC and SOCKETS can be 1 for gcc-2.95
-> type: cd c:\wxWin\src\msw
-> type: make -f makefile.g95 (if using GNU tools)
or type: nmake -f makefile.vc (if using MS VC++)
or type: make -f makefile.g295 (if using Mingw32/gcc-2.95)
or type: make -f makefile.vc (if using MS VC++)
II) Unix ports
@@ -115,20 +130,6 @@ ftp server at ftp://sourceware.cygnus.com/pub/cygwin/.
Of course, you can also build the library using plain makefiles (see
section I).
IV) wxBase
----------------------------------------
wxBase is the non GUI part of wxWindows. Currently it can be only built using
configure (i.e. under Unix and probably under Win32 with cygwin) and with
Visual C++.
To build it using configure, just add "--disable-gui" argument to it.
To build wxBase with VC++, use the project files wxBase.dsp and wxBaseDll.dsp
included in the CVS. See http://www.wxwindows.org/vadim/wxDocs/buildmsw.html
for the instructions on how to generate the project files for the programs
using wxBase.
V) MacOS
----------------------------------------
@@ -162,7 +163,7 @@ To cross compile the windows library, do
(or whatever you called it)
Now run configure. There are two ways to do this
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw \
--enable-dnd=no --without-odbc
--enable-dnd=no
where --build= should read whatever platform you're building on. Configure
will notice that build and host platforms differ, and automatically prepend
i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).
@@ -178,9 +179,6 @@ Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers.
[ Update: some new mingw32 versions now have a new set of windows header
files, which apparently can handle ole. Untested at the moment ]
ODBC files don't compile as of 13.10.99 - may be this will be fixed by the
moment you're reading these lines.
Configure will conclude that shared libraries are out of the question and
opt for a static one. I haven't looked into DLL creation yet.
@@ -189,37 +187,14 @@ Type
and wait, wait, wait. Don't leave the room, because the minute you do there
will be a compile error :-)
NB: you risk to get quite a few warnings about "ANSI C++ forbids implicit
conversion from 'void *'" in all places where va_arg macro is used. This
is due to a bug in (some versions of) mingw32 headers which may be
corrected by editing the file
${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h
(instead of egcs-2.91.57 you may have something different), searching for
the lines
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
typedef char *__gnuc_va_list;
#else
typedef void *__gnuc_va_list;
#endif
#endif
and adding "|| defined(_WIN32)" to the list of platforms on which
__gnuc_va_list is char *.
If this is successful, you end up with a libwx_msw.a in win32/lib. Now try
building the minimal sample:
-> cd samples/minimal
-> make
-> mv minimal minimal.exe
and run it with wine, for example (or copy to a Windows box)
and run it with wine, for example
-> wine minimal.exe
If all is well, do an install; from win32

File diff suppressed because it is too large Load Diff

View File

@@ -75,7 +75,8 @@
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID)
PURE;
! STDMETHOD(Invoked)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
! STDMETHOD(Invoked)(THIS_
DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
};
#ifdef __cplusplus
@@ -85,7 +86,8 @@ PURE;
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*)
PURE;
! STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
! STDMETHOD(Invoke)(THIS_
DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
};
#ifdef __cplusplus
@@ -112,58 +114,5 @@ PURE;
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**);
--- i386-mingw32\include\stdio.h Sun Aug 1 06:18:20 1999
+++ stdio.h Sun Nov 7 03:41:40 1999
@@ -203,9 +203,12 @@
int fprintf (FILE* filePrintTo, const char* szFormat, ...);
int printf (const char* szFormat, ...);
int sprintf (char* caBuffer, const char* szFormat, ...);
+int _snprintf (char* caBuffer, size_t n, const char* szFormat, ...);
int vfprintf (FILE* filePrintTo, const char* szFormat, va_list varg);
int vprintf (const char* szFormat, va_list varg);
int vsprintf (char* caBuffer, const char* szFormat, va_list varg);
+int _vsnprintf (char* caBuffer, size_t n, const char* szFormat,
+ va_list varg);
/* Wide character versions */
int fwprintf (FILE* filePrintTo, const wchar_t* wsFormat, ...);
--- i386-mingw32\include\winbase.h Sat Jul 31 17:48:48 1999
+++ winbase.h Fri Feb 25 01:49:08 2000
@@ -989,7 +989,7 @@
BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
#define RtlMoveMemory memmove
#define RtlCopyMemory memcpy
-#define RtlFillMemory memset
+#define RtlFillMemory(d,l,f) memset ((d),(f),(l))
#define RtlZeroMemory(d,l) memset((d),0,(l))
#define MoveMemory RtlMoveMemory
#define CopyMemory RtlCopyMemory
--- i386-mingw32\include\winsock.h Sat Jul 31 17:48:50 1999
+++ winsock.h Mon Mar 20 13:47:12 2000
@@ -13,6 +13,10 @@
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _SYS_TYPES_H
typedef unsigned char u_char;
typedef unsigned short u_short;
@@ -495,4 +499,9 @@
typedef struct timeval TIMEVAL;
typedef struct timeval *PTIMEVAL;
typedef struct timeval *LPTIMEVAL;
+
+#ifdef __cplusplus
+}
#endif
+#endif
+

286
config.guess vendored
View File

@@ -1,7 +1,6 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
# Free Software Foundation, Inc.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,7 +23,6 @@
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -37,20 +35,6 @@
# (but try to keep the structure clean).
#
# Use $HOST_CC if defined. $CC may point to a cross-compiler
if test x"$CC_FOR_BUILD" = x; then
if test x"$HOST_CC" != x; then
CC_FOR_BUILD="$HOST_CC"
else
if test x"$CC" != x; then
CC_FOR_BUILD="$CC"
else
CC_FOR_BUILD=cc
fi
fi
fi
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
@@ -62,8 +46,7 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
@@ -76,7 +59,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
cat <<EOF >dummy.s
.globl main
.ent main
main:
@@ -93,9 +76,9 @@ main:
ret \$31,(\$26),1
.end main
EOF
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
@@ -114,14 +97,8 @@ EOF
;;
esac
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
@@ -165,7 +142,7 @@ EOF
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
@@ -173,7 +150,7 @@ EOF
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE*:*:*:dcosx)
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
@@ -224,32 +201,6 @@ EOF
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
@@ -283,16 +234,12 @@ EOF
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -307,10 +254,10 @@ EOF
exit (-1);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -362,7 +309,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
@@ -373,8 +320,8 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -421,25 +368,25 @@ EOF
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
sed 's/^ //' << EOF >$dummy.c
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
sed 's/^ //' << EOF >dummy.c
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
@@ -447,20 +394,20 @@ EOF
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
rm -f $dummy.c $dummy
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
rm -f dummy.c dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
@@ -485,8 +432,8 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -495,9 +442,6 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
@@ -514,9 +458,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -549,14 +490,11 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*T3E:*:*:*)
echo t3e-cray-unicosmk${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
@@ -569,22 +507,13 @@ EOF
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
if test -x /usr/bin/objformat; then
if test "elf" = "`/usr/bin/objformat`"; then
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0
fi
fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
@@ -594,22 +523,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -621,14 +541,12 @@ EOF
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_help_string=`cd /; ld --help 2>&1`
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
@@ -641,40 +559,11 @@ EOF
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
extern char __libc_release[];
#endif
main(argc, argv)
int argc;
char *argv[];
{
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
printf("unkown\n");
#endif
return 0;
}
EOF
LIBC=""
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >$dummy.s
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
@@ -692,9 +581,9 @@ EOF
.end main
EOF
LIBC=""
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
@@ -711,23 +600,22 @@ EOF
16)
UNAME_MACHINE="alphaev6"
;;
esac
esac
objdump --private-headers $dummy | \
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.s $dummy
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >$dummy.c <<EOF
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
@@ -737,8 +625,8 @@ EOF
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
@@ -757,13 +645,12 @@ EOF
;;
esac
# Determine whether the default compiler is a.out or elf
cat >$dummy.c <<EOF
cat >dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
@@ -780,8 +667,8 @@ EOF
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
@@ -803,14 +690,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:5:7*)
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -820,15 +699,18 @@ EOF
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i?86:UnixWare:*:*)
if /bin/uname -X 2>/dev/null >/dev/null ; then
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
fi
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
@@ -870,7 +752,7 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@@ -882,9 +764,6 @@ EOF
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
@@ -915,7 +794,7 @@ EOF
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
@@ -931,24 +810,12 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >$dummy.c <<EOF
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@@ -986,10 +853,7 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@@ -1049,8 +913,8 @@ main ()
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.

308
config.sub vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -98,21 +98,11 @@ case $os in
os=
basic_machine=$1
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=vxworks
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=-sco3.2v5
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
@@ -131,9 +121,6 @@ case $os in
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -164,21 +151,14 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v)
| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@@ -194,41 +174,24 @@ case $basic_machine in
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-* | armv*-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* )
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
@@ -258,10 +221,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -338,10 +297,6 @@ case $basic_machine in
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
@@ -360,14 +315,6 @@ case $basic_machine in
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
@@ -383,30 +330,13 @@ case $basic_machine in
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -415,14 +345,6 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
@@ -444,22 +366,6 @@ case $basic_machine in
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
i386-go32 | go32)
basic_machine=i386-unknown
os=-go32
;;
i386-mingw32 | mingw32)
basic_machine=i386-unknown
os=-mingw32
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -488,10 +394,6 @@ case $basic_machine in
miniframe)
basic_machine=m68000-convergent
;;
*mint | *MiNT)
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
@@ -506,26 +408,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
msdos)
basic_machine=i386-unknown
os=-msdos
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-corel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@@ -538,10 +424,6 @@ case $basic_machine in
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
@@ -567,25 +449,9 @@ case $basic_machine in
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
np1)
basic_machine=np1-gould
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -603,19 +469,19 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexen)
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86)
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexen-*)
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-*)
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
@@ -639,20 +505,12 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sequent)
basic_machine=i386-sequent
;;
@@ -660,10 +518,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
@@ -671,13 +525,6 @@ case $basic_machine in
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
sun2)
basic_machine=m68000-sun
;;
@@ -722,10 +569,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=t3e-cray
os=-unicos
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -743,10 +586,6 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
@@ -770,14 +609,6 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xmp)
basic_machine=xmp-cray
os=-unicos
@@ -785,10 +616,6 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@@ -796,15 +623,6 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
@@ -827,7 +645,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sparc | sparcv9)
sparc)
basic_machine=sparc-sun
;;
cydra)
@@ -839,16 +657,6 @@ case $basic_machine in
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@@ -902,21 +710,13 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -941,9 +741,6 @@ case $os in
-acis*)
os=-aos
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
@@ -975,18 +772,9 @@ case $os in
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -*MiNT)
os=-mint
;;
-none)
;;
*)
@@ -1012,9 +800,6 @@ case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-corel)
os=-linux
;;
arm*-semi)
os=-aout
;;
@@ -1036,15 +821,6 @@ case $basic_machine in
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@@ -1057,15 +833,6 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
@@ -1129,18 +896,6 @@ case $basic_machine in
f301-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
@@ -1162,15 +917,9 @@ case $basic_machine in
-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
@@ -1198,15 +947,6 @@ case $basic_machine in
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -*MiNT)
vendor=atari
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;

5448
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
#
# Makefile : Builds wxWindows utils for Unix.
#
all:
cd src; make
clean:
cd src; make clean
cd samples; make clean
samples:
cd samples; make

980
contrib/configure vendored
View File

@@ -1,980 +0,0 @@
#! /bin/sh
# From configure.in Id: configure.in
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=Makefile.in
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
ESD_LINK=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:531: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 546 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 563 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 580 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "esd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for esd.h""... $ac_c" 1>&6
echo "configure:612: checking for esd.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 617 "configure"
#include "confdefs.h"
#include <esd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for esd_close in -lesd""... $ac_c" 1>&6
echo "configure:640: checking for esd_close in -lesd" >&5
ac_lib_var=`echo esd'_'esd_close | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lesd $LIBS"
cat > conftest.$ac_ext <<EOF
#line 648 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char esd_close();
int main() {
esd_close()
; return 0; }
EOF
if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ESD_LINK="-lesd"
else
echo "$ac_t""no" 1>&6
fi
else
echo "$ac_t""no" 1>&6
fi
if test "$ESD_LINK" != "" ; then
echo "ESound detected"
fi
PATH_IFS=$wx_cv_path_ifs
WX_TARGET_LIBRARY=$wx_cv_target_library
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "
Makefile
src/Makefile
src/ogl/Makefile
src/mmedia/Makefile
src/stc/Makefile
samples/Makefile
samples/mmedia/Makefile
samples/ogl/Makefile
samples/ogl/ogledit/Makefile
samples/ogl/studio/Makefile
samples/stc/Makefile
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@CPP@%$CPP%g
s%@PATH_IFS@%$PATH_IFS%g
s%@ESD_LINK@%$ESD_LINK%g
s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g
s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile
src/Makefile
src/ogl/Makefile
src/mmedia/Makefile
src/stc/Makefile
samples/Makefile
samples/mmedia/Makefile
samples/ogl/Makefile
samples/ogl/ogledit/Makefile
samples/ogl/studio/Makefile
samples/stc/Makefile
"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

View File

@@ -1,51 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION($Id$)dnl
AC_INIT(Makefile.in)
dnl ---------------
dnl MMedia specific
dnl ---------------
dnl Check for ESD
ESD_LINK=
AC_CHECK_HEADER(esd.h, [
AC_CHECK_LIB(esd, esd_close, [
ESD_LINK="-lesd"
])
])
if test "$ESD_LINK" != "" ; then
echo "ESound detected"
fi
dnl -----------
dnl Final subst
PATH_IFS=$wx_cv_path_ifs
WX_TARGET_LIBRARY=$wx_cv_target_library
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
AC_SUBST(PATH_IFS)
AC_SUBST(ESD_LINK)
AC_SUBST(WX_TARGET_LIBRARY)
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
dnl -----------
dnl File output
AC_OUTPUT([
Makefile
src/Makefile
src/ogl/Makefile
src/mmedia/Makefile
src/stc/Makefile
samples/Makefile
samples/mmedia/Makefile
samples/ogl/Makefile
samples/ogl/ogledit/Makefile
samples/ogl/studio/Makefile
samples/stc/Makefile
])

View File

@@ -1,5 +0,0 @@
html
htmlhelp
pdf
winhelp
htb

View File

@@ -1,9 +0,0 @@
\chapter{Bugs}\label{bugs}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
These are the known bugs.
\begin{itemize}\itemsep=0pt
\item No bugs
\end{itemize}

View File

@@ -1,24 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
%
\section{\class{wxCDAudio}}\label{wxcdaudio}
\wxheading{Derived from}
wxObject
\wxheading{Data structures}
{\small
\begin{verbatim}
typedef struct wxCDtime {
wxUint8 track
};
\end{verbatim}
}
{\small \begin{verbatim}
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus
\end{verbatim}}

View File

@@ -1,66 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdunix.h at 26/Feb/00 14:52:10
%
\section{\class{wxCDAudioLinux}}\label{wxcdaudiolinux}
\wxheading{Derived from}
\helpref{wxCDAudio}{wxcdaudio}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCDAudioLinux::wxCDAudioLinux}\label{wxcdaudiolinuxwxcdaudiolinux}
\func{}{wxCDAudioLinux}{\void}
\func{}{wxCDAudioLinux}{\param{const char* }{dev\_name}}
\membersection{wxCDAudioLinux::\destruct{wxCDAudioLinux}}\label{wxcdaudiolinuxdtor}
\func{}{\destruct{wxCDAudioLinux}}{\void}
\membersection{wxCDAudioLinux::Play}\label{wxcdaudiolinuxplay}
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
\membersection{wxCDAudioLinux::Pause}\label{wxcdaudiolinuxpause}
\func{bool}{Pause}{\void}
\membersection{wxCDAudioLinux::Resume}\label{wxcdaudiolinuxresume}
\func{bool}{Resume}{\void}
\membersection{wxCDAudioLinux::GetStatus}\label{wxcdaudiolinuxgetstatus}
\func{CDstatus}{GetStatus}{\void}
\membersection{wxCDAudioLinux::GetTime}\label{wxcdaudiolinuxgettime}
\func{wxCDtime}{GetTime}{\void}
\membersection{wxCDAudioLinux::GetToc}\label{wxcdaudiolinuxgettoc}
\func{CDtoc\&}{GetToc}{\void}
\membersection{wxCDAudioLinux::Ok}\label{wxcdaudiolinuxok}
\constfunc{bool}{Ok}{\void}
\membersection{wxCDAudioLinux::OpenDevice}\label{wxcdaudiolinuxopendevice}
\func{void}{OpenDevice}{\param{const char* }{dev\_name}}

View File

@@ -1,78 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdwin.h at 26/Feb/00 14:52:15
%
\section{\class{wxCDAudioWin}}\label{wxcdaudiowin}
\wxheading{Derived from}
\helpref{wxCDAudio}{wxcdaudio}
\wxheading{Data structures}
{\small
\begin{verbatim}
typedef struct CDAW\_Internal {
MCIDEVICEID dev\_id
};
\end{verbatim}
}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCDAudioWin::wxCDAudioWin}\label{wxcdaudiowinwxcdaudiowin}
\func{}{wxCDAudioWin}{\void}
\func{}{wxCDAudioWin}{\param{const char* }{dev\_name}}
\membersection{wxCDAudioWin::\destruct{wxCDAudioWin}}\label{wxcdaudiowindtor}
\func{}{\destruct{wxCDAudioWin}}{\void}
\membersection{wxCDAudioWin::Play}\label{wxcdaudiowinplay}
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
\membersection{wxCDAudioWin::Pause}\label{wxcdaudiowinpause}
\func{bool}{Pause}{\void}
\membersection{wxCDAudioWin::Resume}\label{wxcdaudiowinresume}
\func{bool}{Resume}{\void}
\membersection{wxCDAudioWin::GetStatus}\label{wxcdaudiowingetstatus}
\func{CDstatus}{GetStatus}{\void}
\membersection{wxCDAudioWin::GetTime}\label{wxcdaudiowingettime}
\func{wxCDtime}{GetTime}{\void}
\membersection{wxCDAudioWin::GetToc}\label{wxcdaudiowingettoc}
\func{const CDtoc\&}{GetToc}{\void}
\membersection{wxCDAudioWin::Ok}\label{wxcdaudiowinok}
\constfunc{bool}{Ok}{\void}
\membersection{wxCDAudioWin::PrepareToc}\label{wxcdaudiowinpreparetoc}
\func{void}{PrepareToc}{\void}

View File

@@ -1,111 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
%
\section{\class{CDtoc}}\label{cdtoc}
Table of contents manager
\wxheading{Derived from}
No base class
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{CDtoc::CDtoc}\label{cdtoccdtoc}
\func{}{CDtoc}{\param{wxCDtime\& }{tot\_tm}, \param{wxCDtime* }{trks\_tm}, \param{wxCDtime* }{trks\_pos}}
\membersection{CDtoc::GetTrackTime}\label{cdtocgettracktime}
\constfunc{wxCDtime}{GetTrackTime}{\param{wxUint8 }{track}}
Returns the length of the specified track
track: track to get length
\membersection{CDtoc::GetTrackPos}\label{cdtocgettrackpos}
\constfunc{wxCDtime}{GetTrackPos}{\param{wxUint8 }{track}}
Returns the position of the specified track
track: track to get position
\membersection{CDtoc::GetTotalTime}\label{cdtocgettotaltime}
\constfunc{wxCDtime}{GetTotalTime}{\void}
Returns the total time
\membersection{wxCDAudio::wxCDAudio}\label{wxcdaudiowxcdaudio}
\func{}{wxCDAudio}{\void}
\membersection{wxCDAudio::\destruct{wxCDAudio}}\label{wxcdaudiodtor}
\func{}{\destruct{wxCDAudio}}{\void}
\membersection{wxCDAudio::Play}\label{wxcdaudioplay}
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}, \param{const wxCDtime\& }{end\_play}}
Play audio at the specified position
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}}
Play audio from the specified to the end of the CD audio
\func{bool}{Play}{\param{wxUint8 }{beg\_track}, \param{wxUint8 }{end\_track = 0}}
\membersection{wxCDAudio::Pause}\label{wxcdaudiopause}
\func{bool}{Pause}{\void}
Pause the audio playing
\membersection{wxCDAudio::Resume}\label{wxcdaudioresume}
\func{bool}{Resume}{\void}
Resume a paused audio playing
\membersection{wxCDAudio::GetStatus}\label{wxcdaudiogetstatus}
\func{CDstatus}{GetStatus}{\void}
Get the current CD status
\membersection{wxCDAudio::GetTime}\label{wxcdaudiogettime}
\func{wxCDtime}{GetTime}{\void}
Get the current playing time
\membersection{wxCDAudio::GetToc}\label{wxcdaudiogettoc}
\func{const CDtoc\&}{GetToc}{\void}
Returns the table of contents
\membersection{wxCDAudio::Ok}\label{wxcdaudiook}
\constfunc{bool}{Ok}{\void}
CD ok

View File

@@ -1,3 +0,0 @@
\chapter{Change log}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}

View File

@@ -1,13 +0,0 @@
\chapter{Class reference}\label{classref}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
These are the main Mmedia classes.
\input cdaudio.tex
\input cdaudlnx.tex
\input cdaudwin.tex
\input cdtoc.tex
\input sndbase.tex
\input sndfile.tex
\input sndfrmt.tex

View File

@@ -1,47 +0,0 @@
\chapter{Introduction}
\pagenumbering{arabic}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
The MMedia wxWindows extension is a wxWindows library which provides you
a full set of multimedia classes including sound recording/playing,
cd audio playing and video playing. The API is portable and can be used
on any supported systems with the insurance the behaviour will be the
same.
\section{File structure}
These are the files that comprise the mmedia library.
\begin{description}\itemsep=0pt
\item[sndbase.h] Header for wxSoundStream base class and wxSoundFormat base class.
\item[sndbase.cpp] Basic objects implementation.
\item[sndfile.h] wxSoundFileStream base class header.
\item[sndfile.cpp] wxSoundFileStream base class implementation.
\item[sndpcm.h] wxSoundFormatPcm class header.
\item[sndpcm.cpp] wxSoundFormatPcm class implementation.
\item[sndcpcm.h] wxSoundCodecPcm class header (PCM converter).
\item[sndcpcm.cpp] wxSoundCodecPcm class implementation (PCM converter).
\item[sndulaw.h]
\item[sndulaw.cpp]
\item[sndg72x.h]
\item[sndg72x.cpp]
\item[sndoss.h]
\item[sndoss.cpp]
\item[sndesd.h]
\item[sndesd.cpp]
\item[sndwin.h]
\item[sndwin.cpp]
\item[cdbase.h]
\item[cdbase.cpp]
\item[cdunix.h]
\item[cdunix.cpp]
\item[cdwin.h]
\item[cdwin.cpp]
\item[vidbase.h]
\item[vidbase.cpp]
\item[vidxanm.h]
\item[vidxanm.cpp]
\item[vidwin.h]
\item[vidwin.cpp]
\end{description}

View File

@@ -1,45 +0,0 @@
\documentstyle[a4,makeidx,verbatim,texhelp,fancyheadings]{report}
\definecolour{black}{0}{0}{0}%
\definecolour{cyan}{0}{255}{255}%
\definecolour{green}{0}{255}{0}%
\definecolour{magenta}{255}{0}{255}%
\definecolour{red}{255}{0}{0}%
\definecolour{blue}{0}{0}{200}%
\definecolour{yellow}{255}{255}{0}%
\definecolour{white}{255}{255}{255}%
\input psbox.tex
\parindent 0pt
\parskip 11pt
\title{MMedia for wxWindows}
\author{Guilhem Lavaux}
\date{March 2000}
\makeindex
\begin{document}
\maketitle
\pagestyle{fancyplain}
\bibliographystyle{plain}
\pagenumbering{roman}
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
\setfooter{\thepage}{}{}{}{}{\thepage}
\tableofcontents%
\input{intro.tex}
%
\input{sample.tex}
%
\input{classes.tex}
%
\input{topics.tex}
%
\input{bugs.tex}
%
\input{changes.tex}
%
\addcontentsline{toc}{chapter}{Index}
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}
\setfooter{\thepage}{}{}{}{}{\thepage}%
\printindex
\end{document}

View File

@@ -1,520 +0,0 @@
%
% %%%%%%% %%%%% %%%%%% %%%%% % %
% % % % % % % % % %
% % % % % % % % % %
% %%%%%%% %%%%% %%%%%% % % %
% % % % % % % % %
% % % % % % % % %
% % %%%%%% %%%%%% %%%%% % %
%
% By Jean Orloff
% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
% No modification of this file allowed if not e-sent to me.
%
% A simple way to measure the size of encapsulated postscript figures
% from inside TeX, and to use it for automatically formatting texts
% with inserted figures. Works both under Plain TeX-based macros
% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment.
% Provides exactly the same result on any PostScript printer provided
% the single instruction \psfor... is changed to fit the needs of the
% particular dvi->ps translator used.
% History:
% 1.31: adds \psforDVIALW(?)
% 1.30: adds \splitfile & \joinfiles for multi-file management
% 1.24: fix error handling & add \psonlyboxes
% 1.23: adds \putsp@ce for OzTeX fix
% 1.22: makes \drawingBox \global for use in Phyzzx
% 1.21: accepts %%BoundingBox: (atend)
% 1.20: tries to add \psfordvitps for the TeXPS package.
% 1.10: adds \psforoztex, error handling...
%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
%
\def\temp{1.31}
\let\tempp=\relax
\expandafter\ifx\csname psboxversion\endcsname\relax
\message{version: \temp}
\else
\ifdim\temp cm>\psboxversion cm
\message{version: \temp}
\else
\message{psbox(\psboxversion) is already loaded: I won't load
psbox(\temp)!}
\let\temp=\psboxversion
\let\tempp=\endinput
\fi
\fi
\tempp
\let\psboxversion=\temp
\catcode`\@=11
% Every macro likes a little privacy...
%
% Some common defs
%
\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
\def\executeinspecs#1{%
\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
%
%Trying to tame the variety of \special commands for Postscript: the
% universal internal command \PSspeci@l##1##2 takes ##1 to be the
% filename and ##2 to be the integer scale factor*1000 (as for usual
% TeX \scale commands)
%
\def\psfortextures{% For TeXtures on the Macintosh
%-----------------
\def\PSspeci@l##1##2{%
\special{illustration ##1\space scaled ##2}%
}}
%
\def\psfordvitops{% For the DVItoPS converter on IBM mainframes
%----------------
\def\PSspeci@l##1##2{%
\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
}}
%
\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's
%--------------
\def\PSspeci@l##1##2{%
% \special{/@scaleunit 1000 def}% never read dox without trying!
\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my%
\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
urx=\psurx\space ury=\psury\space rwi=\number\d@mx}%
}}
%
\def\psforoztex{% For the OzTeX shareware on the Macintosh
%--------------
\def\PSspeci@l##1##2{%
\special{##1 \space
##2 1000 div dup scale
\putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate
}%
}}
\def\putsp@ce#1{#1 }
%
\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12
%---------------
% Convert a dimension into the number \psn@sp (in scaled points)
\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
\def\PSspeci@l##1##2{%
% psfig.psr contains the def of "startTexFig": if you can locate it
% and include the correct pathname, it should work
\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
\psdimt@n@sp{\drawingwd}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\drawinght}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psllx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\pslly bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psurx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psury bp}
\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
\special{dvitps: Include1 "##1"}
\special{dvitps: Literal "endTexFig\space"}
}}
\def\psforDVIALW{% Try for dvialw, a UNIX public domain
%---------------
\def\PSspeci@l##1##2{
\special{language "PS"
literal "##2 1000 div dup scale"
include "##1"}}}
\def\psonlyboxes{% Draft-like behaviour if none of the others works
%---------------
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
{\vss
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss}
}}}
}%
}
%
\def\psloc@lerr#1{%
\let\savedPSspeci@l=\PSspeci@l%
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
{\vss
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss}
}}}
\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
}%
}
%
%\def\psfor... add your own!
%
% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
% and stores it in \drawinght(wd)
\newread\pst@mpin
\newdimen\drawinght\newdimen\drawingwd
\newdimen\psxoffset\newdimen\psyoffset
\newbox\drawingBox
\newif\ifNotB@undingBox
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
your graphics (Jean Orloff).}
\def\@mpty{}
\def\s@tsize#1 #2 #3 #4\@ndsize{
\def\psllx{#1}\def\pslly{#2}%
\def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips!
\ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
\else
\drawinght=#4bp\advance\drawinght by-#2bp
\drawingwd=#3bp\advance\drawingwd by-#1bp
% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
\fi
}
\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}}
\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution
{\catcode`\%=12
\xdef\B@undingBox{%%BoundingBox}
} %% is not a true comment in PostScript, even if % is!
\def\ReadPSize#1{
\edef\PSfilename{#1}
\openin\pst@mpin=#1\relax
\ifeof\pst@mpin \errhelp=\PShelp
\errmessage{I haven't found your postscript file (\PSfilename)}
\psloc@lerr{was not found}
\s@tsize 0 0 142 142\@ndsize
\closein\pst@mpin
\else
\immediate\write\psbj@inaux{#1,}
\loop
\executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}
\ifeof\pst@mpin
\errhelp=\PShelp
\errmessage{(\PSfilename) is not an Encapsulated PostScript File:
I could not find any \B@undingBox: line.}
\edef\v@lue{0 0 142 142:}
\psloc@lerr{is not an EPSFile}
\NotB@undingBoxfalse
\else
\expandafter\sc@nline\n@xtline:\@ndline
\ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
\edef\t@mp{%
\expandafter\g@bblefirstblank\v@lue\space\space\space}
\expandafter\s@tsize\t@mp\@ndsize
\else\NotB@undingBoxtrue
\fi
\fi
\ifNotB@undingBox\repeat
\closein\pst@mpin
\fi
\message{#1}
}
%
% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
% TeX uniformly scales to fit the largest one. If xdim=0pt, the
% scale is fully determined by ydim and vice versa.
% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
% indentation and all cr's would be interpreted as spaces (hugh!).
%
\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
\newdimen\d@mx \newdimen\d@my
\let\ps@nnotation=\relax
\def\psboxto(#1;#2)#3{\vbox{
\ReadPSize{#3}
\divide\drawingwd by 1000
\divide\drawinght by 1000
\d@mx=#1
\ifdim\d@mx=0pt\xscale=1000
\else \xscale=\d@mx \divide \xscale by \drawingwd\fi
\d@my=#2
\ifdim\d@my=0pt\yscale=1000
\else \yscale=\d@my \divide \yscale by \drawinght\fi
\ifnum\yscale=1000
\else\ifnum\xscale=1000\xscale=\yscale
\else\ifnum\yscale<\xscale\xscale=\yscale\fi
\fi
\fi
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
\global\divide\pscm by 1000
\global\multiply\pscm by\xscale
\multiply\drawingwd by\xscale \multiply\drawinght by\xscale
\ifdim\d@mx=0pt\d@mx=\drawingwd\fi
\ifdim\d@my=0pt\d@my=\drawinght\fi
\message{scaled \the\xscale}
\hbox to\d@mx{\hss\vbox to\d@my{\vss
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
\kern-\psyoffset
\PSspeci@l{\PSfilename}{\the\xscale}
\vss}\hss\ps@nnotation}
\global\ht\drawingBox=\the\drawinght
\global\wd\drawingBox=\the\drawingwd
\baselineskip=0pt
\copy\drawingBox
\vss}\hss}
\global\psxoffset=0pt
\global\psyoffset=0pt% These are local to one figure
\global\pscm=1cm
\global\drawingwd=\drawingwd
\global\drawinght=\drawinght
}}
%
% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
% rounding errors of TeX integer divisions for situations where the
% TeX box should fit the original BoundingBox with a precision better
% than 1/1000.
%
\def\psboxscaled#1#2{\vbox{
\ReadPSize{#2}
\xscale=#1
\message{scaled \the\xscale}
\divide\drawingwd by 1000\multiply\drawingwd by\xscale
\divide\drawinght by 1000\multiply\drawinght by\xscale
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
\global\divide\pscm by 1000
\global\multiply\pscm by\xscale
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
\kern-\psyoffset
\PSspeci@l{\PSfilename}{\the\xscale}
\vss}\hss\ps@nnotation}
\global\ht\drawingBox=\the\drawinght
\global\wd\drawingBox=\the\drawingwd
\baselineskip=0pt
\copy\drawingBox
\global\psxoffset=0pt
\global\psyoffset=0pt% These are local to one figure
\global\pscm=1cm
\global\drawingwd=\drawingwd
\global\drawinght=\drawinght
}}
%
% \psbox{PSfilename} makes a TeX box having the minimal size to
% enclose the picture
\def\psbox#1{\psboxscaled{1000}{#1}}
%
%
% \joinfiles file1, file2, ...n \into joinedfilename .
% makes one file out of many
% \splitfile joinedfilename
% the opposite
%
%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
%\def\executeinspecs#1{%
%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
%\newread\pst@mpin
\newif\ifn@teof\n@teoftrue
\newif\ifc@ntrolline
\newif\ifmatch
\newread\j@insplitin
\newwrite\j@insplitout
\newwrite\psbj@inaux
\immediate\openout\psbj@inaux=psbjoin.aux
\immediate\write\psbj@inaux{\string\joinfiles}
\immediate\write\psbj@inaux{\jobname,}
%
% We redefine input to keep track of the various files inputted
%
\immediate\let\oldinput=\input
\def\input#1 {
\immediate\write\psbj@inaux{#1,}
\oldinput #1 }
\def\empty{}
\def\setmatchif#1\contains#2{
\def\match##1#2##2\endmatch{
\def\tmp{##2}
\ifx\empty\tmp
\matchfalse
\else
\matchtrue
\fi}
\match#1#2\endmatch}
\def\warnopenout#1#2{
\setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2}
\ifmatch
\else
\immediate\openin\pst@mpin=#2
\ifeof\pst@mpin
\else
\errhelp{If the content of this file is so precious to you, abort (ie
press x or e) and rename it before retrying.}
\errmessage{I'm just about to replace your file named #2}
\fi
\immediate\closein\pst@mpin
\fi
\message{#2}
\immediate\openout#1=#2}
% No comments allowed below: % will have an unusual catcode
{
\catcode`\%=12
\gdef\splitfile#1 {
\immediate\openin\j@insplitin=#1
\message{Splitting file #1 into:}
\warnopenout\j@insplitout{TrashMe}
\loop
\ifeof
\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
\else
\n@teoftrue
\executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
\ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}
\ifc@ntrolline
\else
\toks0=\expandafter{\spl@tinline}
\immediate\write\j@insplitout{\the\toks0}
\fi
\fi
\ifn@teof\repeat
\immediate\closeout\j@insplitout}
\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{
\def\t@mp{#1}
\ifx\empty\t@mp
\def\t@mp{#3}
\ifx\empty\t@mp
\global\c@ntrollinefalse
\else
\immediate\closeout\j@insplitout
\warnopenout\j@insplitout{#2}
\global\c@ntrollinetrue
\fi
\else
\global\c@ntrollinefalse
\fi}
\gdef\joinfiles#1\into#2 {
\message{Joining following files into}
\warnopenout\j@insplitout{#2}
\message{:}
{
\edef\w@##1{\immediate\write\j@insplitout{##1}}
\w@{% This text was produced with psbox's \string\joinfiles.}
\w@{% To decompose and tex it:}
\w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions}
\w@{% (say, JOINTFIL), in some uncrowded directory;}
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
\w@{% the first part in the joining (after splitting JOINTFIL into}
\w@{% it's constituents, TeX will try to process it as it stands).}
\w@{\string\input\space psbox.tex}
\w@{\string\splitfile{\string\jobname}}
}
\tre@tfilelist#1, \endtre@t
\immediate\closeout\j@insplitout}
\gdef\tre@tfilelist#1, #2\endtre@t{
\def\t@mp{#1}
\ifx\empty\t@mp
\else
\llj@in{#1}
\tre@tfilelist#2, \endtre@t
\fi}
\gdef\llj@in#1{
\immediate\openin\j@insplitin=#1
\ifeof\j@insplitin
\errmessage{I couldn't find file #1.}
\else
\message{#1}
\toks0={%Beginning-Of-File-Named:#1}
\immediate\write\j@insplitout{\the\toks0}
\executeinspecs{\global\read\j@insplitin to\oldj@ininline}
\loop
\ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
\else\n@teoftrue
\executeinspecs{\global\read\j@insplitin to\j@ininline}
\toks0=\expandafter{\oldj@ininline}
\let\oldj@ininline=\j@ininline
\immediate\write\j@insplitout{\the\toks0}
\fi
\ifn@teof
\repeat
\immediate\closein\j@insplitin
\fi}
}
% To be put at the end of a file, for making an tar-like file containing
% everything it used.
\def\autojoin{
\immediate\write\psbj@inaux{\string\into\space psbjoin.all}
\immediate\closeout\psbj@inaux
\input psbjoin.aux
}
%
% Annotations & Captions etc...
%
%
% \centinsert{anybox} is just a centered \midinsert, but is included as
% people barely use the original inserts from TeX.
%
\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}
\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}
\def\pscaption#1#2{\vbox{
\setbox\drawingBox=#1
\copy\drawingBox
\vskip\baselineskip
\vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}
\ifdim\wd0>\hsize
\noindent\unhbox0\tolerance=5000
\else\centerline{\box0}
\fi
}}}
% for compatibility with older versions
\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
%
% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
% position without moving it (to be used in annotations).
\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
\rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}
%
% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
% corner is the current point
\newdimen\gridht \newdimen\gridwd
\def\gridfill(#1;#2){
\setbox0=\hbox to 1\pscm
{\vrule height1\pscm width.4pt\leaders\hrule\hfill}
\gridht=#1
\divide\gridht by \ht0
\multiply\gridht by \ht0
\gridwd=#2
\divide\gridwd by \wd0
\multiply\gridwd by \wd0
\advance \gridwd by \wd0
\vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}
%
% Useful to measure where to put annotations
\def\fillinggrid{\at(0cm;0cm){\vbox{
\gridfill(\drawinght;\drawingwd)}}}
%
% \textleftof\anybox: Sample text\endtext
% inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
% \textrightof is the symmetric (not documented, too uggly)
% Welcome any suggestion about clean wraparound macros from
% TeXhackers reading this
%
\def\textleftof#1:{
\setbox1=#1
\setbox0=\vbox\bgroup
\advance\hsize by -\wd1 \advance\hsize by -2em}
\def\textrightof#1:{
\setbox0=#1
\setbox1=\vbox\bgroup
\advance\hsize by -\wd0 \advance\hsize by -2em}
\def\endtext{
\egroup
\hbox to \hsize{\valign{\vfil##\vfil\cr%
\box0\cr%
\noalign{\hss}\box1\cr}}}
%
% \frameit{\thick}{\skip}{\anybox}
% draws with thickness \thick a box around \anybox, leaving \skip of
% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
% \boxit{\anybox} is a shortcut.
\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{
\hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
\vskip#2\hrule height#1}\vrule width#1}}
\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}
%
%
\catcode`\@=12 % cs containing @ are unreachable
%
% CUSTOMIZE YOUR DEFAULT DRIVER:
% Uncomment the line corresponding to your TeX system:
%\psfortextures% For TeXtures on the Macintosh
%\psforoztex % For OzTeX shareware on the Macintosh
%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes
\psfordvips % For DVIPS converter on VAX and UNIX
%\psfordvitps % For dvitps from TeXPS package under UNIX
%\psforDVIALW % For DVIALW, UNIX public domain
%\psonlyboxes % Blank Boxes (when all else fails).

View File

@@ -1,6 +0,0 @@
\chapter{MMboard: a sample MMedia application}\label{mmboard}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
To be written.

View File

@@ -1,68 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndaiff.h at 26/Feb/00 14:52:29
%
\section{\class{wxSoundAiff}}\label{wxsoundaiff}
AIFF codec
\wxheading{Derived from}
\helpref{wxSoundFileStream}{wxsoundfilestream}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundAiff::wxSoundAiff}\label{wxsoundaiffwxsoundaiff}
\func{}{wxSoundAiff}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
\func{}{wxSoundAiff}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
\membersection{wxSoundAiff::\destruct{wxSoundAiff}}\label{wxsoundaiffdtor}
\func{}{\destruct{wxSoundAiff}}{\void}
\membersection{wxSoundAiff::CanRead}\label{wxsoundaiffcanread}
\func{bool}{CanRead}{\void}
\membersection{wxSoundAiff::GetCodecName}\label{wxsoundaiffgetcodecname}
\constfunc{wxString}{GetCodecName}{\void}
\membersection{wxSoundAiff::PrepareToPlay}\label{wxsoundaiffpreparetoplay}
\func{bool}{PrepareToPlay}{\void}
\membersection{wxSoundAiff::PrepareToRecord}\label{wxsoundaiffpreparetorecord}
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
\membersection{wxSoundAiff::FinishRecording}\label{wxsoundaifffinishrecording}
\func{bool}{FinishRecording}{\void}
\membersection{wxSoundAiff::RepositionStream}\label{wxsoundaiffrepositionstream}
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
\membersection{wxSoundAiff::GetData}\label{wxsoundaiffgetdata}
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundAiff::PutData}\label{wxsoundaiffputdata}
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}

View File

@@ -1,294 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: sndbase.tex
%% Purpose: wxMMedia docs
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
%% Modified by:
%% Created: 2000
%% RCS-ID: $Id$
%% Copyright: (c) wxWindows team
%% Licence: wxWindows licence
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxSoundStream}}\label{wxsoundstream}
Base class for sound streams
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/mmedia/sndbase.h>
\wxheading{Data structures}
%%
%% wxSoundStream errors
%%
\wxheading{wxSoundStream errors}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxSOUND\_NOERR}}{No error occured}
\twocolitem{{\bf wxSOUND\_IOERR}}{An input/output error occured, it may concern
either a driver or a file}
\twocolitem{{\bf wxSOUND\_INVFRMT}}{The sound format passed to the function is
invalid. Generally, it means that you passed out of range values to the codec
stream or you don't pass the right sound format object to the right sound codec
stream.}
\twocolitem{{\bf wxSOUND\_INVDEV}}{Invalid device. Generally, it means that the
sound stream didn't manage to open the device driver due to an invalid parameter
or to the fact that sound is not supported on this computer.}
\twocolitem{{\bf wxSOUND\_NOEXACT}}{No exact matching sound codec has been found for
this sound format. It means that the sound driver didn't manage to setup the sound
card with the specified values.}
\twocolitem{{\bf wxSOUND\_NOCODEC}}{No matching codec has been found. Generally, it
may happen when you call wxSoundRouterStream::SetSoundFormat().}
\twocolitem{{\bf wxSOUND\_MEMERR}}{Not enough memory.}
\end{twocollist}
%%
%% C callback
%%
\wxheading{C callback for wxSound event}
When a sound event is generated, it may either call the internal sound event
processor (which can be inherited) or call a C function. Its definition is:
\begin{verbatim}
typedef void (*wxSoundCallback)(wxSoundStream *stream, int evt,
void *cdata);
\end{verbatim}
The {\bf stream} parameter represents the current wxSoundStream.
The {\bf evt} parameter represents the sound event which is the cause of the calling. (See \helpref{wxSound events}{wxsoundstream}).
The {\bf cdata} parameter represents the user callback data which were specified
when the user called \helpref{wxSoundStream::Register}{wxsoundstreamregister}.
{\it Note:} There are two other ways to catch sound events: you can inherit the
sound stream and redefine \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}, or you can reroute the events to another sound stream using \helpref{wxSoundStream::SetEventHandler}{wxsoundstreamseteventhandler}.
%%
%% wxSoundStream streaming mode
%%
\wxheading{wxSound streaming mode}
The wxSoundStream object can work in three different modes. These modes are specified
at the call to \helpref{wxSoundStream::StartProduction}{wxsoundstreamstartproduction}
and cannot be changed until you call
\helpref{wxSoundStream::StopProduction}{wxsoundstreamstopproduction}.
The {\bf wxSOUND\_INPUT} mode is the recording mode. It generates {\bf wxSOUND\_INPUT}
events and you cannot use wxSoundStream::Write().
The {\bf wxSOUND\_OUTPUT} mode is the playing mode. It generates {\bf wxSOUND\_OUTPUT}
events and you cannot use wxSoundStream::Read().
The {\bf wxSOUND\_DUPLEX} mode activates the full duplex mode. The full duplex requires
you to make synchronous call to \helpref{wxSoundStream::Read}{wxsoundstreamread} and
\helpref{wxSoundStream::Write}{wxsoundstreamwrite}. This means that you must be
careful with realtime problems. Each time you call Read you must call Write.
%%
%% wxSoundStream events
%%
\wxheading{wxSoundStream events}
The sound events are generated when the sound driver (or the sound stream) completes
a previous sound buffer. There are two possible sound events and two meanings.
The {\bf wxSOUND\_INPUT} event is generated when the sound stream has a new input
buffer ready to be read. You know that you can read a buffer of the size
\helpref{GetBestSize()}{wxsoundstreamgetbestsize} without blocking.
The {\bf wxSOUND\_OUTPUT} event is generated when the sound stream has completed a
previous buffer. This buffer has been sent to the sound driver and it is ready to
process a new buffer. Consequently, \helpref{Write}{wxsoundstreamwrite} will not
block too.
\latexignore{\rtfignore{\wxheading{Members}}}
%% Ctor && Dtor
\membersection{wxSoundStream::wxSoundStream}\label{wxsoundstreamwxsoundstream}
\func{}{wxSoundStream}{\void}
Default constructor.
\membersection{wxSoundStream::\destruct{wxSoundStream}}\label{wxsoundstreamdtor}
\func{}{\destruct{wxSoundStream}}{\void}
Destructor. The destructor stops automatically all started production and destroys
any temporary buffer.
%%
%% Read
%%
\membersection{wxSoundStream::Read}\label{wxsoundstreamread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
Reads {\it len} bytes from the sound stream. This call may block the user so
use it carefully when you need to intensively refresh the GUI. You may be
interested by sound events: see \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
sound event system.
\wxheading{Parameters}
\docparam{len}{{\it len} is expressed in bytes. If you need to do conversions between bytes
and seconds use wxSoundFormat.
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
\docparam{data}{Data in \it{buffer} are coded using the sound format attached to this sound
stream. The format is specified with
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
%%
%% Write
%%
\membersection{wxSoundStream::Write}\label{wxsoundstreamwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
Writes \it{len} bytes to the sound stream. This call may block the user so
use it carefully. You may be interested by sound events: see
\helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
sound event system.
\wxheading{Parameters}
\docparam{len}{This is expressed in bytes. If you need to do conversions between bytes
and seconds use wxSoundFormat.
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
\docparam{buffer}{Data in \it{buffer} are coded using the sound format attached to this sound
stream. The format is specified with
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
%%
%% GetBestSize
%%
\membersection{wxSoundStream::GetBestSize}\label{wxsoundstreamgetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}
This function returns the best size for IO calls. The best size provides you
a good alignment for data to be written (or read) to (or from) the sound stream.
So, when, for example, a sound event is sent, you are sure the sound stream
will not block for this buffer size.
%%
%% wxSoundStream:SetSoundFormat
%%
\membersection{wxSoundStream::SetSoundFormat}\label{wxsoundstreamsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
SetSoundFormat is one of the key function of the wxSoundStream object.
It specifies the sound format the user needs. SetSoundFormat tries to
apply the format to the current sound stream (it can be a sound file or a
sound driver). Then, either it manages to apply it and it returns {\bf TRUE},
or it could not and it returns {\bf FALSE}. In this case, you must check
the error with
\helpref{wxSoundStream::GetError}{wxsoundstreamgeterror}. See
\helpref{wxSoundStream errors section}{wxsoundstream} for more details.
\wxheading{Note}
The {\bf format} object can be destroyed after the call. The object does not need it.
\wxheading{Note}
If the error is {\bf wxSOUND\_NOTEXACT}, the stream tries to find the best
approaching format and setups it. You can check the format which it applied
with \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.
%%
%% GetSoundFormat
%%
\membersection{wxSoundStream::GetSoundFormat}\label{wxsoundstreamgetsoundformat}
\constfunc{wxSoundFormatBase\&}{GetSoundFormat}{\void}
It returns a reference to the current sound format of the stream represented by a
wxSoundFormatBase object. This object {\it must not} be destroyed by anyone except
the stream itself.
%%
%% SetCallback
%%
\membersection{wxSoundStream::SetCallback}\label{wxsoundstreamregister}
\func{void}{Register}{\param{int }{evt}, \param{wxSoundCallback }{cbk}, \param{void* }{cdata}}
It installs a C callback for wxSoundStream events. The C callbacks are still
useful to avoid hard inheritance. You can install only one callback per event.
Each callback has its callback data.
%%
%% StartProduction
%%
\membersection{wxSoundStream::StartProduction}\label{wxsoundstreamstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
StartProduction starts the sound streaming. {\it evt} may be one of
{\bf wxSOUND\_INPUT}, {\bf wxSOUND\_OUTPUT} or {\bf wxSOUND\_DUPLEX}.
You cannot specify several flags at the same time. Starting the production
may automaticaly in position of buffer underrun (only in the case you activated
recording). Actually this may happen the sound IO queue is too short.
It is also advised that you fill quickly enough the sound IO queue when the
driver requests it (through a wxSoundEvent).
\membersection{wxSoundStream::StopProduction}\label{wxsoundstreamstopproduction}
\func{bool}{StopProduction}{\void}
I stops the async notifier and the sound streaming straightly.
\membersection{wxSoundStream::SetEventHandler}\label{wxsoundstreamseteventhandler}
\func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
Sets the event handler: if it is non-null, all events are routed to it.
\membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror}
\constfunc{wxSoundError}{GetError}{\void}
It returns the last error which occured.
\membersection{wxSoundStream::GetLastAccess}\label{wxsoundstreamgetlastaccess}
\constfunc{wxUint32}{GetLastAccess}{\void}
It returns the number of bytes which were effectively written to/read from the sound stream.
\membersection{wxSoundStream::QueueFilled}\label{wxsoundstreamqueuefilled}
\constfunc{bool}{QueueFilled}{\void}
It returns whether the sound IO queue is full. When it is full, the next IO call will block
until the IO queue has at least one empty entry.
\membersection{wxSoundStream::OnSoundEvent}\label{wxsoundstreamonsoundevent}
\func{void}{OnSoundEvent}{\param{int }{evt}}
It is called by the wxSoundStream when a new sound event occured.

View File

@@ -1,39 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcodec.h at 26/Feb/00 14:26:29
%
\section{\class{wxSoundStreamCodec}}\label{wxsoundstreamcodec}
\wxheading{Derived from}
\helpref{wxSoundStream}{wxsoundstream}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamCodec::wxSoundStreamCodec}\label{wxsoundstreamcodecwxsoundstreamcodec}
\func{}{wxSoundStreamCodec}{\param{wxSoundStream\& }{snd\_io}}
\membersection{wxSoundStreamCodec::\destruct{wxSoundStreamCodec}}\label{wxsoundstreamcodecdtor}
\func{}{\destruct{wxSoundStreamCodec}}{\void}
\membersection{wxSoundStreamCodec::StartProduction}\label{wxsoundstreamcodecstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
\membersection{wxSoundStreamCodec::StopProduction}\label{wxsoundstreamcodecstopproduction}
\func{bool}{StopProduction}{\void}
\membersection{wxSoundStreamCodec::GetBestSize}\label{wxsoundstreamcodecgetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}

View File

@@ -1,64 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndesd.h at 26/Feb/00 14:26:56
%
\section{\class{wxSoundStreamESD}}\label{wxsoundstreamesd}
ESD output class
\wxheading{Derived from}
\helpref{wxSoundStream}{wxsoundstream}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamESD::wxSoundStreamESD}\label{wxsoundstreamesdwxsoundstreamesd}
\func{}{wxSoundStreamESD}{\param{const wxString\& }{hostname = "localhost"}}
\membersection{wxSoundStreamESD::\destruct{wxSoundStreamESD}}\label{wxsoundstreamesddtor}
\func{}{\destruct{wxSoundStreamESD}}{\void}
\membersection{wxSoundStreamESD::Read}\label{wxsoundstreamesdread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamESD::Write}\label{wxsoundstreamesdwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamESD::SetSoundFormat}\label{wxsoundstreamesdsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundStreamESD::StartProduction}\label{wxsoundstreamesdstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
\membersection{wxSoundStreamESD::StopProduction}\label{wxsoundstreamesdstopproduction}
\func{bool}{StopProduction}{\void}
\membersection{wxSoundStreamESD::WakeUpEvt}\label{wxsoundstreamesdwakeupevt}
\func{void}{WakeUpEvt}{\param{int }{evt}}
You should not call this.
\membersection{wxSoundStreamESD::QueueFilled}\label{wxsoundstreamesdqueuefilled}
\constfunc{bool}{QueueFilled}{\void}

View File

@@ -1,87 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
%
\section{\class{wxSoundFormatG72X}}\label{wxsoundformatg72x}
G72X format
\wxheading{Derived from}
\helpref{wxSoundFormatBase}{wxsoundformatbase}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef enum {
wxSOUND\_G721,
wxSOUND\_G723\_24,
wxSOUND\_G723\_40
} wxSoundG72XType
\end{verbatim}}
{\small \begin{verbatim}
typedef struct g72x\_state g72state
\end{verbatim}}
This fixes a bug in Mingw95
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundFormatG72X::wxSoundFormatG72X}\label{wxsoundformatg72xwxsoundformatg72x}
\func{}{wxSoundFormatG72X}{\void}
\membersection{wxSoundFormatG72X::\destruct{wxSoundFormatG72X}}\label{wxsoundformatg72xdtor}
\func{}{\destruct{wxSoundFormatG72X}}{\void}
\membersection{wxSoundFormatG72X::SetG72XType}\label{wxsoundformatg72xsetg72xtype}
\func{void}{SetG72XType}{\param{wxSoundG72XType }{type}}
\membersection{wxSoundFormatG72X::GetG72XType}\label{wxsoundformatg72xgetg72xtype}
\constfunc{wxSoundG72XType}{GetG72XType}{\void}
\membersection{wxSoundFormatG72X::SetSampleRate}\label{wxsoundformatg72xsetsamplerate}
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
\membersection{wxSoundFormatG72X::GetSampleRate}\label{wxsoundformatg72xgetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
\membersection{wxSoundFormatG72X::GetType}\label{wxsoundformatg72xgettype}
\constfunc{wxSoundFormatType}{GetType}{\void}
\membersection{wxSoundFormatG72X::Clone}\label{wxsoundformatg72xclone}
\constfunc{wxSoundFormatBase*}{Clone}{\void}
\membersection{wxSoundFormatG72X::GetTimeFromBytes}\label{wxsoundformatg72xgettimefrombytes}
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
\membersection{wxSoundFormatG72X::GetBytesFromTime}\label{wxsoundformatg72xgetbytesfromtime}
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
\membersection{wxSoundFormatG72X::operator!=}\label{wxsoundformatg72xoperatorneq}
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}

View File

@@ -1,228 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: sndfile.tex
%% Purpose: wxMMedia docs
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
%% Modified by:
%% Created: 2000
%% RCS-ID: $Id$
%% Copyright: (c) wxWindows team
%% Licence: wxWindows licence
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxSoundFileStream}}\label{wxsoundfilestream}
Base class for file coders/decoders. This class is not constructor (it is an abstract
class).
\wxheading{Derived from}
\helpref{wxSoundStream}{wxsoundstream}
\wxheading{Include file}
wx/sndfile.h
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundFileStream::wxSoundFileStream}\label{wxsoundfilestreamwxsoundfilestream}
\func{}{wxSoundFileStream}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
It constructs a new file decoder object which will send
audio data to the specified sound stream.
The {\it stream} is the input stream to be decoded. The
{\it io\_sound} is the destination sound stream.
Once it has been constructed, you cannot change any of
the specified streams nor the direction of the stream.
You will have access to the playback functions.
\func{}{wxSoundFileStream}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
It constructs a new file coder object which will get
data to be recorded from the specified sound stream.
The {\it stream} is the output wxStream. The {\it io\_sound}
is the source sound stream of the audio data. Once
it has been constructed, you cannot change any of
the specified streams nor the direction of the stream.
\membersection{wxSoundFileStream::\destruct{wxSoundFileStream}}\label{wxsoundfilestreamdtor}
\func{}{\destruct{wxSoundFileStream}}{\void}
It destroys the current sound file codec.
\membersection{wxSoundFileStream::Play}\label{wxsoundfilestreamplay}
\func{bool}{Play}{\void}
It starts playing the file. The playing begins, in background
in nearly all cases, after the return of the function. The
codec returns to a {\bf stopped} state when it reaches the
end of the file.
On success, it returns TRUE.
\membersection{wxSoundFileStream::Record}\label{wxsoundfilestreamrecord}
\func{bool}{Record}{\param{wxUint32 }{time}}
It starts recording data from the sound stream and writing them
to the output stream. You have to precise the recording length in
parameter. This length is expressed in seconds. If you want to
control the record length (using \helpref{Stop}{wxsoundfilestreamstop}),
you can set it to wxSOUND\_INFINITE\_TIME.
On success, it returns TRUE.
\membersection{wxSoundFileStream::Stop}\label{wxsoundfilestreamstop}
\func{bool}{Stop}{\void}
It stops either recording or playing. Whatever happens (even unexpected
errors), the stream is stopped when the function returns. When you are
in recording mode, the file headers are updated and flushed if possible
(ie: if the output stream is seekable).
On success, it returns TRUE.
\membersection{wxSoundFileStream::Pause}\label{wxsoundfilestreampause}
\func{bool}{Pause}{\void}
The file codec tries to pause the stream: it means that it stops audio
production but keep the file pointer at the place.
If the file codec is already paused, it returns FALSE.
On success, it returns TREE.
\membersection{wxSoundFileStream::Resume}\label{wxsoundfilestreamresume}
\func{bool}{Resume}{\void}
When the file codec has been paused using
\helpref{Pause}{wxsoundfilestreampause}, you could be interrested in
resuming it. This is the goal of this function.
\membersection{wxSoundFileStream::IsStopped}\label{wxsoundfilestreamisstopped}
\constfunc{bool}{IsStopped}{\void}
It returns TRUE when the stream is stopped, in another case it returns
FALSE.
\membersection{wxSoundFileStream::IsPaused}\label{wxsoundfilestreamispaused}
\constfunc{bool}{IsPaused}{\void}
It returns TRUE when the stream is paused, in another case it returns
FALSE.
\membersection{wxSoundFileStream::StartProduction}\label{wxsoundfilestreamstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
It is really not advised you call this function. From the wxSoundFileStream
point of view it is an internal function. Internally, it is called after
the file stream has been prepared to be played or to receive audio data and
when it wants to start processing audio data.
\membersection{wxSoundFileStream::StopProduction}\label{wxsoundfilestreamstopproduction}
\func{bool}{StopProduction}{\void}
As for \helpref{StartProduction}{wxsoundfilestreamstopproduction}, it is not
advised for you to call this function. It is called by
\helpref{Stop}{wxsoundfilestreamstop} when it needs to stop the audio data
processing.
\membersection{wxSoundFileStream::GetLength}\label{wxsoundfilestreamgetlength}
\func{wxUint32}{GetLength}{\void}
It returns the audio data length of the file stream. This length is expressed
in bytes. If you need the length in seconds, you will need to use
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
\membersection{wxSoundFileStream::GetPosition}\label{wxsoundfilestreamgetposition}
\func{wxUint32}{GetPosition}{\void}
It returns the current position in the soundfile stream. The position
is expressed in bytes. If you need the length in seconds, you will need to use
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
\membersection{wxSoundFileStream::SetPosition}\label{wxsoundfilestreamsetposition}
\func{wxUint32}{SetPosition}{\param{wxUint32 }{new\_position}}
It sets the current in the soundfile stream. The position
{\it new\_position} must be expressed in bytes. You can get
a length/position in bytes from a time value using
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
On success, it returns TRUE.
\wxheading{Warning}
Some wxStream may not be capable to support this function as
it may not support the seekable functionnality. If this happens,
it returns FALSE and leave the stream at the same position.
\membersection{wxSoundFileStream::Read}\label{wxsoundfilestreamread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
You can obtain the audio data encoded in the file using this function.
But it must be considered as an internal function. Used carelessly, it
may corrupt the current state of the stream.
Data are returned using in the original file coding (You must use a sound
format object to decode it).
\membersection{wxSoundFileStream::Write}\label{wxsoundfilestreamwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
You can put encoded audio data to the file using this function.
But it must be considered as an internal function. Used carelessly, it
may corrupt the current state of the stream.
Data must be coded with the specified file coding (You must use a sound
format object to do this).
\membersection{wxSoundFileStream::SetSoundFormat}\label{wxsoundfilestreamsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundFileStream::GetCodecName}\label{wxsoundfilestreamgetcodecname}
\constfunc{wxString}{GetCodecName}{\void}
This function returns the Codec name. This is useful for those who
want to build a player (But also in some other case).
\membersection{wxSoundFileStream::CanRead}\label{wxsoundfilestreamcanread}
\func{bool}{CanRead}{\void}
You should use this function to test whether this file codec can read
the stream you passed to it.
\membersection{wxSoundFileStream::PrepareToPlay}\label{wxsoundfilestreampreparetoplay}
\func{bool}{PrepareToPlay}{\void}
It is called by wxSoundFileStream to prepare the specific file loader
to prepare itself to play the file. Actually, this includes reading
headers and setting the various parameters of the sound format.
This should not be called by an external user but it should be
implemented when you inherit wxSoundFileStream to build a new codec.
It must return when the file is identified and the parameters have
been set. In all other cases, you must return FALSE.
\membersection{wxSoundFileStream::PrepareToRecord}\label{wxsoundfilestreampreparetorecord}
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
\membersection{wxSoundFileStream::FinishRecording}\label{wxsoundfilestreamfinishrecording}
\func{bool}{FinishRecording}{\void}
\membersection{wxSoundFileStream::RepositionStream}\label{wxsoundfilestreamrepositionstream}
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
\membersection{wxSoundFileStream::FinishPreparation}\label{wxsoundfilestreamfinishpreparation}
\func{void}{FinishPreparation}{\param{wxUint32 }{len}}
\membersection{wxSoundFileStream::GetData}\label{wxsoundfilestreamgetdata}
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundFileStream::PutData}\label{wxsoundfilestreamputdata}
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}

View File

@@ -1,104 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndpcm.h at 26/Feb/00 14:26:33
%
\section{\class{wxSoundFormatPcm}}\label{wxsoundformatpcm}
PCM specification class
\wxheading{Derived from}
\helpref{wxSoundFormatBase}{wxsoundformatbase}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundFormatPcm::wxSoundFormatPcm}\label{wxsoundformatpcmwxsoundformatpcm}
\func{}{wxSoundFormatPcm}{\param{wxUint32 }{srate = 22500}, \param{wxUint8 }{bps = 8}, \param{wxUint16 }{channels = 2}, \param{bool }{sign = TRUE}, \param{int }{order = wxLITTLE\_ENDIAN}}
\membersection{wxSoundFormatPcm::\destruct{wxSoundFormatPcm}}\label{wxsoundformatpcmdtor}
\func{}{\destruct{wxSoundFormatPcm}}{\void}
\membersection{wxSoundFormatPcm::SetSampleRate}\label{wxsoundformatpcmsetsamplerate}
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
\membersection{wxSoundFormatPcm::SetBPS}\label{wxsoundformatpcmsetbps}
\func{void}{SetBPS}{\param{wxUint8 }{bps}}
\membersection{wxSoundFormatPcm::SetChannels}\label{wxsoundformatpcmsetchannels}
\func{void}{SetChannels}{\param{wxUint16 }{nchannels}}
\membersection{wxSoundFormatPcm::SetOrder}\label{wxsoundformatpcmsetorder}
\func{void}{SetOrder}{\param{int }{order}}
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmsigned}
\func{void}{Signed}{\param{bool }{sign}}
\membersection{wxSoundFormatPcm::GetSampleRate}\label{wxsoundformatpcmgetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
\membersection{wxSoundFormatPcm::GetBPS}\label{wxsoundformatpcmgetbps}
\constfunc{wxUint8}{GetBPS}{\void}
\membersection{wxSoundFormatPcm::GetChannels}\label{wxsoundformatpcmgetchannels}
\constfunc{wxUint16}{GetChannels}{\void}
\membersection{wxSoundFormatPcm::GetOrder}\label{wxsoundformatpcmgetorder}
\constfunc{int}{GetOrder}{\void}
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmgetsigned}
\constfunc{bool}{Signed}{\void}
\membersection{wxSoundFormatPcm::GetType}\label{wxsoundformatpcmgettype}
\constfunc{wxSoundFormatType}{GetType}{\void}
\membersection{wxSoundFormatPcm::Clone}\label{wxsoundformatpcmclone}
\constfunc{wxSoundFormatBase*}{Clone}{\void}
\membersection{wxSoundFormatPcm::GetTimeFromBytes}\label{wxsoundformatpcmgettimefrombytes}
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
\membersection{wxSoundFormatPcm::GetBytesFromTime}\label{wxsoundformatpcmgetbytesfromtime}
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
\membersection{wxSoundFormatPcm::operator!}\label{wxsoundformatpcmoperatornot}
\constfunc{bool}{operator!}{\param{const wxSoundFormatBase\& }{frmt2}}

View File

@@ -1,69 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndbase.h at 26/Feb/00 14:23:29
%
\section{\class{wxSoundFormatBase}}\label{wxsoundformatbase}
Base class for sound format specification
\wxheading{Derived from}
No base class
\wxheading{Data structures}
{\small \begin{verbatim}
typedef enum {
wxSOUND\_NOFORMAT,
wxSOUND\_PCM,
wxSOUND\_ULAW,
wxSOUND\_G72X,
wxSOUND\_MSADPCM
} wxSoundFormatType
\end{verbatim}}
wxSoundFormatType: it specifies the format family of the sound data
which will be passed to the stream.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundFormatBase::wxSoundFormatBase}\label{wxsoundformatbasewxsoundformatbase}
\func{}{wxSoundFormatBase}{\void}
\membersection{wxSoundFormatBase::\destruct{wxSoundFormatBase}}\label{wxsoundformatbasedtor}
\func{}{\destruct{wxSoundFormatBase}}{\void}
\membersection{wxSoundFormatBase::GetType}\label{wxsoundformatbasegettype}
\constfunc{wxSoundFormatType}{GetType}{\void}
It returns a "standard" format type.
\membersection{wxSoundFormatBase::Clone}\label{wxsoundformatbaseclone}
\constfunc{wxSoundFormatBase*}{Clone}{\void}
It clones the current format.
\membersection{wxSoundFormatBase::GetTimeFromBytes}\label{wxsoundformatbasegettimefrombytes}
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
\membersection{wxSoundFormatBase::GetBytesFromTime}\label{wxsoundformatbasegetbytesfromtime}
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
\membersection{wxSoundFormatBase::operator!=}\label{wxsoundformatbaseoperatorneq}
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}

View File

@@ -1,74 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
%
\section{\class{wxSoundFormatUlaw}}\label{wxsoundformatulaw}
ULAW format
\wxheading{Derived from}
\helpref{wxSoundFormatBase}{wxsoundformatbase}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundFormatUlaw::wxSoundFormatUlaw}\label{wxsoundformatulawwxsoundformatulaw}
\func{}{wxSoundFormatUlaw}{\void}
\membersection{wxSoundFormatUlaw::\destruct{wxSoundFormatUlaw}}\label{wxsoundformatulawdtor}
\func{}{\destruct{wxSoundFormatUlaw}}{\void}
\membersection{wxSoundFormatUlaw::SetSampleRate}\label{wxsoundformatulawsetsamplerate}
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
\membersection{wxSoundFormatUlaw::GetSampleRate}\label{wxsoundformatulawgetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
\membersection{wxSoundFormatUlaw::SetChannels}\label{wxsoundformatulawsetchannels}
\func{void}{SetChannels}{\param{wxUint8 }{channels}}
\membersection{wxSoundFormatUlaw::GetChannels}\label{wxsoundformatulawgetchannels}
\constfunc{wxUint8}{GetChannels}{\void}
\membersection{wxSoundFormatUlaw::GetType}\label{wxsoundformatulawgettype}
\constfunc{wxSoundFormatType}{GetType}{\void}
\membersection{wxSoundFormatUlaw::Clone}\label{wxsoundformatulawclone}
\constfunc{wxSoundFormatBase*}{Clone}{\void}
\membersection{wxSoundFormatUlaw::GetTimeFromBytes}\label{wxsoundformatulawgettimefrombytes}
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
\membersection{wxSoundFormatUlaw::GetBytesFromTime}\label{wxsoundformatulawgetbytesfromtime}
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
\membersection{wxSoundFormatUlaw::operator!=}\label{wxsoundformatulawoperatorneq}
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}

View File

@@ -1,54 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
%
\section{\class{wxSoundStreamG72X}}\label{wxsoundstreamg72x}
ULAW converter class
\wxheading{Derived from}
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamG72X::wxSoundStreamG72X}\label{wxsoundstreamg72xwxsoundstreamg72x}
\func{}{wxSoundStreamG72X}{\param{wxSoundStream\& }{sndio}}
\membersection{wxSoundStreamG72X::\destruct{wxSoundStreamG72X}}\label{wxsoundstreamg72xdtor}
\func{}{\destruct{wxSoundStreamG72X}}{\void}
\membersection{wxSoundStreamG72X::Read}\label{wxsoundstreamg72xread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamG72X::Write}\label{wxsoundstreamg72xwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamG72X::SetSoundFormat}\label{wxsoundstreamg72xsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundStreamG72X::PutBits}\label{wxsoundstreamg72xputbits}
\func{void}{PutBits}{\param{wxUint8 }{bits}}
\membersection{wxSoundStreamG72X::GetBits}\label{wxsoundstreamg72xgetbits}
\func{wxUint8}{GetBits}{\void}

View File

@@ -1,71 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndoss.h at 26/Feb/00 14:26:53
%
\section{\class{wxSoundStreamOSS}}\label{wxsoundstreamoss}
OSS output class
\wxheading{Derived from}
\helpref{wxSoundStream}{wxsoundstream}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamOSS::wxSoundStreamOSS}\label{wxsoundstreamosswxsoundstreamoss}
\func{}{wxSoundStreamOSS}{\param{const wxString\& }{dev\_name = \_T("/dev/dsp")}}
\membersection{wxSoundStreamOSS::\destruct{wxSoundStreamOSS}}\label{wxsoundstreamossdtor}
\func{}{\destruct{wxSoundStreamOSS}}{\void}
\membersection{wxSoundStreamOSS::Read}\label{wxsoundstreamossread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamOSS::Write}\label{wxsoundstreamosswrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamOSS::GetBestSize}\label{wxsoundstreamossgetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}
\membersection{wxSoundStreamOSS::SetSoundFormat}\label{wxsoundstreamosssetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundStreamOSS::StartProduction}\label{wxsoundstreamossstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
\membersection{wxSoundStreamOSS::StopProduction}\label{wxsoundstreamossstopproduction}
\func{bool}{StopProduction}{\void}
\membersection{wxSoundStreamOSS::QueueFilled}\label{wxsoundstreamossqueuefilled}
\constfunc{bool}{QueueFilled}{\void}
\membersection{wxSoundStreamOSS::WakeUpEvt}\label{wxsoundstreamosswakeupevt}
\func{void}{WakeUpEvt}{\param{int }{evt}}
You should not call this.

View File

@@ -1,48 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcpcm.h at 26/Feb/00 14:26:35
%
\section{\class{wxSoundStreamPcm}}\label{wxsoundstreampcm}
PCM converter class
\wxheading{Derived from}
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef void (*ConverterType)(const char *buf\_in, char *buf\_out, wxUint32 len) ConverterType
\end{verbatim}}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamPcm::wxSoundStreamPcm}\label{wxsoundstreampcmwxsoundstreampcm}
\func{}{wxSoundStreamPcm}{\param{wxSoundStream\& }{sndio}}
\membersection{wxSoundStreamPcm::\destruct{wxSoundStreamPcm}}\label{wxsoundstreampcmdtor}
\func{}{\destruct{wxSoundStreamPcm}}{\void}
\membersection{wxSoundStreamPcm::Read}\label{wxsoundstreampcmread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamPcm::Write}\label{wxsoundstreampcmwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamPcm::SetSoundFormat}\label{wxsoundstreampcmsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}

View File

@@ -1,59 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndfile.h at 26/Feb/00 14:26:42
%
\section{\class{wxSoundRouterStream}}\label{wxsoundrouterstream}
Codec router class
\wxheading{Derived from}
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundRouterStream::wxSoundRouterStream}\label{wxsoundrouterstreamwxsoundrouterstream}
\func{}{wxSoundRouterStream}{\param{wxSoundStream\& }{sndio}}
\membersection{wxSoundRouterStream::\destruct{wxSoundRouterStream}}\label{wxsoundrouterstreamdtor}
\func{}{\destruct{wxSoundRouterStream}}{\void}
\membersection{wxSoundRouterStream::Read}\label{wxsoundrouterstreamread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundRouterStream::Write}\label{wxsoundrouterstreamwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundRouterStream::SetSoundFormat}\label{wxsoundrouterstreamsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundRouterStream::StartProduction}\label{wxsoundrouterstreamstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
\membersection{wxSoundRouterStream::StopProduction}\label{wxsoundrouterstreamstopproduction}
\func{bool}{StopProduction}{\void}
\membersection{wxSoundRouterStream::GetBestSize}\label{wxsoundrouterstreamgetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}

View File

@@ -1,49 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
%
\section{\class{wxSoundStreamUlaw}}\label{wxsoundstreamulaw}
ULAW converter class
\wxheading{Derived from}
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamUlaw::wxSoundStreamUlaw}\label{wxsoundstreamulawwxsoundstreamulaw}
\func{}{wxSoundStreamUlaw}{\param{wxSoundStream\& }{sndio}}
\membersection{wxSoundStreamUlaw::\destruct{wxSoundStreamUlaw}}\label{wxsoundstreamulawdtor}
\func{}{\destruct{wxSoundStreamUlaw}}{\void}
\membersection{wxSoundStreamUlaw::Read}\label{wxsoundstreamulawread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamUlaw::Write}\label{wxsoundstreamulawwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamUlaw::SetSoundFormat}\label{wxsoundstreamulawsetsoundformat}
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
\membersection{wxSoundStreamUlaw::GetBestSize}\label{wxsoundstreamulawgetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}

View File

@@ -1,91 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwav.h at 26/Feb/00 14:26:40
%
\section{\class{wxSoundWave}}\label{wxsoundwave}
WAVE codec
\wxheading{Derived from}
\helpref{wxSoundFileStream}{wxsoundfilestream}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundWave::wxSoundWave}\label{wxsoundwavewxsoundwave}
\func{}{wxSoundWave}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
\func{}{wxSoundWave}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
\membersection{wxSoundWave::\destruct{wxSoundWave}}\label{wxsoundwavedtor}
\func{}{\destruct{wxSoundWave}}{\void}
\membersection{wxSoundWave::CanRead}\label{wxsoundwavecanread}
\func{bool}{CanRead}{\void}
\membersection{wxSoundWave::GetCodecName}\label{wxsoundwavegetcodecname}
\constfunc{wxString}{GetCodecName}{\void}
\membersection{wxSoundWave::PrepareToPlay}\label{wxsoundwavepreparetoplay}
\func{bool}{PrepareToPlay}{\void}
\membersection{wxSoundWave::PrepareToRecord}\label{wxsoundwavepreparetorecord}
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
\membersection{wxSoundWave::FinishRecording}\label{wxsoundwavefinishrecording}
\func{bool}{FinishRecording}{\void}
\membersection{wxSoundWave::RepositionStream}\label{wxsoundwaverepositionstream}
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
\membersection{wxSoundWave::GetData}\label{wxsoundwavegetdata}
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundWave::PutData}\label{wxsoundwaveputdata}
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundWave::HandleOutputPCM}\label{wxsoundwavehandleoutputpcm}
\func{bool}{HandleOutputPCM}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
\membersection{wxSoundWave::HandleOutputG721}\label{wxsoundwavehandleoutputg721}
\func{bool}{HandleOutputG721}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
\membersection{wxSoundWave::HandleInputPCM}\label{wxsoundwavehandleinputpcm}
\func{wxSoundFormatBase*}{HandleInputPCM}{\param{wxDataOutputStream\& }{data}}
\membersection{wxSoundWave::HandleInputG72X}\label{wxsoundwavehandleinputg72x}
\func{wxSoundFormatBase*}{HandleInputG72X}{\param{wxDataOutputStream\& }{data}}

View File

@@ -1,140 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwin.h at 26/Feb/00 14:26:51
%
\section{\class{wxSoundStreamWin}}\label{wxsoundstreamwin}
\wxheading{Derived from}
\helpref{wxSoundStream}{wxsoundstream}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef struct \_wxSoundInternal wxSoundInternal
\end{verbatim}}
{\small \begin{verbatim}
typedef struct \_wxSoundInfoHeader wxSoundInfoHeader
\end{verbatim}}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSoundStreamWin::wxSoundStreamWin}\label{wxsoundstreamwinwxsoundstreamwin}
\func{}{wxSoundStreamWin}{\void}
\membersection{wxSoundStreamWin::\destruct{wxSoundStreamWin}}\label{wxsoundstreamwindtor}
\func{}{\destruct{wxSoundStreamWin}}{\void}
\membersection{wxSoundStreamWin::Write}\label{wxsoundstreamwinwrite}
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamWin::Read}\label{wxsoundstreamwinread}
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
\membersection{wxSoundStreamWin::SetSoundFormat}\label{wxsoundstreamwinsetsoundformat}
\func{bool}{SetSoundFormat}{\param{wxSoundFormatBase\& }{base}}
\membersection{wxSoundStreamWin::StartProduction}\label{wxsoundstreamwinstartproduction}
\func{bool}{StartProduction}{\param{int }{evt}}
\membersection{wxSoundStreamWin::StopProduction}\label{wxsoundstreamwinstopproduction}
\func{bool}{StopProduction}{\void}
\membersection{wxSoundStreamWin::QueueFilled}\label{wxsoundstreamwinqueuefilled}
\constfunc{bool}{QueueFilled}{\void}
\membersection{wxSoundStreamWin::NotifyDoneBuffer}\label{wxsoundstreamwinnotifydonebuffer}
\func{void}{NotifyDoneBuffer}{\param{wxUint32 }{dev\_handle}, \param{int }{flag}}
Internal but defined as public
\membersection{wxSoundStreamWin::GetBestSize}\label{wxsoundstreamwingetbestsize}
\constfunc{wxUint32}{GetBestSize}{\void}
\membersection{wxSoundStreamWin::CreateSndWindow}\label{wxsoundstreamwincreatesndwindow}
\func{void}{CreateSndWindow}{\void}
\membersection{wxSoundStreamWin::DestroySndWindow}\label{wxsoundstreamwindestroysndwindow}
\func{void}{DestroySndWindow}{\void}
\membersection{wxSoundStreamWin::OpenDevice}\label{wxsoundstreamwinopendevice}
\func{bool}{OpenDevice}{\param{int }{mode}}
\membersection{wxSoundStreamWin::CloseDevice}\label{wxsoundstreamwinclosedevice}
\func{void}{CloseDevice}{\void}
\membersection{wxSoundStreamWin::AllocHeader}\label{wxsoundstreamwinallocheader}
\func{wxSoundInfoHeader*}{AllocHeader}{\param{int }{mode}}
\membersection{wxSoundStreamWin::FreeHeader}\label{wxsoundstreamwinfreeheader}
\func{void}{FreeHeader}{\param{wxSoundInfoHeader* }{header}, \param{int }{mode}}
\membersection{wxSoundStreamWin::AllocHeaders}\label{wxsoundstreamwinallocheaders}
\func{bool}{AllocHeaders}{\param{int }{mode}}
\membersection{wxSoundStreamWin::FreeHeaders}\label{wxsoundstreamwinfreeheaders}
\func{void}{FreeHeaders}{\param{int }{mode}}
\membersection{wxSoundStreamWin::WaitFor}\label{wxsoundstreamwinwaitfor}
\func{void}{WaitFor}{\param{wxSoundInfoHeader* }{info}}
\membersection{wxSoundStreamWin::AddToQueue}\label{wxsoundstreamwinaddtoqueue}
\func{bool}{AddToQueue}{\param{wxSoundInfoHeader* }{info}}
\membersection{wxSoundStreamWin::ClearHeader}\label{wxsoundstreamwinclearheader}
\func{void}{ClearHeader}{\param{wxSoundInfoHeader* }{info}}
\membersection{wxSoundStreamWin::NextFragmentOutput}\label{wxsoundstreamwinnextfragmentoutput}
\func{wxSoundInfoHeader*}{NextFragmentOutput}{\void}
\membersection{wxSoundStreamWin::NextFragmentInput}\label{wxsoundstreamwinnextfragmentinput}
\func{wxSoundInfoHeader*}{NextFragmentInput}{\void}

View File

@@ -1,34 +0,0 @@
runTwice = yes
titleFontSize = 12
authorFontSize = 10
chapterFontSize = 12
sectionFontSize = 12
subsectionFontSize = 12
headerRule = yes
footerRule = yes
useHeadingStyles = yes
listItemIndent=40
generateHPJ = yes
htmlBrowseButtons = bitmap
winHelpVersion = 3
winHelpContents = yes
winHelpTitle = "MMedia Manual"
truncateFilenames = yes
combineSubSections = yes
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
\sethotspotcolour{on}\sethotspotunderline{on}}
\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}}
\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}}
\const [0] {{\bf const}}
\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
\windowstyle [1] {{\bf #1}\index{#1}}
;;
;; These two are for generating MS HTML Help project, contents and index files.
;;
htmlWorkshopFiles = true
htmlIndex = true
\pythonnote [1] {{\bf \fcol{blue}{wxPython note:}} #1}
%\pythonnote [1] {}

View File

@@ -1,10 +0,0 @@
\chapter{Topic overviews}\label{overviews}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
The following sections describe particular topics.
\section{MMedia extension overview}\label{mmedoverview}
To be written.

View File

@@ -1,173 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidbase.h at 26/Feb/00 14:51:56
%
\section{\class{wxVideoBaseDriver}}\label{wxvideobasedriver}
Classes definition
\wxheading{Derived from}
wxObject
\wxheading{Data structures}
{\small \begin{verbatim}
typedef enum {
wxVIDEO\_MSAVI,
wxVIDEO\_MPEG,
wxVIDEO\_QT,
wxVIDEO\_GIF,
wxVIDEO\_JMOV,
wxVIDEO\_FLI,
wxVIDEO\_IFF,
wxVIDEO\_SGI,
wxVIDEO\_MPEG2
} wxVideoType
\end{verbatim}}
wxMMedia2 (video) types
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
\func{}{wxVideoBaseDriver}{\void}
Ctors
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
\func{}{wxVideoBaseDriver}{\param{wxInputStream\& }{str}}
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
\func{}{wxVideoBaseDriver}{\param{const wxString\& }{filename}}
\membersection{wxVideoBaseDriver::\destruct{wxVideoBaseDriver}}\label{wxvideobasedriverdtor}
\func{}{\destruct{wxVideoBaseDriver}}{\void}
Dtor
\membersection{wxVideoBaseDriver::Play}\label{wxvideobasedriverplay}
\func{bool}{Play}{\void}
Usual functions ... They all return FALSE in case of errors.
\membersection{wxVideoBaseDriver::Stop}\label{wxvideobasedriverstop}
\func{bool}{Stop}{\void}
\membersection{wxVideoBaseDriver::Pause}\label{wxvideobasedriverpause}
\func{bool}{Pause}{\void}
\membersection{wxVideoBaseDriver::Resume}\label{wxvideobasedriverresume}
\func{bool}{Resume}{\void}
\membersection{wxVideoBaseDriver::SetSize}\label{wxvideobasedriversetsize}
\func{bool}{SetSize}{\param{wxSize }{size}}
Size management
\membersection{wxVideoBaseDriver::GetSize}\label{wxvideobasedrivergetsize}
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
\membersection{wxVideoBaseDriver::IsCapable}\label{wxvideobasedriveriscapable}
\constfunc{bool}{IsCapable}{\param{wxVideoType }{WXUNUSED(v\_type)}}
Test the capability of the driver to handle the specified type
\membersection{wxVideoBaseDriver::GetMovieCodec}\label{wxvideobasedrivergetmoviecodec}
\constfunc{wxString}{GetMovieCodec}{\void}
Return the video codec name
\membersection{wxVideoBaseDriver::GetAudioCodec}\label{wxvideobasedrivergetaudiocodec}
\constfunc{wxString}{GetAudioCodec}{\void}
Return the audio codec name
\membersection{wxVideoBaseDriver::GetSampleRate}\label{wxvideobasedrivergetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
Return misc info about audio
\membersection{wxVideoBaseDriver::GetChannels}\label{wxvideobasedrivergetchannels}
\constfunc{wxUint8}{GetChannels}{\void}
\membersection{wxVideoBaseDriver::GetBPS}\label{wxvideobasedrivergetbps}
\constfunc{wxUint8}{GetBPS}{\void}
\membersection{wxVideoBaseDriver::GetFrameRate}\label{wxvideobasedrivergetframerate}
\constfunc{double}{GetFrameRate}{\void}
Return frame rate
\membersection{wxVideoBaseDriver::GetNbFrames}\label{wxvideobasedrivergetnbframes}
\constfunc{wxUint32}{GetNbFrames}{\void}
Return number of frames
\membersection{wxVideoBaseDriver::OnFinished}\label{wxvideobasedriveronfinished}
\func{void}{OnFinished}{\void}
Called when the movie finished
\membersection{wxVideoBaseDriver::AttachOutput}\label{wxvideobasedriverattachoutput}
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
Attaches the video output to a window. The video will be shown in that window.
\membersection{wxVideoBaseDriver::DetachOutput}\label{wxvideobasedriverdetachoutput}
\func{void}{DetachOutput}{\void}
\membersection{wxVideoBaseDriver::IsPaused}\label{wxvideobasedriverispaused}
\constfunc{bool}{IsPaused}{\void}
They return the state of the movie.
\membersection{wxVideoBaseDriver::IsStopped}\label{wxvideobasedriverisstopped}
\constfunc{bool}{IsStopped}{\void}

View File

@@ -1,148 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidwin.h at 26/Feb/00 14:52:03
%
\section{\class{wxVideoWindows}}\label{wxvideowindows}
Class definition
\wxheading{Derived from}
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef struct VIDW\_Internal {
MCIDEVICEID m\_dev\_id
};
\end{verbatim}}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxVideoWindows::OpenFile}\label{wxvideowindowsopenfile}
\func{void}{OpenFile}{\void}
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
\func{}{wxVideoWindows}{\void}
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
\func{}{wxVideoWindows}{\param{wxInputStream\& }{str}}
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
\func{}{wxVideoWindows}{\param{const wxString\& }{fname}}
\membersection{wxVideoWindows::\destruct{wxVideoWindows}}\label{wxvideowindowsdtor}
\func{}{\destruct{wxVideoWindows}}{\void}
\membersection{wxVideoWindows::Play}\label{wxvideowindowsplay}
\func{bool}{Play}{\void}
\membersection{wxVideoWindows::Stop}\label{wxvideowindowsstop}
\func{bool}{Stop}{\void}
\membersection{wxVideoWindows::Pause}\label{wxvideowindowspause}
\func{bool}{Pause}{\void}
\membersection{wxVideoWindows::Resume}\label{wxvideowindowsresume}
\func{bool}{Resume}{\void}
\membersection{wxVideoWindows::GetSize}\label{wxvideowindowsgetsize}
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
\membersection{wxVideoWindows::SetSize}\label{wxvideowindowssetsize}
\func{bool}{SetSize}{\param{wxSize }{size}}
\membersection{wxVideoWindows::GetMovieCodec}\label{wxvideowindowsgetmoviecodec}
\constfunc{wxString}{GetMovieCodec}{\void}
Return codec name for each stream.
\membersection{wxVideoWindows::GetAudioCodec}\label{wxvideowindowsgetaudiocodec}
\constfunc{wxString}{GetAudioCodec}{\void}
\membersection{wxVideoWindows::GetSampleRate}\label{wxvideowindowsgetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
Return misc. info about audio
\membersection{wxVideoWindows::GetChannels}\label{wxvideowindowsgetchannels}
\constfunc{wxUint8}{GetChannels}{\void}
\membersection{wxVideoWindows::GetBPS}\label{wxvideowindowsgetbps}
\constfunc{wxUint8}{GetBPS}{\void}
\membersection{wxVideoWindows::GetFrameRate}\label{wxvideowindowsgetframerate}
\constfunc{double}{GetFrameRate}{\void}
Return the frame rate of the video (in frames/second)
\membersection{wxVideoWindows::GetNbFrames}\label{wxvideowindowsgetnbframes}
\constfunc{wxUint32}{GetNbFrames}{\void}
Return the total number of frames in the movie
\membersection{wxVideoWindows::IsCapable}\label{wxvideowindowsiscapable}
\func{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
\membersection{wxVideoWindows::AttachOutput}\label{wxvideowindowsattachoutput}
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
\membersection{wxVideoWindows::DetachOutput}\label{wxvideowindowsdetachoutput}
\func{void}{DetachOutput}{\void}
\membersection{wxVideoWindows::IsPaused}\label{wxvideowindowsispaused}
\constfunc{bool}{IsPaused}{\void}
\membersection{wxVideoWindows::IsStopped}\label{wxvideowindowsisstopped}
\constfunc{bool}{IsStopped}{\void}

View File

@@ -1,170 +0,0 @@
%
% automatically generated by HelpGen from
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidxanm.h at 26/Feb/00 14:52:06
%
\section{\class{wxVideoXANIM}}\label{wxvideoxanim}
Class definition
\wxheading{Derived from}
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef struct wxXANIMinternal {
Display *xanim\_dpy
\end{verbatim}}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
\func{}{wxVideoXANIM}{\void}
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
\func{}{wxVideoXANIM}{\param{wxInputStream\& }{str}}
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
\func{}{wxVideoXANIM}{\param{const wxString\& }{filename}}
\membersection{wxVideoXANIM::\destruct{wxVideoXANIM}}\label{wxvideoxanimdtor}
\func{}{\destruct{wxVideoXANIM}}{\void}
\membersection{wxVideoXANIM::Play}\label{wxvideoxanimplay}
\func{bool}{Play}{\void}
\membersection{wxVideoXANIM::Pause}\label{wxvideoxanimpause}
\func{bool}{Pause}{\void}
\membersection{wxVideoXANIM::Resume}\label{wxvideoxanimresume}
\func{bool}{Resume}{\void}
\membersection{wxVideoXANIM::Stop}\label{wxvideoxanimstop}
\func{bool}{Stop}{\void}
\membersection{wxVideoXANIM::SetVolume}\label{wxvideoxanimsetvolume}
\func{bool}{SetVolume}{\param{wxUint8 }{vol}}
\membersection{wxVideoXANIM::SetSize}\label{wxvideoxanimsetsize}
\func{bool}{SetSize}{\param{wxSize }{size}}
\membersection{wxVideoXANIM::GetSize}\label{wxvideoxanimgetsize}
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
\membersection{wxVideoXANIM::GetMovieCodec}\label{wxvideoxanimgetmoviecodec}
\constfunc{wxString}{GetMovieCodec}{\void}
Return the video codec name
\membersection{wxVideoXANIM::GetAudioCodec}\label{wxvideoxanimgetaudiocodec}
\constfunc{wxString}{GetAudioCodec}{\void}
Return the audio codec name
\membersection{wxVideoXANIM::GetSampleRate}\label{wxvideoxanimgetsamplerate}
\constfunc{wxUint32}{GetSampleRate}{\void}
Return misc info about audio
\membersection{wxVideoXANIM::GetChannels}\label{wxvideoxanimgetchannels}
\constfunc{wxUint8}{GetChannels}{\void}
\membersection{wxVideoXANIM::GetBPS}\label{wxvideoxanimgetbps}
\constfunc{wxUint8}{GetBPS}{\void}
\membersection{wxVideoXANIM::GetFrameRate}\label{wxvideoxanimgetframerate}
\constfunc{double}{GetFrameRate}{\void}
Return frame rate
\membersection{wxVideoXANIM::GetNbFrames}\label{wxvideoxanimgetnbframes}
\constfunc{wxUint32}{GetNbFrames}{\void}
Return number of frames in the movie
\membersection{wxVideoXANIM::IsCapable}\label{wxvideoxanimiscapable}
\constfunc{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
\membersection{wxVideoXANIM::AttachOutput}\label{wxvideoxanimattachoutput}
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
\membersection{wxVideoXANIM::DetachOutput}\label{wxvideoxanimdetachoutput}
\func{void}{DetachOutput}{\void}
\membersection{wxVideoXANIM::IsPaused}\label{wxvideoxanimispaused}
\constfunc{bool}{IsPaused}{\void}
\membersection{wxVideoXANIM::IsStopped}\label{wxvideoxanimisstopped}
\constfunc{bool}{IsStopped}{\void}
\membersection{wxVideoXANIM::RestartXANIM}\label{wxvideoxanimrestartxanim}
\func{bool}{RestartXANIM}{\void}
Start the subprocess with the right parameters
\membersection{wxVideoXANIM::SendCommand}\label{wxvideoxanimsendcommand}
\func{bool}{SendCommand}{\param{const char* }{command}, \param{char** }{ret = NULL}, \param{wxUint32* }{size = NULL}}
Send a command to the subprocess
\membersection{wxVideoXANIM::CollectInfo}\label{wxvideoxanimcollectinfo}
\func{bool}{CollectInfo}{\void}
Collect informations from XAnim

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 959 B

View File

@@ -1,17 +0,0 @@
[OPTIONS]
BMROOT=d:\wx2\wxwind~1\contrib\docs\latex\ogl ; Assume that bitmaps are where the source is
TITLE=OGL Manual
CONTENTS=Contents
COMPRESS=HIGH
[FILES]
ogl.rtf
[CONFIG]
CreateButton("Up", "&Up", "JumpId(`ogl.hlp', `Contents')")
BrowseButtons()
[MAP]
[BITMAPS]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

View File

@@ -1,58 +0,0 @@
// ---------------------------------------------------------------------------
// Name: cdunix.h
// Purpose: wxMMedia
// Author: Guilhem Lavaux
// Created: 1997
// Updated: 2000
// Copyright: (C) 1997, 1998, 1999, 2000 Guilhem Lavaux
// License: wxWindows license
// ---------------------------------------------------------------------------
#ifndef __CDUNIXH__
#define __CDUNIXH__
#ifdef __GNUG__
#pragma interface "cdunix.h"
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/mmedia/cdbase.h"
///
class WXDLLEXPORT wxCDAudioLinux : public wxCDAudio {
DECLARE_DYNAMIC_CLASS(wxCDAudioLinux)
protected:
wxCDtime m_time;
CDstatus m_status;
CDtoc *m_toc;
int m_fd;
wxCDtime *m_trksize, *m_trkpos;
public:
///
wxCDAudioLinux();
///
wxCDAudioLinux(const wxString& dev_name);
///
virtual ~wxCDAudioLinux();
///
virtual bool Play(const wxCDtime& beg_time, const wxCDtime& end_time);
///
virtual bool Pause();
///
virtual bool Resume();
///
virtual CDstatus GetStatus();
///
virtual wxCDtime GetTime();
///
virtual CDtoc& GetToc();
///
virtual inline bool Ok() const { return (m_fd != -1); }
protected:
///
void OpenDevice(const wxString& dev_name);
};
#endif

View File

@@ -1,46 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndaiff.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDAIFF_H
#define _WX_SNDAIFF_H
#ifdef __GNUG__
#pragma interface "sndaiff.h"
#endif
#include "wx/defs.h"
#include "wx/stream.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndcodec.h"
#include "wx/mmedia/sndfile.h"
//
// AIFF codec
//
class wxSoundAiff: public wxSoundFileStream {
public:
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
~wxSoundAiff();
bool CanRead();
wxString GetCodecName() const;
protected:
bool PrepareToPlay();
bool PrepareToRecord(wxUint32 time);
bool FinishRecording();
bool RepositionStream(wxUint32 position);
wxUint32 GetData(void *buffer, wxUint32 len);
wxUint32 PutData(const void *buffer, wxUint32 len);
protected:
off_t m_base_offset;
};
#endif

View File

@@ -1,171 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndbase.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDBASE_H
#define _WX_SNDBASE_H
#ifdef __GNUG__
#pragma interface "sndbase.h"
#endif
#include "wx/defs.h"
// ------------------------------------------------------------------------
// DEFINITIONS
// ---------------------
// Sound streaming mode:
// - wxSOUND_INPUT: simple recording mode
// - wxSOUND_OUTPUT: simple playing mode
// - wxSOUND_DUPLEX: full duplex record/play at the same time
// ---------------------
enum {
wxSOUND_INPUT = 1,
wxSOUND_OUTPUT = 2,
wxSOUND_DUPLEX = wxSOUND_INPUT | wxSOUND_OUTPUT,
};
// ---------------------
// wxSoundFormatType: it specifies the format family of the sound data
// which will be passed to the stream.
// ---------------------
typedef enum {
wxSOUND_NOFORMAT,
wxSOUND_PCM,
wxSOUND_ULAW,
wxSOUND_G72X,
wxSOUND_MSADPCM
} wxSoundFormatType;
// ---------------------
// wxSoundError:
// - wxSOUND_NOERR: No error occured
// - wxSOUND_IOERR: an input/output error occured, it may concern either
// a driver or a file
// - wxSOUND_INVFRMT: the sound format passed to the function is invalid.
// Generally, it means that you passed out of range values
// to the codec stream or you don't pass the right sound
// format object to the right sound codec stream.
// - wxSOUND_INVDEV: Invalid device. Generally, it means that the sound stream
// didn't manage to open the device driver due to an invalid// parameter or to the fact that sound is not supported on
// this computer.
// - wxSOUND_NOEXACT: No exact matching sound codec has been found for
// this sound format. It means that the sound driver didn't
// manage to setup the sound card with the specified
// values.
// - wxSOUND_NOCODEC: No matching codec has been found. Generally, it
// may happen when you call
// wxSoundRouterStream::SetSoundFormat().
// - wxSOUND_MEMERR: Not enough memory.
// - wxSOUND_NOTSTARTED: You did not start the production using
// StartProduction()
// ---------------------
typedef enum {
wxSOUND_NOERROR,
wxSOUND_IOERROR,
wxSOUND_INVFRMT,
wxSOUND_INVDEV,
wxSOUND_NOEXACT,
wxSOUND_INVSTRM,
wxSOUND_NOCODEC,
wxSOUND_MEMERROR,
wxSOUND_NOTSTARTED
} wxSoundError;
class WXDLLEXPORT wxSoundStream;
// ---------------------
// wxSoundCallback(stream, evt, cdata): C callback for sound event.
// - stream: current wxSoundStream
// - evt: the sound event which has occured, it may be wxSOUND_INPUT,
// wxSOUND_OUTPUT or wxSOUND_DUPLEX
// - cdata: User callback data
// ---------------------
typedef void (*wxSoundCallback)(wxSoundStream *stream, int evt,
void *cdata);
//
// Base class for sound format specification
//
class WXDLLEXPORT wxSoundFormatBase {
public:
wxSoundFormatBase();
virtual ~wxSoundFormatBase();
// It returns a "standard" format type.
virtual wxSoundFormatType GetType() const { return wxSOUND_NOFORMAT; }
// It clones the current format.
virtual wxSoundFormatBase *Clone() const;
virtual wxUint32 GetTimeFromBytes(wxUint32 bytes) const = 0;
virtual wxUint32 GetBytesFromTime(wxUint32 time) const = 0;
virtual bool operator !=(const wxSoundFormatBase& frmt2) const;
};
//
// Base class for sound streams
//
class wxSoundStream {
public:
wxSoundStream();
virtual ~wxSoundStream();
// Reads "len" bytes from the sound stream.
virtual wxSoundStream& Read(void *buffer, wxUint32 len) = 0;
// Writes "len" byte to the sound stream.
virtual wxSoundStream& Write(const void *buffer, wxUint32 len) = 0;
// Returns the best size for IO calls
virtual wxUint32 GetBestSize() const { return 1024; }
// SetSoundFormat returns TRUE when the format can be handled.
virtual bool SetSoundFormat(const wxSoundFormatBase& format);
// GetSoundFormat returns the current sound format.
wxSoundFormatBase& GetSoundFormat() const { return *m_sndformat; }
// Register a callback for a specified async event.
void SetCallback(int evt, wxSoundCallback cbk, void *cdata);
// Starts the async notifier. After this call, the stream begins either
// recording or playing or the two at the same time.
virtual bool StartProduction(int evt) = 0;
// Stops the async notifier.
virtual bool StopProduction() = 0;
// Sets the event handler: if it is non-null, all events are routed to it.
void SetEventHandler(wxSoundStream *handler) { m_handler = handler; }
wxSoundError GetError() const { return m_snderror; }
wxUint32 GetLastAccess() const { return m_lastcount; }
// This is only useful for device (I think).
virtual bool QueueFilled() const { return TRUE; }
protected:
// Current sound format
wxSoundFormatBase *m_sndformat;
// Last error
wxSoundError m_snderror;
// Last access
wxUint32 m_lastcount;
// Event handler
wxSoundStream *m_handler;
wxSoundCallback m_callback[2];
void *m_cdata[2];
protected:
// Handles event
virtual void OnSoundEvent(int evt);
};
#endif

View File

@@ -1,54 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndcpcm.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDCPCM_H
#define _WX_SNDCPCM_H
#ifdef __GNUG__
#pragma interface "sndcpcm.h"
#endif
#include "wx/defs.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndcodec.h"
//
// PCM converter class
//
class wxSoundStreamPcm: public wxSoundStreamCodec {
public:
typedef void (*ConverterType)(const void *buf_in, void *buf_out,
wxUint32 len);
wxSoundStreamPcm(wxSoundStream& sndio);
~wxSoundStreamPcm();
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
bool SetSoundFormat(const wxSoundFormatBase& format);
wxUint32 GetBestSize() const;
protected:
wxUint32 GetReadSize(wxUint32 len) const;
wxUint32 GetWriteSize(wxUint32 len) const;
protected:
ConverterType m_function_out, m_function_in;
// Static temporary buffer
char *m_prebuffer;
wxUint32 m_prebuffer_size;
// Estimated best size to fit into the static buffer
wxUint32 m_best_size;
// Multiplier for IO buffer size
float m_multiplier_in, m_multiplier_out;
};
#endif

View File

@@ -1,53 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndesd.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDESD_H
#define _WX_SNDESD_H
#ifdef __GNUG__
#pragma interface "sndesd.h"
#endif
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndpcm.h"
//
// ESD output class
//
class wxSoundStreamESD : public wxSoundStream {
public:
wxSoundStreamESD(const wxString& hostname = wxT("localhost"));
~wxSoundStreamESD();
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
bool SetSoundFormat(const wxSoundFormatBase& format);
bool StartProduction(int evt);
bool StopProduction();
// You should not call this.
void WakeUpEvt(int evt);
bool QueueFilled() const { return m_q_filled; }
protected:
int m_fd_input, m_fd_output; // ESD fds
int m_tag_input, m_tag_output; // GLIB tags
bool m_esd_stop; // Stream started ?
bool m_esd_ok; // ESD detected
wxString m_hostname; // ESD host
bool m_q_filled; // queue filled
private:
void DetectBest(wxSoundFormatPcm *pcm);
};
#endif

View File

@@ -1,125 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndfile.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDFILE_H
#define _WX_SNDFILE_H
#include "wx/defs.h"
#include "wx/stream.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndcodec.h"
#define wxSOUND_INFINITE_TIME ((wxUint32)-1)
//
// Codec router class
//
class WXDLLEXPORT wxSoundRouterStream: public wxSoundStreamCodec {
public:
wxSoundRouterStream(wxSoundStream& sndio);
~wxSoundRouterStream();
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
bool SetSoundFormat(const wxSoundFormatBase& format);
bool StartProduction(int evt);
bool StopProduction();
wxUint32 GetBestSize() const;
protected:
wxSoundStream *m_router;
};
typedef enum {
wxSOUND_FILE_STOPPED,
wxSOUND_FILE_PAUSED,
wxSOUND_FILE_PLAYING,
wxSOUND_FILE_RECORDING
} wxSoundFileState;
//
// Base class for file coders/decoders
//
class wxSoundFileStream: public wxSoundStream {
public:
wxSoundFileStream(wxInputStream& stream, wxSoundStream& io_sound);
wxSoundFileStream(wxOutputStream& stream, wxSoundStream& io_sound);
~wxSoundFileStream();
// Usual sound file calls (Play, Stop, ...)
bool Play();
bool Record(wxUint32 time);
bool Stop();
bool Pause();
bool Resume();
// Functions which return the current state
bool IsStopped() const { return m_state == wxSOUND_FILE_STOPPED; }
bool IsPaused() const { return m_state == wxSOUND_FILE_PAUSED; }
// A user should not call these two functions.
// Several things must be done before calling them.
// Users should use Play(), ...
bool StartProduction(int evt);
bool StopProduction();
// These three functions deals with the length, the position in the sound file.
// All the values are expressed in bytes. If you need the values expressed
// in terms of time, you have to use GetSoundFormat().GetTimeFromBytes(...)
wxUint32 GetLength();
wxUint32 GetPosition();
wxUint32 SetPosition(wxUint32 new_position);
// These two functions use the sound format specified by GetSoundFormat().
// All samples must be encoded in that format.
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
// This function set the sound format of the file. !! It must be used only
// when you are in output mode (concerning the file) !! If you are in
// input mode (concerning the file) you can't use this function to modify
// the format of the samples returned by Read() !
// For this action, you must use wxSoundRouterStream applied to wxSoundFileStream.
bool SetSoundFormat(const wxSoundFormatBase& format);
// This function returns the Codec name. This is useful for those who want to build
// a player (But also in some other case).
virtual wxString GetCodecName() const;
// You should use this function to test whether this file codec can read
// the stream you passed to it.
virtual bool CanRead() { return FALSE; }
protected:
wxSoundRouterStream m_codec;
wxSoundStream *m_sndio;
wxInputStream *m_input;
wxOutputStream *m_output;
wxSoundFileState m_state, m_oldstate;
wxUint32 m_length, m_bytes_left;
bool m_prepared;
protected:
virtual bool PrepareToPlay() = 0;
virtual bool PrepareToRecord(wxUint32 time) = 0;
virtual bool FinishRecording() = 0;
virtual bool RepositionStream(wxUint32 position) = 0;
void FinishPreparation(wxUint32 len);
virtual wxUint32 GetData(void *buffer, wxUint32 len) = 0;
virtual wxUint32 PutData(const void *buffer, wxUint32 len) = 0;
void OnSoundEvent(int evt);
};
#endif

View File

@@ -1,72 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndmsad(pcm).h
// Purpose: MS ADPCM codec
// Date: 25/02/2000
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 2000
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDULAW_H
#define _WX_SNDULAW_H
#ifdef __GNUG__
#pragma interface "sndmsad.h"
#endif
#include "wx/defs.h"
#include "wx/dynarray.h"
#include "wx/mmedia/sndcodec.h"
#include "wx/mmedia/sndbase.h"
WX_DEFINE_EXPORTED_ARRAY(wxUint16, wxMSAdpcmCoeffs);
//
// MSADPCM format
//
class WXDLLEXPORT wxSoundFormatMSAdpcm: public wxSoundFormatBase {
public:
wxSoundFormatMSAdpcm();
~wxSoundFormatMSAdpcm();
void SetSampleRate(wxUint32 srate);
wxUint32 GetSampleRate() const;
void SetSamplesBlock(wxUint16 sampblock);
wxUint16 GetSamplesBlock() const;
void SetCoefs(wxMSAdpcmCoefs& coefs);
wxMSAdpcmCoefs& GetCoefs() const;
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
wxSoundFormatBase *Clone() const;
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
wxUint32 GetBytesFromTime(wxUint32 time) const;
bool operator !=(const wxSoundFormatBase& frmt2) const;
protected:
wxUint32 m_srate;
wxMSAdpcmCoefs *m_coefs;
};
//
// MS ADPCM converter class
//
class WXDLLEXPORT wxSoundRouterStream;
class WXDLLEXPORT wxSoundStreamAdpcm: public wxSoundStreamCodec {
public:
wxSoundStreamAdpcm(wxSoundStream& sndio);
~wxSoundStreamAdpcm();
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
bool SetSoundFormat(const wxSoundFormatBase& format);
wxUint32 GetBestSize() const;
protected:
wxSoundRouterStream *m_router;
};
#endif

View File

@@ -1,67 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndulaw.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDULAW_H
#define _WX_SNDULAW_H
#ifdef __GNUG__
#pragma interface "sndulaw.h"
#endif
#include "wx/defs.h"
#include "wx/mmedia/sndcodec.h"
#include "wx/mmedia/sndbase.h"
//
// ULAW format
//
class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
public:
wxSoundFormatUlaw();
~wxSoundFormatUlaw();
void SetSampleRate(wxUint32 srate);
wxUint32 GetSampleRate() const;
void SetChannels(wxUint8 channels);
wxUint8 GetChannels() const;
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
wxSoundFormatBase *Clone() const;
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
wxUint32 GetBytesFromTime(wxUint32 time) const;
bool operator !=(const wxSoundFormatBase& frmt2) const;
protected:
wxUint32 m_srate;
wxUint8 m_channels;
};
//
// ULAW converter class
//
class WXDLLEXPORT wxSoundRouterStream;
class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
public:
wxSoundStreamUlaw(wxSoundStream& sndio);
~wxSoundStreamUlaw();
wxSoundStream& Read(void *buffer, wxUint32 len);
wxSoundStream& Write(const void *buffer, wxUint32 len);
bool SetSoundFormat(const wxSoundFormatBase& format);
wxUint32 GetBestSize() const;
protected:
wxSoundRouterStream *m_router;
};
#endif

View File

@@ -1,58 +0,0 @@
// --------------------------------------------------------------------------
// Name: sndwav.h
// Purpose:
// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifndef _WX_SNDWAV_H
#define _WX_SNDWAV_H
#ifdef __GNUG__
#pragma interface "sndwav.h"
#endif
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/stream.h"
#include "wx/datstrm.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndcodec.h"
#include "wx/mmedia/sndfile.h"
//
// WAVE codec
//
class wxSoundWave: public wxSoundFileStream {
public:
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
~wxSoundWave();
bool CanRead();
wxString GetCodecName() const;
protected:
bool PrepareToPlay();
bool PrepareToRecord(wxUint32 time);
bool FinishRecording();
bool RepositionStream(wxUint32 position);
wxUint32 GetData(void *buffer, wxUint32 len);
wxUint32 PutData(const void *buffer, wxUint32 len);
bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels,
wxUint32 sample_fq, wxUint32 byte_p_sec,
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels,
wxUint32 sample_fq, wxUint32 byte_p_sec,
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
protected:
off_t m_base_offset;
};
#endif

View File

@@ -1,110 +0,0 @@
// /////////////////////////////////////////////////////////////////////////////
// Name: vidbase.h
// Purpose: wxMMedia
// Author: Guilhem Lavaux
// Created: 1997
// Updated: 1998
// Copyright: (C) 1997, 1998, Guilhem Lavaux
// CVS: $Id$
// License: wxWindows license
// /////////////////////////////////////////////////////////////////////////////
/* Real -*- C++ -*- */
#ifndef __VID_bdrv_H__
#define __VID_bdrv_H__
#ifdef __GNUG__
#pragma interface "vidbase.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/stream.h"
#include "wx/string.h"
#include "wx/window.h"
#include "wx/frame.h"
#endif
// ----------------------------------------------------------------------------
// wxMMedia2 (video) types
typedef enum {
wxVIDEO_MSAVI,
wxVIDEO_MPEG,
wxVIDEO_QT,
wxVIDEO_GIF,
wxVIDEO_JMOV,
wxVIDEO_FLI,
wxVIDEO_IFF,
wxVIDEO_SGI,
wxVIDEO_MPEG2
} wxVideoType;
// ----------------------------------------------------------------------------
// Classes definition
class WXDLLEXPORT wxVideoBaseDriver : public wxObject {
DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver)
protected:
wxWindow *m_video_output;
public:
// Ctors
wxVideoBaseDriver();
wxVideoBaseDriver(wxInputStream& str);
wxVideoBaseDriver(const wxString& filename);
// Dtor
virtual ~wxVideoBaseDriver();
// Usual functions ... They all return FALSE in case of errors.
virtual bool Play() = 0;
virtual bool Stop() = 0;
virtual bool Pause() = 0;
virtual bool Resume() = 0;
// Size management
virtual bool SetSize(wxSize size) = 0;
virtual bool GetSize(wxSize& size) const = 0;
// Test the capability of the driver to handle the specified type
virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) const { return FALSE; }
// Return the video codec name
virtual wxString GetMovieCodec() const = 0;
// Return the audio codec name
virtual wxString GetAudioCodec() const = 0;
// Return misc info about audio
virtual wxUint32 GetSampleRate() const = 0;
virtual wxUint8 GetChannels() const = 0;
virtual wxUint8 GetBPS() const = 0;
// Return frame rate
virtual double GetFrameRate() const = 0;
// Return number of frames
virtual wxUint32 GetNbFrames() const = 0;
// Called when the movie finished
virtual void OnFinished() {}
// Attaches the video output to a window. The video will be shown in that window.
virtual bool AttachOutput(wxWindow& output);
virtual void DetachOutput();
// They return the state of the movie.
virtual bool IsPaused() const = 0;
virtual bool IsStopped() const = 0;
};
WXDLLEXPORT wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv);
#endif

View File

@@ -1,101 +0,0 @@
// ----------------------------------------------------------------------------
// Name: vidwin.h
// Purpose: wxMMedia
// Author: Guilhem Lavaux
// Created: February 1998
// Updated:
// Copyright: (C) 1998, Guilhem Lavaux
// License: wxWindows license
// ----------------------------------------------------------------------------
#ifndef __VID_windows_H__
#define __VID_windows_H__
#ifdef __GNUG__
#pragma interface "vidwin.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/stream.h"
#include "wx/window.h"
#endif
// ----------------------------------------------------------------------------
// wxMMedia2 headers
#include "wx/mmedia/vidbase.h"
// ----------------------------------------------------------------------------
// System headers and private types
#ifdef WXMMEDIA_INTERNAL
#include <windows.h>
#include <mmsystem.h>
typedef struct VIDW_Internal {
MCIDEVICEID m_dev_id;
} wxVIDWinternal;
#endif
// ----------------------------------------------------------------------------
// Class definition
class WXDLLEXPORT wxVideoWindows : public wxVideoBaseDriver {
DECLARE_DYNAMIC_CLASS(wxVideoWindows)
protected:
struct VIDW_Internal *m_internal;
bool m_paused, m_stopped, m_remove_file;
wxString m_filename;
double m_frameRate;
wxUint8 m_bps;
void OpenFile();
public:
wxVideoWindows(void);
wxVideoWindows(wxInputStream& str);
wxVideoWindows(const wxString& fname);
~wxVideoWindows(void);
bool Play();
bool Stop();
bool Pause();
bool Resume();
bool GetSize(wxSize& size) const;
bool SetSize(wxSize size);
// Return codec name for each stream.
wxString GetMovieCodec() const;
wxString GetAudioCodec() const;
// Return misc. info about audio
wxUint32 GetSampleRate() const;
wxUint8 GetChannels() const;
wxUint8 GetBPS() const;
// Return the frame rate of the video (in frames/second)
double GetFrameRate() const;
// Return the total number of frames in the movie
wxUint32 GetNbFrames() const;
bool IsCapable(wxVideoType v_type);
bool AttachOutput(wxWindow& output);
void DetachOutput(void);
bool IsPaused() const;
bool IsStopped() const;
};
#endif

View File

@@ -1,136 +0,0 @@
// /////////////////////////////////////////////////////////////////////////////
// Name: vidxanm.h
// Purpose: wxMMedia
// Author: Guilhem Lavaux
// Created: 1997
// Updated: 1998
// Copyright: (C) 1997, 1998, Guilhem Lavaux
// License: wxWindows license
// /////////////////////////////////////////////////////////////////////////////
/* Real -*- C++ -*- */
#ifndef __VID_xanim_H__
#define __VID_xanim_H__
#ifdef __GNUG__
#pragma interface "vidxanm.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/process.h"
#endif
// ----------------------------------------------------------------------------
// System dependent headers
#if defined(WXMMEDIA_INTERNAL) && (defined(__X__) || defined(__WXGTK__))
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#endif
// ----------------------------------------------------------------------------
// wxMMedia2 headers
#include "wx/mmedia/vidbase.h"
// ----------------------------------------------------------------------------
// Internal types
#ifdef WXMMEDIA_INTERNAL
typedef struct wxXANIMinternal {
Display *xanim_dpy;
Window xanim_window;
Atom xanim_atom, xanim_ret;
} wxXANIMinternal;
#ifndef __XANIM_COMMAND__
#define __XANIM_COMMAND__ "/usr/X11R6/bin/xanim"
#endif
#endif
// ----------------------------------------------------------------------------
// Class definition
class WXDLLEXPORT wxVideoXANIM : public wxVideoBaseDriver {
DECLARE_DYNAMIC_CLASS(wxVideoXANIM)
protected:
// Remember the state of the subprocess
bool m_xanim_started, m_paused;
// Pure X11 variables
struct wxXANIMinternal *m_internal;
wxString m_filename;
wxProcess *m_xanim_detector;
// Remember to delete the temporary file when necessary
bool m_remove_file;
wxUint32 m_size[2];
wxUint32 m_sampleRate;
wxUint8 m_channels;
wxUint8 m_bps;
wxUint32 m_frames;
double m_frameRate;
wxString m_movieCodec, m_audioCodec;
public:
wxVideoXANIM();
wxVideoXANIM(wxInputStream& str);
wxVideoXANIM(const wxString& filename);
~wxVideoXANIM();
bool Play();
bool Pause();
bool Resume();
bool Stop();
bool SetVolume(wxUint8 vol);
bool SetSize(wxSize size);
bool GetSize(wxSize& size) const;
// Return the video codec name
wxString GetMovieCodec() const;
// Return the audio codec name
wxString GetAudioCodec() const;
// Return misc info about audio
wxUint32 GetSampleRate() const;
wxUint8 GetChannels() const;
wxUint8 GetBPS() const;
// Return frame rate
double GetFrameRate() const;
// Return number of frames in the movie
wxUint32 GetNbFrames() const;
bool IsCapable(wxVideoType v_type) const;
bool AttachOutput(wxWindow& output);
void DetachOutput();
bool IsPaused() const;
bool IsStopped() const;
friend class wxVideoXANIMProcess;
protected:
// Start the subprocess with the right parameters
bool RestartXANIM();
// Send a command to the subprocess
bool SendCommand(const char *command,char **ret = NULL,
wxUint32 *size = NULL);
// Collect informations from XAnim
bool CollectInfo();
};
#endif

View File

@@ -1,27 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: ogl.h
// Purpose: OGL main include
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_OGL_H_
#define _OGL_OGL_H_
#include <wx/ogl/basic.h> // Basic shapes
#include <wx/ogl/lines.h> // Lines and splines
#include <wx/ogl/divided.h> // Vertically-divided rectangle
#include <wx/ogl/composit.h> // Composite images
#include <wx/ogl/canvas.h> // wxShapeCanvas for displaying objects
#include <wx/ogl/ogldiag.h> // wxDiagram
// TODO: replace with wxModule implementation
extern void wxOGLInitialize();
extern void wxOGLCleanUp();
#endif
// _OGL_OGL_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +0,0 @@
# $Id$
CONTRIB_SAMPLES=mmedia ogl stc
all:
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
clean:
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE) clean); done

View File

@@ -1,16 +0,0 @@
# Makefile for mmedia sample.
# $Id$
top_srcdir = @top_srcdir@/..
top_builddir = ../../..
program_dir = contrib/samples/mmedia
PROGRAM=mmboard
OBJECTS=mmboard.o mmbman.o
APPEXTRALIBS=$(top_builddir)/lib/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
include $(top_builddir)/src/makeprog.env

View File

@@ -1,30 +0,0 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)
.else
CXX_DEFINE =
.endif
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
$(MMS)$(MMSQUALIFIERS) minimal.exe
minimal.exe : minimal.obj
.ifdef __WXMOTIF__
cxxlink minimal,[--.lib]vms/opt
.endif
minimal.obj : minimal.cpp

View File

@@ -1,24 +0,0 @@
/* XPM */
static char * eject_xpm[] = {
"15 16 5 1",
" c None",
". c #949594",
"+ c #000000",
"@ c #FFFFFF",
"# c #8E8E8E",
" . ",
" .+@ ",
" .+++@ ",
" .+++++@ ",
" .+++++++@ ",
" .+++++++++@ ",
" .+++++++++++@ ",
".+############@",
".@@@@@@@@@@@@@@",
" ",
"...............",
".++++++++++++#@",
".++++++++++++#@",
".++++++++++++#@",
".+############@",
".@@@@@@@@@@@@@@"};

View File

@@ -1,17 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=mmboard
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
OBJECTS = $(TARGET).obj mmbman.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,20 +0,0 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=mmboard
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
OBJECTS=$(TARGET).obj mmbman.obj
!include $(WXDIR)\src\makeprog.bcc

View File

@@ -1,17 +0,0 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Makefile : Builds 16-bit sample, VC++ 1.5
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
TARGET=minimal
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.msc

View File

@@ -1,17 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=mmboard
EXTRALIBS=-lmmedia
OBJECTS = $(TARGET).o mmbman.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,25 +0,0 @@
#
# File: makefile.vc
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart
#
# Makefile : Builds sample (VC++, WIN32)
# Use FINAL=1 argument to nmake to build final version with no debug info.
# Set WXDIR for your system
WXDIR = $(WXWIN)
PROGRAM=mmboard
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\contrib\lib\mmediad.lib
!else
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
!endif
OBJECTS = $(PROGRAM).obj mmbman.obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,14 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = mmboard
OBJECTS = $(PROGRAM).obj mmbman.obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,512 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mmbman.cpp
// Purpose: Multimedia Board manager
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
// Modified by:
// Created: 13/02/2000
// RCS-ID: $Id$
// Copyright: (c) 2000, Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "mmbman.cpp"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// Personal headers
#include "wx/stream.h"
#include "wx/wfstream.h"
#include "wx/mmedia/sndbase.h"
#include "wx/mmedia/sndfile.h"
#include "wx/mmedia/sndwav.h"
#include "wx/mmedia/sndaiff.h"
#include "wx/mmedia/sndpcm.h"
#include "wx/mmedia/sndulaw.h"
#ifdef __UNIX__
#include "wx/mmedia/sndoss.h"
#include "wx/mmedia/sndesd.h"
#endif
#ifdef __WIN32__
#include "wx/mmedia/sndwin.h"
#endif
#include "wx/mmedia/vidbase.h"
#ifdef __UNIX__
#include "wx/mmedia/vidxanm.h"
#endif
#ifdef __WIN32__
#include "wx/mmedia/vidwin.h"
#endif
#include "mmboard.h"
#include "mmbman.h"
// ----------------------------------------------------------------------------
// Private class definitions
// ----------------------------------------------------------------------------
class MMBoardSoundFile: public MMBoardFile {
public:
MMBoardSoundFile(const wxString& filename);
~MMBoardSoundFile();
bool NeedWindow();
void SetWindow(wxWindow *window);
void Play();
void Pause();
void Resume();
void Stop();
MMBoardTime GetPosition();
MMBoardTime GetLength();
void SetPosition(MMBoardTime btime);
bool IsStopped();
bool IsPaused();
wxString GetStringType();
wxString GetStringInformation();
protected:
wxSoundFileStream *GetDecoder();
wxSoundStream *m_output_stream;
wxInputStream *m_input_stream;
wxSoundFileStream *m_file_stream;
MMBoardTime m_length;
wxUint8 m_file_type;
};
class MMBoardVideoFile: public MMBoardFile {
public:
MMBoardVideoFile(const wxString& filename);
~MMBoardVideoFile();
bool NeedWindow();
void SetWindow(wxWindow *window);
void Play();
void Pause();
void Resume();
void Stop();
MMBoardTime GetPosition();
MMBoardTime GetLength();
void SetPosition(MMBoardTime btime);
bool IsStopped();
bool IsPaused();
wxString GetStringType();
wxString GetStringInformation();
protected:
wxWindow *m_output_window;
wxVideoBaseDriver *m_video_driver;
};
// ----------------------------------------------------------------------------
// Implementation
// ----------------------------------------------------------------------------
#define MMBoard_UNKNOWNTYPE 0
#define MMBoard_WAVE 1
#define MMBoard_AIFF 2
// ----------------------------------------------------------------------------
// MMBoardSoundFile
MMBoardSoundFile::MMBoardSoundFile(const wxString& filename)
: MMBoardFile()
{
m_input_stream = new wxFileInputStream(filename);
m_output_stream = MMBoardManager::OpenSoundStream();
m_file_stream = GetDecoder();
if (!m_file_stream) {
SetError(MMBoard_UnknownFile);
return;
}
// Compute length
wxUint32 length, seconds;
length = m_file_stream->GetLength();
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
m_length.seconds = seconds % 60;
m_length.minutes = (seconds / 60) % 60;
m_length.hours = seconds / 3600;
}
MMBoardSoundFile::~MMBoardSoundFile()
{
if (m_file_stream)
delete m_file_stream;
MMBoardManager::UnrefSoundStream(m_output_stream);
delete m_input_stream;
}
wxSoundFileStream *MMBoardSoundFile::GetDecoder()
{
wxSoundFileStream *f_stream;
// First, we try a Wave decoder
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_WAVE;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
// Then, a AIFF decoder
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_AIFF;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
m_file_type = MMBoard_UNKNOWNTYPE;
// TODO: automate
return NULL;
}
MMBoardTime MMBoardSoundFile::GetLength()
{
return m_length;
}
bool MMBoardSoundFile::IsStopped()
{
return m_file_stream->IsStopped();
}
bool MMBoardSoundFile::IsPaused()
{
return m_file_stream->IsPaused();
}
MMBoardTime MMBoardSoundFile::GetPosition()
{
wxUint32 length, seconds;
MMBoardTime file_time;
file_time.seconds = file_time.minutes = file_time.hours = 0;
if (m_file_stream->IsStopped())
return file_time;
length = m_file_stream->GetPosition();
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
file_time.seconds = seconds % 60;
file_time.minutes = (seconds / 60) % 60;
file_time.hours = seconds / 3600;
return file_time;
}
void MMBoardSoundFile::SetPosition(MMBoardTime btime)
{
wxUint32 itime;
itime = btime.seconds + btime.minutes * 60 + btime.hours;
m_file_stream->SetPosition(
m_file_stream->GetSoundFormat().GetBytesFromTime(itime)
);
}
bool MMBoardSoundFile::NeedWindow()
{
return FALSE;
}
void MMBoardSoundFile::SetWindow(wxWindow *window)
{
}
void MMBoardSoundFile::Play()
{
m_file_stream->Play();
}
void MMBoardSoundFile::Pause()
{
m_file_stream->Pause();
}
void MMBoardSoundFile::Resume()
{
m_file_stream->Resume();
}
void MMBoardSoundFile::Stop()
{
m_file_stream->Stop();
}
wxString MMBoardSoundFile::GetStringType()
{
switch (m_file_type) {
case MMBoard_WAVE:
return wxString(wxT("WAVE file"));
break;
case MMBoard_AIFF:
return wxString(wxT("AIFF file"));
break;
default:
return wxString(wxT("Unknown file"));
break;
}
}
wxString MMBoardSoundFile::GetStringInformation()
{
wxString info;
wxSoundFormatBase *format;
format = &(m_file_stream->GetSoundFormat());
info = wxT("Data encoding: ");
switch (format->GetType()) {
case wxSOUND_PCM: {
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
info += wxString::Format(wxT("PCM %s %s\n"),
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
info += wxString::Format(wxT("Sampling rate: %d\n")
wxT("Bits per sample: %d\n")
wxT("Number of channels: %d\n"),
pcm_format->GetSampleRate(),
pcm_format->GetBPS(),
pcm_format->GetChannels());
break;
}
case wxSOUND_ULAW: {
wxSoundFormatUlaw *ulaw_format = (wxSoundFormatUlaw *)format;
info += wxT("ULAW\n");
info += wxString::Format(wxT("Sampling rate: %d\n"), ulaw_format->GetSampleRate());
break;
}
default:
info += wxT("Unknown");
break;
}
return info;
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// MMBoardVideoFile
MMBoardVideoFile::MMBoardVideoFile(const wxString& filename)
{
m_output_window = NULL;
#if defined(__UNIX__)
m_video_driver = new wxVideoXANIM(filename);
#elif defined(__WIN32__)
m_video_driver = new wxVideoWindows(filename);
#else
m_video_driver = NULL;
SetError(MMBoard_UnknownFile);
#endif
}
MMBoardVideoFile::~MMBoardVideoFile()
{
if (m_video_driver)
delete m_video_driver;
}
bool MMBoardVideoFile::NeedWindow()
{
return TRUE;
}
void MMBoardVideoFile::SetWindow(wxWindow *window)
{
m_output_window = window;
m_video_driver->AttachOutput(*window);
wxSize size;
m_video_driver->GetSize(size);
window->SetSize(size);
// BAD BAD
// and we remove
// window->GetParent()->GetSizer()->Fit(window->GetParent());
}
void MMBoardVideoFile::Play()
{
m_video_driver->Play();
}
void MMBoardVideoFile::Pause()
{
m_video_driver->Pause();
}
void MMBoardVideoFile::Resume()
{
m_video_driver->Resume();
}
void MMBoardVideoFile::Stop()
{
m_video_driver->Stop();
}
MMBoardTime MMBoardVideoFile::GetPosition()
{
MMBoardTime btime;
btime.seconds = btime.minutes = btime.hours = 0;
return btime;
}
MMBoardTime MMBoardVideoFile::GetLength()
{
MMBoardTime btime;
int frameTime;
frameTime = (int)( m_video_driver->GetNbFrames() / m_video_driver->GetFrameRate());
btime.seconds = frameTime % 60;
btime.minutes = (frameTime / 60) % 60;
btime.hours = frameTime / 3600;
return btime;
}
void MMBoardVideoFile::SetPosition(MMBoardTime btime)
{
}
bool MMBoardVideoFile::IsStopped()
{
return m_video_driver->IsStopped();
}
bool MMBoardVideoFile::IsPaused()
{
return m_video_driver->IsPaused();
}
wxString MMBoardVideoFile::GetStringType()
{
return wxString(wxT("Video XANIM"));
}
wxString MMBoardVideoFile::GetStringInformation()
{
wxString info;
info = wxT("Video codec: ");
info += m_video_driver->GetMovieCodec() + "\n";
info += wxT("Audio codec: ");
info += m_video_driver->GetAudioCodec();
info += wxString::Format(" Sample rate: %d Channels: %d\n", m_video_driver->GetSampleRate(),
m_video_driver->GetBPS());
info += wxString::Format(" Frame rate: %.01f", m_video_driver->GetFrameRate());
return info;
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// MMBoardFile
MMBoardFile::MMBoardFile()
{
m_error = 0;
}
MMBoardFile::~MMBoardFile()
{
}
//
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// MMBoardManager
MMBoardFile *MMBoardManager::Open(const wxString& filename)
{
MMBoardFile *file;
// Test the audio codec
file = new MMBoardSoundFile(filename);
if (!file->GetError())
return file;
delete file;
// Test the video codec
file = new MMBoardVideoFile(filename);
if (!file->GetError())
return file;
delete file;
// Arrrgh, we just could not see what is that file ...
return NULL;
}
DECLARE_APP(MMBoardApp)
wxSoundStream *MMBoardManager::OpenSoundStream()
{
#ifdef __UNIX__
if ((wxGetApp().m_caps & MM_SOUND_ESD) != 0)
return new wxSoundStreamESD();
if ((wxGetApp().m_caps & MM_SOUND_OSS) != 0)
return new wxSoundStreamOSS();
#endif
#ifdef __WIN32__
if ((wxGetApp().m_caps & MM_SOUND_WIN) != 0)
return new wxSoundStreamWin();
#endif
wxMessageBox("You are trying to open a multimedia but you have not devices", "Error", wxOK | wxICON_ERROR, NULL);
return NULL;
}
void MMBoardManager::UnrefSoundStream(wxSoundStream *stream)
{
delete stream;
}
// ----------------------------------------------------------------------------

View File

@@ -1,84 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mmbman.h
// Purpose: Multimedia Board manager
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
// Modified by:
// Created: 13/02/2000
// RCS-ID: $Id$
// Copyright: (c) 2000, Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _MMBMAN_APP_H_
#define _MMBMAN_APP_H_
#ifdef __GNUG__
#pragma interface "mmbman.cpp"
#endif
#include "wx/stream.h"
#include "wx/mmedia/sndbase.h"
// -------------------------------------------------------------------------
// Base structure definitions
// -------------------------------------------------------------------------
typedef struct {
wxUint8 seconds, minutes, hours;
} MMBoardTime;
// -------------------------------------------------------------------------
// Constants
// -------------------------------------------------------------------------
#define MMBoard_NoError 0
#define MMBoard_UnknownFile 1
// -------------------------------------------------------------------------
// Interface definition: MMBoardFile
// -------------------------------------------------------------------------
class MMBoardFile {
public:
MMBoardFile();
virtual ~MMBoardFile();
virtual bool NeedWindow() = 0;
virtual void SetWindow(wxWindow *window) = 0;
virtual void Play() = 0;
virtual void Pause() = 0;
virtual void Resume() = 0;
virtual void Stop() = 0;
virtual MMBoardTime GetPosition() = 0;
virtual MMBoardTime GetLength() = 0;
virtual void SetPosition(MMBoardTime btime) = 0;
virtual bool IsStopped() = 0;
virtual bool IsPaused() = 0;
virtual wxString GetStringType() = 0;
virtual wxString GetStringInformation() = 0;
void SetError(wxUint8 error) { m_error = error; }
wxUint8 GetError() const { return m_error; }
protected:
wxUint8 m_error;
};
// -------------------------------------------------------------------------
// Main manager
// -------------------------------------------------------------------------
class MMBoardManager {
public:
static MMBoardFile *Open(const wxString& filename);
static wxSoundStream *OpenSoundStream();
static void UnrefSoundStream(wxSoundStream *stream);
};
#endif

View File

@@ -1,570 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mmboard.cpp
// Purpose: Multimedia Library sample
// Author: Guilhem Lavaux (created from minimal by J. Smart)
// Modified by:
// Created: 13/02/2000
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#ifdef __GNUG__
#pragma implementation "mmboard.cpp"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// ----------------------------------------------------------------------------
// ressources
// ----------------------------------------------------------------------------
// the application icon
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "mondrian.xpm"
#endif
// include multimedia classes
#include "wx/mmedia/sndbase.h"
#ifdef __WIN32__
#include "wx/mmedia/sndwin.h"
#endif
#ifdef __UNIX__
#include "wx/mmedia/sndoss.h"
#include "wx/mmedia/sndesd.h"
#endif
#include "wx/statline.h"
#include "wx/stattext.h"
// include personnal classes
#include "mmboard.h"
#include "mmbman.h"
#include "play.xpm"
#include "stop.xpm"
#include "eject.xpm"
#include "pause.xpm"
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Main Multimedia Board frame
class MMBoardFrame : public wxFrame
{
public:
// ctor(s)
MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// dtor
~MMBoardFrame();
// event handlers
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnOpen(wxCommandEvent& event);
void OnPlay(wxCommandEvent& event);
void OnStop(wxCommandEvent& event);
void OnPause(wxCommandEvent& event);
void OnEject(wxCommandEvent& event);
void OnRefreshInfo(wxEvent& event);
void OnSetPosition(wxCommandEvent& event);
void OpenVideoWindow();
void CloseVideoWindow();
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
private:
void UpdateMMedInfo();
void UpdateInfoText();
MMBoardFile *m_opened_file;
wxSlider *m_positionSlider;
wxBitmapButton *m_playButton, *m_pauseButton, *m_stopButton, *m_ejectButton;
wxStaticText *m_fileType, *m_infoText;
wxWindow *m_video_window;
wxPanel *m_panel;
wxSizer *m_sizer;
wxTimer *m_refreshTimer;
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
MMBoard_Quit = 1,
MMBoard_Open,
MMBoard_About,
MMBoard_PositionSlider,
MMBoard_PlayButton,
MMBoard_PauseButton,
MMBoard_ResumeButton,
MMBoard_StopButton,
MMBoard_EjectButton,
MMBoard_RefreshInfo
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(MMBoardFrame, wxFrame)
EVT_MENU(MMBoard_Quit, MMBoardFrame::OnQuit)
EVT_MENU(MMBoard_About, MMBoardFrame::OnAbout)
EVT_MENU(MMBoard_Open, MMBoardFrame::OnOpen)
EVT_BUTTON(MMBoard_PlayButton, MMBoardFrame::OnPlay)
EVT_BUTTON(MMBoard_StopButton, MMBoardFrame::OnStop)
EVT_BUTTON(MMBoard_PauseButton, MMBoardFrame::OnPause)
EVT_BUTTON(MMBoard_EjectButton, MMBoardFrame::OnEject)
EVT_SLIDER(MMBoard_PositionSlider, MMBoardFrame::OnSetPosition)
EVT_CUSTOM(wxEVT_TIMER, MMBoard_RefreshInfo, MMBoardFrame::OnRefreshInfo)
END_EVENT_TABLE()
// ---------------------------------------------------------------------------
// Main board application launcher
// ---------------------------------------------------------------------------
IMPLEMENT_APP(MMBoardApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
bool MMBoardApp::OnInit()
{
// create the main application window
MMBoardFrame *frame = new MMBoardFrame("Multimedia Board",
wxPoint(50, 50), wxSize(450, 340));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
frame->Show(TRUE);
m_caps = TestMultimediaCaps();
if (!m_caps) {
wxMessageBox("Your system has no multimedia capabilities. We are exiting now.", "Major error !", wxOK | wxICON_ERROR, NULL);
return FALSE;
}
wxString msg;
msg.Printf("Detected : %s%s%s", (m_caps & MM_SOUND_OSS) ? "OSS " : "",
(m_caps & MM_SOUND_ESD) ? "ESD " : "",
(m_caps & MM_SOUND_WIN) ? "WIN" : "");
wxMessageBox(msg, "Good !", wxOK | wxICON_INFORMATION, NULL);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
wxUint8 MMBoardApp::TestMultimediaCaps()
{
wxSoundStream *dev;
wxUint8 caps;
caps = 0;
#ifdef __UNIX__
// We now test the ESD support
dev = new wxSoundStreamESD();
if (dev->GetError() == wxSOUND_NOERROR)
caps |= MM_SOUND_ESD;
delete dev;
// We test the OSS (Open Sound System) support.
// WARNING: There is a conflict between ESD and ALSA
dev = new wxSoundStreamOSS();
if (dev->GetError() == wxSOUND_NOERROR)
caps |= MM_SOUND_OSS;
delete dev;
#endif
#ifdef __WIN32__
// We test the Windows sound support.
dev = new wxSoundStreamWin();
if (dev->GetError() == wxSOUND_NOERROR)
caps |= MM_SOUND_WIN;
delete dev;
#endif
return caps;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
#ifdef __WXMAC__
// we need this in order to allow the about menu relocation, since ABOUT is
// not the default id of the about menu
wxApp::s_macAboutMenuItemId = MMBoard_About;
#endif
// set the frame icon
SetIcon(wxICON(mondrian));
// create a menu bar
wxMenu *menuFile = new wxMenu(wxT(""), wxMENU_TEAROFF);
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(MMBoard_About, wxT("&About...\tCtrl-A"), wxT("Show about dialog"));
menuFile->Append(MMBoard_Open, wxT("&Open\tAlt-O"), wxT("Open file"));
menuFile->AppendSeparator();
menuFile->Append(MMBoard_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, wxT("&File"));
menuBar->Append(helpMenu, wxT("&Help"));
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(3);
SetStatusText(wxT("Welcome to wxWindows!"));
#endif // wxUSE_STATUSBAR
// Misc variables
m_opened_file = NULL;
m_panel = new wxPanel(this, -1);
// Initialize main slider
m_positionSlider = new wxSlider( m_panel, MMBoard_PositionSlider, 0, 0, 60,
wxDefaultPosition, wxSize(300, -1),
wxSL_HORIZONTAL | wxSL_AUTOTICKS);
m_positionSlider->SetPageSize(60); // 60 secs
m_positionSlider->Enable(FALSE);
// Initialize info panel
wxPanel *infoPanel = new wxPanel( m_panel, -1);
infoPanel->SetBackgroundColour(*wxBLACK);
infoPanel->SetForegroundColour(*wxWHITE);
wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL);
m_fileType = new wxStaticText(infoPanel, -1, wxT(""));
wxStaticLine *line = new wxStaticLine(infoPanel, -1);
m_infoText = new wxStaticText(infoPanel, -1, "");
UpdateInfoText();
infoSizer->Add(m_fileType, 0, wxGROW | wxALL, 1);
infoSizer->Add(line, 0, wxGROW | wxCENTRE, 20);
infoSizer->Add(m_infoText, 0, wxGROW | wxALL, 1);
infoPanel->SetSizer(infoSizer);
infoPanel->SetAutoLayout(TRUE);
// Bitmap button panel
wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL);
wxBitmap *play_bmp = new wxBitmap(play_back_xpm);
wxBitmap *stop_bmp = new wxBitmap(stop_back_xpm);
wxBitmap *eject_bmp = new wxBitmap(eject_xpm);
wxBitmap *pause_bmp = new wxBitmap(pause_xpm);
m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, *play_bmp);
m_playButton->Enable(FALSE);
m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, *pause_bmp);
m_pauseButton->Enable(FALSE);
m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, *stop_bmp);
m_stopButton->Enable(FALSE);
m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, *eject_bmp);
m_ejectButton->Enable(FALSE);
buttonSizer->Add(m_playButton, 0, wxALL, 2);
buttonSizer->Add(m_pauseButton, 0, wxALL, 2);
buttonSizer->Add(m_stopButton, 0, wxALL, 2);
buttonSizer->Add(m_ejectButton, 0, wxALL, 2);
// Top sizer
m_sizer = new wxBoxSizer(wxVERTICAL);
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
m_sizer->Add(m_positionSlider, 0, wxCENTRE | wxGROW | wxALL, 2);
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
m_sizer->Add(buttonSizer, 0, wxALL, 0);
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
m_sizer->Add(infoPanel, 1, wxCENTRE | wxGROW, 0);
m_panel->SetSizer(m_sizer);
m_panel->SetAutoLayout(TRUE);
m_sizer->Fit(this);
m_sizer->SetSizeHints(this);
// Timer
m_refreshTimer = new wxTimer(this, MMBoard_RefreshInfo);
// Video window
m_video_window = NULL;
// Multimedia file
m_opened_file = NULL;
}
MMBoardFrame::~MMBoardFrame()
{
if (m_opened_file)
delete m_opened_file;
delete m_refreshTimer;
}
void MMBoardFrame::OpenVideoWindow()
{
if (m_video_window)
return;
m_video_window = new wxWindow(m_panel, -1, wxDefaultPosition, wxSize(200, 200));
m_video_window->SetBackgroundColour(*wxBLACK);
m_sizer->Prepend(m_video_window, 2, wxGROW | wxSHRINK | wxCENTRE, 1);
m_sizer->Fit(this);
}
void MMBoardFrame::CloseVideoWindow()
{
if (!m_video_window)
return;
m_sizer->Remove(m_video_window);
delete m_video_window;
m_video_window = NULL;
m_sizer->Fit(this);
}
// event handlers
void MMBoardFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MMBoardFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
msg.Printf( wxT("wxWindows Multimedia board v1.0a, wxMMedia v2.0a:\n")
wxT("an example of the capabilities of the wxWindows multimedia classes.\n")
wxT("Copyright 1999, 2000, Guilhem Lavaux.\n"));
wxMessageBox(msg, "About MMBoard", wxOK | wxICON_INFORMATION, this);
}
void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
{
wxString selected_file;
if (m_opened_file) {
if (!m_opened_file->IsStopped()) {
wxCommandEvent event2;
OnStop(event2);
}
delete m_opened_file;
}
// select a file to be opened
selected_file = wxLoadFileSelector("multimedia", "*", NULL, this);
if (selected_file.IsNull())
return;
m_opened_file = MMBoardManager::Open(selected_file);
// Change the range values of the slider.
MMBoardTime length;
length = m_opened_file->GetLength();
m_positionSlider->SetRange(0, length.hours * 3600 + length.minutes * 60 + length.seconds);
// Update misc info
UpdateMMedInfo();
SetStatusText(selected_file, 2);
// Update info text
UpdateInfoText();
// Enable a few buttons
m_playButton->Enable(TRUE);
m_ejectButton->Enable(TRUE);
m_positionSlider->Enable(TRUE);
if (m_opened_file->NeedWindow()) {
OpenVideoWindow();
m_opened_file->SetWindow(m_video_window);
} else
CloseVideoWindow();
}
void MMBoardFrame::UpdateInfoText()
{
wxString infotext1, infotext2;
if (m_opened_file) {
infotext1 = wxT("File type:\n\t");
infotext1 += m_opened_file->GetStringType() + wxT("\n");
infotext2 = wxT("File informations:\n\n");
infotext2 += m_opened_file->GetStringInformation();
} else {
infotext1 = wxT("File type: \n\tNo file opened");
infotext2 = wxT("File informations:\nNo information\n\n\n\n\n");
}
m_fileType->SetLabel(infotext1);
m_infoText->SetLabel(infotext2);
}
void MMBoardFrame::UpdateMMedInfo()
{
wxString temp_string;
MMBoardTime current, length;
if (m_opened_file) {
current = m_opened_file->GetPosition();
length = m_opened_file->GetLength();
} else {
current.hours = current.minutes = current.seconds = 0;
length = current;
}
// We refresh the status bar
temp_string.Printf(wxT("%02d:%02d / %02d:%02d"), current.hours * 60 + current.minutes,
current.seconds, length.hours * 60 + length.minutes, length.seconds);
SetStatusText(temp_string, 1);
// We set the slider position
m_positionSlider->SetValue(current.hours * 3600 + current.minutes * 60 + current.seconds);
}
// ----------------------------------------------------------------------------
// Playing management, refreshers, ...
void MMBoardFrame::OnRefreshInfo(wxEvent& WXUNUSED(event))
{
UpdateMMedInfo();
if (m_opened_file->IsStopped()) {
m_refreshTimer->Stop();
m_playButton->Enable(TRUE);
m_stopButton->Enable(FALSE);
m_pauseButton->Enable(FALSE);
}
}
void MMBoardFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
{
m_stopButton->Enable(TRUE);
m_pauseButton->Enable(TRUE);
m_playButton->Enable(FALSE);
if (m_opened_file->IsPaused()) {
m_opened_file->Resume();
return;
}
m_refreshTimer->Start(1000, FALSE);
m_opened_file->Play();
m_stopButton->Enable(TRUE);
m_pauseButton->Enable(TRUE);
m_playButton->Enable(FALSE);
}
void MMBoardFrame::OnStop(wxCommandEvent& WXUNUSED(event))
{
m_opened_file->Stop();
m_refreshTimer->Stop();
m_stopButton->Enable(FALSE);
m_playButton->Enable(TRUE);
UpdateMMedInfo();
}
void MMBoardFrame::OnPause(wxCommandEvent& WXUNUSED(event))
{
m_opened_file->Pause();
m_playButton->Enable(TRUE);
m_pauseButton->Enable(FALSE);
}
void MMBoardFrame::OnEject(wxCommandEvent& WXUNUSED(event))
{
m_opened_file->Stop();
delete m_opened_file;
m_opened_file = NULL;
m_playButton->Enable(FALSE);
m_pauseButton->Enable(FALSE);
m_stopButton->Enable(FALSE);
m_ejectButton->Enable(FALSE);
m_positionSlider->Enable(FALSE);
UpdateInfoText();
UpdateMMedInfo();
}
void MMBoardFrame::OnSetPosition(wxCommandEvent& WXUNUSED(event))
{
wxUint32 itime;
MMBoardTime btime;
itime = m_positionSlider->GetValue();
btime.seconds = itime % 60;
btime.minutes = (itime / 60) % 60;
btime.hours = itime / 3600;
m_opened_file->SetPosition(btime);
UpdateMMedInfo();
}

View File

@@ -1,57 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mmboard.h
// Purpose: Multimedia Board header
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
// Modified by:
// Created: 13/02/2000
// RCS-ID: $Id$
// Copyright: (c) 2000, Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _MMBOARD_APP_H_
#define _MMBOARD_APP_H_
#ifdef __GNUG__
#pragma interface "mmboard.cpp"
#endif
// for compilers that support precompilation, includes "wx/wx.h"
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// --------------------------------------------------------------------------
// constants
// --------------------------------------------------------------------------
#define MM_SOUND_OSS 0x01
#define MM_SOUND_ESD 0x02
#define MM_SOUND_WIN 0x04
// --------------------------------------------------------------------------
// Class definitions
// --------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MMBoardApp : public wxApp
{
public:
wxUint8 m_caps;
// override base class virtuals
// ----------------------------
virtual bool OnInit();
wxUint8 TestMultimediaCaps();
};
#endif

View File

@@ -1,6 +0,0 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"
#define MINIMAL_QUIT 1
#define MINIMAL_ABOUT 102

View File

@@ -1,6 +0,0 @@
ICON 1 PRELOAD "mondros2.ico"
#include "H:\DEV\WX2\wxWindows\include\wx\os2\wx.rc"
#define MINIMAL_QUIT 1
#define MINIMAL_ABOUT 102

Binary file not shown.

View File

@@ -1,23 +0,0 @@
/* XPM */
static char * pause_xpm[] = {
"13 15 5 1",
" c None",
". c #949594",
"+ c #000000",
"@ c #8E8E8E",
"# c #FFFFFF",
"...... ......",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+++@# .+++@#",
".+@@@# .+@@@#",
".##### .#####"};

View File

@@ -1,23 +0,0 @@
/* XPM */
static char * play_back_xpm[] = {
"13 15 5 1",
" c None",
". c #949594",
"+ c #000000",
"@ c #8E8E8E",
"# c #FFFFFF",
"...... ",
".+++++. ",
".++++++. ",
".+++++++. ",
".++++++++. ",
".+++++++++. ",
".++++++++++. ",
".++++++++++@#",
".+++++++++@# ",
".++++++++@# ",
".+++++++@# ",
".++++++@# ",
".+++++@# ",
".+@@@@# ",
".##### "};

View File

@@ -1,23 +0,0 @@
/* XPM */
static char * stop_back_xpm[] = {
"13 15 5 1",
" c None",
". c #949594",
"+ c #000000",
"@ c #8E8E8E",
"# c #FFFFFF",
".............",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".++++++++++@#",
".+@@@@@@@@@@#",
".############"};

View File

@@ -1,12 +0,0 @@
#
# Makefile : Builds wxWindows utils for Unix.
#
OGL_SAMPLES=ogledit studio
all:
@for d in $(OGL_SAMPLES); do (cd $$d && $(MAKE)); done
clean:
@for d in $(OGL_SAMPLES); do (cd $$d && $(MAKE) clean); done

View File

@@ -1,16 +0,0 @@
# Makefile for OGLEdit example.
# $Id$
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = contrib/samples/ogl/ogledit
PROGRAM=ogledit
OBJECTS=$(PROGRAM).o doc.o view.o palette.o
APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
include $(top_builddir)/src/makeprog.env

View File

@@ -1,611 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.cpp
// Purpose: Implements document functionality in OGLEdit
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma implementation
#endif
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#if !wxUSE_DOC_VIEW_ARCHITECTURE
#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
#include <wx/wxexpr.h>
#include "ogledit.h"
#include "doc.h"
#include "view.h"
#if wxUSE_STD_IOSTREAM
#include <iostream.h>
#endif
IMPLEMENT_DYNAMIC_CLASS(DiagramDocument, wxDocument)
DiagramDocument::DiagramDocument(void)
{
}
DiagramDocument::~DiagramDocument(void)
{
}
bool DiagramDocument::OnCloseDocument(void)
{
diagram.DeleteAllShapes();
return TRUE;
}
#if wxUSE_STD_IOSTREAM
ostream& DiagramDocument::SaveObject(ostream& stream)
{
wxDocument::SaveObject(stream);
char buf[400];
(void) wxGetTempFileName("diag", buf);
diagram.SaveFile(buf);
wxTransferFileToStream(buf, stream);
wxRemoveFile(buf);
return stream;
}
istream& DiagramDocument::LoadObject(istream& stream)
{
wxDocument::LoadObject(stream);
char buf[400];
(void) wxGetTempFileName("diag", buf);
wxTransferStreamToFile(stream, buf);
diagram.DeleteAllShapes();
diagram.LoadFile(buf);
wxRemoveFile(buf);
return stream;
}
#else
wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream)
{
wxDocument::SaveObject(stream);
char buf[400];
(void) wxGetTempFileName("diag", buf);
diagram.SaveFile(buf);
wxTransferFileToStream(buf, stream);
wxRemoveFile(buf);
return stream;
}
wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream)
{
wxDocument::LoadObject(stream);
char buf[400];
(void) wxGetTempFileName("diag", buf);
wxTransferStreamToFile(stream, buf);
diagram.DeleteAllShapes();
diagram.LoadFile(buf);
wxRemoveFile(buf);
return stream;
}
#endif
/*
* Implementation of drawing command
*/
DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, wxClassInfo *info, double xx, double yy,
bool sel, wxShape *theShape, wxShape *fs, wxShape *ts):
wxCommand(TRUE, name)
{
doc = ddoc;
cmd = command;
shape = theShape;
fromShape = fs;
toShape = ts;
shapeInfo = info;
shapeBrush = NULL;
shapePen = NULL;
x = xx;
y = yy;
selected = sel;
deleteShape = FALSE;
}
DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape):
wxCommand(TRUE, name)
{
doc = ddoc;
cmd = command;
shape = theShape;
fromShape = NULL;
toShape = NULL;
shapeInfo = NULL;
x = 0.0;
y = 0.0;
selected = FALSE;
deleteShape = FALSE;
shapeBrush = backgroundColour;
shapePen = NULL;
}
DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape):
wxCommand(TRUE, name)
{
doc = ddoc;
cmd = command;
shape = theShape;
fromShape = NULL;
toShape = NULL;
shapeInfo = NULL;
x = 0.0;
y = 0.0;
selected = FALSE;
deleteShape = FALSE;
shapeBrush = NULL;
shapePen = NULL;
shapeLabel = lab;
}
DiagramCommand::~DiagramCommand(void)
{
if (shape && deleteShape)
{
shape->SetCanvas(NULL);
delete shape;
}
}
bool DiagramCommand::Do(void)
{
switch (cmd)
{
case OGLEDIT_CUT:
{
if (shape)
{
deleteShape = TRUE;
shape->Select(FALSE);
// Generate commands to explicitly remove each connected line.
RemoveLines(shape);
doc->GetDiagram()->RemoveShape(shape);
if (shape->IsKindOf(CLASSINFO(wxLineShape)))
{
wxLineShape *lineShape = (wxLineShape *)shape;
fromShape = lineShape->GetFrom();
toShape = lineShape->GetTo();
}
shape->Unlink();
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
case OGLEDIT_ADD_SHAPE:
{
wxShape *theShape = NULL;
if (shape)
theShape = shape; // Saved from undoing the shape
else
{
theShape = (wxShape *)shapeInfo->CreateObject();
theShape->AssignNewIds();
theShape->SetEventHandler(new MyEvtHandler(theShape, theShape, wxString("")));
theShape->SetCentreResize(FALSE);
theShape->SetPen(wxBLACK_PEN);
theShape->SetBrush(wxCYAN_BRUSH);
theShape->SetSize(60, 60);
}
doc->GetDiagram()->AddShape(theShape);
theShape->Show(TRUE);
wxClientDC dc(theShape->GetCanvas());
theShape->GetCanvas()->PrepareDC(dc);
theShape->Move(dc, x, y);
shape = theShape;
deleteShape = FALSE;
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
case OGLEDIT_ADD_LINE:
{
wxShape *theShape = NULL;
if (shape)
theShape = shape; // Saved from undoing the line
else
{
theShape = (wxShape *)shapeInfo->CreateObject();
theShape->AssignNewIds();
theShape->SetEventHandler(new MyEvtHandler(theShape, theShape, wxString("")));
theShape->SetPen(wxBLACK_PEN);
theShape->SetBrush(wxRED_BRUSH);
wxLineShape *lineShape = (wxLineShape *)theShape;
// Yes, you can have more than 2 control points, in which case
// it becomes a multi-segment line.
lineShape->MakeLineControlPoints(2);
lineShape->AddArrow(ARROW_ARROW, ARROW_POSITION_END, 10.0, 0.0, "Normal arrowhead");
}
doc->GetDiagram()->AddShape(theShape);
fromShape->AddLine((wxLineShape *)theShape, toShape);
theShape->Show(TRUE);
wxClientDC dc(theShape->GetCanvas());
theShape->GetCanvas()->PrepareDC(dc);
// It won't get drawn properly unless you move both
// connected images
fromShape->Move(dc, fromShape->GetX(), fromShape->GetY());
toShape->Move(dc, toShape->GetX(), toShape->GetY());
shape = theShape;
deleteShape = FALSE;
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
case OGLEDIT_CHANGE_BACKGROUND_COLOUR:
{
if (shape)
{
wxClientDC dc(shape->GetCanvas());
shape->GetCanvas()->PrepareDC(dc);
wxBrush *oldBrush = shape->GetBrush();
shape->SetBrush(shapeBrush);
shapeBrush = oldBrush;
shape->Draw(dc);
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
case OGLEDIT_EDIT_LABEL:
{
if (shape)
{
MyEvtHandler *myHandler = (MyEvtHandler *)shape->GetEventHandler();
wxString oldLabel(myHandler->label);
myHandler->label = shapeLabel;
shapeLabel = oldLabel;
wxClientDC dc(shape->GetCanvas());
shape->GetCanvas()->PrepareDC(dc);
shape->FormatText(dc, (char*) (const char*) myHandler->label);
shape->Draw(dc);
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
}
return TRUE;
}
bool DiagramCommand::Undo(void)
{
switch (cmd)
{
case OGLEDIT_CUT:
{
if (shape)
{
doc->GetDiagram()->AddShape(shape);
shape->Show(TRUE);
if (shape->IsKindOf(CLASSINFO(wxLineShape)))
{
wxLineShape *lineShape = (wxLineShape *)shape;
fromShape->AddLine(lineShape, toShape);
}
if (selected)
shape->Select(TRUE);
deleteShape = FALSE;
}
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
case OGLEDIT_ADD_SHAPE:
case OGLEDIT_ADD_LINE:
{
if (shape)
{
wxClientDC dc(shape->GetCanvas());
shape->GetCanvas()->PrepareDC(dc);
shape->Select(FALSE, &dc);
doc->GetDiagram()->RemoveShape(shape);
shape->Unlink();
deleteShape = TRUE;
}
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
case OGLEDIT_CHANGE_BACKGROUND_COLOUR:
{
if (shape)
{
wxClientDC dc(shape->GetCanvas());
shape->GetCanvas()->PrepareDC(dc);
wxBrush *oldBrush = shape->GetBrush();
shape->SetBrush(shapeBrush);
shapeBrush = oldBrush;
shape->Draw(dc);
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
case OGLEDIT_EDIT_LABEL:
{
if (shape)
{
MyEvtHandler *myHandler = (MyEvtHandler *)shape->GetEventHandler();
wxString oldLabel(myHandler->label);
myHandler->label = shapeLabel;
shapeLabel = oldLabel;
wxClientDC dc(shape->GetCanvas());
shape->GetCanvas()->PrepareDC(dc);
shape->FormatText(dc, (char*) (const char*) myHandler->label);
shape->Draw(dc);
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
}
return TRUE;
}
// Remove each individual line connected to a shape by sending a command.
void DiagramCommand::RemoveLines(wxShape *shape)
{
wxNode *node = shape->GetLines().First();
while (node)
{
wxLineShape *line = (wxLineShape *)node->Data();
doc->GetCommandProcessor()->Submit(new DiagramCommand("Cut", OGLEDIT_CUT, doc, NULL, 0.0, 0.0, line->Selected(), line));
node = shape->GetLines().First();
}
}
/*
* MyEvtHandler: an event handler class for all shapes
*/
void MyEvtHandler::OnLeftClick(double x, double y, int keys, int attachment)
{
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
if (keys == 0)
{
// Selection is a concept the library knows about
if (GetShape()->Selected())
{
GetShape()->Select(FALSE, &dc);
GetShape()->GetCanvas()->Redraw(dc); // Redraw because bits of objects will be are missing
}
else
{
// Ensure no other shape is selected, to simplify Undo/Redo code
bool redraw = FALSE;
wxNode *node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->First();
while (node)
{
wxShape *eachShape = (wxShape *)node->Data();
if (eachShape->GetParent() == NULL)
{
if (eachShape->Selected())
{
eachShape->Select(FALSE, &dc);
redraw = TRUE;
}
}
node = node->Next();
}
GetShape()->Select(TRUE, &dc);
if (redraw)
GetShape()->GetCanvas()->Redraw(dc);
}
}
else if (keys & KEY_CTRL)
{
// Do something for CONTROL
}
else
{
wxGetApp().frame->SetStatusText(label);
}
}
/*
* Implement connection of two shapes by right-dragging between them.
*/
void MyEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment)
{
// Force attachment to be zero for now. Eventually we can deal with
// the actual attachment point, e.g. a rectangle side if attachment mode is on.
attachment = 0;
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
dc.SetLogicalFunction(OGLRBLF);
dc.SetPen(dottedPen);
double xp, yp;
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
dc.DrawLine((long) xp, (long) yp, (long) x, (long) y);
GetShape()->GetCanvas()->CaptureMouse();
}
void MyEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int attachment)
{
// Force attachment to be zero for now
attachment = 0;
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
dc.SetLogicalFunction(OGLRBLF);
dc.SetPen(dottedPen);
double xp, yp;
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
dc.DrawLine((long) xp, (long) yp, (long) x, (long) y);
}
void MyEvtHandler::OnEndDragRight(double x, double y, int keys, int attachment)
{
GetShape()->GetCanvas()->ReleaseMouse();
MyCanvas *canvas = (MyCanvas *)GetShape()->GetCanvas();
// Check if we're on an object
int new_attachment;
wxShape *otherShape = canvas->FindFirstSensitiveShape(x, y, &new_attachment, OP_DRAG_RIGHT);
if (otherShape && !otherShape->IsKindOf(CLASSINFO(wxLineShape)))
{
canvas->view->GetDocument()->GetCommandProcessor()->Submit(
new DiagramCommand("wxLineShape", OGLEDIT_ADD_LINE, (DiagramDocument *)canvas->view->GetDocument(), CLASSINFO(wxLineShape),
0.0, 0.0, FALSE, NULL, GetShape(), otherShape));
}
}
void MyEvtHandler::OnEndSize(double x, double y)
{
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
GetShape()->FormatText(dc, (char*) (const char*) label);
}
/*
* Diagram
*/
bool MyDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
{
wxDiagram::OnShapeSave(db, shape, expr);
MyEvtHandler *handler = (MyEvtHandler *)shape.GetEventHandler();
expr.AddAttributeValueString("label", handler->label);
return TRUE;
}
bool MyDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
{
wxDiagram::OnShapeLoad(db, shape, expr);
char *label = NULL;
expr.AssignAttributeValue("label", &label);
MyEvtHandler *handler = new MyEvtHandler(&shape, &shape, wxString(label));
shape.SetEventHandler(handler);
if (label)
delete[] label;
return TRUE;
}
/*
* New shapes
*/
IMPLEMENT_DYNAMIC_CLASS(wxRoundedRectangleShape, wxRectangleShape)
wxRoundedRectangleShape::wxRoundedRectangleShape(double w, double h):
wxRectangleShape(w, h)
{
// 0.3 of the smaller rectangle dimension
SetCornerRadius((double) -0.3);
}
IMPLEMENT_DYNAMIC_CLASS(wxDiamondShape, wxPolygonShape)
wxDiamondShape::wxDiamondShape(double w, double h):
wxPolygonShape()
{
// wxPolygonShape::SetSize relies on the shape having non-zero
// size initially.
if (w == 0.0)
w = 60.0;
if (h == 0.0)
h = 60.0;
wxList *thePoints = new wxList;
wxRealPoint *point = new wxRealPoint(0.0, (-h/2.0));
thePoints->Append((wxObject*) point);
point = new wxRealPoint((w/2.0), 0.0);
thePoints->Append((wxObject*) point);
point = new wxRealPoint(0.0, (h/2.0));
thePoints->Append((wxObject*) point);
point = new wxRealPoint((-w/2.0), 0.0);
thePoints->Append((wxObject*) point);
Create(thePoints);
}

View File

@@ -1,182 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.h
// Purpose: Document classes
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGLSAMPLE_DOC_H_
#define _OGLSAMPLE_DOC_H_
#ifdef __GNUG__
// #pragma interface
#endif
#include <wx/docview.h>
#include <wx/string.h>
#include <wx/wxexpr.h>
#include <wx/ogl/ogl.h>
#if wxUSE_STD_IOSTREAM
class ostream;
class istream;
#endif
/*
* Override a few members for this application
*/
class MyDiagram: public wxDiagram
{
public:
MyDiagram(void) {}
bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
};
/*
* A few new shape classes so we have a 1:1 mapping
* between palette symbol and unique class
*/
class wxRoundedRectangleShape: public wxRectangleShape
{
DECLARE_DYNAMIC_CLASS(wxRoundedRectangleShape)
private:
public:
wxRoundedRectangleShape(double w = 0.0, double h = 0.0);
};
class wxDiamondShape: public wxPolygonShape
{
DECLARE_DYNAMIC_CLASS(wxDiamondShape)
private:
public:
wxDiamondShape(double w = 0.0, double h = 0.0);
};
/*
* All shape event behaviour is routed through this handler, so we don't
* have to derive from each shape class. We plug this in to each shape.
*/
class MyEvtHandler: public wxShapeEvtHandler
{
public:
wxString label;
MyEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL, const wxString& lab = ""):wxShapeEvtHandler(prev, shape)
{
label = lab;
}
~MyEvtHandler(void)
{
}
void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void OnBeginDragRight(double x, double y, int keys = 0, int attachment = 0);
void OnDragRight(bool draw, double x, double y, int keys = 0, int attachment = 0);
void OnEndDragRight(double x, double y, int keys = 0, int attachment = 0);
void OnEndSize(double x, double y);
};
/*
* A diagram document, which contains a diagram.
*/
class DiagramDocument: public wxDocument
{
DECLARE_DYNAMIC_CLASS(DiagramDocument)
private:
public:
MyDiagram diagram;
DiagramDocument(void);
~DiagramDocument(void);
#if wxUSE_STD_IOSTREAM
virtual ostream& SaveObject(ostream& stream);
virtual istream& LoadObject(istream& stream);
#else
virtual wxOutputStream& SaveObject(wxOutputStream& stream);
virtual wxInputStream& LoadObject(wxInputStream& stream);
#endif
inline wxDiagram *GetDiagram() { return &diagram; }
bool OnCloseDocument(void);
};
/*
* Most user interface commands are routed through this, to give us the
* Undo/Redo mechanism. If you add more commands, such as changing the shape colour,
* you will need to add members to 'remember' what the user applied (for 'Do') and what the
* previous state was (for 'Undo').
* You can have one member for each property to be changed. Assume we also have
* a pointer member wxShape *shape, which is set to the shape being changed.
* Let's assume we're changing the shape colour. Our member for this is shapeColour.
*
* - In 'Do':
* o Set a temporary variable 'temp' to the current colour for 'shape'.
* o Change the colour to the new colour.
* o Set shapeColour to the _old_ colour, 'temp'.
* - In 'Undo':
* o Set a temporary variable 'temp' to the current colour for 'shape'.
* o Change the colour to shapeColour (the old colour).
* o Set shapeColour to 'temp'.
*
* So, as long as we have a pointer to the shape being changed,
* we only need one member variable for each property.
*
* PROBLEM: when an Add shape command is redone, the 'shape' pointer changes.
* Assume, as here, that we keep a pointer to the old shape so we reuse it
* when we recreate.
*/
class DiagramCommand: public wxCommand
{
protected:
DiagramDocument *doc;
int cmd;
wxShape *shape; // Pointer to the shape we're acting on
wxShape *fromShape;
wxShape *toShape;
wxClassInfo *shapeInfo;
double x;
double y;
bool selected;
bool deleteShape;
// Storage for property commands
wxBrush *shapeBrush;
wxPen *shapePen;
wxString shapeLabel;
public:
// Multi-purpose constructor for creating, deleting shapes
DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxClassInfo *shapeInfo = NULL,
double x = 0.0, double y = 0.0, bool sel = FALSE, wxShape *theShape = NULL, wxShape *fs = NULL, wxShape *ts = NULL);
// Property-changing command constructors
DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape);
DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape);
~DiagramCommand(void);
bool Do(void);
bool Undo(void);
inline void SetShape(wxShape *s) { shape = s; }
inline wxShape *GetShape(void) { return shape; }
inline wxShape *GetFromShape(void) { return fromShape; }
inline wxShape *GetToShape(void) { return toShape; }
inline wxClassInfo *GetShapeInfo(void) { return shapeInfo; }
inline bool GetSelected(void) { return selected; }
void RemoveLines(wxShape *shape);
};
#endif
// _OGLSAMPLE_DOC_H_

View File

@@ -1,18 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=ogledit
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
# EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,21 +0,0 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=ogledit
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
# EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,88 +0,0 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1995
# Updated:
# Copyright: (c) 1995, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds OGLEdit example (MSVC++ 1.5).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makemsc.env
THISDIR = $(WXDIR)\contrib\samples\ogl\ogledit
WXLIB = $(WXDIR)\contrib\lib\wx.lib
OGLLIB = $(WXDIR)\contrib\lib\ogl.lib
LIBS=$(WXLIB) $(OGLLIB) oldnames libw llibcew commdlg shell ddeml
OBJECTS = ogledit.obj doc.obj view.obj palette.obj
all: ogledit.exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.dos
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.dos clean
cd $(THISDIR)
ogl:
cd $(OGLDIR)\src
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
prologio:
cd $(PROLOGDIR)\src
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
ogledit.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(OGLLIB) ogledit.def ogledit.res
link $(LINKFLAGS) @<<
$(WXDIR)\src\msw\dummy.obj $(OBJECTS),
ogledit,
NUL,
$(LIBS),
ogledit.def
;
<<
rc -30 -K ogledit.res
ogledit.obj: ogledit.h ogledit.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
view.obj: view.h view.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
doc.obj: doc.h doc.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
palette.obj: view.h doc.h ogledit.h palette.$(SRCSUFF) $(DUMMYOBJ)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
ogledit.res : ogledit.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\include /i$(WXDIR)\contrib\include ogledit
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -1,18 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=ogledit
# EXTRACPPFLAGS=-I../../src
EXTRALIBS=-logl
OBJECTS = $(TARGET).o doc.o view.o palette.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,39 +0,0 @@
#
# File: Makefile
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) 2000 Julian Smart
#
# Makefile for OGL demo (GTK version)
#
# This makefile requires wxWindows/GTK to be
# installed (possibly using "make install")
# on your system.
#
CPP = gcc -g
CC = gcc
WXCONFIG=../../../../wx-config
WXINCLUDE=-I../../../../include -I../../../include
WXLIB=-L../../../../lib -L../../../src/ogl
OBJECTS=ogledit.o palette.o doc.o view.o
ogledit: $(OBJECTS)
$(CPP) -o ogledit $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl
ogledit.o: ogledit.cpp
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c ogledit.cpp
palette.o: palette.cpp
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c palette.cpp
doc.o: doc.cpp
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp
view.o: view.cpp
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp
clean:
rm -f *.o ogledit

View File

@@ -1,29 +0,0 @@
#
# File: makefile.vc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds ogledit example (MS VC++).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
# Set WXDIR for your system
WXDIR = $(WXWIN)
PROGRAM=ogledit
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\contrib\lib\ogld.lib
!else
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
!endif
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
# 8 Nov 1994
#
WXDIR = $(%WXWIN)
PROGRAM = ogledit
EXTRALIBS = $(WXDIR)\contrib\lib\ogl.lib
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,79 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: view.h
// Purpose: View-related classes
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGLSAMPLE_VIEW_H_
#define _OGLSAMPLE_VIEW_H_
#ifdef __GNUG__
// #pragma interface "view.h"
#endif
#include "doc.h"
#include <wx/ogl/ogl.h>
class MyCanvas: public wxShapeCanvas
{
// DECLARE_DYNAMIC_CLASS(wxShapeCanvas)
protected:
public:
wxView *view;
MyCanvas(wxView *view, wxWindow *parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxRETAINED);
~MyCanvas(void);
void OnMouseEvent(wxMouseEvent& event);
void OnPaint(wxPaintEvent& event);
virtual void OnLeftClick(double x, double y, int keys = 0);
virtual void OnRightClick(double x, double y, int keys = 0);
virtual void OnDragLeft(bool draw, double x, double y, int keys=0); // Erase if draw false
virtual void OnBeginDragLeft(double x, double y, int keys=0);
virtual void OnEndDragLeft(double x, double y, int keys=0);
virtual void OnDragRight(bool draw, double x, double y, int keys=0); // Erase if draw false
virtual void OnBeginDragRight(double x, double y, int keys=0);
virtual void OnEndDragRight(double x, double y, int keys=0);
DECLARE_EVENT_TABLE()
};
class DiagramView: public wxView
{
DECLARE_DYNAMIC_CLASS(DiagramView)
private:
public:
wxFrame *frame;
MyCanvas *canvas;
DiagramView(void) { canvas = NULL; frame = NULL; };
~DiagramView(void) {};
bool OnCreate(wxDocument *doc, long flags);
void OnDraw(wxDC *dc);
void OnUpdate(wxView *sender, wxObject *hint = NULL);
bool OnClose(bool deleteWindow = TRUE);
wxShape *FindSelectedShape(void);
// void OnMenuCommand(int cmd);
void OnCut(wxCommandEvent& event);
void OnChangeBackgroundColour(wxCommandEvent& event);
void OnEditLabel(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
#endif
// _OGLSAMPLE_VIEW_H_

View File

@@ -1,19 +0,0 @@
# Makefile for OGL Studio.
# $Id$
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = contrib/samples/ogl/studio
PROGRAM=studio
DATAFILES=studio_resources.wxr
OBJECTS=$(PROGRAM).o doc.o shapes.o symbols.o view.o cspalette.o\
mainfrm.o project.o dialogs.o csprint.o
APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include -I$(top_srcdir)/$(program_dir)/bitmaps
include $(top_builddir)/src/makeprog.env

View File

@@ -1,598 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.cpp
// Purpose: Implements document functionality
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma implementation
#endif
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include "studio.h"
#include "doc.h"
#include "view.h"
#include <wx/ogl/basicp.h>
IMPLEMENT_DYNAMIC_CLASS(csDiagramDocument, wxDocument)
#ifdef _MSC_VER
#pragma warning(disable:4355)
#endif
csDiagramDocument::csDiagramDocument():m_diagram(this)
{
}
#ifdef _MSC_VER
#pragma warning(default:4355)
#endif
csDiagramDocument::~csDiagramDocument()
{
}
bool csDiagramDocument::OnCloseDocument()
{
m_diagram.DeleteAllShapes();
return TRUE;
}
bool csDiagramDocument::OnSaveDocument(const wxString& file)
{
if (file == "")
return FALSE;
if (!m_diagram.SaveFile(file))
{
wxString msgTitle;
if (wxTheApp->GetAppName() != "")
msgTitle = wxTheApp->GetAppName();
else
msgTitle = wxString("File error");
(void)wxMessageBox("Sorry, could not open this file for saving.", msgTitle, wxOK | wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
Modify(FALSE);
SetFilename(file);
return TRUE;
}
bool csDiagramDocument::OnOpenDocument(const wxString& file)
{
if (!OnSaveModified())
return FALSE;
wxString msgTitle;
if (wxTheApp->GetAppName() != "")
msgTitle = wxTheApp->GetAppName();
else
msgTitle = wxString("File error");
m_diagram.DeleteAllShapes();
if (!m_diagram.LoadFile(file))
{
(void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
SetFilename(file, TRUE);
Modify(FALSE);
UpdateAllViews();
return TRUE;
}
/*
* Implementation of drawing command
*/
csDiagramCommand::csDiagramCommand(const wxString& name, csDiagramDocument *doc,
csCommandState* onlyState):
wxCommand(TRUE, name)
{
m_doc = doc;
if (onlyState)
{
AddState(onlyState);
}
}
csDiagramCommand::~csDiagramCommand()
{
wxNode* node = m_states.First();
while (node)
{
csCommandState* state = (csCommandState*) node->Data();
delete state;
node = node->Next();
}
}
void csDiagramCommand::AddState(csCommandState* state)
{
state->m_doc = m_doc;
// state->m_cmd = m_cmd;
m_states.Append(state);
}
// Insert a state at the beginning of the list
void csDiagramCommand::InsertState(csCommandState* state)
{
state->m_doc = m_doc;
// state->m_cmd = m_cmd;
m_states.Insert(state);
}
// Schedule all lines connected to the states to be cut.
void csDiagramCommand::RemoveLines()
{
wxNode* node = m_states.First();
while (node)
{
csCommandState* state = (csCommandState*) node->Data();
wxShape* shape = state->GetShapeOnCanvas();
wxASSERT( (shape != NULL) );
wxNode *node1 = shape->GetLines().First();
while (node1)
{
wxLineShape *line = (wxLineShape *)node1->Data();
if (!FindStateByShape(line))
{
csCommandState* newState = new csCommandState(ID_CS_CUT, NULL, line);
InsertState(newState);
}
node1 = node1->Next();
}
node = node->Next();
}
}
csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape)
{
wxNode* node = m_states.First();
while (node)
{
csCommandState* state = (csCommandState*) node->Data();
if (shape == state->GetShapeOnCanvas() || shape == state->GetSavedState())
return state;
node = node->Next();
}
return NULL;
}
bool csDiagramCommand::Do()
{
wxNode* node = m_states.First();
while (node)
{
csCommandState* state = (csCommandState*) node->Data();
if (!state->Do())
return FALSE;
node = node->Next();
}
return TRUE;
}
bool csDiagramCommand::Undo()
{
// Undo in reverse order, so e.g. shapes get added
// back before the lines do.
wxNode* node = m_states.Last();
while (node)
{
csCommandState* state = (csCommandState*) node->Data();
if (!state->Undo())
return FALSE;
node = node->Previous();
}
return TRUE;
}
csCommandState::csCommandState(int cmd, wxShape* savedState, wxShape* shapeOnCanvas)
{
m_cmd = cmd;
m_doc = NULL;
m_savedState = savedState;
m_shapeOnCanvas = shapeOnCanvas;
m_linePositionFrom = 0;
m_linePositionTo = 0;
}
csCommandState::~csCommandState()
{
if (m_savedState)
{
m_savedState->SetCanvas(NULL);
delete m_savedState;
}
}
bool csCommandState::Do()
{
switch (m_cmd)
{
case ID_CS_CUT:
{
// New state is 'nothing' - maybe pass shape ID to state so we know what
// we're talking about.
// Then save old shape in m_savedState (actually swap pointers)
wxASSERT( (m_shapeOnCanvas != NULL) );
wxASSERT( (m_savedState == NULL) ); // new state will be 'nothing'
wxASSERT( (m_doc != NULL) );
wxShapeCanvas* canvas = m_shapeOnCanvas->GetCanvas();
// In case this is a line
wxShape* lineFrom = NULL;
wxShape* lineTo = NULL;
int attachmentFrom = 0, attachmentTo = 0;
if (m_shapeOnCanvas->IsKindOf(CLASSINFO(wxLineShape)))
{
// Store the from/to info to save in the line shape
wxLineShape* lineShape = (wxLineShape*) m_shapeOnCanvas;
lineFrom = lineShape->GetFrom();
lineTo = lineShape->GetTo();
attachmentFrom = lineShape->GetAttachmentFrom();
attachmentTo = lineShape->GetAttachmentTo();
m_linePositionFrom = lineFrom->GetLinePosition(lineShape);
m_linePositionTo = lineTo->GetLinePosition(lineShape);
}
m_shapeOnCanvas->Select(FALSE);
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, FALSE);
m_shapeOnCanvas->Unlink();
m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas);
m_savedState = m_shapeOnCanvas;
if (m_savedState->IsKindOf(CLASSINFO(wxLineShape)))
{
// Restore the from/to info for future reference
wxLineShape* lineShape = (wxLineShape*) m_savedState;
lineShape->SetFrom(lineFrom);
lineShape->SetTo(lineTo);
lineShape->SetAttachments(attachmentFrom, attachmentTo);
wxClientDC dc(canvas);
canvas->PrepareDC(dc);
lineFrom->MoveLinks(dc);
lineTo->MoveLinks(dc);
}
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
case ID_CS_ADD_SHAPE:
case ID_CS_ADD_SHAPE_SELECT:
{
// The app has given the command state a new m_savedState
// shape, which is the new shape to add to the canvas (but
// not actually added until this point).
// The new 'saved state' is therefore 'nothing' since there
// was nothing there before.
wxASSERT( (m_shapeOnCanvas == NULL) );
wxASSERT( (m_savedState != NULL) );
wxASSERT( (m_doc != NULL) );
m_shapeOnCanvas = m_savedState;
m_savedState = NULL;
m_doc->GetDiagram()->AddShape(m_shapeOnCanvas);
m_shapeOnCanvas->Show(TRUE);
wxClientDC dc(m_shapeOnCanvas->GetCanvas());
m_shapeOnCanvas->GetCanvas()->PrepareDC(dc);
csEvtHandler *handler = (csEvtHandler *)m_shapeOnCanvas->GetEventHandler();
m_shapeOnCanvas->FormatText(dc, handler->m_label);
m_shapeOnCanvas->Move(dc, m_shapeOnCanvas->GetX(), m_shapeOnCanvas->GetY());
if (m_cmd == ID_CS_ADD_SHAPE_SELECT)
{
m_shapeOnCanvas->Select(TRUE, &dc);
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, TRUE);
}
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
case ID_CS_ADD_LINE:
case ID_CS_ADD_LINE_SELECT:
{
wxASSERT( (m_shapeOnCanvas == NULL) );
wxASSERT( (m_savedState != NULL) );
wxASSERT( (m_doc != NULL) );
wxLineShape *lineShape = (wxLineShape *)m_savedState;
wxASSERT( (lineShape->GetFrom() != NULL) );
wxASSERT( (lineShape->GetTo() != NULL) );
m_shapeOnCanvas = m_savedState;
m_savedState = NULL;
m_doc->GetDiagram()->AddShape(lineShape);
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());
lineShape->Show(TRUE);
wxClientDC dc(lineShape->GetCanvas());
lineShape->GetCanvas()->PrepareDC(dc);
// It won't get drawn properly unless you move both
// connected images
lineShape->GetFrom()->Move(dc, lineShape->GetFrom()->GetX(), lineShape->GetFrom()->GetY());
lineShape->GetTo()->Move(dc, lineShape->GetTo()->GetX(), lineShape->GetTo()->GetY());
if (m_cmd == ID_CS_ADD_LINE_SELECT)
{
lineShape->Select(TRUE, &dc);
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, TRUE);
}
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
case ID_CS_CHANGE_BACKGROUND_COLOUR:
case ID_CS_MOVE:
case ID_CS_SIZE:
case ID_CS_EDIT_PROPERTIES:
case ID_CS_FONT_CHANGE:
case ID_CS_ARROW_CHANGE:
case ID_CS_ROTATE_CLOCKWISE:
case ID_CS_ROTATE_ANTICLOCKWISE:
case ID_CS_CHANGE_LINE_ORDERING:
case ID_CS_CHANGE_LINE_ATTACHMENT:
case ID_CS_ALIGN:
case ID_CS_NEW_POINT:
case ID_CS_CUT_POINT:
case ID_CS_MOVE_LINE_POINT:
case ID_CS_STRAIGHTEN:
case ID_CS_MOVE_LABEL:
{
// At this point we have been given a new shape
// just like the old one but with a changed colour.
// It's now time to apply that change to the
// shape on the canvas, saving the old state.
// NOTE: this is general enough to work with MOST attribute
// changes!
wxASSERT( (m_shapeOnCanvas != NULL) );
wxASSERT( (m_savedState != NULL) ); // This is the new shape with changed colour
wxASSERT( (m_doc != NULL) );
wxClientDC dc(m_shapeOnCanvas->GetCanvas());
m_shapeOnCanvas->GetCanvas()->PrepareDC(dc);
bool isSelected = m_shapeOnCanvas->Selected();
if (isSelected)
m_shapeOnCanvas->Select(FALSE, & dc);
if (m_cmd == ID_CS_SIZE || m_cmd == ID_CS_ROTATE_CLOCKWISE || m_cmd == ID_CS_ROTATE_ANTICLOCKWISE ||
m_cmd == ID_CS_CHANGE_LINE_ORDERING || m_cmd == ID_CS_CHANGE_LINE_ATTACHMENT)
{
m_shapeOnCanvas->Erase(dc);
}
// TODO: make sure the ID is the same. Or, when applying the new state,
// don't change the original ID.
wxShape* tempShape = m_shapeOnCanvas->CreateNewCopy();
// Apply the saved state to the shape on the canvas, by copying.
m_savedState->CopyWithHandler(*m_shapeOnCanvas);
// Delete this state now it's been used (m_shapeOnCanvas currently holds this state)
delete m_savedState;
// Remember the previous state
m_savedState = tempShape;
// Redraw the shape
if (m_cmd == ID_CS_MOVE || m_cmd == ID_CS_ROTATE_CLOCKWISE || m_cmd == ID_CS_ROTATE_ANTICLOCKWISE ||
m_cmd == ID_CS_ALIGN)
{
m_shapeOnCanvas->Move(dc, m_shapeOnCanvas->GetX(), m_shapeOnCanvas->GetY());
csEvtHandler *handler = (csEvtHandler *)m_shapeOnCanvas->GetEventHandler();
m_shapeOnCanvas->FormatText(dc, handler->m_label);
m_shapeOnCanvas->Draw(dc);
}
else if (m_cmd == ID_CS_CHANGE_LINE_ORDERING)
{
m_shapeOnCanvas->MoveLinks(dc);
}
else if (m_cmd == ID_CS_CHANGE_LINE_ATTACHMENT)
{
wxLineShape *lineShape = (wxLineShape *)m_shapeOnCanvas;
// Have to move both sets of links since we don't know which links
// have been affected (unless we compared before and after states).
lineShape->GetFrom()->MoveLinks(dc);
lineShape->GetTo()->MoveLinks(dc);
}
else if (m_cmd == ID_CS_SIZE)
{
double width, height;
m_shapeOnCanvas->GetBoundingBoxMax(&width, &height);
m_shapeOnCanvas->SetSize(width, height);
m_shapeOnCanvas->Move(dc, m_shapeOnCanvas->GetX(), m_shapeOnCanvas->GetY());
m_shapeOnCanvas->Show(TRUE);
// Recursively redraw links if we have a composite.
if (m_shapeOnCanvas->GetChildren().Number() > 0)
m_shapeOnCanvas->DrawLinks(dc, -1, TRUE);
m_shapeOnCanvas->GetEventHandler()->OnEndSize(width, height);
}
else if (m_cmd == ID_CS_EDIT_PROPERTIES || m_cmd == ID_CS_FONT_CHANGE)
{
csEvtHandler *handler = (csEvtHandler *)m_shapeOnCanvas->GetEventHandler();
m_shapeOnCanvas->FormatText(dc, handler->m_label);
m_shapeOnCanvas->Draw(dc);
}
else
{
m_shapeOnCanvas->Draw(dc);
}
if (isSelected)
m_shapeOnCanvas->Select(TRUE, & dc);
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
}
return TRUE;
}
bool csCommandState::Undo()
{
switch (m_cmd)
{
case ID_CS_CUT:
{
wxASSERT( (m_savedState != NULL) );
wxASSERT( (m_doc != NULL) );
m_doc->GetDiagram()->AddShape(m_savedState);
m_shapeOnCanvas = m_savedState;
m_savedState = NULL;
if (m_shapeOnCanvas->IsKindOf(CLASSINFO(wxLineShape)))
{
wxLineShape* lineShape = (wxLineShape*) m_shapeOnCanvas;
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo(),
m_linePositionFrom, m_linePositionTo);
wxShapeCanvas* canvas = lineShape->GetFrom()->GetCanvas();
wxClientDC dc(canvas);
canvas->PrepareDC(dc);
lineShape->GetFrom()->MoveLinks(dc);
lineShape->GetTo()->MoveLinks(dc);
}
m_shapeOnCanvas->Show(TRUE);
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
case ID_CS_ADD_SHAPE:
case ID_CS_ADD_LINE:
case ID_CS_ADD_SHAPE_SELECT:
case ID_CS_ADD_LINE_SELECT:
{
wxASSERT( (m_shapeOnCanvas != NULL) );
wxASSERT( (m_savedState == NULL) );
wxASSERT( (m_doc != NULL) );
// In case this is a line
wxShape* lineFrom = NULL;
wxShape* lineTo = NULL;
int attachmentFrom = 0, attachmentTo = 0;
if (m_shapeOnCanvas->IsKindOf(CLASSINFO(wxLineShape)))
{
// Store the from/to info to save in the line shape
wxLineShape* lineShape = (wxLineShape*) m_shapeOnCanvas;
lineFrom = lineShape->GetFrom();
lineTo = lineShape->GetTo();
attachmentFrom = lineShape->GetAttachmentFrom();
attachmentTo = lineShape->GetAttachmentTo();
}
wxClientDC dc(m_shapeOnCanvas->GetCanvas());
m_shapeOnCanvas->GetCanvas()->PrepareDC(dc);
m_shapeOnCanvas->Select(FALSE, &dc);
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, FALSE);
m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas);
m_shapeOnCanvas->Unlink(); // Unlinks the line, if it is a line
if (m_shapeOnCanvas->IsKindOf(CLASSINFO(wxLineShape)))
{
// Restore the from/to info for future reference
wxLineShape* lineShape = (wxLineShape*) m_shapeOnCanvas;
lineShape->SetFrom(lineFrom);
lineShape->SetTo(lineTo);
lineShape->SetAttachments(attachmentFrom, attachmentTo);
}
m_savedState = m_shapeOnCanvas;
m_shapeOnCanvas = NULL;
m_doc->Modify(TRUE);
m_doc->UpdateAllViews();
break;
}
case ID_CS_CHANGE_BACKGROUND_COLOUR:
case ID_CS_MOVE:
case ID_CS_SIZE:
case ID_CS_EDIT_PROPERTIES:
case ID_CS_FONT_CHANGE:
case ID_CS_ARROW_CHANGE:
case ID_CS_ROTATE_CLOCKWISE:
case ID_CS_ROTATE_ANTICLOCKWISE:
case ID_CS_CHANGE_LINE_ORDERING:
case ID_CS_CHANGE_LINE_ATTACHMENT:
case ID_CS_ALIGN:
case ID_CS_NEW_POINT:
case ID_CS_CUT_POINT:
case ID_CS_MOVE_LINE_POINT:
case ID_CS_STRAIGHTEN:
case ID_CS_MOVE_LABEL:
{
// Exactly like the Do case; we're just swapping states.
Do();
break;
}
}
return TRUE;
}

View File

@@ -1,134 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.h
// Purpose: Document classes
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _STUDIO_DOC_H_
#define _STUDIO_DOC_H_
#ifdef __GNUG__
// #pragma interface
#endif
#include <wx/docview.h>
#include <wx/string.h>
#include <wx/wxexpr.h>
#include <wx/ogl/ogl.h>
#include "shapes.h"
/*
* A diagram document, which contains a diagram.
*/
class csDiagramDocument: public wxDocument
{
DECLARE_DYNAMIC_CLASS(csDiagramDocument)
public:
csDiagramDocument();
~csDiagramDocument();
bool OnSaveDocument(const wxString& file);
bool OnOpenDocument(const wxString& file);
inline wxDiagram *GetDiagram() { return &m_diagram; }
bool OnCloseDocument();
protected:
csDiagram m_diagram;
};
/*
Do/Undo 30/7/98
1) We have a csCommandState, and in csDiagramCommand you have a list of
these. This allows undo to work with several shapes at once.
2) Instead of storing info about each operation, e.g. separate pens, colours,
etc., we simply use a copy of the shape.
In csCommandState, we have a pointer to the actual shape in the canvas, m_currentShape.
We also have wxShape* m_shapeState which stores the requested or previous state
(depending on whether it's before the Do or after the Do.
- In Do: save a temp copy of the old m_currentShape (i.e. the state just before it's changed).
Change the data pointed to by m_currentShape to the new attributes stored in m_shapeState.
Now assign the temp copy to m_shapeState, for use in Undo.
wxShape* temp = m_currentShape->Copy(); // Take a copy of the current state
m_currentShape->Set(m_shapeState); // Apply the new state (e.g. moving, changing colour etc.)
delete m_shapeState; // Delete the previous 'old state'.
m_shapeState = temp; // Remember the new 'old state'.
*/
class csCommandState;
class csDiagramCommand: public wxCommand
{
friend class csCommandState;
public:
// Multi-purpose constructor for creating, deleting shapes
csDiagramCommand(const wxString& name, csDiagramDocument *doc,
csCommandState* onlyState = NULL); // Allow for the common case of just one state to change
~csDiagramCommand();
bool Do();
bool Undo();
// Add a state to the end of the list
void AddState(csCommandState* state);
// Insert a state at the beginning of the list
void InsertState(csCommandState* state);
// Schedule all lines connected to the states to be cut.
void RemoveLines();
// Find the state that refers to this shape
csCommandState* FindStateByShape(wxShape* shape);
wxList& GetStates() const { return (wxList&) m_states; }
protected:
csDiagramDocument* m_doc;
wxList m_states;
};
class csCommandState: public wxObject
{
friend class csDiagramCommand;
public:
csCommandState(int cmd, wxShape* savedState, wxShape* shapeOnCanvas);
~csCommandState();
bool Do();
bool Undo();
inline void SetSavedState(wxShape *s) { m_savedState = s; }
inline wxShape *GetSavedState() const { return m_savedState; }
inline void SetShapeOnCanvas(wxShape *s) { m_shapeOnCanvas = s; }
inline wxShape *GetShapeOnCanvas() const { return m_shapeOnCanvas; }
protected:
wxShape* m_savedState; // Previous state, for restoring on Undo
wxShape* m_shapeOnCanvas; // The actual shape on the canvas
csDiagramDocument* m_doc;
int m_cmd;
// These store the line ordering for the shapes at either end,
// so an un-cut line can restore the ordering properly. Otherwise
// it just adds the line at an arbitrary position.
int m_linePositionFrom;
int m_linePositionTo;
};
#endif
// _STUDIO_DOC_H_

View File

@@ -1,18 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=studio
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
mainfrm.obj project.obj dialogs.obj csprint.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,21 +0,0 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=studio
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
mainfrm.obj project.obj dialogs.obj csprint.obj
!include $(WXDIR)\src\makeprog.bcc

Some files were not shown because too many files have changed in this diff Show More