Compare commits
1 Commits
master
...
WX_2_2_STA
Author | SHA1 | Date | |
---|---|---|---|
|
d5f8a1d800 |
44
.cvsignore
@@ -1,44 +0,0 @@
|
||||
system.list
|
||||
bin
|
||||
.gdb_history
|
||||
Test
|
||||
config.cache
|
||||
configarg.cache
|
||||
config.status
|
||||
system.list
|
||||
linux.system.cache
|
||||
wx-config
|
||||
config.log
|
||||
linux-gnu.system.cache
|
||||
*.dsp
|
||||
*.dsw
|
||||
*.plg
|
||||
*.opt
|
||||
*.aps
|
||||
*.ncb
|
||||
*.pro
|
||||
*.opt
|
||||
*.d
|
||||
*.swp
|
||||
*.swo
|
||||
Release
|
||||
Debug
|
||||
ReleaseDLL
|
||||
DebugDLL
|
||||
robert
|
||||
stamp-h.in
|
||||
Makefile
|
||||
configure
|
||||
setup.h
|
||||
stamp-h
|
||||
libtool
|
||||
aclocal.m4
|
||||
base
|
||||
gtk
|
||||
motif
|
||||
win32
|
||||
base-release
|
||||
gtk-release
|
||||
motif-release
|
||||
win32-release
|
||||
*tags
|
242
BuildCVS.txt
@@ -1,242 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
How to build the sources from CVS
|
||||
------------------------------------------------------------------------
|
||||
|
||||
I) Windows using plain makefiles
|
||||
----------------------------------------
|
||||
|
||||
a) If using Microsoft Visual C++ 5.0 or 6.0
|
||||
|
||||
Ensure that the command-line compiler and tools (including
|
||||
nmake) are installed and ready to run. Depending on your
|
||||
installation there may be a batch file (named something like
|
||||
VCVARS32.BAT) that needs to be run to set correct environment
|
||||
varaibles and PATH entries.
|
||||
|
||||
Continue with item c) below.
|
||||
|
||||
|
||||
b) If using the GNU MinGW32 or GNU CygWin32 compilers
|
||||
|
||||
You'll need the compiler itself which is available from
|
||||
|
||||
http://www.cygwin.com
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
->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
|
||||
appropriately.
|
||||
|
||||
|
||||
c) Build instructions
|
||||
|
||||
-> Assumming that you installed the wxWindows sources
|
||||
into c:\wxWin
|
||||
-> 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) with
|
||||
#define wxUSE_ODBC 0
|
||||
#define wxUSE_SOCKETS 0
|
||||
#define wxUSE_HTML 1
|
||||
#define wxUSE_THREADS 1
|
||||
#define wxUSE_FS_INET 0
|
||||
#define wxUSE_FS_ZIP 1
|
||||
#define wxUSE_BUSYINFO 1
|
||||
#define wxUSE_DYNLIB_CLASS 1
|
||||
#define wxUSE_ZIPSTREAM 1
|
||||
#define wxUSE_LIBJPEG 1
|
||||
#define wxUSE_LIBPNG 1
|
||||
|
||||
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: make -f makefile.vc (if using MS VC++)
|
||||
|
||||
|
||||
II) Unix ports
|
||||
--------------
|
||||
|
||||
Building wxGTK or wxMotif completely without configure
|
||||
won't ever work, but there is now a new makefile system
|
||||
that works without libtool and automake, using only
|
||||
configure to create what is needed.
|
||||
|
||||
In order to create configure, you need to have the
|
||||
GNU autoconf package (version 2.13 or 2.14) installed
|
||||
on your system and type run "autoconf" in the base
|
||||
directory (or run the autogen.sh script in the same
|
||||
directory, which just calls autoconf).
|
||||
|
||||
Set WXWIN environment variable to the base directory such
|
||||
as ~/wxWindows (this is actually not really needed).
|
||||
|
||||
-> type: export WXWIN=~/wxWindows
|
||||
-> type: md mybuild
|
||||
-> type: cd mybuild
|
||||
-> type: ../configure --with-motif
|
||||
or type: ../configure --with-gtk
|
||||
-> type: make
|
||||
-> type: su <type root password>
|
||||
-> type: make install
|
||||
-> type: ldconfig
|
||||
-> type: exit
|
||||
|
||||
Call configure with --disable-shared to create a static
|
||||
library. Calling "make uninstall" will remove the installed
|
||||
library and "make dist" will create a distribution (not
|
||||
yet complete).
|
||||
|
||||
III) Windows using configure
|
||||
----------------------------------------
|
||||
|
||||
Take a look at Unix->Windows cross compiling. With minor
|
||||
modifications, this should work in Windows if you've got the cygnus
|
||||
utilities (bash, GNU make, etc) and either mingw32 or cygwin32 installed.
|
||||
See http://www.cygnus.com for these programs, or go straight to their
|
||||
ftp server at ftp://sourceware.cygnus.com/pub/cygwin/.
|
||||
|
||||
Of course, you can also build the library using plain makefiles (see
|
||||
section I).
|
||||
|
||||
V) MacOS
|
||||
----------------------------------------
|
||||
|
||||
VI) OS/2
|
||||
----------------------------------------
|
||||
|
||||
VII) Unix->Windows cross-compiling using configure
|
||||
--------------------------------------------------
|
||||
|
||||
First you'll need a cross-compiler; linux glibc binaries of mingw32 and
|
||||
cygwin32 (both based on egcs) can be found at
|
||||
ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Otherwise you can
|
||||
compile one yourself. Check the relevant FAQs.
|
||||
|
||||
[ A Note about cygwin32 and mingw32: the main difference is that cygwin32
|
||||
binaries are always linked against cygwin.dll. This dll encapsulates most
|
||||
standard Unix C extensions, which is very handy if you're porting unix
|
||||
software to windows. However, wxMSW doesn't need this, so mingw32 is
|
||||
preferable if you write portable C(++). ]
|
||||
|
||||
You might want to build both Unix and Windows binaries in the same source
|
||||
tree; to do this make subdirs for each e.g. unix and win32. If you've
|
||||
already build wxWindows in the main dir, do a 'make distclean' there,
|
||||
otherwise configure will get confused. (In any case, read the section 'Unix
|
||||
using configure' and make sure you're able to build a native wxWindows
|
||||
library; cross-compiling errors can be pretty obscure and you'll want to be
|
||||
sure that your configure setup is basically sound.)
|
||||
|
||||
To cross compile the windows library, do
|
||||
-> cd win32
|
||||
(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
|
||||
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!).
|
||||
The other way to run configure is by specifying the names of the binaries
|
||||
yourself:
|
||||
-> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \
|
||||
DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \
|
||||
../configure --host=i586-mingw32 --with-mingw --enable-dnd=no
|
||||
|
||||
(all assuming you're using mingw32)
|
||||
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.
|
||||
|
||||
Type
|
||||
-> make
|
||||
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
|
||||
|
||||
and run it with wine, for example (or copy to a Windows box)
|
||||
-> wine minimal.exe
|
||||
|
||||
If all is well, do an install; from win32
|
||||
-> make install
|
||||
|
||||
Native and cross-compiled installations can co-exist peacefully
|
||||
(as long as their widget sets differ), except for wx-config. You might
|
||||
want to rename the cross-compiled one to i586-mingw32-wx-config, or something.
|
||||
|
||||
Cross-compiling TODO:
|
||||
---------------------
|
||||
- resource compiling must be done manually for now (should/can we link the
|
||||
default wx resources into libwx_msw.a?) [ No we can't; the linker won't
|
||||
link it in... you have to supply an object file ]
|
||||
- dynamic libraries
|
||||
- static executables are HUGE -- there must be room for improvement.
|
||||
|
1225
Makefile.in
@@ -1,169 +0,0 @@
|
||||
*** \gcc-inc\basetyps.h Sat Jul 31 16:48:36 1999
|
||||
--- basetyps.h Fri Aug 06 11:14:36 1999
|
||||
***************
|
||||
*** 74,91 ****
|
||||
--- 74,97 ----
|
||||
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||
}
|
||||
#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||
|
||||
+ #ifndef GUID_DEFINED
|
||||
+ #define GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID;
|
||||
+ #endif /* GUID_DEFINED */
|
||||
typedef GUID *REFGUID;
|
||||
typedef GUID *LPGUID;
|
||||
+ #ifndef UUID_DEFINED
|
||||
+ #define UUID_DEFINED
|
||||
typedef GUID UUID;
|
||||
+ #endif /* UUID_DEFINED */
|
||||
typedef GUID IID;
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
typedef IID *LPIID;
|
||||
|
||||
|
||||
*** \gcc-inc\oaidl.h Sat Jul 31 16:48:42 1999
|
||||
--- oaidl.h Fri Aug 06 13:18:48 1999
|
||||
***************
|
||||
*** 39,44 ****
|
||||
--- 39,53 ----
|
||||
#define IMPLTYPEFLAG_FRESTRICTED 4
|
||||
#define IMPLTYPEFLAG_FDEFAULTVTABLE 8
|
||||
|
||||
+ #define DISPID_UNKNOWN ( -1 )
|
||||
+ #define DISPID_VALUE ( 0 )
|
||||
+ #define DISPID_PROPERTYPUT ( -3 )
|
||||
+ #define DISPID_NEWENUM ( -4 )
|
||||
+ #define DISPID_EVALUATE ( -5 )
|
||||
+ #define DISPID_CONSTRUCTOR ( -6 )
|
||||
+ #define DISPID_DESTRUCTOR ( -7 )
|
||||
+ #define DISPID_COLLECT ( -8 )
|
||||
+
|
||||
typedef interface ITypeLib *LPTYPELIB;
|
||||
typedef interface ICreateTypeInfo *LPCREATETYPEINFO;
|
||||
typedef interface ICreateTypeInfo2 *LPCREATETYPEINFO2;
|
||||
***************
|
||||
*** 49,54 ****
|
||||
--- 58,73 ----
|
||||
typedef interface IDispatch *LPDISPATCH;
|
||||
typedef interface ICreateErrorInfo *LPCREATEERRORINFO;
|
||||
|
||||
+ extern "C" const IID IID_ITypeLib;
|
||||
+ extern "C" const IID IID_ICreateTypeInfo;
|
||||
+ extern "C" const IID IID_ICreateTypeInfo2;
|
||||
+ extern "C" const IID IID_ICreateTypeLib;
|
||||
+ extern "C" const IID IID_ICreateTypeLib2;
|
||||
+ extern "C" const IID IID_ITypeInfo;
|
||||
+ extern "C" const IID IID_IErrorInfo;
|
||||
+ extern "C" const IID IID_IDispatch;
|
||||
+ extern "C" const IID IID_ICreateErrorInfo;
|
||||
+
|
||||
typedef enum tagSYSKIND {
|
||||
SYS_WIN16,SYS_WIN32,SYS_MAC
|
||||
} SYSKIND;
|
||||
***************
|
||||
*** 375,382 ****
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
|
||||
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;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
--- 394,401 ----
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) 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;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
||||
*** \gcc-inc\objidl.h Sat Jul 31 16:48:42 1999
|
||||
--- objidl.h Fri Aug 06 11:00:19 1999
|
||||
***************
|
||||
*** 627,633 ****
|
||||
STDMETHOD(QueryGetData)(THIS_ FORMATETC*) PURE;
|
||||
STDMETHOD(GetCanonicalFormatEtc)(THIS_ FORMATETC*,FORMATETC*) PURE;
|
||||
STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
|
||||
! STDMETHOD(EnumFormatEtc)(THIS_ DWORD,IEnumFORMATETC*) PURE;
|
||||
STDMETHOD(DAdvise)(THIS_ FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
|
||||
STDMETHOD(DUnadvise)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**);
|
||||
--- 627,633 ----
|
||||
STDMETHOD(QueryGetData)(THIS_ FORMATETC*) PURE;
|
||||
STDMETHOD(GetCanonicalFormatEtc)(THIS_ FORMATETC*,FORMATETC*) PURE;
|
||||
STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
|
||||
! STDMETHOD(EnumFormatEtc)(THIS_ DWORD,IEnumFORMATETC**) PURE;
|
||||
STDMETHOD(DAdvise)(THIS_ FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
|
||||
STDMETHOD(DUnadvise)(THIS_ DWORD) 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
|
||||
+
|
||||
|
||||
|
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
autoconf
|
951
config.guess
vendored
@@ -1,951 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# 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
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
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
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
# A Vn.n version is a released version.
|
||||
# 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
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
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
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
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
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
case "`/usr/bin/arch -k`" in
|
||||
Series*|S4*)
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
sun4)
|
||||
echo sparc-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:NetBSD:*:*)
|
||||
echo powerpc-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
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);
|
||||
#endif
|
||||
#if defined (SYSTYPE_SVR4)
|
||||
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
||||
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${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:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
||||
echo m88k-tektronix-sysv3
|
||||
exit 0 ;;
|
||||
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
||||
echo m68k-tektronix-bsd
|
||||
exit 0 ;;
|
||||
*:IRIX*:*:*)
|
||||
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
|
||||
exit 0 ;;
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i?86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${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
|
||||
else
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
|
||||
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
|
||||
exit 0 ;; # report: romp-ibm BSD 4.3
|
||||
*:BOSX:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[34678]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
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
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
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:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(${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
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
|
||||
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
|
||||
results, however. */
|
||||
if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${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:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
i?86:OSF1:*:*)
|
||||
if [ -x /usr/sbin/sysversion ] ; then
|
||||
echo ${UNAME_MACHINE}-unknown-osf1mk
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-osf1
|
||||
fi
|
||||
exit 0 ;;
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*[A-Z]90:*:*:*)
|
||||
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
|
||||
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
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 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin32
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
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.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
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) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
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
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${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.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${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.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
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`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
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
|
||||
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.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit 0 ;;
|
||||
paragon:*:*:*)
|
||||
echo i860-intel-osf1
|
||||
exit 0 ;;
|
||||
i860:*:4.*:*) # i860-SVR4
|
||||
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
||||
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
|
||||
else # Add other i860-SVR4 vendors below as they are discovered.
|
||||
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
*:SINIX-*:*:*)
|
||||
if uname -p 2>/dev/null >/dev/null ; then
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
echo ${UNAME_MACHINE}-sni-sysv4
|
||||
else
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
echo hppa1.1-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:*:*:FTX*)
|
||||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit 0 ;;
|
||||
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
|
||||
echo powerpc-apple-beos
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
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
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${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.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
955
config.sub
vendored
@@ -1,955 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# 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.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
# Each package is responsible for reporting which valid configurations
|
||||
# it does not support. The user should be able to distinguish
|
||||
# a failure to support a valid configuration from a meaningless
|
||||
# configuration.
|
||||
|
||||
# The goal of this file is to map all the various variations of a given
|
||||
# machine specification into a single specification in the form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or in some cases, the newer four-part form:
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
if [ x$1 = x ]
|
||||
then
|
||||
echo Configuration name missing. 1>&2
|
||||
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
|
||||
echo "or $0 ALIAS" 1>&2
|
||||
echo where ALIAS is a recognized configuration type. 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### recognize some manufacturers as not being operating systems, so we
|
||||
### can provide default operating systems below.
|
||||
case $os in
|
||||
-sun*os*)
|
||||
# Prevent following clause from handling this invalid input.
|
||||
;;
|
||||
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
|
||||
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
|
||||
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
-ptx*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-windowsnt*)
|
||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||
;;
|
||||
-psos*)
|
||||
os=-psos
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# 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 \
|
||||
| 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
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
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-* | 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-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
altos | altos3068)
|
||||
basic_machine=m68k-altos
|
||||
;;
|
||||
am29k)
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
;;
|
||||
balance)
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c2)
|
||||
basic_machine=c2-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c32)
|
||||
basic_machine=c32-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c34)
|
||||
basic_machine=c34-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c38)
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
;;
|
||||
delta88)
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
;;
|
||||
dpx2* | dpx2*-bull)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
;;
|
||||
elxsi)
|
||||
basic_machine=elxsi-elxsi
|
||||
os=-bsd
|
||||
;;
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
genix)
|
||||
basic_machine=ns32k-ns
|
||||
;;
|
||||
gmicro)
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
h8300hms)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
;;
|
||||
hp300-*)
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp300bsd)
|
||||
basic_machine=m68k-hp
|
||||
os=-bsd
|
||||
;;
|
||||
hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
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])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
-irix*)
|
||||
;;
|
||||
*)
|
||||
os=-irix4
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
isi68 | isi)
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
magnum | m3230)
|
||||
basic_machine=mips-mips
|
||||
os=-sysv
|
||||
;;
|
||||
merlin)
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news1000)
|
||||
basic_machine=m68030-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news-3600 | risc-news)
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
-nextstep* )
|
||||
;;
|
||||
-ns2*)
|
||||
os=-nextstep2
|
||||
;;
|
||||
*)
|
||||
os=-nextstep3
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
nh3000)
|
||||
basic_machine=m68k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nh[45]000)
|
||||
basic_machine=m88k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nindy960)
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
paragon)
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | k6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | k6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
;;
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
sun2os3)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun2os4)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun3os3)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun3os4)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4os3)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun4os4)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4sol2)
|
||||
basic_machine=sparc-sun
|
||||
os=-solaris2
|
||||
;;
|
||||
sun3 | sun3-*)
|
||||
basic_machine=m68k-sun
|
||||
;;
|
||||
sun4)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
ultra3)
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
;;
|
||||
vms)
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks68)
|
||||
basic_machine=m68k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks29k)
|
||||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
;;
|
||||
|
||||
# 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.
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
basic_machine=orion-highlevel
|
||||
;;
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we canonicalize certain aliases for manufacturers.
|
||||
case $basic_machine in
|
||||
*-digital*)
|
||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||
;;
|
||||
*-commodore*)
|
||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-unixware*)
|
||||
os=-sysv4.2uw
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
-dynix*)
|
||||
os=-bsd
|
||||
;;
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
;;
|
||||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
-svr3)
|
||||
os=-sysv3
|
||||
;;
|
||||
-sysvr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
# Get rid of the `-' at the beginning of $os.
|
||||
os=`echo $os | sed 's/[^-]*-//'`
|
||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
# Here we handle the default operating systems that come with various machines.
|
||||
# The value should be what the vendor currently ships out the door with their
|
||||
# machine or put another way, the most popular os provided with the machine.
|
||||
|
||||
# Note that if you're going to try to match "-MANUFACTURER" here (say,
|
||||
# "-sun"), then you have to tell the case statement up towards the top
|
||||
# that MANUFACTURER isn't an operating system. Otherwise, code above
|
||||
# will signal an error saying that MANUFACTURER isn't an operating
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
os=-ultrix4.2
|
||||
;;
|
||||
m68*-apollo)
|
||||
os=-domain
|
||||
;;
|
||||
i386-sun)
|
||||
os=-sunos4.0.2
|
||||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
*-hitachi)
|
||||
os=-hiux
|
||||
;;
|
||||
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigaos
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
;;
|
||||
*-dolphin)
|
||||
os=-sysv3
|
||||
;;
|
||||
m68k-ccur)
|
||||
os=-rtu
|
||||
;;
|
||||
m88k-omron*)
|
||||
os=-luna
|
||||
;;
|
||||
*-next )
|
||||
os=-nextstep
|
||||
;;
|
||||
*-sequent)
|
||||
os=-ptx
|
||||
;;
|
||||
*-crds)
|
||||
os=-unos
|
||||
;;
|
||||
*-ns)
|
||||
os=-genix
|
||||
;;
|
||||
i370-*)
|
||||
os=-mvs
|
||||
;;
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Here we handle the case where we know the os, and the CPU type, but not the
|
||||
# manufacturer. We pick the logical manufacturer.
|
||||
vendor=unknown
|
||||
case $basic_machine in
|
||||
*-unknown)
|
||||
case $os in
|
||||
-riscix*)
|
||||
vendor=acorn
|
||||
;;
|
||||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-unos*)
|
||||
vendor=crds
|
||||
;;
|
||||
-dgux*)
|
||||
vendor=dg
|
||||
;;
|
||||
-luna*)
|
||||
vendor=omron
|
||||
;;
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
3805
configure.in
@@ -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
|
974
contrib/configure
vendored
@@ -1,974 +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/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/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
|
||||
|
@@ -1,48 +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/stc/Makefile
|
||||
])
|
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 1.2 KiB |
@@ -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}
|
Before Width: | Height: | Size: 138 B |
@@ -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}}
|
||||
|
@@ -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}}
|
||||
|
@@ -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}
|
||||
|
@@ -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
|
||||
|
@@ -1,3 +0,0 @@
|
||||
\chapter{Change log}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
@@ -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
|
Before Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 164 B |
@@ -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}
|
@@ -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}
|
@@ -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).
|
@@ -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.
|
||||
|
@@ -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}}
|
||||
|
@@ -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.
|
||||
|
@@ -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}
|
||||
|
@@ -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}
|
||||
|
@@ -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}}
|
||||
|
@@ -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}}
|
||||
|
@@ -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}}
|
||||
|
@@ -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}}
|
@@ -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}}
|
||||
|
@@ -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}
|
||||
|
@@ -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.
|
||||
|
@@ -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}}
|
||||
|
@@ -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}
|
||||
|
@@ -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}
|
||||
|
@@ -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}}
|
||||
|
@@ -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}
|
||||
|
@@ -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] {}
|
||||
|
@@ -1,298 +0,0 @@
|
||||
% LaTeX style file
|
||||
% Name: texhelp.sty
|
||||
% Author: Julian Smart
|
||||
%
|
||||
% Purpose
|
||||
% -------
|
||||
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
|
||||
% hypertext manuals.
|
||||
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
|
||||
%
|
||||
% Note that if a non-ASCII character starts a newline and there should be a space
|
||||
% between the last word on the previous line and the first word on this line,
|
||||
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
|
||||
% in all other formats.
|
||||
%
|
||||
% Julian Smart
|
||||
% Artificial Intelligence Applications Institute
|
||||
%
|
||||
%
|
||||
% ============== C++/CLIPS Documentation Facilities ==============
|
||||
%
|
||||
% Each class definition should be typeset with e.g.
|
||||
%
|
||||
% \section{\class{Name}: Parent}
|
||||
%
|
||||
% followed by a description of the class.
|
||||
% Each member should follow:
|
||||
%
|
||||
% \membersection{wxName::Member}
|
||||
%
|
||||
% with a description of what this member does.
|
||||
% Then, one (or more if overloaded) member (function) in detail:
|
||||
%
|
||||
% \func{return type}{name}{args}
|
||||
% or
|
||||
% \member{type}{name}
|
||||
%
|
||||
% where args is a list of \param{type}{name}, ...
|
||||
|
||||
% Function, e.g.
|
||||
% e.g. to typeset
|
||||
%
|
||||
% void DoIt(char *string);
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \func{void}{DoIt}{\param{char *}{string}}
|
||||
%
|
||||
|
||||
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} {\bf #2}\index{#2}}(#3)}
|
||||
|
||||
% For function/type definition where the name is a pointer,
|
||||
% e.g. to typeset
|
||||
%
|
||||
% typedef void (*wxFunction)(wxObject&)
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
|
||||
|
||||
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
|
||||
|
||||
% Use an ordinary \section command for class name definitions.
|
||||
|
||||
% This is used for a member, such as wxBitmap: GetDepth
|
||||
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
|
||||
|
||||
% CLIPS function
|
||||
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\bf #1} ({\bf #2}\index{#2}}#3)}
|
||||
|
||||
\newcommand{\clipssection}[1]{\chapter{#1}}
|
||||
|
||||
% This is used for a CLIPS function name
|
||||
\newcommand{\functionsection}[1]{\subsection*{#1}}
|
||||
|
||||
% Member: a type and a name
|
||||
\newcommand{\member}[2]{{\bf #1 \it #2}}
|
||||
|
||||
% C++ Parameter: a type and a name (no intervening space)
|
||||
\newcommand{\param}[2]{{\it #1}{\bf #2}}
|
||||
|
||||
% CLIPS Parameter: a type and a name (one intervening space)
|
||||
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
|
||||
|
||||
% Class: puts in index
|
||||
\newcommand{\class}[1]{#1\index{#1}}
|
||||
|
||||
%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
|
||||
|
||||
% Void type
|
||||
\newcommand{\void}{{\it void}}
|
||||
|
||||
% Typeset destructor
|
||||
\newcommand{\destruct}[1]{{$\sim$}#1}
|
||||
|
||||
% Typeset insert/extract operators
|
||||
\newcommand{\cinsert}{$<<$}
|
||||
\newcommand{\cextract}{$>>$}
|
||||
|
||||
|
||||
% =================== Hypertext facilities ===================
|
||||
%
|
||||
% To insert hyperlinks (or references, in Latex), \label the sections
|
||||
% or membersections \label{ref-label} immediately after the section, on the same line,
|
||||
% and use \helpref{text-to-show}{ref-label} to make a reference.
|
||||
%
|
||||
|
||||
% Type text with section reference
|
||||
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
|
||||
|
||||
% Type text with URL in verbatim mode
|
||||
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
|
||||
|
||||
% Don't typeset section number in LaTeX
|
||||
\newcommand{\helprefn}[2]{{\it #1}}
|
||||
|
||||
% Like helpref, but popup text in WinHelp instead of hyperlinked
|
||||
\newcommand{\popref}[2]{{\it #1}}
|
||||
|
||||
% Like footnote, but popup text.
|
||||
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
|
||||
|
||||
% =================== On-line help specific macros ===================
|
||||
%
|
||||
|
||||
% Global document font size/family, help only.
|
||||
\newcommand{\helpfontsize}[1]{}
|
||||
\newcommand{\helpfontfamily}[1]{}
|
||||
|
||||
% Ignore in all on-line help
|
||||
\newcommand{\helpignore}[1]{#1}
|
||||
% Only print in all on-line help
|
||||
\newcommand{\helponly}[1]{}
|
||||
|
||||
% Ignore in LaTeX
|
||||
\newcommand{\latexignore}[1]{}
|
||||
% Only print in LaTeX
|
||||
\newcommand{\latexonly}[1]{#1}
|
||||
|
||||
% Ignore in linear RTF
|
||||
\newcommand{\rtfignore}[1]{#1}
|
||||
% Only print in linear RTF
|
||||
\newcommand{\rtfonly}[1]{}
|
||||
|
||||
% Ignore in WinHelp RTF
|
||||
\newcommand{\winhelpignore}[1]{#1}
|
||||
% Only print in WinHelp RTF
|
||||
\newcommand{\winhelponly}[1]{}
|
||||
|
||||
% Ignore in wxHelp
|
||||
\newcommand{\xlpignore}[1]{#1}
|
||||
% Only print in wxHelp
|
||||
\newcommand{\xlponly}[1]{}
|
||||
|
||||
% Ignore in HTML
|
||||
\newcommand{\htmlignore}[1]{#1}
|
||||
% Only print in HTML
|
||||
\newcommand{\htmlonly}[1]{}
|
||||
|
||||
% Input a file only for help system (binder thickness is not a limitation
|
||||
% in help systems!)
|
||||
\newcommand{\helpinput}[1]{}
|
||||
|
||||
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
|
||||
|
||||
% =================== Miscellaneous macros ===================
|
||||
%
|
||||
% Headings consistent with generated ones
|
||||
\newcommand{\myheading}[1]{\vspace*{25pt}
|
||||
\begin{flushleft}
|
||||
{\LARGE \bf #1}
|
||||
\end{flushleft}
|
||||
\vskip 20pt
|
||||
}
|
||||
|
||||
% Heading with entry in contents page.
|
||||
\newcommand{\chapterheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\newcommand{\sectionheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{section}{#1}}
|
||||
|
||||
% Glossary environment
|
||||
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
|
||||
|
||||
% Glossary entry
|
||||
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
|
||||
|
||||
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
|
||||
\newcommand{\image}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, left aligned (HTML)
|
||||
\newcommand{\imager}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, right aligned (HTML)
|
||||
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Imagemap: principally for HTML only. In Latex,
|
||||
% acts like \image.
|
||||
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
|
||||
|
||||
% Headers and footers
|
||||
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setheader}[6]{
|
||||
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
|
||||
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
|
||||
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
|
||||
}
|
||||
|
||||
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setfooter}[6]{
|
||||
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
|
||||
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
|
||||
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
|
||||
}
|
||||
|
||||
% Needed for telling RTF where margin paragraph should go
|
||||
% in mirrored margins mode.
|
||||
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
|
||||
% Environment for two-column table popular in WinHelp and manuals.
|
||||
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
|
||||
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
|
||||
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
|
||||
|
||||
\twocolwidtha{3cm}
|
||||
\twocolwidthb{8.5cm}
|
||||
\twocolspacing{2}
|
||||
|
||||
\newcommand{\twocolitem}[2]{#1 & #2\\}
|
||||
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
|
||||
|
||||
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
|
||||
{\end{tabular}\renewcommand{\arraystretch}{1}}
|
||||
|
||||
% Specifying table rows for RTF compatibility
|
||||
\newcommand{\row}[1]{#1\\}
|
||||
|
||||
% Use for the last ruled row for correct RTF generation.
|
||||
\newcommand{\ruledrow}[1]{#1\\\hline}
|
||||
|
||||
% Indentation environment. Arg1 is left margin size
|
||||
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
|
||||
{\end{list}}
|
||||
|
||||
% Framed box of text, normal formatting.
|
||||
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
|
||||
% Double-framed box of text.
|
||||
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
|
||||
|
||||
% WITHDRAWN -- can't do in RTF, easily.
|
||||
% Framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
|
||||
% Double-framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
|
||||
|
||||
% toocomplex environment: simply prints the argument in LaTeX,
|
||||
% comes out verbatim in all generated formats.
|
||||
\newenvironment{toocomplex}{}{}
|
||||
|
||||
% Colour: dummy commands since LaTeX doesn't support colour.
|
||||
% \definecolour{name}{red}{blue}{green}
|
||||
% \fcol{name}{text} ; Foreground
|
||||
% \bcol{name}{text} ; Background
|
||||
\newcommand{\definecolour}[4]{}
|
||||
\newcommand{\definecolor}[4]{}
|
||||
\newcommand{\fcol}[2]{#2}
|
||||
\newcommand{\bcol}[2]{#2}
|
||||
\newcommand{\sethotspotcolour}[1]{}
|
||||
\newcommand{\sethotspotunderline}[1]{}
|
||||
\newcommand{\settransparency}[1]{}
|
||||
\newcommand{\backslashraw}[0]{}
|
||||
\newcommand{\lbraceraw}[0]{}
|
||||
\newcommand{\rbraceraw}[0]{}
|
||||
\newcommand{\registered}[0]{(r)}
|
||||
\newcommand{\background}[1]{}
|
||||
\newcommand{\textcolour}[1]{}
|
||||
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
|
||||
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
|
||||
#2%
|
||||
\end{list}}
|
||||
\newcommand{\wxheading}[1]{{\bf #1}}
|
||||
\newcommand{\const}[0]{{\bf const}}
|
||||
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
|
||||
|
||||
\addtolength{\textwidth}{1in}
|
||||
\addtolength{\oddsidemargin}{-0.5in}
|
||||
\addtolength{\topmargin}{-0.5in}
|
||||
\addtolength{\textheight}{1in}
|
||||
\sloppy
|
||||
|
@@ -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.
|
||||
|
Before Width: | Height: | Size: 137 B |
@@ -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}
|
||||
|
@@ -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}
|
||||
|
@@ -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
|
||||
|
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,11 +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 In the OGLEdit sample, .dia files are output double-spaced
|
||||
due to an unidentified bug in the way a stream is converted to a file.
|
||||
\end{itemize}
|
||||
|
Before Width: | Height: | Size: 138 B |
@@ -1,19 +0,0 @@
|
||||
\chapter{Change log}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
Version 3.0, September 8th 1998
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Version for wxWindows 2.0.
|
||||
\item Various enhancements especially to wxDrawnShape
|
||||
(multiple metafiles, for different orientations).
|
||||
\item More ability to override functions e.g. OnSizeDragLeft, so events can be
|
||||
intercepted for Do/Undo.
|
||||
\end{itemize}
|
||||
|
||||
Version 2.0, June 1st 1996
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item First publicly released version.
|
||||
\end{itemize}
|
Before Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 164 B |
@@ -1,47 +0,0 @@
|
||||
\chapter{Introduction}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
Object Graphics Library (\ogl) is a C++ library supporting the creation and
|
||||
manipulation of simple and complex graphic images on a canvas.
|
||||
|
||||
It can be found in the directory {\tt utils/ogl/src} in the
|
||||
wxWindows distribution. The file {\tt ogl.h} must be included to make use
|
||||
of the library.
|
||||
|
||||
Please see \helpref{OGL overview}{ogloverview} for a general description how the object library works. For details,
|
||||
please see the \helpref{class reference}{classref}.
|
||||
|
||||
\section{File structure}
|
||||
|
||||
These are the files that comprise the \ogl\ library.
|
||||
|
||||
\begin{description}\itemsep=0pt
|
||||
\item[basic.h] Header for basic objects such as wxShape and wxRectangleShape.
|
||||
\item[basic.cpp] Basic objects implementation (1).
|
||||
\item[basic2.cpp] Basic objects implementation (2).
|
||||
\item[bmpshape.h] wxBitmapShape class header.
|
||||
\item[bmpshape.cpp] wxBitmapShape implementation.
|
||||
\item[canvas.h] wxShapeCanvas class header.
|
||||
\item[canvas.cpp] wxShapeCanvas class implementation.
|
||||
\item[composit.h] Composite object class header.
|
||||
\item[composit.cpp] Composite object class implementation.
|
||||
\item[constrnt.h] Constraint classes header.
|
||||
\item[constrnt.cpp] Constraint classes implementation.
|
||||
\item[divided.h] Divided object class header.
|
||||
\item[divided.cpp] Divided object class implementation.
|
||||
\item[drawn.h] Drawn (metafile) object class header.
|
||||
\item[drawn.cpp] Drawn (metafile) object class implementation.
|
||||
\item[graphics.h] Main include file.
|
||||
\item[lines.h] wxLineShape class header.
|
||||
\item[lines.cpp] wxLineShape class implementation.
|
||||
\item[misc.h] Miscellaneous graphics functions header.
|
||||
\item[misc.cpp] Miscellaneous graphics functions implementation.
|
||||
\item[ogldiag.h] wxDiagram class header.
|
||||
\item[ogldiag.cpp] wxDiagram implementation.
|
||||
\item[mfutils.h] Metafile utilities header.
|
||||
\item[mfutils.cpp] Metafile utilities implementation.
|
||||
\end{description}
|
||||
|
||||
|
@@ -1,17 +0,0 @@
|
||||
[OPTIONS]
|
||||
BMROOT=d:\wx2\wxwind~1\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]
|
||||
|
@@ -1,46 +0,0 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
|
||||
\newcommand{\ogl}[0]{{OGL}}%
|
||||
\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{Object Graphics Library 3.0}
|
||||
\author{Julian Smart}
|
||||
\date{September 1998}
|
||||
|
||||
\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}
|
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 7.0 KiB |
@@ -1,87 +0,0 @@
|
||||
\chapter{OGLEdit: a sample OGL application}\label{ogledit}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
OGLEdit is a sample OGL application that allows the user to draw, edit,
|
||||
save and load a few shapes. It should clarify aspects of OGL usage, and
|
||||
can act as a template for similar applications. OGLEdit can be found in\rtfsp
|
||||
{\tt samples/ogledit} in the OGL distribution.
|
||||
|
||||
$$\image{10cm;0cm}{ogledit.eps}$$\par
|
||||
|
||||
The wxWindows document/view model has been used in OGL, to reduce the amount of
|
||||
housekeeping logic required to get it up and running. OGLEdit also provides
|
||||
a demonstration of the Undo/Redo capability supported by the document/view classes,
|
||||
and how a typical application might implement this feature.
|
||||
|
||||
\section{OGLEdit files}
|
||||
|
||||
OGLEdit comprises the following source files.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item doc.h, doc.cpp: MyDiagram, DiagramDocument, DiagramCommand, MyEvtHandler
|
||||
classes related to diagram functionality and documents.
|
||||
\item view.h, view.cpp: MyCanvas, DiagramView classes related to visualisation of
|
||||
the diagram.
|
||||
\item ogledit.h, ogledit.cpp: MyFrame, MyApp classes related to the overall application.
|
||||
\item palette.h, palette.cpp: EditorToolPalette implementing the shape palette.
|
||||
\end{itemize}
|
||||
|
||||
\section{How OGLEdit works}
|
||||
|
||||
OGLEdit defines a DiagramDocument class, each of instance of which holds a MyDiagram
|
||||
member which itself contains the shapes.
|
||||
|
||||
In order to implement specific mouse behaviour for shapes, a class MyEvtHandler is
|
||||
defined which is `plugged into' each shape when it is created, instead of overriding each shape class
|
||||
individually. This event handler class also holds a label string.
|
||||
|
||||
The DiagramCommand class is the key to implementing Undo/Redo. Each instance of DiagramCommand
|
||||
stores enough information about an operation (create, delete, change colour etc.) to allow
|
||||
it to carry out (or undo) its command. In DiagramView::OnMenuCommand, when the user initiates the
|
||||
command, a new DiagramCommand instance is created which is then sent to the document's
|
||||
command processor (see wxWindows manual for more information about doc/view and command
|
||||
processing).
|
||||
|
||||
Apart from menu commands, another way commands are initiated is by the user left-clicking on
|
||||
the canvas or right-dragging on a node. MyCanvas::OnLeftClick in view.cpp shows how
|
||||
the appropriate wxClassInfo is passed to a DiagramCommand, to allow DiagramCommand::Do
|
||||
to create a new shape given the wxClassInfo.
|
||||
|
||||
The MyEvtHandler right-drag methods in doc.cpp implement drawing a line between
|
||||
two shapes, detecting where the right mouse button was released and looking for a second
|
||||
shape. Again, a new DiagramCommand instance is created and passed to the command
|
||||
processor to carry out the command.
|
||||
|
||||
DiagramCommand::Do and DiagramCommand::Undo embody much of the
|
||||
interesting interaction with the OGL library. A complication of note
|
||||
when implementing undo is the problem of deleting a node shape which has
|
||||
one or more arcs attached to it. If you delete the node, the arc(s)
|
||||
should be deleted too. But multiple arc deletion represents more information
|
||||
that can be incorporated in the existing DiagramCommand scheme. OGLEdit
|
||||
copes with this by treating each arc deletion as a separate command, and
|
||||
sending Cut commands recursively, providing an undo path. Undoing such a
|
||||
Cut will only undo one command at a time - not a one to one
|
||||
correspondence with the original command - but it's a reasonable
|
||||
compromise and preserves Do/Undo whilst keeping our DiagramCommand class
|
||||
simple.
|
||||
|
||||
\section{Possible enhancements}
|
||||
|
||||
OGLEdit is very simplistic and does not employ the more advanced features
|
||||
of OGL, such as:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item attachment points (arcs are drawn to particular points on a shape)
|
||||
\item metafile and bitmaps shapes
|
||||
\item divided rectangles
|
||||
\item composite shapes, and constraints
|
||||
\item creating labels in shape regions
|
||||
\item arc labels (OGL has support for three movable labels per arc)
|
||||
\item spline and multiple-segment line arcs
|
||||
\item adding annotations to node and arc shapes
|
||||
\item line-straightening (supported by OGL) and alignment (not supported directly by OGL)
|
||||
\end{itemize}
|
||||
|
||||
These could be added to OGLEdit, at the risk of making it a less
|
||||
useful example for beginners.
|
@@ -1,35 +0,0 @@
|
||||
; Last change: JS 8 Sep 98 2:54 pm
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = no
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpVersion = 3
|
||||
winHelpContents = yes
|
||||
winHelpTitle = "OGL 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] {}
|
||||
|
@@ -1,298 +0,0 @@
|
||||
% LaTeX style file
|
||||
% Name: texhelp.sty
|
||||
% Author: Julian Smart
|
||||
%
|
||||
% Purpose
|
||||
% -------
|
||||
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
|
||||
% hypertext manuals.
|
||||
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
|
||||
%
|
||||
% Note that if a non-ASCII character starts a newline and there should be a space
|
||||
% between the last word on the previous line and the first word on this line,
|
||||
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
|
||||
% in all other formats.
|
||||
%
|
||||
% Julian Smart
|
||||
% Artificial Intelligence Applications Institute
|
||||
%
|
||||
%
|
||||
% ============== C++/CLIPS Documentation Facilities ==============
|
||||
%
|
||||
% Each class definition should be typeset with e.g.
|
||||
%
|
||||
% \section{\class{Name}: Parent}
|
||||
%
|
||||
% followed by a description of the class.
|
||||
% Each member should follow:
|
||||
%
|
||||
% \membersection{wxName::Member}
|
||||
%
|
||||
% with a description of what this member does.
|
||||
% Then, one (or more if overloaded) member (function) in detail:
|
||||
%
|
||||
% \func{return type}{name}{args}
|
||||
% or
|
||||
% \member{type}{name}
|
||||
%
|
||||
% where args is a list of \param{type}{name}, ...
|
||||
|
||||
% Function, e.g.
|
||||
% e.g. to typeset
|
||||
%
|
||||
% void DoIt(char *string);
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \func{void}{DoIt}{\param{char *}{string}}
|
||||
%
|
||||
|
||||
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} {\bf #2}\index{#2}}(#3)}
|
||||
|
||||
% For function/type definition where the name is a pointer,
|
||||
% e.g. to typeset
|
||||
%
|
||||
% typedef void (*wxFunction)(wxObject&)
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
|
||||
|
||||
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
|
||||
|
||||
% Use an ordinary \section command for class name definitions.
|
||||
|
||||
% This is used for a member, such as wxBitmap: GetDepth
|
||||
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
|
||||
|
||||
% CLIPS function
|
||||
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\bf #1} ({\bf #2}\index{#2}}#3)}
|
||||
|
||||
\newcommand{\clipssection}[1]{\chapter{#1}}
|
||||
|
||||
% This is used for a CLIPS function name
|
||||
\newcommand{\functionsection}[1]{\subsection*{#1}}
|
||||
|
||||
% Member: a type and a name
|
||||
\newcommand{\member}[2]{{\bf #1 \it #2}}
|
||||
|
||||
% C++ Parameter: a type and a name (no intervening space)
|
||||
\newcommand{\param}[2]{{\it #1}{\bf #2}}
|
||||
|
||||
% CLIPS Parameter: a type and a name (one intervening space)
|
||||
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
|
||||
|
||||
% Class: puts in index
|
||||
\newcommand{\class}[1]{#1\index{#1}}
|
||||
|
||||
%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
|
||||
|
||||
% Void type
|
||||
\newcommand{\void}{{\it void}}
|
||||
|
||||
% Typeset destructor
|
||||
\newcommand{\destruct}[1]{{$\sim$}#1}
|
||||
|
||||
% Typeset insert/extract operators
|
||||
\newcommand{\cinsert}{$<<$}
|
||||
\newcommand{\cextract}{$>>$}
|
||||
|
||||
|
||||
% =================== Hypertext facilities ===================
|
||||
%
|
||||
% To insert hyperlinks (or references, in Latex), \label the sections
|
||||
% or membersections \label{ref-label} immediately after the section, on the same line,
|
||||
% and use \helpref{text-to-show}{ref-label} to make a reference.
|
||||
%
|
||||
|
||||
% Type text with section reference
|
||||
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
|
||||
|
||||
% Type text with URL in verbatim mode
|
||||
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
|
||||
|
||||
% Don't typeset section number in LaTeX
|
||||
\newcommand{\helprefn}[2]{{\it #1}}
|
||||
|
||||
% Like helpref, but popup text in WinHelp instead of hyperlinked
|
||||
\newcommand{\popref}[2]{{\it #1}}
|
||||
|
||||
% Like footnote, but popup text.
|
||||
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
|
||||
|
||||
% =================== On-line help specific macros ===================
|
||||
%
|
||||
|
||||
% Global document font size/family, help only.
|
||||
\newcommand{\helpfontsize}[1]{}
|
||||
\newcommand{\helpfontfamily}[1]{}
|
||||
|
||||
% Ignore in all on-line help
|
||||
\newcommand{\helpignore}[1]{#1}
|
||||
% Only print in all on-line help
|
||||
\newcommand{\helponly}[1]{}
|
||||
|
||||
% Ignore in LaTeX
|
||||
\newcommand{\latexignore}[1]{}
|
||||
% Only print in LaTeX
|
||||
\newcommand{\latexonly}[1]{#1}
|
||||
|
||||
% Ignore in linear RTF
|
||||
\newcommand{\rtfignore}[1]{#1}
|
||||
% Only print in linear RTF
|
||||
\newcommand{\rtfonly}[1]{}
|
||||
|
||||
% Ignore in WinHelp RTF
|
||||
\newcommand{\winhelpignore}[1]{#1}
|
||||
% Only print in WinHelp RTF
|
||||
\newcommand{\winhelponly}[1]{}
|
||||
|
||||
% Ignore in wxHelp
|
||||
\newcommand{\xlpignore}[1]{#1}
|
||||
% Only print in wxHelp
|
||||
\newcommand{\xlponly}[1]{}
|
||||
|
||||
% Ignore in HTML
|
||||
\newcommand{\htmlignore}[1]{#1}
|
||||
% Only print in HTML
|
||||
\newcommand{\htmlonly}[1]{}
|
||||
|
||||
% Input a file only for help system (binder thickness is not a limitation
|
||||
% in help systems!)
|
||||
\newcommand{\helpinput}[1]{}
|
||||
|
||||
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
|
||||
|
||||
% =================== Miscellaneous macros ===================
|
||||
%
|
||||
% Headings consistent with generated ones
|
||||
\newcommand{\myheading}[1]{\vspace*{25pt}
|
||||
\begin{flushleft}
|
||||
{\LARGE \bf #1}
|
||||
\end{flushleft}
|
||||
\vskip 20pt
|
||||
}
|
||||
|
||||
% Heading with entry in contents page.
|
||||
\newcommand{\chapterheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\newcommand{\sectionheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{section}{#1}}
|
||||
|
||||
% Glossary environment
|
||||
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
|
||||
|
||||
% Glossary entry
|
||||
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
|
||||
|
||||
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
|
||||
\newcommand{\image}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, left aligned (HTML)
|
||||
\newcommand{\imager}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, right aligned (HTML)
|
||||
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Imagemap: principally for HTML only. In Latex,
|
||||
% acts like \image.
|
||||
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
|
||||
|
||||
% Headers and footers
|
||||
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setheader}[6]{
|
||||
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
|
||||
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
|
||||
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
|
||||
}
|
||||
|
||||
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setfooter}[6]{
|
||||
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
|
||||
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
|
||||
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
|
||||
}
|
||||
|
||||
% Needed for telling RTF where margin paragraph should go
|
||||
% in mirrored margins mode.
|
||||
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
|
||||
% Environment for two-column table popular in WinHelp and manuals.
|
||||
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
|
||||
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
|
||||
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
|
||||
|
||||
\twocolwidtha{3cm}
|
||||
\twocolwidthb{8.5cm}
|
||||
\twocolspacing{2}
|
||||
|
||||
\newcommand{\twocolitem}[2]{#1 & #2\\}
|
||||
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
|
||||
|
||||
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
|
||||
{\end{tabular}\renewcommand{\arraystretch}{1}}
|
||||
|
||||
% Specifying table rows for RTF compatibility
|
||||
\newcommand{\row}[1]{#1\\}
|
||||
|
||||
% Use for the last ruled row for correct RTF generation.
|
||||
\newcommand{\ruledrow}[1]{#1\\\hline}
|
||||
|
||||
% Indentation environment. Arg1 is left margin size
|
||||
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
|
||||
{\end{list}}
|
||||
|
||||
% Framed box of text, normal formatting.
|
||||
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
|
||||
% Double-framed box of text.
|
||||
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
|
||||
|
||||
% WITHDRAWN -- can't do in RTF, easily.
|
||||
% Framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
|
||||
% Double-framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
|
||||
|
||||
% toocomplex environment: simply prints the argument in LaTeX,
|
||||
% comes out verbatim in all generated formats.
|
||||
\newenvironment{toocomplex}{}{}
|
||||
|
||||
% Colour: dummy commands since LaTeX doesn't support colour.
|
||||
% \definecolour{name}{red}{blue}{green}
|
||||
% \fcol{name}{text} ; Foreground
|
||||
% \bcol{name}{text} ; Background
|
||||
\newcommand{\definecolour}[4]{}
|
||||
\newcommand{\definecolor}[4]{}
|
||||
\newcommand{\fcol}[2]{#2}
|
||||
\newcommand{\bcol}[2]{#2}
|
||||
\newcommand{\sethotspotcolour}[1]{}
|
||||
\newcommand{\sethotspotunderline}[1]{}
|
||||
\newcommand{\settransparency}[1]{}
|
||||
\newcommand{\backslashraw}[0]{}
|
||||
\newcommand{\lbraceraw}[0]{}
|
||||
\newcommand{\rbraceraw}[0]{}
|
||||
\newcommand{\registered}[0]{(r)}
|
||||
\newcommand{\background}[1]{}
|
||||
\newcommand{\textcolour}[1]{}
|
||||
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
|
||||
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
|
||||
#2%
|
||||
\end{list}}
|
||||
\newcommand{\wxheading}[1]{{\bf #1}}
|
||||
\newcommand{\const}[0]{{\bf const}}
|
||||
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
|
||||
|
||||
\addtolength{\textwidth}{1in}
|
||||
\addtolength{\oddsidemargin}{-0.5in}
|
||||
\addtolength{\topmargin}{-0.5in}
|
||||
\addtolength{\textheight}{1in}
|
||||
\sloppy
|
||||
|
@@ -1,161 +0,0 @@
|
||||
\chapter{Topic overviews}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The following sections describe particular topics.
|
||||
|
||||
\section{OGL overview}\label{ogloverview}
|
||||
|
||||
\helpref{wxShapeCanvas}{wxshapecanvas}, derived from {\bf wxCanvas}, is the drawing area
|
||||
for a number of \helpref{wxShape}{wxshape} instances. Everything drawn on a
|
||||
wxShapeCanvas is derived from wxShape, which provides virtual
|
||||
member functions for redrawing, creating and destroying
|
||||
resize/selection `handles', movement and erasing behaviour, mouse
|
||||
click behaviour, calculating the bounding box of the shape, linking
|
||||
nodes with arcs, and so on.
|
||||
|
||||
The way a client application copes with `damage' to the canvas is to
|
||||
erase (white out) anything should no longer be displayed, redraw the shape,
|
||||
and then redraw everything on the canvas to repair any damage. If quick edit
|
||||
mode is on for the canvas, the complete should be omitted by OGL and the
|
||||
application.
|
||||
|
||||
Selection handles (called control points in the code) are implemented as
|
||||
wxRectangleShapes.
|
||||
|
||||
Events are passed to shapes by the canvas in a high-level form, for example {\bf OnLeftClick},
|
||||
{\bf OnBeginDragLeft}, {\bf OnDragLeft}, {\bf OnEndDragLeft}. The canvas decides
|
||||
what is a click and what is a drag, whether it is on a shape or the canvas itself,
|
||||
and (by interrogating the shape) which attachment point the click is associated with.
|
||||
|
||||
In order to provide event-handling flexibility, each shapes has an `event handler' associated with it,
|
||||
which by default is the shape itself (all shapes derive from wxShapeEvtHandler).
|
||||
An application can modify the event-handling behaviour simply by plugging a new
|
||||
event handler into the shape. This can avoid the need for multiple inheritance when
|
||||
new properties and behaviour are required for a number of different shape classes: instead
|
||||
of overriding each class, one new event handler class can be defined and used for all
|
||||
existing shape classes.
|
||||
|
||||
A range of shapes have been predefined in the library, including rectangles, ellipses,
|
||||
polygons. A client application can derive from these shapes and/or derive entirely
|
||||
new shapes from wxShape.
|
||||
|
||||
Instances of a class called \helpref{wxDiagram}{wxdiagram} organise collections of
|
||||
shapes, providing default file input and output behaviour.
|
||||
|
||||
\section{wxDividedShape overview}\label{dividedshapeoverview}
|
||||
|
||||
Classes: \helpref{wxDividedShape}{wxdividedshape}
|
||||
|
||||
A wxDividedShape is a rectangle with a number of vertical divisions. Each
|
||||
division may have its text formatted with independent characteristics, and
|
||||
the size of each division relative to the whole image may be specified.
|
||||
|
||||
Once a wxDividedShape has been created, the user may move the divisions with the
|
||||
mouse. By pressing Ctrl while right-clicking, the region attributes can be edited.
|
||||
|
||||
Here are examples of creating wxDividedShape objects:
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
/*
|
||||
* Divided rectangle with 3 regions
|
||||
*
|
||||
*/
|
||||
|
||||
wxDividedShape *dividedRect = new wxDividedShape(50, 60);
|
||||
|
||||
wxShapeRegion *region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.5);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
dividedRect->SetSize(50, 60); // Allow it to calculate region sizes
|
||||
dividedRect->SetPen(wxBLACK_PEN);
|
||||
dividedRect->SetBrush(wxWHITE_BRUSH);
|
||||
dividedRect->Show(TRUE);
|
||||
dividedRect->NameRegions();
|
||||
|
||||
/*
|
||||
* Divided rectangle with 3 regions, rounded
|
||||
*
|
||||
*/
|
||||
|
||||
wxDividedShape *dividedRect3 = new wxDividedShape(50, 60);
|
||||
dividedRect3->SetCornerRadius(-0.4);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.5);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
dividedRect3->SetSize(50, 60); // Allow it to calculate region sizes
|
||||
dividedRect3->SetPen(wxBLACK_PEN);
|
||||
dividedRect3->SetBrush(wxWHITE_BRUSH);
|
||||
dividedRect3->Show(TRUE);
|
||||
dividedRect3->NameRegions();
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
\section{wxCompositeShape overview}\label{compositeshapeoverview}
|
||||
|
||||
Classes: \helpref{wxCompositeShape}{wxcompositeshape}, \helpref{wxOGLConstraint}{wxoglconstraint}
|
||||
|
||||
The wxCompositeShape allows fairly complex shapes to be created, and maintains
|
||||
a set of constraints which specify the layout and proportions of child shapes.
|
||||
|
||||
Add child shapes to a wxCompositeShape using \helpref{AddChild}{wxcompositeshapeaddchild}, and
|
||||
add constraints using \helpref{AddConstraint}{wxcompositeshapeaddconstraint}.
|
||||
|
||||
After children and shapes have been added, call \helpref{Recompute}{wxcompositeshaperecompute} which
|
||||
will return TRUE is the constraints could be satisfied, FALSE otherwise. If
|
||||
constraints have been correctly and consistently specified, this call will succeed.
|
||||
|
||||
If there is more than one child, constraints must be specified: OGL cannot calculate
|
||||
the size and position of children otherwise. Don't assume that children will simply
|
||||
move relative to the parent without the use of constraints.
|
||||
|
||||
To specify a constraint, you need three things:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item a constraint type, such as gyCONSTRAINT\_CENTRED\_VERTICALLY;
|
||||
\item a reference shape, with respect to which other shapes are going to be positioned - the\rtfsp
|
||||
{\it constraining} shape;
|
||||
\item a list of one or more shapes to be constrained: the {\it constrained} shapes.
|
||||
\end{enumerate}
|
||||
|
||||
The constraining shape can be either the parent of the constrained shapes, or a sibling. The
|
||||
constrained shapes must all be siblings of each other.
|
||||
|
||||
For an exhaustive list and description of the available constraint types, see the \helpref{wxOGLConstraint constructor}{wxoglconstraintconstr}.
|
||||
Note that most constraints operate in one dimension only (vertically or horizontally), so you will
|
||||
usually need to specify constraints in pairs.
|
||||
|
||||
You can set the spacing between constraining and constrained shapes by
|
||||
calling \helpref{wxOGLConstraint::SetSpacing}{wxoglconstraintsetspacing}.
|
||||
|
||||
Finally, a wxCompositeShape can have {\it divisions}, which are special child shapes of class
|
||||
wxDivisionShape (not to be confused with wxDividedShape). The purpose of this is to allow
|
||||
the composite to be divided into user-adjustable regions (divisions) into which other shapes
|
||||
can be dropped dynamically, given suitable application code. Divisons allow the child
|
||||
shapes to have an identity of their own - they can be manipulated independently of their container -
|
||||
but to behave as if they are contained with the division, moving with the parent shape.
|
||||
Divisions boundaries can themselves be moved using the mouse.
|
||||
|
||||
To create an initial division, call \helpref{wxCompositeShape::MakeContainer}{wxcompositeshapemakecontainer}.
|
||||
Make further divisions by calling \helpref{wxDivisionShape::Divide}{wxdivisionshapedivide}.
|
||||
|
Before Width: | Height: | Size: 137 B |
@@ -1,74 +0,0 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Name: cdbase.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998, 1999, 2000
|
||||
// Copyright: (C) 1997, 1998, 1999, 2000 Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// ---------------------------------------------------------------------------
|
||||
#ifndef __CDA_base_H__
|
||||
#define __CDA_base_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cdbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
typedef struct wxCDtime {
|
||||
wxUint8 track;
|
||||
wxUint8 hour, min, sec;
|
||||
} wxCDtime;
|
||||
|
||||
class WXDLLEXPORT wxCDAudio : public wxObject {
|
||||
DECLARE_ABSTRACT_CLASS(wxCDAudio)
|
||||
public:
|
||||
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus;
|
||||
// Table of contents manager
|
||||
class CDtoc {
|
||||
protected:
|
||||
wxCDtime *tracks_time, *tracks_pos;
|
||||
wxCDtime total_time;
|
||||
public:
|
||||
//
|
||||
CDtoc(wxCDtime& tot_tm, wxCDtime *trks_tm, wxCDtime *trks_pos)
|
||||
{ tracks_time = trks_tm; total_time = tot_tm; tracks_pos = trks_pos; }
|
||||
|
||||
// Returns the length of the specified track
|
||||
// track: track to get length
|
||||
wxCDtime GetTrackTime(wxUint8 track) const;
|
||||
// Returns the position of the specified track
|
||||
// track: track to get position
|
||||
wxCDtime GetTrackPos(wxUint8 track) const;
|
||||
// Returns the total time
|
||||
inline wxCDtime GetTotalTime() const { return total_time; }
|
||||
};
|
||||
public:
|
||||
//
|
||||
wxCDAudio() : wxObject() {}
|
||||
//
|
||||
virtual ~wxCDAudio() {}
|
||||
|
||||
// Play audio at the specified position
|
||||
virtual bool Play(const wxCDtime& beg_play, const wxCDtime& end_play) = 0;
|
||||
// Play audio from the specified to the end of the CD audio
|
||||
bool Play(const wxCDtime& beg_play);
|
||||
//
|
||||
bool Play(wxUint8 beg_track, wxUint8 end_track = 0);
|
||||
// Pause the audio playing
|
||||
virtual bool Pause() = 0;
|
||||
// Resume a paused audio playing
|
||||
virtual bool Resume() = 0;
|
||||
// Get the current CD status
|
||||
virtual CDstatus GetStatus() = 0;
|
||||
// Get the current playing time
|
||||
virtual wxCDtime GetTime() = 0;
|
||||
// Returns the table of contents
|
||||
virtual const CDtoc& GetToc() = 0;
|
||||
// CD ok
|
||||
virtual bool Ok() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
@@ -1,62 +0,0 @@
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cdwin.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __CDA_win_H__
|
||||
#define __CDA_win_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
#include "cdbase.h"
|
||||
|
||||
#ifdef WXMMEDIA_INTERNAL
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
typedef struct CDAW_Internal {
|
||||
MCIDEVICEID dev_id;
|
||||
} CDAW_Internal;
|
||||
#endif
|
||||
|
||||
///
|
||||
class WXDLLEXPORT wxCDAudioWin : public wxCDAudio {
|
||||
DECLARE_DYNAMIC_CLASS(wxCDAudioWin)
|
||||
protected:
|
||||
struct CDAW_Internal *m_internal;
|
||||
wxCDtime *m_trksize, *m_trkpos;
|
||||
CDtoc *m_toc;
|
||||
bool m_ok;
|
||||
public:
|
||||
///
|
||||
wxCDAudioWin(void);
|
||||
///
|
||||
wxCDAudioWin(const char *dev_name);
|
||||
///
|
||||
virtual ~wxCDAudioWin(void);
|
||||
|
||||
///
|
||||
virtual bool Play(const wxCDtime& beg_time, const wxCDtime& end_time);
|
||||
///
|
||||
virtual bool Pause(void);
|
||||
///
|
||||
virtual bool Resume(void);
|
||||
///
|
||||
virtual CDstatus GetStatus(void);
|
||||
///
|
||||
virtual wxCDtime GetTime(void);
|
||||
///
|
||||
virtual const CDtoc& GetToc(void);
|
||||
///
|
||||
virtual inline bool Ok(void) const { return m_ok; }
|
||||
protected:
|
||||
void PrepareToc();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* This source code is a product of Sun Microsystems, Inc. and is provided
|
||||
* for unrestricted use. Users may copy or modify this source code without
|
||||
* charge.
|
||||
*
|
||||
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
|
||||
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun source code is provided with no support and without any obligation on
|
||||
* the part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* g72x.h
|
||||
*
|
||||
* Header file for CCITT conversion routines.
|
||||
*
|
||||
*/
|
||||
#ifndef _G72X_H
|
||||
#define _G72X_H
|
||||
|
||||
#define AUDIO_ENCODING_ULAW (1) /* ISDN u-law */
|
||||
#define AUDIO_ENCODING_ALAW (2) /* ISDN A-law */
|
||||
#define AUDIO_ENCODING_LINEAR (3) /* PCM 2's-complement (0-center) */
|
||||
|
||||
/*
|
||||
* The following is the definition of the state structure
|
||||
* used by the G.721/G.723 encoder and decoder to preserve their internal
|
||||
* state between successive calls. The meanings of the majority
|
||||
* of the state structure fields are explained in detail in the
|
||||
* CCITT Recommendation G.721. The field names are essentially indentical
|
||||
* to variable names in the bit level description of the coding algorithm
|
||||
* included in this Recommendation.
|
||||
*/
|
||||
struct g72x_state {
|
||||
long yl; /* Locked or steady state step size multiplier. */
|
||||
short yu; /* Unlocked or non-steady state step size multiplier. */
|
||||
short dms; /* Short term energy estimate. */
|
||||
short dml; /* Long term energy estimate. */
|
||||
short ap; /* Linear weighting coefficient of 'yl' and 'yu'. */
|
||||
|
||||
short a[2]; /* Coefficients of pole portion of prediction filter. */
|
||||
short b[6]; /* Coefficients of zero portion of prediction filter. */
|
||||
short pk[2]; /*
|
||||
* Signs of previous two samples of a partially
|
||||
* reconstructed signal.
|
||||
*/
|
||||
short dq[6]; /*
|
||||
* Previous 6 samples of the quantized difference
|
||||
* signal represented in an internal floating point
|
||||
* format.
|
||||
*/
|
||||
short sr[2]; /*
|
||||
* Previous 2 samples of the quantized difference
|
||||
* signal represented in an internal floating point
|
||||
* format.
|
||||
*/
|
||||
char td; /* delayed tone detect, new in 1988 version */
|
||||
};
|
||||
|
||||
/* External function definitions. */
|
||||
|
||||
extern unsigned char linear2alaw (int pcm_val); /* 2's complement (16-bit range) */
|
||||
extern int alaw2linear (unsigned char a_val);
|
||||
extern unsigned char linear2ulaw (int pcm_val); /* 2's complement (16-bit range) */
|
||||
extern int ulaw2linear (unsigned char u_val);
|
||||
extern int predictor_zero (struct g72x_state *state_ptr);
|
||||
extern int predictor_pole (struct g72x_state *state_ptr);
|
||||
extern int step_size (struct g72x_state *state_ptr);
|
||||
extern int quantize (int d, int y, short *table, int size);
|
||||
extern int reconstruct (int sign, int dqln, int y);
|
||||
|
||||
extern void update
|
||||
( int code_size, int y, int wi, int fi, int dq
|
||||
, int sr, int dqsez, struct g72x_state *state_ptr);
|
||||
|
||||
int tandem_adjust_alaw
|
||||
(int sr, int se, int y, int i, int sign, short *qtab);
|
||||
|
||||
int tandem_adjust_ulaw
|
||||
(int sr, int se, int y, int i, int sign, short *qtab);
|
||||
|
||||
extern void g72x_init_state (struct g72x_state *);
|
||||
extern int g721_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g721_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_24_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_24_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_40_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_40_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
|
||||
#endif /* !_G72X_H */
|
@@ -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
|
@@ -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
|
@@ -1,32 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndcodec.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDCODEC_H
|
||||
#define _WX_SNDCODEC_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndcodec.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
class wxSoundStreamCodec: public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamCodec(wxSoundStream& snd_io);
|
||||
~wxSoundStreamCodec();
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundStream *m_sndio;
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -1,85 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndg72x.h
|
||||
// Purpose:
|
||||
// Date: 08/26/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDG72X_H
|
||||
#define _WX_SNDG72X_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndg72x.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
typedef enum {
|
||||
wxSOUND_G721,
|
||||
wxSOUND_G723_24,
|
||||
wxSOUND_G723_40
|
||||
} wxSoundG72XType;
|
||||
|
||||
// This fixes a bug in Mingw95
|
||||
typedef struct g72x_state g72state;
|
||||
|
||||
//
|
||||
// G72X format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatG72X: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatG72X();
|
||||
~wxSoundFormatG72X();
|
||||
|
||||
void SetG72XType(wxSoundG72XType type);
|
||||
wxSoundG72XType GetG72XType() const { return m_g72x_type; }
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_G72X; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxSoundG72XType m_g72x_type;
|
||||
};
|
||||
|
||||
//
|
||||
// ULAW converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamG72X: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamG72X(wxSoundStream& sndio);
|
||||
~wxSoundStreamG72X();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
wxUint8 m_n_bits, m_current_mask, m_current_b_pos, m_current_byte;
|
||||
wxUint8 *m_io_buffer;
|
||||
g72state *m_state;
|
||||
|
||||
int (*m_coder)(int code, int in_code, struct g72x_state *state);
|
||||
int (*m_decoder)(int code, int out_code, struct g72x_state *state);
|
||||
|
||||
protected:
|
||||
void PutBits(wxUint8 bits);
|
||||
wxUint8 GetBits();
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
@@ -1,55 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndoss.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDOSS_H
|
||||
#define _WX_SNDOSS_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndoss.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
|
||||
//
|
||||
// OSS output class
|
||||
//
|
||||
|
||||
class wxSoundStreamOSS : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp"));
|
||||
~wxSoundStreamOSS();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
bool QueueFilled() const;
|
||||
|
||||
// You should not call this.
|
||||
void WakeUpEvt(int evt);
|
||||
protected:
|
||||
// OSS device
|
||||
int m_fd;
|
||||
wxUint32 m_bufsize;
|
||||
int m_tag;
|
||||
bool m_oss_stop, m_oss_ok, m_q_filled;
|
||||
wxString m_devname;
|
||||
|
||||
private:
|
||||
bool SetupFormat(wxSoundFormatPcm *pcm);
|
||||
void DetectBest(wxSoundFormatPcm *pcm);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,57 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndpcm.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDPCM_H
|
||||
#define _WX_SNDPCM_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndpcm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
//
|
||||
// PCM specification class
|
||||
//
|
||||
|
||||
class wxSoundFormatPcm : public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatPcm(wxUint32 srate = 22500, wxUint8 bps = 8,
|
||||
wxUint16 channels = 2, bool sign = TRUE,
|
||||
int order = wxLITTLE_ENDIAN);
|
||||
~wxSoundFormatPcm();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
void SetBPS(wxUint8 bps);
|
||||
void SetChannels(wxUint16 nchannels);
|
||||
void SetOrder(int order);
|
||||
void Signed(bool sign);
|
||||
|
||||
wxUint32 GetSampleRate() const { return m_srate; }
|
||||
wxUint8 GetBPS() const { return m_bps; }
|
||||
wxUint16 GetChannels() const { return m_nchan; }
|
||||
int GetOrder() const { return m_order; }
|
||||
bool Signed() const { return m_signed; }
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_PCM; }
|
||||
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_bps;
|
||||
wxUint16 m_nchan;
|
||||
int m_order;
|
||||
bool m_signed;
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
@@ -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
|
@@ -1,65 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndwin.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDWIN_H
|
||||
#define _WX_SNDWIN_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
typedef struct _wxSoundInternal wxSoundInternal;
|
||||
typedef struct _wxSoundInfoHeader wxSoundInfoHeader;
|
||||
|
||||
// class WXDLLEXPORT wxSoundInternal;
|
||||
class WXDLLEXPORT wxSoundStreamWin : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamWin();
|
||||
~wxSoundStreamWin();
|
||||
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(wxSoundFormatBase& base);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
bool QueueFilled() const;
|
||||
|
||||
// Internal but defined as public
|
||||
void NotifyDoneBuffer(wxUint32 dev_handle, int flag);
|
||||
|
||||
wxUint32 GetBestSize() const { return 4096; }
|
||||
|
||||
protected:
|
||||
wxSoundInternal *m_internal;
|
||||
wxUint32 m_current_frag_in, m_current_frag_out;
|
||||
wxUint32 m_input_frag_in, m_output_frag_out;
|
||||
wxSoundInfoHeader **m_headers_play, **m_headers_rec;
|
||||
|
||||
bool m_production_started, m_queue_filled, m_waiting_for;
|
||||
|
||||
protected:
|
||||
void CreateSndWindow();
|
||||
void DestroySndWindow();
|
||||
bool OpenDevice(int mode);
|
||||
void CloseDevice();
|
||||
|
||||
wxSoundInfoHeader *AllocHeader(int mode);
|
||||
void FreeHeader(wxSoundInfoHeader *header, int mode);
|
||||
bool AllocHeaders(int mode);
|
||||
void FreeHeaders(int mode);
|
||||
|
||||
void WaitFor(wxSoundInfoHeader *info);
|
||||
bool AddToQueue(wxSoundInfoHeader *info);
|
||||
void ClearHeader(wxSoundInfoHeader *info);
|
||||
|
||||
wxSoundInfoHeader *NextFragmentOutput();
|
||||
wxSoundInfoHeader *NextFragmentInput();
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -1,744 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: basic.h
|
||||
// Purpose: Basic OGL classes and definitions
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_BASIC_H_
|
||||
#define _OGL_BASIC_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "basic.h"
|
||||
#endif
|
||||
|
||||
#define OGL_VERSION 2.0
|
||||
|
||||
#ifndef DEFAULT_MOUSE_TOLERANCE
|
||||
#define DEFAULT_MOUSE_TOLERANCE 3
|
||||
#endif
|
||||
|
||||
// Edit these lines if you positively don't want PROLOGIO support
|
||||
#ifndef PROLOGIO
|
||||
#define PROLOGIO
|
||||
#endif
|
||||
|
||||
// Key identifiers
|
||||
#define KEY_SHIFT 1
|
||||
#define KEY_CTRL 2
|
||||
|
||||
// Arrow styles
|
||||
|
||||
#define ARROW_NONE 0
|
||||
#define ARROW_END 1
|
||||
#define ARROW_BOTH 2
|
||||
#define ARROW_MIDDLE 3
|
||||
#define ARROW_START 4
|
||||
|
||||
// Control point types
|
||||
// Rectangle and most other shapes
|
||||
#define CONTROL_POINT_VERTICAL 1
|
||||
#define CONTROL_POINT_HORIZONTAL 2
|
||||
#define CONTROL_POINT_DIAGONAL 3
|
||||
|
||||
// Line
|
||||
#define CONTROL_POINT_ENDPOINT_TO 4
|
||||
#define CONTROL_POINT_ENDPOINT_FROM 5
|
||||
#define CONTROL_POINT_LINE 6
|
||||
|
||||
// Types of formatting: can be combined in a bit list
|
||||
#define FORMAT_NONE 0
|
||||
// Left justification
|
||||
#define FORMAT_CENTRE_HORIZ 1
|
||||
// Centre horizontally
|
||||
#define FORMAT_CENTRE_VERT 2
|
||||
// Centre vertically
|
||||
#define FORMAT_SIZE_TO_CONTENTS 4
|
||||
// Resize shape to contents
|
||||
|
||||
// Shadow mode
|
||||
#define SHADOW_NONE 0
|
||||
#define SHADOW_LEFT 1
|
||||
#define SHADOW_RIGHT 2
|
||||
|
||||
/*
|
||||
* Declare types
|
||||
*
|
||||
*/
|
||||
|
||||
#define SHAPE_BASIC wxTYPE_USER + 1
|
||||
#define SHAPE_RECTANGLE wxTYPE_USER + 2
|
||||
#define SHAPE_ELLIPSE wxTYPE_USER + 3
|
||||
#define SHAPE_POLYGON wxTYPE_USER + 4
|
||||
#define SHAPE_CIRCLE wxTYPE_USER + 5
|
||||
#define SHAPE_LINE wxTYPE_USER + 6
|
||||
#define SHAPE_DIVIDED_RECTANGLE wxTYPE_USER + 8
|
||||
#define SHAPE_COMPOSITE wxTYPE_USER + 9
|
||||
#define SHAPE_CONTROL_POINT wxTYPE_USER + 10
|
||||
#define SHAPE_DRAWN wxTYPE_USER + 11
|
||||
#define SHAPE_DIVISION wxTYPE_USER + 12
|
||||
#define SHAPE_LABEL_OBJECT wxTYPE_USER + 13
|
||||
#define SHAPE_BITMAP wxTYPE_USER + 14
|
||||
#define SHAPE_DIVIDED_OBJECT_CONTROL_POINT wxTYPE_USER + 15
|
||||
|
||||
#define OBJECT_REGION wxTYPE_USER + 20
|
||||
|
||||
#define OP_CLICK_LEFT 1
|
||||
#define OP_CLICK_RIGHT 2
|
||||
#define OP_DRAG_LEFT 4
|
||||
#define OP_DRAG_RIGHT 8
|
||||
|
||||
#define OP_ALL (OP_CLICK_LEFT | OP_CLICK_RIGHT | OP_DRAG_LEFT | OP_DRAG_RIGHT)
|
||||
|
||||
// Attachment modes
|
||||
#define ATTACHMENT_MODE_NONE 0
|
||||
#define ATTACHMENT_MODE_EDGE 1
|
||||
#define ATTACHMENT_MODE_BRANCHING 2
|
||||
|
||||
// Sub-modes for branching attachment mode
|
||||
#define BRANCHING_ATTACHMENT_NORMAL 1
|
||||
#define BRANCHING_ATTACHMENT_BLOB 2
|
||||
|
||||
class wxShapeTextLine;
|
||||
class wxShapeCanvas;
|
||||
class wxLineShape;
|
||||
class wxControlPoint;
|
||||
class wxShapeRegion;
|
||||
class wxShape;
|
||||
|
||||
#ifdef PROLOGIO
|
||||
class WXDLLEXPORT wxExpr;
|
||||
class WXDLLEXPORT wxExprDatabase;
|
||||
#endif
|
||||
|
||||
// Round up
|
||||
#define WXROUND(x) ( (long) (x + 0.5) )
|
||||
|
||||
|
||||
// logical function to use when drawing rubberband boxes, etc.
|
||||
#define OGLRBLF wxINVERT
|
||||
|
||||
|
||||
|
||||
class wxShapeEvtHandler: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler)
|
||||
|
||||
public:
|
||||
wxShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL);
|
||||
virtual ~wxShapeEvtHandler();
|
||||
|
||||
inline void SetShape(wxShape *sh) { m_handlerShape = sh; }
|
||||
inline wxShape *GetShape() const { return m_handlerShape; }
|
||||
|
||||
inline void SetPreviousHandler(wxShapeEvtHandler* handler) { m_previousHandler = handler; }
|
||||
inline wxShapeEvtHandler* GetPreviousHandler() const { return m_previousHandler; }
|
||||
|
||||
// This is called when the _shape_ is deleted.
|
||||
virtual void OnDelete();
|
||||
virtual void OnDraw(wxDC& dc);
|
||||
virtual void OnDrawContents(wxDC& dc);
|
||||
virtual void OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
||||
virtual void OnMoveLinks(wxDC& dc);
|
||||
virtual void OnErase(wxDC& dc);
|
||||
virtual void OnEraseContents(wxDC& dc);
|
||||
virtual void OnHighlight(wxDC& dc);
|
||||
virtual void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
virtual void OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
virtual void OnSize(double x, double y);
|
||||
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
|
||||
virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||
virtual void OnDrawControlPoints(wxDC& dc);
|
||||
virtual void OnEraseControlPoints(wxDC& dc);
|
||||
virtual void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
||||
|
||||
// Control points ('handles') redirect control to the actual shape, to make it easier
|
||||
// to override sizing behaviour.
|
||||
virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
virtual void OnBeginSize(double WXUNUSED(w), double WXUNUSED(h)) { }
|
||||
virtual void OnEndSize(double WXUNUSED(w), double WXUNUSED(h)) { }
|
||||
|
||||
// Can override this to prevent or intercept line reordering.
|
||||
virtual void OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering);
|
||||
|
||||
// Creates a copy of this event handler.
|
||||
wxShapeEvtHandler *CreateNewCopy();
|
||||
|
||||
// Does the copy - override for new event handlers which might store
|
||||
// app-specific data.
|
||||
virtual void CopyData(wxShapeEvtHandler& copy) {};
|
||||
|
||||
private:
|
||||
wxShapeEvtHandler* m_previousHandler;
|
||||
wxShape* m_handlerShape;
|
||||
};
|
||||
|
||||
class wxShape: public wxShapeEvtHandler
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxShape)
|
||||
|
||||
public:
|
||||
|
||||
wxShape(wxShapeCanvas *can = NULL);
|
||||
virtual ~wxShape();
|
||||
virtual void GetBoundingBoxMax(double *width, double *height);
|
||||
virtual void GetBoundingBoxMin(double *width, double *height) = 0;
|
||||
virtual bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
inline wxShapeCanvas *GetCanvas() { return m_canvas; }
|
||||
void SetCanvas(wxShapeCanvas *the_canvas);
|
||||
virtual void AddToCanvas(wxShapeCanvas *the_canvas, wxShape *addAfter = NULL);
|
||||
virtual void InsertInCanvas(wxShapeCanvas *the_canvas);
|
||||
|
||||
virtual void RemoveFromCanvas(wxShapeCanvas *the_canvas);
|
||||
inline double GetX() const { return m_xpos; }
|
||||
inline double GetY() const { return m_ypos; }
|
||||
inline void SetX(double x) { m_xpos = x; }
|
||||
inline void SetY(double y) { m_ypos = y; }
|
||||
|
||||
inline wxShape *GetParent() const { return m_parent; }
|
||||
inline void SetParent(wxShape *p) { m_parent = p; }
|
||||
wxShape *GetTopAncestor();
|
||||
inline wxList& GetChildren() { return m_children; }
|
||||
|
||||
virtual void OnDraw(wxDC& dc);
|
||||
virtual void OnDrawContents(wxDC& dc);
|
||||
virtual void OnMoveLinks(wxDC& dc);
|
||||
virtual void Unlink() { };
|
||||
void SetDrawHandles(bool drawH);
|
||||
inline bool GetDrawHandles() { return m_drawHandles; }
|
||||
virtual void OnErase(wxDC& dc);
|
||||
virtual void OnEraseContents(wxDC& dc);
|
||||
virtual void OnHighlight(wxDC& dc);
|
||||
virtual void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
virtual void OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0) {}
|
||||
virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
virtual void OnSize(double x, double y);
|
||||
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
|
||||
virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||
virtual void OnDrawControlPoints(wxDC& dc);
|
||||
virtual void OnEraseControlPoints(wxDC& dc);
|
||||
|
||||
virtual void OnBeginSize(double WXUNUSED(w), double WXUNUSED(h)) { }
|
||||
virtual void OnEndSize(double WXUNUSED(w), double WXUNUSED(h)) { }
|
||||
|
||||
// Control points ('handles') redirect control to the actual shape, to make it easier
|
||||
// to override sizing behaviour.
|
||||
virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
|
||||
virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
virtual void MakeControlPoints();
|
||||
virtual void DeleteControlPoints(wxDC *dc = NULL);
|
||||
virtual void ResetControlPoints();
|
||||
|
||||
inline wxShapeEvtHandler *GetEventHandler() { return m_eventHandler; }
|
||||
inline void SetEventHandler(wxShapeEvtHandler *handler) { m_eventHandler = handler; }
|
||||
|
||||
// Mandatory control points, e.g. the divided line moving handles
|
||||
// should appear even if a child of the 'selected' image
|
||||
virtual void MakeMandatoryControlPoints();
|
||||
virtual void ResetMandatoryControlPoints();
|
||||
|
||||
inline virtual bool Recompute() { return TRUE; };
|
||||
// Calculate size recursively, if size changes. Size might depend on children.
|
||||
inline virtual void CalculateSize() { };
|
||||
virtual void Select(bool select = TRUE, wxDC* dc = NULL);
|
||||
virtual void SetHighlight(bool hi = TRUE, bool recurse = FALSE);
|
||||
inline virtual bool IsHighlighted() const { return m_highlighted; };
|
||||
virtual bool Selected() const;
|
||||
virtual bool AncestorSelected() const;
|
||||
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = FALSE);
|
||||
int GetSensitivityFilter() const { return m_sensitivity; }
|
||||
void SetDraggable(bool drag, bool recursive = FALSE);
|
||||
inline void SetFixedSize(bool x, bool y) { m_fixedWidth = x; m_fixedHeight = y; };
|
||||
inline void GetFixedSize(bool *x, bool *y) const { *x = m_fixedWidth; *y = m_fixedHeight; };
|
||||
inline bool GetFixedWidth() const { return m_fixedWidth; }
|
||||
inline bool GetFixedHeight() const { return m_fixedHeight; }
|
||||
inline void SetSpaceAttachments(bool sp) { m_spaceAttachments = sp; };
|
||||
inline bool GetSpaceAttachments() const { return m_spaceAttachments; };
|
||||
void SetShadowMode(int mode, bool redraw = FALSE);
|
||||
inline int GetShadowMode() const { return m_shadowMode; }
|
||||
virtual bool HitTest(double x, double y, int *attachment, double *distance);
|
||||
inline void SetCentreResize(bool cr) { m_centreResize = cr; }
|
||||
inline bool GetCentreResize() const { return m_centreResize; }
|
||||
inline void SetMaintainAspectRatio(bool ar) { m_maintainAspectRatio = ar; }
|
||||
inline bool GetMaintainAspectRatio() const { return m_maintainAspectRatio; }
|
||||
inline wxList& GetLines() const { return (wxList&) m_lines; }
|
||||
inline void SetDisableLabel(bool flag) { m_disableLabel = flag; }
|
||||
inline bool GetDisableLabel() const { return m_disableLabel; }
|
||||
inline void SetAttachmentMode(int mode) { m_attachmentMode = mode; }
|
||||
inline int GetAttachmentMode() const { return m_attachmentMode; }
|
||||
inline void SetId(long i) { m_id = i; }
|
||||
inline long GetId() const { return m_id; }
|
||||
|
||||
void SetPen(wxPen *pen);
|
||||
void SetBrush(wxBrush *brush);
|
||||
inline void SetClientData(wxObject *client_data) { m_clientData = client_data; };
|
||||
inline wxObject *GetClientData() const { return m_clientData; };
|
||||
|
||||
virtual void Show(bool show);
|
||||
virtual bool IsShown() const { return m_visible; }
|
||||
virtual void Move(wxDC& dc, double x1, double y1, bool display = TRUE);
|
||||
virtual void Erase(wxDC& dc);
|
||||
virtual void EraseContents(wxDC& dc);
|
||||
virtual void Draw(wxDC& dc);
|
||||
virtual void Flash();
|
||||
virtual void MoveLinks(wxDC& dc);
|
||||
virtual void DrawContents(wxDC& dc); // E.g. for drawing text label
|
||||
virtual void SetSize(double x, double y, bool recursive = TRUE);
|
||||
virtual void SetAttachmentSize(double x, double y);
|
||||
void Attach(wxShapeCanvas *can);
|
||||
void Detach();
|
||||
|
||||
inline virtual bool Constrain() { return FALSE; } ;
|
||||
|
||||
void AddLine(wxLineShape *line, wxShape *other,
|
||||
int attachFrom = 0, int attachTo = 0,
|
||||
// The line ordering
|
||||
int positionFrom = -1, int positionTo = -1);
|
||||
|
||||
// Return the zero-based position in m_lines of line.
|
||||
int GetLinePosition(wxLineShape* line);
|
||||
|
||||
void AddText(const wxString& string);
|
||||
|
||||
inline wxPen *GetPen() const { return m_pen; }
|
||||
inline wxBrush *GetBrush() const { return m_brush; }
|
||||
|
||||
/*
|
||||
* Region-specific functions (defaults to the default region
|
||||
* for simple objects
|
||||
*/
|
||||
|
||||
// Set the default, single region size to be consistent
|
||||
// with the object size
|
||||
void SetDefaultRegionSize();
|
||||
virtual void FormatText(wxDC& dc, const wxString& s, int regionId = 0);
|
||||
virtual void SetFormatMode(int mode, int regionId = 0);
|
||||
virtual int GetFormatMode(int regionId = 0) const;
|
||||
virtual void SetFont(wxFont *font, int regionId = 0);
|
||||
virtual wxFont *GetFont(int regionId = 0) const;
|
||||
virtual void SetTextColour(const wxString& colour, int regionId = 0);
|
||||
virtual wxString GetTextColour(int regionId = 0) const;
|
||||
virtual inline int GetNumberOfTextRegions() const { return m_regions.Number(); }
|
||||
virtual void SetRegionName(const wxString& name, int regionId = 0);
|
||||
|
||||
// Get the name representing the region for this image alone.
|
||||
// I.e. this image's region ids go from 0 to N-1.
|
||||
// But the names might be "0.2.0", "0.2.1" etc. depending on position in composite.
|
||||
// So the last digit represents the region Id, the others represent positions
|
||||
// in composites.
|
||||
virtual wxString GetRegionName(int regionId);
|
||||
|
||||
// Gets the region corresponding to the name, or -1 if not found.
|
||||
virtual int GetRegionId(const wxString& name);
|
||||
|
||||
// Construct names for regions, unique even for children of a composite.
|
||||
virtual void NameRegions(const wxString& parentName = "");
|
||||
|
||||
// Get list of regions
|
||||
inline wxList& GetRegions() const { return (wxList&) m_regions; }
|
||||
|
||||
virtual void AddRegion(wxShapeRegion *region);
|
||||
|
||||
virtual void ClearRegions();
|
||||
|
||||
// Assign new ids to this image and children (if composite)
|
||||
void AssignNewIds();
|
||||
|
||||
// Returns actual image (same as 'this' if non-composite) and region id
|
||||
// for given region name.
|
||||
virtual wxShape *FindRegion(const wxString& regionName, int *regionId);
|
||||
|
||||
// Finds all region names for this image (composite or simple).
|
||||
// Supply empty string list.
|
||||
virtual void FindRegionNames(wxStringList& list);
|
||||
|
||||
virtual void ClearText(int regionId = 0);
|
||||
void RemoveLine(wxLineShape *line);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
// I/O
|
||||
virtual void WriteAttributes(wxExpr *clause);
|
||||
virtual void ReadAttributes(wxExpr *clause);
|
||||
|
||||
// In case the object has constraints it needs to read in in a different pass
|
||||
inline virtual void ReadConstraints(wxExpr *WXUNUSED(clause), wxExprDatabase *WXUNUSED(database)) { };
|
||||
virtual void WriteRegions(wxExpr *clause);
|
||||
virtual void ReadRegions(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
// Attachment code
|
||||
virtual bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
virtual int GetNumberOfAttachments() const;
|
||||
virtual bool AttachmentIsValid(int attachment) const;
|
||||
|
||||
// Only get the attachment position at the _edge_ of the shape, ignoring
|
||||
// branching mode. This is used e.g. to indicate the edge of interest, not the point
|
||||
// on the attachment branch.
|
||||
virtual bool GetAttachmentPositionEdge(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
|
||||
// Assuming the attachment lies along a vertical or horizontal line,
|
||||
// calculate the position on that point.
|
||||
virtual wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
|
||||
int nth, int noArcs, wxLineShape* line);
|
||||
|
||||
// Returns TRUE if pt1 <= pt2 in the sense that one point comes before another on an
|
||||
// edge of the shape.
|
||||
// attachmentPoint is the attachment point (= side) in question.
|
||||
virtual bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
|
||||
|
||||
virtual void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
|
||||
virtual void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
|
||||
|
||||
virtual bool MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
|
||||
double x, double y);
|
||||
|
||||
// Reorders the lines coming into the node image at this attachment
|
||||
// position, in the order in which they appear in linesToSort.
|
||||
virtual void SortLines(int attachment, wxList& linesToSort);
|
||||
|
||||
// Apply an attachment ordering change
|
||||
void ApplyAttachmentOrdering(wxList& ordering);
|
||||
|
||||
// Can override this to prevent or intercept line reordering.
|
||||
virtual void OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering);
|
||||
|
||||
//// New banching attachment code, 24/9/98
|
||||
|
||||
//
|
||||
// |________|
|
||||
// | <- root
|
||||
// | <- neck
|
||||
// shoulder1 ->---------<- shoulder2
|
||||
// | | | | |<- stem
|
||||
// <- branching attachment point N-1
|
||||
|
||||
// This function gets the root point at the given attachment.
|
||||
virtual wxRealPoint GetBranchingAttachmentRoot(int attachment);
|
||||
|
||||
// This function gets information about where branching connections go (calls GetBranchingAttachmentRoot)
|
||||
virtual bool GetBranchingAttachmentInfo(int attachment, wxRealPoint& root, wxRealPoint& neck,
|
||||
wxRealPoint& shoulder1, wxRealPoint& shoulder2);
|
||||
|
||||
// n is the number of the adjoining line, from 0 to N-1 where N is the number of lines
|
||||
// at this attachment point.
|
||||
// attachmentPoint is where the arc meets the stem, and stemPoint is where the stem meets the
|
||||
// shoulder.
|
||||
virtual bool GetBranchingAttachmentPoint(int attachment, int n, wxRealPoint& attachmentPoint,
|
||||
wxRealPoint& stemPoint);
|
||||
|
||||
// Get the number of lines at this attachment position.
|
||||
virtual int GetAttachmentLineCount(int attachment) const;
|
||||
|
||||
// Draw the branches (not the actual arcs though)
|
||||
virtual void OnDrawBranches(wxDC& dc, int attachment, bool erase = FALSE);
|
||||
virtual void OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
||||
|
||||
// Branching attachment settings
|
||||
inline void SetBranchNeckLength(int len) { m_branchNeckLength = len; }
|
||||
inline int GetBranchNeckLength() const { return m_branchNeckLength; }
|
||||
|
||||
inline void SetBranchStemLength(int len) { m_branchStemLength = len; }
|
||||
inline int GetBranchStemLength() const { return m_branchStemLength; }
|
||||
|
||||
inline void SetBranchSpacing(int len) { m_branchSpacing = len; }
|
||||
inline int GetBranchSpacing() const { return m_branchSpacing; }
|
||||
|
||||
// Further detail on branching style, e.g. blobs on interconnections
|
||||
inline void SetBranchStyle(long style) { m_branchStyle = style; }
|
||||
inline long GetBranchStyle() const { return m_branchStyle; }
|
||||
|
||||
// Rotate the standard attachment point from physical (0 is always North)
|
||||
// to logical (0 -> 1 if rotated by 90 degrees)
|
||||
virtual int PhysicalToLogicalAttachment(int physicalAttachment) const;
|
||||
|
||||
// Rotate the standard attachment point from logical
|
||||
// to physical (0 is always North)
|
||||
virtual int LogicalToPhysicalAttachment(int logicalAttachment) const;
|
||||
|
||||
// This is really to distinguish between lines and other images.
|
||||
// For lines, want to pass drag to canvas, since lines tend to prevent
|
||||
// dragging on a canvas (they get in the way.)
|
||||
virtual bool Draggable() const { return TRUE; }
|
||||
|
||||
// Returns TRUE if image is a descendant of this image
|
||||
bool HasDescendant(wxShape *image);
|
||||
|
||||
// Creates a copy of this shape.
|
||||
wxShape *CreateNewCopy(bool resetMapping = TRUE, bool recompute = TRUE);
|
||||
|
||||
// Does the copying for this object
|
||||
virtual void Copy(wxShape& copy);
|
||||
|
||||
// Does the copying for this object, including copying event
|
||||
// handler data if any. Calls the virtual Copy function.
|
||||
void CopyWithHandler(wxShape& copy);
|
||||
|
||||
// Rotate about the given axis by the given amount in radians.
|
||||
virtual void Rotate(double x, double y, double theta);
|
||||
virtual inline double GetRotation() const { return m_rotation; }
|
||||
|
||||
void ClearAttachments();
|
||||
|
||||
// Recentres all the text regions for this object
|
||||
void Recentre(wxDC& dc);
|
||||
|
||||
// Clears points from a list of wxRealPoints
|
||||
void ClearPointList(wxList& list);
|
||||
|
||||
private:
|
||||
wxObject* m_clientData;
|
||||
|
||||
protected:
|
||||
wxShapeEvtHandler* m_eventHandler;
|
||||
bool m_formatted;
|
||||
double m_xpos, m_ypos;
|
||||
wxPen* m_pen;
|
||||
wxBrush* m_brush;
|
||||
wxFont* m_font;
|
||||
wxColour* m_textColour;
|
||||
wxString m_textColourName;
|
||||
wxShapeCanvas* m_canvas;
|
||||
wxList m_lines;
|
||||
wxList m_text;
|
||||
wxList m_controlPoints;
|
||||
wxList m_regions;
|
||||
wxList m_attachmentPoints;
|
||||
bool m_visible;
|
||||
bool m_disableLabel;
|
||||
long m_id;
|
||||
bool m_selected;
|
||||
bool m_highlighted; // Different from selected: user-defined highlighting,
|
||||
// e.g. thick border.
|
||||
double m_rotation;
|
||||
int m_sensitivity;
|
||||
bool m_draggable;
|
||||
int m_attachmentMode; // 0 for no attachments, 1 if using normal attachments,
|
||||
// 2 for branching attachments
|
||||
bool m_spaceAttachments; // TRUE if lines at one side should be spaced
|
||||
bool m_fixedWidth;
|
||||
bool m_fixedHeight;
|
||||
bool m_centreResize; // Default is to resize keeping the centre constant (TRUE)
|
||||
bool m_drawHandles; // Don't draw handles if FALSE, usually TRUE
|
||||
wxList m_children; // In case it's composite
|
||||
wxShape* m_parent; // In case it's a child
|
||||
int m_formatMode;
|
||||
int m_shadowMode;
|
||||
wxBrush* m_shadowBrush;
|
||||
int m_shadowOffsetX;
|
||||
int m_shadowOffsetY;
|
||||
int m_textMarginX; // Gap between text and border
|
||||
int m_textMarginY;
|
||||
wxString m_regionName;
|
||||
bool m_maintainAspectRatio;
|
||||
int m_branchNeckLength;
|
||||
int m_branchStemLength;
|
||||
int m_branchSpacing;
|
||||
long m_branchStyle;
|
||||
};
|
||||
|
||||
class wxPolygonShape: public wxShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPolygonShape)
|
||||
public:
|
||||
wxPolygonShape();
|
||||
~wxPolygonShape();
|
||||
|
||||
// Takes a list of wxRealPoints; each point is an OFFSET from the centre.
|
||||
// Deletes user's points in destructor.
|
||||
virtual void Create(wxList *points);
|
||||
virtual void ClearPoints();
|
||||
|
||||
void GetBoundingBoxMin(double *w, double *h);
|
||||
void CalculateBoundingBox();
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
bool HitTest(double x, double y, int *attachment, double *distance);
|
||||
void SetSize(double x, double y, bool recursive = TRUE);
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||
|
||||
// Control points ('handles') redirect control to the actual shape, to make it easier
|
||||
// to override sizing behaviour.
|
||||
virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
// A polygon should have a control point at each vertex,
|
||||
// with the option of moving the control points individually
|
||||
// to change the shape.
|
||||
void MakeControlPoints();
|
||||
void ResetControlPoints();
|
||||
|
||||
// If we've changed the shape, must make the original
|
||||
// points match the working points
|
||||
void UpdateOriginalPoints();
|
||||
|
||||
// Add a control point after the given point
|
||||
virtual void AddPolygonPoint(int pos = 0);
|
||||
|
||||
// Delete a control point
|
||||
virtual void DeletePolygonPoint(int pos = 0);
|
||||
|
||||
// Recalculates the centre of the polygon
|
||||
virtual void CalculatePolygonCentre();
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
int GetNumberOfAttachments() const;
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
bool AttachmentIsValid(int attachment);
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
inline wxList *GetPoints() { return m_points; }
|
||||
|
||||
// Rotate about the given axis by the given amount in radians
|
||||
virtual void Rotate(double x, double y, double theta);
|
||||
|
||||
private:
|
||||
wxList* m_points;
|
||||
wxList* m_originalPoints;
|
||||
double m_boundWidth;
|
||||
double m_boundHeight;
|
||||
double m_originalWidth;
|
||||
double m_originalHeight;
|
||||
};
|
||||
|
||||
class wxRectangleShape: public wxShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRectangleShape)
|
||||
public:
|
||||
wxRectangleShape(double w = 0.0, double h = 0.0);
|
||||
void GetBoundingBoxMin(double *w, double *h);
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
void OnDraw(wxDC& dc);
|
||||
void SetSize(double x, double y, bool recursive = TRUE);
|
||||
void SetCornerRadius(double rad); // If > 0, rounded corners
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
int GetNumberOfAttachments() const;
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
inline double GetWidth() const { return m_width; }
|
||||
inline double GetHeight() const { return m_height; }
|
||||
inline void SetWidth(double w) { m_width = w; }
|
||||
inline void SetHeight(double h) { m_height = h; }
|
||||
|
||||
protected:
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_cornerRadius;
|
||||
};
|
||||
|
||||
class wxTextShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTextShape)
|
||||
public:
|
||||
wxTextShape(double width = 0.0, double height = 0.0);
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
};
|
||||
|
||||
class wxEllipseShape: public wxShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxEllipseShape)
|
||||
public:
|
||||
wxEllipseShape(double w = 0.0, double h = 0.0);
|
||||
|
||||
void GetBoundingBoxMin(double *w, double *h);
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void SetSize(double x, double y, bool recursive = TRUE);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
int GetNumberOfAttachments() const;
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
inline double GetWidth() const { return m_width; }
|
||||
inline double GetHeight() const { return m_height; }
|
||||
|
||||
inline void SetWidth(double w) { m_width = w; }
|
||||
inline void SetHeight(double h) { m_height = h; }
|
||||
|
||||
protected:
|
||||
double m_width;
|
||||
double m_height;
|
||||
};
|
||||
|
||||
class wxCircleShape: public wxEllipseShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCircleShape)
|
||||
public:
|
||||
wxCircleShape(double w = 0.0);
|
||||
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_BASIC_H_
|
@@ -1,223 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: basicp.h
|
||||
// Purpose: Private OGL classes and definitions
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_BASICP_H_
|
||||
#define _OGL_BASICP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "basicp.h"
|
||||
#endif
|
||||
|
||||
#define CONTROL_POINT_SIZE 6
|
||||
|
||||
class wxShapeTextLine: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxShapeTextLine)
|
||||
public:
|
||||
wxShapeTextLine(double the_x = 0.0, double the_y = 0.0, const wxString& the_line = "");
|
||||
~wxShapeTextLine();
|
||||
|
||||
inline double GetX() const { return m_x; }
|
||||
inline double GetY() const { return m_y; }
|
||||
|
||||
inline void SetX(double x) { m_x = x; }
|
||||
inline void SetY(double y) { m_y = y; }
|
||||
|
||||
inline void SetText(const wxString& text) { m_line = text; }
|
||||
inline wxString GetText() const { return m_line; }
|
||||
|
||||
protected:
|
||||
wxString m_line;
|
||||
double m_x;
|
||||
double m_y;
|
||||
};
|
||||
|
||||
class wxShape;
|
||||
class wxControlPoint: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxControlPoint)
|
||||
|
||||
friend class wxShapeEvtHandler;
|
||||
friend class wxShape;
|
||||
|
||||
public:
|
||||
wxControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, double the_xoffset = 0.0,
|
||||
double the_yoffset = 0.0, int the_type = 0);
|
||||
~wxControlPoint();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnErase(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
int GetNumberOfAttachments() const;
|
||||
|
||||
inline void SetEraseObject(bool er) { m_eraseObject = er; }
|
||||
|
||||
public:
|
||||
int m_type;
|
||||
double m_xoffset;
|
||||
double m_yoffset;
|
||||
wxShape* m_shape;
|
||||
wxCursor* m_oldCursor;
|
||||
bool m_eraseObject; // If TRUE, erases object before dragging handle.
|
||||
|
||||
/*
|
||||
* Store original top-left, bottom-right coordinates
|
||||
* in case we're doing non-vertical resizing.
|
||||
*/
|
||||
static double sm_controlPointDragStartX;
|
||||
static double sm_controlPointDragStartY;
|
||||
static double sm_controlPointDragStartWidth;
|
||||
static double sm_controlPointDragStartHeight;
|
||||
static double sm_controlPointDragEndWidth;
|
||||
static double sm_controlPointDragEndHeight;
|
||||
static double sm_controlPointDragPosX;
|
||||
static double sm_controlPointDragPosY;
|
||||
};
|
||||
|
||||
class wxPolygonShape;
|
||||
class wxPolygonControlPoint: public wxControlPoint
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPolygonControlPoint)
|
||||
friend class wxPolygonShape;
|
||||
public:
|
||||
wxPolygonControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, wxRealPoint *vertex = NULL,
|
||||
double the_xoffset = 0.0, double the_yoffset = 0.0);
|
||||
~wxPolygonControlPoint();
|
||||
|
||||
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
// Calculate what new size would be, at end of resize
|
||||
virtual void CalculateNewSize(double x, double y);
|
||||
|
||||
// Get new size
|
||||
inline wxRealPoint GetNewSize() const { return m_newSize; };
|
||||
|
||||
public:
|
||||
wxRealPoint* m_polygonVertex;
|
||||
wxRealPoint m_originalSize;
|
||||
double m_originalDistance;
|
||||
wxRealPoint m_newSize;
|
||||
};
|
||||
|
||||
/*
|
||||
* Object regions.
|
||||
* Every shape has one or more text regions with various
|
||||
* properties. Not all of a region's properties will be used
|
||||
* by a shape.
|
||||
*
|
||||
*/
|
||||
|
||||
class wxShapeRegion: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxShapeRegion)
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
wxShapeRegion();
|
||||
// Copy constructor
|
||||
wxShapeRegion(wxShapeRegion& region);
|
||||
// Destructor
|
||||
~wxShapeRegion();
|
||||
|
||||
// Accessors
|
||||
inline void SetText(const wxString& s) { m_regionText = s; }
|
||||
void SetFont(wxFont *f);
|
||||
void SetMinSize(double w, double h);
|
||||
void SetSize(double w, double h);
|
||||
void SetPosition(double x, double y);
|
||||
void SetProportions(double x, double y);
|
||||
void SetFormatMode(int mode);
|
||||
inline void SetName(const wxString& s) { m_regionName = s; };
|
||||
void SetColour(const wxString& col); // Text colour
|
||||
|
||||
inline wxString GetText() const { return m_regionText; }
|
||||
inline wxFont *GetFont() const { return m_font; }
|
||||
inline void GetMinSize(double *x, double *y) const { *x = m_minWidth; *y = m_minHeight; }
|
||||
inline void GetProportion(double *x, double *y) const { *x = m_regionProportionX; *y = m_regionProportionY; }
|
||||
inline void GetSize(double *x, double *y) const { *x = m_width; *y = m_height; }
|
||||
inline void GetPosition(double *xp, double *yp) const { *xp = m_x; *yp = m_y; }
|
||||
inline int GetFormatMode() const { return m_formatMode; }
|
||||
inline wxString GetName() const { return m_regionName; }
|
||||
inline wxString GetColour() const { return m_textColour; }
|
||||
wxColour *GetActualColourObject();
|
||||
inline wxList& GetFormattedText() { return m_formattedText; }
|
||||
inline wxString GetPenColour() const { return m_penColour; }
|
||||
inline int GetPenStyle() const { return m_penStyle; }
|
||||
inline void SetPenStyle(int style) { m_penStyle = style; m_actualPenObject = NULL; }
|
||||
void SetPenColour(const wxString& col);
|
||||
wxPen *GetActualPen();
|
||||
inline double GetWidth() const { return m_width; }
|
||||
inline double GetHeight() const { return m_height; }
|
||||
|
||||
void ClearText();
|
||||
|
||||
public:
|
||||
wxString m_regionText;
|
||||
wxList m_formattedText; // List of wxShapeTextLines
|
||||
wxFont* m_font;
|
||||
double m_minHeight; // If zero, hide region.
|
||||
double m_minWidth; // If zero, hide region.
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_x;
|
||||
double m_y;
|
||||
|
||||
double m_regionProportionX; // Proportion of total object size;
|
||||
// -1.0 indicates equal proportion
|
||||
double m_regionProportionY; // Proportion of total object size;
|
||||
// -1.0 indicates equal proportion
|
||||
|
||||
int m_formatMode; // FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT | FORMAT_NONE
|
||||
wxString m_regionName;
|
||||
wxString m_textColour;
|
||||
wxColour* m_actualColourObject; // For speed purposes
|
||||
|
||||
// New members for specifying divided rectangle division colour/style 30/6/94
|
||||
wxString m_penColour;
|
||||
int m_penStyle;
|
||||
wxPen* m_actualPenObject;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* User-defined attachment point
|
||||
*/
|
||||
|
||||
class wxAttachmentPoint: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxAttachmentPoint)
|
||||
|
||||
public:
|
||||
inline wxAttachmentPoint()
|
||||
{
|
||||
m_id = 0; m_x = 0.0; m_y = 0.0;
|
||||
}
|
||||
inline wxAttachmentPoint(int id, double x, double y)
|
||||
{
|
||||
m_id = id; m_x = x; m_y = y;
|
||||
}
|
||||
|
||||
public:
|
||||
int m_id; // Identifier
|
||||
double m_x; // x offset from centre of object
|
||||
double m_y; // y offset from centre of object
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_BASICP_H_
|
@@ -1,53 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpshape.h
|
||||
// Purpose: wxBitmapShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_BITMAP_H_
|
||||
#define _OGL_BITMAP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "bmpshape.h"
|
||||
#endif
|
||||
|
||||
#include <wx/ogl/basic.h>
|
||||
|
||||
class wxBitmapShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapShape)
|
||||
public:
|
||||
wxBitmapShape();
|
||||
~wxBitmapShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
// I/O
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
void SetSize(double w, double h, bool recursive = TRUE);
|
||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; }
|
||||
void SetBitmap(const wxBitmap& bm);
|
||||
inline void SetFilename(const wxString& f) { m_filename = f; };
|
||||
inline wxString GetFilename() const { return m_filename; }
|
||||
|
||||
private:
|
||||
wxBitmap m_bitmap;
|
||||
wxString m_filename;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_BITMAP_H_
|
||||
|
||||
|
@@ -1,83 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: canvas.h
|
||||
// Purpose: wxShapeCanvas
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_CANVAS_H_
|
||||
#define _OGL_CANVAS_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "canvas.h"
|
||||
#endif
|
||||
|
||||
// Drag states
|
||||
#define NoDragging 0
|
||||
#define StartDraggingLeft 1
|
||||
#define ContinueDraggingLeft 2
|
||||
#define StartDraggingRight 3
|
||||
#define ContinueDraggingRight 4
|
||||
|
||||
// When drag_count reaches 0, process drag message
|
||||
|
||||
class wxDiagram;
|
||||
|
||||
class wxShapeCanvas: public wxScrolledWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxShapeCanvas)
|
||||
public:
|
||||
wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER | wxRETAINED);
|
||||
~wxShapeCanvas();
|
||||
|
||||
inline void SetDiagram(wxDiagram *diag) { m_shapeDiagram = diag; }
|
||||
inline wxDiagram *GetDiagram() const { return m_shapeDiagram; }
|
||||
|
||||
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);
|
||||
|
||||
// Find object for mouse click, of given wxClassInfo (NULL for any type).
|
||||
// If notImage is non-NULL, don't find an object that is equal to or a descendant of notImage
|
||||
virtual wxShape *FindShape(double x, double y, int *attachment, wxClassInfo *info = NULL, wxShape *notImage = NULL);
|
||||
wxShape *FindFirstSensitiveShape(double x, double y, int *new_attachment, int op);
|
||||
wxShape *FindFirstSensitiveShape1(wxShape *image, int op);
|
||||
|
||||
// Redirect to wxDiagram object
|
||||
virtual void AddShape(wxShape *object, wxShape *addAfter = NULL);
|
||||
virtual void InsertShape(wxShape *object);
|
||||
virtual void RemoveShape(wxShape *object);
|
||||
virtual bool GetQuickEditMode();
|
||||
virtual void Redraw(wxDC& dc);
|
||||
void Snap(double *x, double *y);
|
||||
|
||||
// Events
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
|
||||
protected:
|
||||
wxDiagram* m_shapeDiagram;
|
||||
int m_dragState;
|
||||
double m_oldDragX, m_oldDragY; // Previous drag coordinates
|
||||
double m_firstDragX, m_firstDragY; // INITIAL drag coordinates
|
||||
bool m_checkTolerance; // Whether to check drag tolerance
|
||||
wxShape* m_draggedShape;
|
||||
int m_draggedAttachment;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_CANVAS_H_
|
@@ -1,238 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: composit.h
|
||||
// Purpose: wxCompositeShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_COMPOSIT_H_
|
||||
#define _OGL_COMPOSIT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "composit.h"
|
||||
#endif
|
||||
|
||||
class wxDivisionShape;
|
||||
class wxOGLConstraint;
|
||||
|
||||
/*
|
||||
* A composite object is an invisible rectangle surrounding all children
|
||||
*
|
||||
*/
|
||||
|
||||
class wxCompositeShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCompositeShape)
|
||||
public:
|
||||
|
||||
wxCompositeShape();
|
||||
~wxCompositeShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
void OnErase(wxDC& dc);
|
||||
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE);
|
||||
void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys, int attachment = 0);
|
||||
|
||||
void OnRightClick(double x, double y, int keys, int attachment = 0);
|
||||
|
||||
void SetSize(double w, double h, bool recursive = TRUE);
|
||||
|
||||
// Returns TRUE if it settled down
|
||||
bool Recompute();
|
||||
|
||||
// New members
|
||||
void AddChild(wxShape *child, wxShape *addAfter = NULL);
|
||||
void RemoveChild(wxShape *child);
|
||||
|
||||
wxOGLConstraint *AddConstraint(wxOGLConstraint *constraint);
|
||||
wxOGLConstraint *AddConstraint(int type, wxShape *constraining, wxList& constrained);
|
||||
wxOGLConstraint *AddConstraint(int type, wxShape *constraining, wxShape *constrained);
|
||||
|
||||
void DeleteConstraint(wxOGLConstraint *constraint);
|
||||
|
||||
// Delete constraints that involve this child.
|
||||
void DeleteConstraintsInvolvingChild(wxShape *child);
|
||||
|
||||
// Remove the image from any constraints involving it, but DON'T
|
||||
// remove any constraints.
|
||||
void RemoveChildFromConstraints(wxShape *child);
|
||||
|
||||
// Find constraint, also returning actual composite the constraint was in,
|
||||
// in case it had to find it recursively.
|
||||
wxOGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL);
|
||||
|
||||
// Returns TRUE if something changed
|
||||
bool Constrain();
|
||||
|
||||
// Make this composite into a container by creating one wxDivisionShape
|
||||
void MakeContainer();
|
||||
|
||||
// Calculates size and position of composite object based on children
|
||||
void CalculateSize();
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
// In case the object has constraints it needs to read in in a different pass
|
||||
void ReadConstraints(wxExpr *clause, wxExprDatabase *database);
|
||||
#endif
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
virtual wxDivisionShape *OnCreateDivision();
|
||||
|
||||
// Finds the image used to visualize a container. This is any child
|
||||
// of the composite that is not in the divisions list.
|
||||
wxShape *FindContainerImage();
|
||||
|
||||
// Returns TRUE if division is a descendant of this container
|
||||
bool ContainsDivision(wxDivisionShape *division);
|
||||
|
||||
inline wxList& GetDivisions() const { return (wxList&) m_divisions; }
|
||||
inline wxList& GetConstraints() const { return (wxList&) m_constraints; }
|
||||
|
||||
protected:
|
||||
double m_oldX;
|
||||
double m_oldY;
|
||||
wxList m_constraints;
|
||||
wxList m_divisions; // In case it's a container
|
||||
};
|
||||
|
||||
/*
|
||||
* A division object is a composite with special properties,
|
||||
* to be used for containment. It's a subdivision of a container.
|
||||
* A containing node image consists of a composite with a main child shape
|
||||
* such as rounded rectangle, plus a list of division objects.
|
||||
* It needs to be a composite because a division contains pieces
|
||||
* of diagram.
|
||||
* NOTE a container has at least one wxDivisionShape for consistency.
|
||||
* This can be subdivided, so it turns into two objects, then each of
|
||||
* these can be subdivided, etc.
|
||||
*/
|
||||
#define DIVISION_SIDE_NONE 0
|
||||
#define DIVISION_SIDE_LEFT 1
|
||||
#define DIVISION_SIDE_TOP 2
|
||||
#define DIVISION_SIDE_RIGHT 3
|
||||
#define DIVISION_SIDE_BOTTOM 4
|
||||
|
||||
class wxDivisionShape: public wxCompositeShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDivisionShape)
|
||||
public:
|
||||
|
||||
wxDivisionShape();
|
||||
~wxDivisionShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE);
|
||||
void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys, int attachment = 0);
|
||||
|
||||
void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
|
||||
// Don't want this kind of composite to resize its subdiagrams, so
|
||||
// override composite's SetSize.
|
||||
void SetSize(double w, double h, bool recursive = TRUE);
|
||||
|
||||
// Similarly for calculating size: it's fixed at whatever SetSize
|
||||
// set it to, not in terms of children.
|
||||
void CalculateSize();
|
||||
|
||||
void MakeControlPoints();
|
||||
void ResetControlPoints();
|
||||
void MakeMandatoryControlPoints();
|
||||
void ResetMandatoryControlPoints();
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
// Divide horizontally (wxHORIZONTAL) or vertically (wxVERTICAL)
|
||||
bool Divide(int direction);
|
||||
|
||||
// Resize adjoining divisions at the given side. If test is TRUE,
|
||||
// just see whether it's possible for each adjoining region,
|
||||
// returning FALSE if it's not.
|
||||
bool ResizeAdjoining(int side, double newPos, bool test);
|
||||
|
||||
// Adjust a side, returning FALSE if it's not physically possible.
|
||||
bool AdjustLeft(double left, bool test);
|
||||
bool AdjustTop(double top, bool test);
|
||||
bool AdjustRight(double right, bool test);
|
||||
bool AdjustBottom(double bottom, bool test);
|
||||
|
||||
// Edit style of left or top side
|
||||
void EditEdge(int side);
|
||||
|
||||
// Popup menu
|
||||
void PopupMenu(double x, double y);
|
||||
|
||||
inline void SetLeftSide(wxDivisionShape *shape) { m_leftSide = shape; }
|
||||
inline void SetTopSide(wxDivisionShape *shape) { m_topSide = shape; }
|
||||
inline void SetRightSide(wxDivisionShape *shape) { m_rightSide = shape; }
|
||||
inline void SetBottomSide(wxDivisionShape *shape) { m_bottomSide = shape; }
|
||||
inline wxDivisionShape *GetLeftSide() const { return m_leftSide; }
|
||||
inline wxDivisionShape *GetTopSide() const { return m_topSide; }
|
||||
inline wxDivisionShape *GetRightSide() const { return m_rightSide; }
|
||||
inline wxDivisionShape *GetBottomSide() const { return m_bottomSide; }
|
||||
|
||||
inline void SetHandleSide(int side) { m_handleSide = side; }
|
||||
inline int GetHandleSide() const { return m_handleSide; }
|
||||
|
||||
inline void SetLeftSidePen(wxPen *pen) { m_leftSidePen = pen; }
|
||||
inline wxPen *GetLeftSidePen() const { return m_leftSidePen; }
|
||||
inline void SetTopSidePen(wxPen *pen) { m_topSidePen = pen; }
|
||||
inline wxPen *GetTopSidePen() const { return m_topSidePen; }
|
||||
|
||||
void SetLeftSideColour(const wxString& colour);
|
||||
void SetTopSideColour(const wxString& colour);
|
||||
void SetLeftSideStyle(const wxString& style);
|
||||
void SetTopSideStyle(const wxString& style);
|
||||
|
||||
inline wxString GetLeftSideColour() const { return m_leftSideColour; }
|
||||
inline wxString GetTopSideColour() const { return m_topSideColour; }
|
||||
inline wxString GetLeftSideStyle() const { return m_leftSideStyle; }
|
||||
inline wxString GetTopSideStyle() const { return m_topSideStyle; }
|
||||
|
||||
protected:
|
||||
// Adjoining divisions. NULL indicates edge
|
||||
// of container, and that side shouldn't be
|
||||
// drawn.
|
||||
wxDivisionShape* m_leftSide;
|
||||
wxDivisionShape* m_rightSide;
|
||||
wxDivisionShape* m_topSide;
|
||||
wxDivisionShape* m_bottomSide;
|
||||
|
||||
int m_handleSide; // Side at which handle is legal
|
||||
|
||||
wxPen* m_leftSidePen;
|
||||
wxPen* m_topSidePen;
|
||||
wxString m_leftSideColour;
|
||||
wxString m_topSideColour;
|
||||
wxString m_leftSideStyle;
|
||||
wxString m_topSideStyle;
|
||||
};
|
||||
|
||||
|
||||
#define DIVISION_MENU_SPLIT_HORIZONTALLY 1
|
||||
#define DIVISION_MENU_SPLIT_VERTICALLY 2
|
||||
#define DIVISION_MENU_EDIT_LEFT_EDGE 3
|
||||
#define DIVISION_MENU_EDIT_TOP_EDGE 4
|
||||
#define DIVISION_MENU_EDIT_RIGHT_EDGE 5
|
||||
#define DIVISION_MENU_EDIT_BOTTOM_EDGE 6
|
||||
#define DIVISION_MENU_DELETE_ALL 7
|
||||
|
||||
#endif
|
||||
// _OGL_COMPOSIT_H_
|
@@ -1,87 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: constrnt.h
|
||||
// Purpose: OGL constraint definitions
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_CONSTRNT_H_
|
||||
#define _OGL_CONSTRNT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "constrnt.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* OGL Constraints
|
||||
*
|
||||
*/
|
||||
|
||||
class wxOGLConstraintType: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxOGLConstraintType)
|
||||
public:
|
||||
wxOGLConstraintType(int type = 0, const wxString& name = "", const wxString& phrase = "");
|
||||
~wxOGLConstraintType();
|
||||
|
||||
public:
|
||||
int m_type; // E.g. gyCONSTRAINT_CENTRED_VERTICALLY
|
||||
wxString m_name; // E.g. "Centre vertically"
|
||||
wxString m_phrase; // E.g. "centred vertically with respect to", "left of"
|
||||
|
||||
};
|
||||
|
||||
extern wxList* wxOGLConstraintTypes;
|
||||
|
||||
#define gyCONSTRAINT_CENTRED_VERTICALLY 1
|
||||
#define gyCONSTRAINT_CENTRED_HORIZONTALLY 2
|
||||
#define gyCONSTRAINT_CENTRED_BOTH 3
|
||||
#define gyCONSTRAINT_LEFT_OF 4
|
||||
#define gyCONSTRAINT_RIGHT_OF 5
|
||||
#define gyCONSTRAINT_ABOVE 6
|
||||
#define gyCONSTRAINT_BELOW 7
|
||||
#define gyCONSTRAINT_ALIGNED_TOP 8
|
||||
#define gyCONSTRAINT_ALIGNED_BOTTOM 9
|
||||
#define gyCONSTRAINT_ALIGNED_LEFT 10
|
||||
#define gyCONSTRAINT_ALIGNED_RIGHT 11
|
||||
|
||||
// Like aligned, but with the objects centred on the respective edge
|
||||
// of the reference object.
|
||||
#define gyCONSTRAINT_MIDALIGNED_TOP 12
|
||||
#define gyCONSTRAINT_MIDALIGNED_BOTTOM 13
|
||||
#define gyCONSTRAINT_MIDALIGNED_LEFT 14
|
||||
#define gyCONSTRAINT_MIDALIGNED_RIGHT 15
|
||||
|
||||
class wxOGLConstraint: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxOGLConstraint)
|
||||
public:
|
||||
wxOGLConstraint() { m_xSpacing = 0.0; m_ySpacing = 0.0; m_constraintType = 0; m_constraintName = ""; m_constraintId = 0;
|
||||
m_constrainingObject = NULL; }
|
||||
wxOGLConstraint(int type, wxShape *constraining, wxList& constrained);
|
||||
~wxOGLConstraint();
|
||||
|
||||
// Returns TRUE if anything changed
|
||||
bool Evaluate();
|
||||
inline void SetSpacing(double x, double y) { m_xSpacing = x; m_ySpacing = y; };
|
||||
bool Equals(double a, double b);
|
||||
|
||||
double m_xSpacing;
|
||||
double m_ySpacing;
|
||||
int m_constraintType;
|
||||
wxString m_constraintName;
|
||||
long m_constraintId;
|
||||
wxShape* m_constrainingObject;
|
||||
wxList m_constrainedObjects;
|
||||
|
||||
};
|
||||
|
||||
void OGLInitializeConstraintTypes();
|
||||
void OGLCleanUpConstraintTypes();
|
||||
|
||||
#endif
|
||||
// _OGL_CONSTRNT_H_
|
@@ -1,75 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: divided.h
|
||||
// Purpose: wxDividedShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_DIVIDED_H_
|
||||
#define _OGL_DIVIDED_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "basic.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definition of a region
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Box divided into horizontal regions
|
||||
*
|
||||
*/
|
||||
|
||||
extern wxFont *g_oglNormalFont;
|
||||
class wxDividedShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDividedShape)
|
||||
|
||||
public:
|
||||
wxDividedShape(double w = 0.0, double h = 0.0);
|
||||
~wxDividedShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
|
||||
void SetSize(double w, double h, bool recursive = TRUE);
|
||||
|
||||
void MakeControlPoints();
|
||||
void ResetControlPoints();
|
||||
|
||||
void MakeMandatoryControlPoints();
|
||||
void ResetMandatoryControlPoints();
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
void Copy(wxShape ©);
|
||||
|
||||
// Set all region sizes according to proportions and
|
||||
// this object total size
|
||||
void SetRegionSizes();
|
||||
|
||||
// Edit region colours/styles
|
||||
void EditRegions();
|
||||
|
||||
// Attachment points correspond to regions in the divided box
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||
bool AttachmentIsValid(int attachment);
|
||||
int GetNumberOfAttachments() const;
|
||||
|
||||
// Invoke editor on CTRL-right click
|
||||
void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_DIVIDED_H_
|
||||
|
@@ -1,227 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: drawn.h
|
||||
// Purpose: wxDrawnShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_DRAWN_H_
|
||||
#define _OGL_DRAWN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "drawn.h"
|
||||
#endif
|
||||
|
||||
#include <wx/ogl/basic.h>
|
||||
|
||||
#define oglMETAFLAGS_OUTLINE 1
|
||||
#define oglMETAFLAGS_ATTACHMENTS 2
|
||||
|
||||
class wxDrawnShape;
|
||||
class wxPseudoMetaFile: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPseudoMetaFile)
|
||||
public:
|
||||
wxPseudoMetaFile();
|
||||
wxPseudoMetaFile(wxPseudoMetaFile& mf);
|
||||
~wxPseudoMetaFile();
|
||||
|
||||
void Draw(wxDC& dc, double xoffset, double yoffset);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
void WriteAttributes(wxExpr *clause, int whichAngle);
|
||||
void ReadAttributes(wxExpr *clause, int whichAngle);
|
||||
#endif
|
||||
|
||||
void Clear();
|
||||
|
||||
void Copy(wxPseudoMetaFile& copy);
|
||||
|
||||
void Scale(double sx, double sy);
|
||||
void ScaleTo(double w, double h); // Scale to fit size
|
||||
void Translate(double x, double y);
|
||||
|
||||
// Rotate about the given axis by theta radians from the x axis.
|
||||
void Rotate(double x, double y, double theta);
|
||||
|
||||
bool LoadFromMetaFile(char *filename, double *width, double *height);
|
||||
|
||||
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
||||
|
||||
// Calculate size from current operations
|
||||
void CalculateSize(wxDrawnShape* shape);
|
||||
|
||||
inline wxList& GetOutlineColours() const { return (wxList&) m_outlineColours; }
|
||||
inline wxList& GetFillColours() const { return (wxList&) m_fillColours; }
|
||||
inline void SetRotateable(bool rot) { m_rotateable = rot; }
|
||||
inline bool GetRotateable() const { return m_rotateable; }
|
||||
|
||||
inline void SetSize(double w, double h) { m_width = w; m_height = h; }
|
||||
|
||||
inline void SetFillBrush(wxBrush* brush) { m_fillBrush = brush; }
|
||||
inline wxBrush* GetFillBrush() const { return m_fillBrush; }
|
||||
|
||||
inline void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; }
|
||||
inline wxPen* GetOutlinePen() const { return m_outlinePen; }
|
||||
|
||||
inline void SetOutlineOp(int op) { m_outlineOp = op; }
|
||||
inline int GetOutlineOp() const { return m_outlineOp; }
|
||||
|
||||
inline wxList& GetOps() const { return (wxList&) m_ops; }
|
||||
|
||||
// Is this a valid (non-empty) metafile?
|
||||
inline bool IsValid() const { return (m_ops.Number() > 0); }
|
||||
|
||||
public:
|
||||
/// Set of functions for drawing into a pseudo metafile.
|
||||
/// They use integers, but doubles are used internally for accuracy
|
||||
/// when scaling.
|
||||
|
||||
virtual void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
|
||||
virtual void DrawRectangle(const wxRect& rect);
|
||||
virtual void DrawRoundedRectangle(const wxRect& rect, double radius);
|
||||
virtual void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
|
||||
virtual void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
|
||||
virtual void DrawEllipse(const wxRect& rect);
|
||||
virtual void DrawPoint(const wxPoint& pt);
|
||||
virtual void DrawText(const wxString& text, const wxPoint& pt);
|
||||
virtual void DrawLines(int n, wxPoint pts[]);
|
||||
// flags:
|
||||
// oglMETAFLAGS_OUTLINE: will be used for drawing the outline and
|
||||
// also drawing lines/arrows at the circumference.
|
||||
// oglMETAFLAGS_ATTACHMENTS: will be used for initialising attachment points at
|
||||
// the vertices (perhaps a rare case...)
|
||||
virtual void DrawPolygon(int n, wxPoint pts[], int flags = 0);
|
||||
virtual void DrawSpline(int n, wxPoint pts[]);
|
||||
|
||||
virtual void SetClippingRect(const wxRect& rect);
|
||||
virtual void DestroyClippingRect();
|
||||
|
||||
virtual void SetPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc.
|
||||
virtual void SetFont(wxFont* font);
|
||||
virtual void SetTextColour(const wxColour& colour);
|
||||
virtual void SetBackgroundColour(const wxColour& colour);
|
||||
virtual void SetBackgroundMode(int mode);
|
||||
|
||||
public:
|
||||
bool m_rotateable;
|
||||
double m_width;
|
||||
double m_height;
|
||||
wxList m_ops; // List of drawing operations (see drawnp.h)
|
||||
wxList m_gdiObjects; // List of pens, brushes and fonts for this object.
|
||||
int m_outlineOp; // The op representing the outline, if any
|
||||
|
||||
// Pen/brush specifying outline/fill colours
|
||||
// to override operations.
|
||||
wxPen* m_outlinePen;
|
||||
wxBrush* m_fillBrush;
|
||||
wxList m_outlineColours; // List of the GDI operations that comprise the outline
|
||||
wxList m_fillColours; // List of the GDI operations that fill the shape
|
||||
double m_currentRotation;
|
||||
};
|
||||
|
||||
#define oglDRAWN_ANGLE_0 0
|
||||
#define oglDRAWN_ANGLE_90 1
|
||||
#define oglDRAWN_ANGLE_180 2
|
||||
#define oglDRAWN_ANGLE_270 3
|
||||
|
||||
class wxDrawnShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDrawnShape)
|
||||
public:
|
||||
wxDrawnShape();
|
||||
~wxDrawnShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
// I/O
|
||||
void WriteAttributes(wxExpr *clause);
|
||||
void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
void Scale(double sx, double sy);
|
||||
void Translate(double x, double y);
|
||||
// Rotate about the given axis by theta radians from the x axis.
|
||||
void Rotate(double x, double y, double theta);
|
||||
|
||||
// Get current rotation
|
||||
inline double GetRotation() const { return m_rotation; }
|
||||
|
||||
void SetSize(double w, double h, bool recursive = TRUE);
|
||||
bool LoadFromMetaFile(char *filename);
|
||||
|
||||
inline void SetSaveToFile(bool save) { m_saveToFile = save; }
|
||||
inline wxPseudoMetaFile& GetMetaFile(int which = 0) const { return (wxPseudoMetaFile&) m_metafiles[which]; }
|
||||
|
||||
void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||
|
||||
// Get the perimeter point using the special outline op, if there is one,
|
||||
// otherwise use default wxRectangleShape scheme
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3);
|
||||
|
||||
/// Set of functions for drawing into a pseudo metafile.
|
||||
/// They use integers, but doubles are used internally for accuracy
|
||||
/// when scaling.
|
||||
|
||||
virtual void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
|
||||
virtual void DrawRectangle(const wxRect& rect);
|
||||
virtual void DrawRoundedRectangle(const wxRect& rect, double radius);
|
||||
virtual void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
|
||||
virtual void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
|
||||
virtual void DrawEllipse(const wxRect& rect);
|
||||
virtual void DrawPoint(const wxPoint& pt);
|
||||
virtual void DrawText(const wxString& text, const wxPoint& pt);
|
||||
virtual void DrawLines(int n, wxPoint pts[]);
|
||||
virtual void DrawPolygon(int n, wxPoint pts[], int flags = 0);
|
||||
virtual void DrawSpline(int n, wxPoint pts[]);
|
||||
|
||||
virtual void SetClippingRect(const wxRect& rect);
|
||||
virtual void DestroyClippingRect();
|
||||
|
||||
virtual void SetDrawnPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetDrawnBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc.
|
||||
virtual void SetDrawnFont(wxFont* font);
|
||||
virtual void SetDrawnTextColour(const wxColour& colour);
|
||||
virtual void SetDrawnBackgroundColour(const wxColour& colour);
|
||||
virtual void SetDrawnBackgroundMode(int mode);
|
||||
|
||||
// Set the width/height according to the shapes in the metafile.
|
||||
// Call this after drawing into the shape.
|
||||
inline void CalculateSize() { m_metafiles[m_currentAngle].CalculateSize(this); }
|
||||
|
||||
inline void DrawAtAngle(int angle) { m_currentAngle = angle; };
|
||||
|
||||
inline int GetAngle() const { return m_currentAngle; }
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
// Which metafile do we use now? Based on current rotation and validity
|
||||
// of metafiles.
|
||||
int DetermineMetaFile(double rotation);
|
||||
|
||||
private:
|
||||
// One metafile for each 90 degree rotation (or just a single one).
|
||||
wxPseudoMetaFile m_metafiles[4];
|
||||
|
||||
// Don't save all wxDrawnShape metafiles to file: sometimes
|
||||
// we take the metafile data from a symbol library.
|
||||
bool m_saveToFile;
|
||||
|
||||
// Which angle are we using/drawing into?
|
||||
int m_currentAngle;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _DRAWN_H_
|
||||
|
@@ -1,205 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: drawnp.h
|
||||
// Purpose: Private header for wxDrawnShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_DRAWNP_H_
|
||||
#define _OGL_DRAWNP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "drawnp.h"
|
||||
#endif
|
||||
|
||||
#include <wx/ogl/drawn.h>
|
||||
|
||||
/*
|
||||
* Drawing operations
|
||||
*
|
||||
*/
|
||||
|
||||
#define DRAWOP_SET_PEN 1
|
||||
#define DRAWOP_SET_BRUSH 2
|
||||
#define DRAWOP_SET_FONT 3
|
||||
#define DRAWOP_SET_TEXT_COLOUR 4
|
||||
#define DRAWOP_SET_BK_COLOUR 5
|
||||
#define DRAWOP_SET_BK_MODE 6
|
||||
#define DRAWOP_SET_CLIPPING_RECT 7
|
||||
#define DRAWOP_DESTROY_CLIPPING_RECT 8
|
||||
|
||||
/*
|
||||
#define DRAWOP_CREATE_PEN 10
|
||||
#define DRAWOP_CREATE_BRUSH 11
|
||||
#define DRAWOP_CREATE_FONT 12
|
||||
*/
|
||||
|
||||
#define DRAWOP_DRAW_LINE 20
|
||||
#define DRAWOP_DRAW_POLYLINE 21
|
||||
#define DRAWOP_DRAW_POLYGON 22
|
||||
#define DRAWOP_DRAW_RECT 23
|
||||
#define DRAWOP_DRAW_ROUNDED_RECT 24
|
||||
#define DRAWOP_DRAW_ELLIPSE 25
|
||||
#define DRAWOP_DRAW_POINT 26
|
||||
#define DRAWOP_DRAW_ARC 27
|
||||
#define DRAWOP_DRAW_TEXT 28
|
||||
#define DRAWOP_DRAW_SPLINE 29
|
||||
#define DRAWOP_DRAW_ELLIPTIC_ARC 30
|
||||
|
||||
/*
|
||||
* Base, virtual class
|
||||
*
|
||||
*/
|
||||
|
||||
class wxDrawOp: public wxObject
|
||||
{
|
||||
public:
|
||||
inline wxDrawOp(int theOp) { m_op = theOp; }
|
||||
inline ~wxDrawOp() {}
|
||||
inline virtual void Scale(double xScale, double yScale) {};
|
||||
inline virtual void Translate(double x, double y) {};
|
||||
inline virtual void Rotate(double x, double y, double theta, double sinTheta, double cosTheta) {};
|
||||
virtual void Do(wxDC& dc, double xoffset, double yoffset) = 0;
|
||||
virtual wxDrawOp *Copy(wxPseudoMetaFile *newImage) = 0;
|
||||
virtual wxExpr *WriteExpr(wxPseudoMetaFile *image) = 0;
|
||||
virtual void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) = 0;
|
||||
|
||||
inline int GetOp() const { return m_op; }
|
||||
|
||||
// Draw an outline using the current operation. By default, return FALSE (not drawn)
|
||||
virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h,
|
||||
double oldW, double oldH) { return FALSE; }
|
||||
|
||||
// Get the perimeter point using this data
|
||||
virtual bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3,
|
||||
double xOffset, double yOffset,
|
||||
int attachmentMode)
|
||||
{ return FALSE; }
|
||||
|
||||
protected:
|
||||
int m_op;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Set font, brush, text colour
|
||||
*
|
||||
*/
|
||||
|
||||
class wxOpSetGDI: public wxDrawOp
|
||||
{
|
||||
public:
|
||||
wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0);
|
||||
void Do(wxDC& dc, double xoffset, double yoffset);
|
||||
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
|
||||
wxExpr *WriteExpr(wxPseudoMetaFile *image);
|
||||
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
|
||||
|
||||
public:
|
||||
int m_mode;
|
||||
int m_gdiIndex;
|
||||
wxPseudoMetaFile* m_image;
|
||||
unsigned char m_r;
|
||||
unsigned char m_g;
|
||||
unsigned char m_b;
|
||||
};
|
||||
|
||||
/*
|
||||
* Set/destroy clipping
|
||||
*
|
||||
*/
|
||||
|
||||
class wxOpSetClipping: public wxDrawOp
|
||||
{
|
||||
public:
|
||||
wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2);
|
||||
void Do(wxDC& dc, double xoffset, double yoffset);
|
||||
void Scale(double xScale, double yScale);
|
||||
void Translate(double x, double y);
|
||||
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
|
||||
wxExpr *WriteExpr(wxPseudoMetaFile *image);
|
||||
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
|
||||
|
||||
public:
|
||||
double m_x1;
|
||||
double m_y1;
|
||||
double m_x2;
|
||||
double m_y2;
|
||||
};
|
||||
|
||||
/*
|
||||
* Draw line, rectangle, rounded rectangle, ellipse, point, arc, text
|
||||
*
|
||||
*/
|
||||
|
||||
class wxOpDraw: public wxDrawOp
|
||||
{
|
||||
public:
|
||||
wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2,
|
||||
double radius = 0.0, char *s = NULL);
|
||||
~wxOpDraw();
|
||||
void Do(wxDC& dc, double xoffset, double yoffset);
|
||||
void Scale(double scaleX, double scaleY);
|
||||
void Translate(double x, double y);
|
||||
void Rotate(double x, double y, double theta, double sinTheta, double cosTheta);
|
||||
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
|
||||
wxExpr *WriteExpr(wxPseudoMetaFile *image);
|
||||
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
|
||||
|
||||
public:
|
||||
double m_x1;
|
||||
double m_y1;
|
||||
double m_x2;
|
||||
double m_y2;
|
||||
double m_x3;
|
||||
double m_y3;
|
||||
double m_radius;
|
||||
char* m_textString;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Draw polyline, spline, polygon
|
||||
*
|
||||
*/
|
||||
|
||||
class wxOpPolyDraw: public wxDrawOp
|
||||
{
|
||||
public:
|
||||
wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints);
|
||||
~wxOpPolyDraw();
|
||||
void Do(wxDC& dc, double xoffset, double yoffset);
|
||||
void Scale(double scaleX, double scaleY);
|
||||
void Translate(double x, double y);
|
||||
void Rotate(double x, double y, double theta, double sinTheta, double cosTheta);
|
||||
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
|
||||
wxExpr *WriteExpr(wxPseudoMetaFile *image);
|
||||
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
|
||||
|
||||
// Draw an outline using the current operation.
|
||||
virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h,
|
||||
double oldW, double oldH);
|
||||
|
||||
// Get the perimeter point using this data
|
||||
bool GetPerimeterPoint(double x1, double y1,
|
||||
double x2, double y2,
|
||||
double *x3, double *y3,
|
||||
double xOffset, double yOffset,
|
||||
int attachmentMode);
|
||||
|
||||
public:
|
||||
wxRealPoint* m_points;
|
||||
int m_noPoints;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_DRAWNP_H_
|
||||
|
||||
|
@@ -1,296 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: lines.h
|
||||
// Purpose: wxLineShape
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_LINES_H_
|
||||
#define _OGL_LINES_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "lines.h"
|
||||
#endif
|
||||
|
||||
class wxLabelShape;
|
||||
class wxPseudoMetaFile;
|
||||
class wxLineControlPoint;
|
||||
/*
|
||||
* Arcs with multiple arrowheads
|
||||
*
|
||||
*/
|
||||
|
||||
// Types of arrowhead
|
||||
// (i) Built-in
|
||||
#define ARROW_HOLLOW_CIRCLE 1
|
||||
#define ARROW_FILLED_CIRCLE 2
|
||||
#define ARROW_ARROW 3
|
||||
#define ARROW_SINGLE_OBLIQUE 4
|
||||
#define ARROW_DOUBLE_OBLIQUE 5
|
||||
// (ii) Custom
|
||||
#define ARROW_METAFILE 20
|
||||
|
||||
// Position of arrow on line
|
||||
#define ARROW_POSITION_START 0
|
||||
#define ARROW_POSITION_END 1
|
||||
#define ARROW_POSITION_MIDDLE 2
|
||||
|
||||
// Line alignment flags
|
||||
// Vertical by default
|
||||
#define LINE_ALIGNMENT_HORIZ 1
|
||||
#define LINE_ALIGNMENT_VERT 0
|
||||
#define LINE_ALIGNMENT_TO_NEXT_HANDLE 2
|
||||
#define LINE_ALIGNMENT_NONE 0
|
||||
|
||||
class wxArrowHead: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxArrowHead)
|
||||
|
||||
public:
|
||||
wxArrowHead(WXTYPE type = 0, int end = 0, double size = 0.0, double dist = 0.0, const wxString& name = "", wxPseudoMetaFile *mf = NULL,
|
||||
long arrowId = -1);
|
||||
~wxArrowHead();
|
||||
wxArrowHead(wxArrowHead& toCopy);
|
||||
|
||||
inline WXTYPE _GetType() const { return m_arrowType; }
|
||||
inline int GetPosition() const { return m_arrowEnd; }
|
||||
inline void SetPosition(int pos) { m_arrowEnd = pos; }
|
||||
inline double GetXOffset() const { return m_xOffset; }
|
||||
inline double GetYOffset() const { return m_yOffset; }
|
||||
inline double GetSpacing() const { return m_spacing; }
|
||||
inline double GetSize() const { return m_arrowSize; }
|
||||
inline wxString GetName() const { return m_arrowName; }
|
||||
inline void SetXOffset(double x) { m_xOffset = x; }
|
||||
inline void SetYOffset(double y) { m_yOffset = y; }
|
||||
inline wxPseudoMetaFile *GetMetaFile() const { return m_metaFile; }
|
||||
inline long GetId() const { return m_id; }
|
||||
inline int GetArrowEnd() const { return m_arrowEnd; }
|
||||
inline double GetArrowSize() const { return m_arrowSize; }
|
||||
void SetSize(double size);
|
||||
inline void SetSpacing(double sp) { m_spacing = sp; }
|
||||
|
||||
protected:
|
||||
WXTYPE m_arrowType;
|
||||
int m_arrowEnd; // Position on line
|
||||
double m_xOffset; // Distance from arc start or end, w.r.t. point on arrowhead
|
||||
// nearest start or end. If zero, use default spacing.
|
||||
double m_yOffset; // vertical offset (w.r.t. a horizontal line). Normally zero.
|
||||
double m_spacing; // Spacing from the last arrowhead
|
||||
double m_arrowSize; // Length of arrowhead
|
||||
wxString m_arrowName; // Name of arrow
|
||||
bool m_saveToFile; // TRUE if we want to save custom arrowheads to file.
|
||||
wxPseudoMetaFile* m_metaFile; // Pseudo metafile if this is a custom arrowhead
|
||||
long m_id; // identifier
|
||||
};
|
||||
|
||||
// Line object
|
||||
class wxLabelShape;
|
||||
class wxLineShape: public wxShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxLineShape)
|
||||
|
||||
public:
|
||||
wxLineShape();
|
||||
~wxLineShape();
|
||||
|
||||
// Called when a connected object has moved, to move the link to
|
||||
// correct position
|
||||
// moveControlPoints must be disabled when a control point is being
|
||||
// dragged.
|
||||
void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
||||
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
void OnDrawControlPoints(wxDC& dc);
|
||||
void OnEraseControlPoints(wxDC& dc);
|
||||
void OnErase(wxDC& dc);
|
||||
virtual bool OnMoveControlPoint(int WXUNUSED(which), double WXUNUSED(x), double WXUNUSED(y)) { return FALSE; }
|
||||
virtual bool OnMoveMiddleControlPoint(wxDC& dc, wxLineControlPoint* lpt, const wxRealPoint& pt);
|
||||
virtual bool OnLabelMovePre(wxDC& dc, wxLabelShape* labelShape, double x, double y, double old_x, double old_y, bool display);
|
||||
void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||
void GetBoundingBoxMin(double *w, double *h);
|
||||
void FormatText(wxDC& dc, const wxString& s, int regionId = 0);
|
||||
virtual void SetEnds(double x1, double y1, double x2, double y2);
|
||||
virtual void GetEnds(double *x1, double *y1, double *x2, double *y2);
|
||||
inline virtual wxShape *GetFrom() { return m_from; }
|
||||
inline virtual wxShape *GetTo() { return m_to; }
|
||||
inline virtual int GetAttachmentFrom() { return m_attachmentFrom; }
|
||||
inline virtual int GetAttachmentTo() { return m_attachmentTo; }
|
||||
|
||||
virtual void SetFrom(wxShape *object);
|
||||
virtual void SetTo(wxShape *object);
|
||||
virtual void DrawArrows(wxDC& dc);
|
||||
|
||||
// Finds the x, y points at the two ends of the line.
|
||||
// This function can be used by e.g. line-routing routines to
|
||||
// get the actual points on the two node images where the lines will be drawn
|
||||
// to/from.
|
||||
void FindLineEndPoints(double *fromX, double *fromY, double *toX, double *toY);
|
||||
|
||||
// Format one region at this position
|
||||
void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
|
||||
|
||||
// Erase one region at this position
|
||||
void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
|
||||
|
||||
// Get the reference point for a label. Region x and y
|
||||
// are offsets from this.
|
||||
// position is 0 (middle), 1 (start), 2 (end)
|
||||
void GetLabelPosition(int position, double *x, double *y);
|
||||
|
||||
// Can override this to create a different class of label shape
|
||||
virtual wxLabelShape* OnCreateLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
|
||||
|
||||
// Straighten verticals and horizontals
|
||||
virtual void Straighten(wxDC* dc = NULL);
|
||||
|
||||
// Not implemented
|
||||
inline void SetMaintainStraightLines(bool flag) { m_maintainStraightLines = flag; }
|
||||
inline bool GetMaintainStraightLines() const { return m_maintainStraightLines; }
|
||||
|
||||
// Make handle control points
|
||||
void MakeControlPoints();
|
||||
void ResetControlPoints();
|
||||
|
||||
// Make a given number of control points
|
||||
virtual void MakeLineControlPoints(int n);
|
||||
virtual wxNode *InsertLineControlPoint(wxDC* dc);
|
||||
virtual bool DeleteLineControlPoint();
|
||||
virtual void Initialise();
|
||||
inline wxList *GetLineControlPoints() { return m_lineControlPoints; }
|
||||
|
||||
// Override dragging behaviour - don't want to be able to drag lines!
|
||||
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
// Control points ('handles') redirect control to the actual shape, to make it easier
|
||||
// to override sizing behaviour.
|
||||
virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
// Override select, to create/delete temporary label-moving objects
|
||||
void Select(bool select = TRUE, wxDC* dc = NULL);
|
||||
|
||||
// Set to spline (TRUE) or line (FALSE)
|
||||
inline void SetSpline(bool spl) { m_isSpline = spl; }
|
||||
inline bool IsSpline() const { return m_isSpline; }
|
||||
|
||||
void Unlink();
|
||||
void SetAttachments(int from_attach, int to_attach);
|
||||
inline void SetAttachmentFrom(int attach) { m_attachmentFrom = attach; }
|
||||
inline void SetAttachmentTo(int attach) { m_attachmentTo = attach; }
|
||||
|
||||
bool HitTest(double x, double y, int *attachment, double *distance);
|
||||
|
||||
#ifdef PROLOGIO
|
||||
// I/O
|
||||
virtual void WriteAttributes(wxExpr *clause);
|
||||
virtual void ReadAttributes(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
virtual void FindNth(wxShape *image, int *nth, int *no_arcs, bool incoming);
|
||||
|
||||
// Find which position we're talking about at this (x, y).
|
||||
// Returns ARROW_POSITION_START, ARROW_POSITION_MIDDLE, ARROW_POSITION_END
|
||||
int FindLinePosition(double x, double y);
|
||||
|
||||
// This is really to distinguish between lines and other images.
|
||||
// For lines, want to pass drag to canvas, since lines tend to prevent
|
||||
// dragging on a canvas (they get in the way.)
|
||||
virtual bool Draggable() const { return FALSE; }
|
||||
|
||||
// Does the copying for this object
|
||||
void Copy(wxShape& copy);
|
||||
|
||||
// Add an arrowhead.
|
||||
wxArrowHead *AddArrow(WXTYPE type, int end = ARROW_POSITION_END,
|
||||
double arrowSize = 10.0, double xOffset = 0.0, const wxString& name = "",
|
||||
wxPseudoMetaFile *mf = NULL, long arrowId = -1);
|
||||
|
||||
// Add an arrowhead in the position indicated by the reference
|
||||
// list of arrowheads, which contains all legal arrowheads for this
|
||||
// line, in the correct order.
|
||||
// E.g. reference list: a b c d e
|
||||
// Current line list: a d
|
||||
// Add c, then line list is: a c d
|
||||
// If no legal arrowhead position, return FALSE.
|
||||
// Assume reference list is for one end only, since it potentially defines
|
||||
// the ordering for any one of the 3 positions. So we don't check
|
||||
// the reference list for arrowhead position.
|
||||
bool AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end);
|
||||
|
||||
// Delete arrowhead(s)
|
||||
void ClearArrowsAtPosition(int end = -1);
|
||||
bool ClearArrow(const wxString& name);
|
||||
wxArrowHead *FindArrowHead(int position, const wxString& name);
|
||||
wxArrowHead *FindArrowHead(long arrowId);
|
||||
bool DeleteArrowHead(int position, const wxString& name);
|
||||
bool DeleteArrowHead(long arrowId);
|
||||
void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset);
|
||||
inline void SetIgnoreOffsets(bool ignore) { m_ignoreArrowOffsets = ignore; }
|
||||
inline wxList& GetArrows() const { return (wxList&) m_arcArrows; }
|
||||
|
||||
// Find horizontal width for drawing a line with
|
||||
// arrows in minimum space. Assume arrows at
|
||||
// END only
|
||||
double FindMinimumWidth();
|
||||
|
||||
// Set alignment flags. ALIGNMENT NOT IMPLEMENTED.
|
||||
void SetAlignmentOrientation(bool isEnd, bool isHoriz);
|
||||
void SetAlignmentType(bool isEnd, int alignType);
|
||||
bool GetAlignmentOrientation(bool isEnd);
|
||||
int GetAlignmentType(bool isEnd);
|
||||
|
||||
// Find next control point in line after the start/end point
|
||||
// (depending on whether the node object is at start or end)
|
||||
wxRealPoint *GetNextControlPoint(wxShape *nodeObject);
|
||||
inline bool IsEnd(wxShape *nodeObject) const { return (m_to == nodeObject); }
|
||||
|
||||
private:
|
||||
bool m_erasing; // flag to say whether we're erasing or drawing
|
||||
// this line (really so metafiles can draw a
|
||||
// blank rectangle)
|
||||
bool m_ignoreArrowOffsets; // Don't always want to draw arrowhead offsets
|
||||
// because they may not work on tool palettes (for example)
|
||||
bool m_isSpline;
|
||||
bool m_maintainStraightLines;
|
||||
|
||||
protected:
|
||||
// Temporary list of line segment orientations
|
||||
// so we know what direction the line is supposed to be dog-legging
|
||||
// in. The values are integer: 0 for vertical, 1 for horizontal.
|
||||
wxList m_lineOrientations;
|
||||
|
||||
// Temporary pointers for start, middle and end label editing objects
|
||||
// (active only when the line is selected)
|
||||
wxLabelShape* m_labelObjects[3];
|
||||
|
||||
// These define the segmented line - not to be confused with temporary control
|
||||
// points which appear when object is selected (although in this case they'll
|
||||
// probably be the same)
|
||||
wxList* m_lineControlPoints;
|
||||
|
||||
double m_arrowSpacing; // Separation between adjacent arrows
|
||||
|
||||
wxShape* m_to;
|
||||
wxShape* m_from;
|
||||
|
||||
int m_attachmentTo; // Attachment point at one end
|
||||
int m_attachmentFrom; // Attachment point at other end
|
||||
|
||||
// Alignment flags
|
||||
int m_alignmentStart;
|
||||
int m_alignmentEnd;
|
||||
|
||||
wxList m_arcArrows;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// _OGL_LINES_H_
|
@@ -1,89 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: linesp.h
|
||||
// Purpose: Lines private header file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 12/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _OGL_LINESP_H_
|
||||
#define _OGL_LINESP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "linesp.h"
|
||||
#endif
|
||||
|
||||
class wxLineShape;
|
||||
class wxLineControlPoint: public wxControlPoint
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
|
||||
friend class wxLineShape;
|
||||
public:
|
||||
|
||||
wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0,
|
||||
double x = 0.0, double y = 0.0, int the_type = 0);
|
||||
~wxLineControlPoint();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
|
||||
// Obsolete (left-dragging now moves attachment point to new relative position OR new
|
||||
// attachment id)
|
||||
#if 0
|
||||
void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
int m_type;
|
||||
wxRealPoint* m_point; // Line point
|
||||
wxRealPoint m_originalPos;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Temporary arc label object
|
||||
*/
|
||||
|
||||
class wxLabelShape: public wxRectangleShape
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxLabelShape)
|
||||
|
||||
public:
|
||||
wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
|
||||
~wxLabelShape();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnDrawContents(wxDC& dc);
|
||||
void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
||||
|
||||
public:
|
||||
wxLineShape* m_lineShape;
|
||||
wxShapeRegion* m_shapeRegion;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the point on the given line (x1, y1) (x2, y2)
|
||||
* distance 'length' along from the end,
|
||||
* returned values in x and y
|
||||
*/
|
||||
|
||||
void GetPointOnLine(double x1, double y1, double x2, double y2,
|
||||
double length, double *x, double *y);
|
||||
|
||||
#endif
|
||||
// _OGL_LINESP_H_
|
||||
|