diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-02-28 15:46:09 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-02-28 15:46:09 (GMT) |
commit | e4be9be99a7fb0f30e57803fda355321f64b0b05 (patch) | |
tree | 24aba5a9c441812ecf675a50690a64ea4a049cc2 | |
parent | ea39abd56c9f66b54c01e7c08682329790ae59b4 (diff) | |
download | cpython-e4be9be99a7fb0f30e57803fda355321f64b0b05.zip cpython-e4be9be99a7fb0f30e57803fda355321f64b0b05.tar.gz cpython-e4be9be99a7fb0f30e57803fda355321f64b0b05.tar.bz2 |
Three down, two to go...
-rw-r--r-- | Doc/libmacconsole.tex | 108 | ||||
-rw-r--r-- | Doc/libmacfs.tex | 120 | ||||
-rw-r--r-- | Doc/libmacspeech.tex | 83 | ||||
-rw-r--r-- | Doc/mac/libmacconsole.tex | 108 | ||||
-rw-r--r-- | Doc/mac/libmacfs.tex | 120 | ||||
-rw-r--r-- | Doc/mac/libmacspeech.tex | 83 |
6 files changed, 622 insertions, 0 deletions
diff --git a/Doc/libmacconsole.tex b/Doc/libmacconsole.tex new file mode 100644 index 0000000..1a09e6b --- /dev/null +++ b/Doc/libmacconsole.tex @@ -0,0 +1,108 @@ +\section{Built-in module \sectcode{macconsole}} +\bimodindex{macconsole} + +This module is available on the Macintosh, provided Python has been +built using the Think C compiler. It provides an interface to the +Think console package, with which basic text windows can be created. + +\begin{datadesc}{options} +An object allowing you to set various options when creating windows, +see below. +\end{datadesc} + +\begin{datadesc}{C_ECHO} +\dataline{C_NOECHO} +\dataline{C_CBREAK} +\dataline{C_RAW} +Options for the \code{setmode} method. \var{C_ECHO} and \var{C_CBREAK} +enable character echo, the other two disable it, \var{C_ECHO} and +\var{C_NOECHO} enable line-oriented input (erase/kill processing, +etc). +\end{datadesc} + +\begin{funcdesc}{copen}{} +Open a new console window. Returns a console window object. +\end{funcdesc} + +\begin{funcdesc}{fopen}{fp} +Return the console window object corresponding with the given file +object. \var{Fp} should be one of \var{sys.stdin}, \var{sys.stdout} or +\var{sys.stderr}. +\end{funcdesc} + +\subsection{macconsole options object} +These options are examined when a window is created: + +\renewcommand{\indexsubitem}{(macconsole option)} +\begin{datadesc}{top} +\dataline{left} +The origin of the window. +\end{datadesc} + +\begin{datadesc}{nrows} +\dataline{ncols} +The size of the window. +\end{datadesc} + +\begin{datadesc}{txFont} +\dataline{txSize} +\dataline{txStyle} +The font, fontsize and fontstyle to be used in the window. +\end{datadesc} + +\begin{datadesc}{title} +The title of the window. +\end{datadesc} + +\begin{datadesc}{pause_atexit} +If set non-zero, the window will wait for user action before closing +the window. +\end{datadesc} + +\subsection{console window object} + +\renewcommand{\indexsubitem}{(console window method)} + +\begin{datadesc}{file} +The file object corresponding to this console window. If the file is +buffered, you should call \code{file.flush()} between \code{write()} +and \code{read()} calls. +\end{datadesc} + +\begin{funcdesc}{setmode}{mode} +Set the input mode of the console to \var{C_ECHO}, etc. +\end{funcdesc} + +\begin{funcdesc}{settabs}{n} +Set the tabsize to \var{n} spaces. +\end{funcdesc} + +\begin{funcdesc}{cleos}{} +Clear to end-of-screen. +\end{funcdesc} + +\begin{funcdesc}{cleol}{} +Clear to end-of-line. +\end{funcdesc} + +\begin{funcdesc}{inverse}{onoff} +Enable inverse-video mode: characters with the high bit set are +displayed in inverse video (this disables the upper half of a +non-ascii character set). +\end{funcdesc} + +\begin{funcdesc}{gotoxy}{x\, y} +Set the cursor to position \code{(x, y)}. +\end{funcdesc} + +\begin{funcdesc}{hide}{} +Hide the window, remembering the contents. +\end{funcdesc} + +\begin{funcdesc}{show}{} +Show the window again. +\end{funcdesc} + +\begin{funcdesc}{echo2printer}{} +Copy everything written to the window to the printer as well. +\end{funcdesc} diff --git a/Doc/libmacfs.tex b/Doc/libmacfs.tex new file mode 100644 index 0000000..86d108a --- /dev/null +++ b/Doc/libmacfs.tex @@ -0,0 +1,120 @@ +\section{Built-in module \sectcode{macfs}} +\bimodindex{macfs} + +This module provides access to macintosh FSSpec handling, the Alias +Manager, finder aliases and the Standard File package. + +Whenever a function or method expects a \var{file} argument, this +argument can be one of three things: (1) a full or partial macintosh +pathname, (2) an FSSpec object or (3) a 3-tuple \code{(wdRefNum, +parID, name)} as described in Inside Mac VI. A description of aliases +and the standard file package can also be found there. + +\begin{funcdesc}{FSSpec}{file} +Create an FSSpec object for the specified file. +\end{funcdesc} + +\begin{funcdesc}{RawFSSpec}{data} +Create an FSSpec object given the raw data for the C structure for the +FSSpec. +\end{funcdesc} + +\begin{funcdesc}{RawAlias}{data} +Create an Alias object given the raw data for the alias. +\end{funcdesc} + +\begin{funcdesc}{ResolveAliasFile}{file} +Resolve an alias file. Returns a 3-tuple \code{(fsspec, isfolder, +aliased)} where \var{fsspec} is the resulting FSSpec object, +\var{isfolder} is true if \var{fsspec} points to a folder and +\var{aliased} is true if the file was an alias in the first place +(otherwise the FSSpec object for the file itself is returned). +\end{funcdesc} + +\begin{funcdesc}{StandardGetFile}{\optional{type\, ...}} +Present the user with a standard ``open onput file'' +dialog. Optionally, you can pass up to four 4-char file types to limit +the files the user can choose from. The function returns an FSSpec +object and a flag indicating that the user completed the dialog +without cancelling. +\end{funcdesc} + +\begin{funcdesc}{StandardPutFile}{prompt\, \optional{default}} +Present the user with a standard ``open output file'' +dialog. \var{prompt} is the prompt string, and the optional +\var{default} argument initialized the output file name. The function +returns an FSSpec object and a flag indicating that the user completed +the dialog without cancelling. +\end{funcdesc} + +\begin{funcdesc}{GetDirectory}{} +Present the user with a non-standard ``select a directory'' +dialog. Returns an FSSpec object and a success-indicator. +\end{funcdesc} + +\subsection{FSSpec objects} + +\renewcommand{\indexsubitem}{(FSSpec object method)} +\begin{datadesc}{data} +The raw data from the FSSpec object, suitable for passing +to other applications, for instance. +\end{datadesc} + +\begin{funcdesc}{as_pathname}{} +Return the full pathname of the file described by the FSSpec object. +\end{funcdesc} + +\begin{funcdesc}{as_tuple}{} +Return the \code{(wdRefNum, parID, name)} tuple of the file described +by the FSSpec object. +\end{funcdesc} + +\begin{funcdesc}{NewAlias}{\optional{file}} +Create an Alias object pointing to the file described by this +FSSpec. If the optional \code{file} parameter is present the alias +will be relative to that file, otherwise it will be absolute. +\end{funcdesc} + +\begin{funcdesc}{NewAliasMinimal}{} +Create a minimal alias pointing to this file. +\end{funcdesc} + +\begin{funcdesc}{GetCreatorType}{} +Return the 4-char creator and type of the file. +\end{funcdesc} + +\begin{funcdesc}{SetCreatorType}{creator\, type} +Set the 4-char creator and type of the file. +\end{funcdesc} + +\subsection{alias objects} + +\renewcommand{\indexsubitem}{(alias object method)} +\begin{datadesc}{data} +The raw data for the Alias record, suitable for storing in a resource +or transmitting to other programs. +\end{datadesc} + +\begin{funcdesc}{Resolve}{\optional{file}} +Resolve the alias. If the alias was created as a relative alias you +should pass the file relative to which it is. Returns the FSSpec for +the file pointed to and a flag indicating whether the alias object +itself was modified during the search process. +\end{funcdesc} + +\begin{funcdesc}{GetInfo}{num} +An interface to the C routine \code{GetAliasInfo()}. +\end{funcdesc} + +\begin{funcdesc}{Update}{file\, \optional{file2}} +Update the alias to point to the \var{file} given. If \var{file2} is +present a relative alias will be created. +\end{funcdesc} + +Note that is currently not possible to directly manipulate a resource +as an alias object. Hence, after calling \var{Update} or after +\var{Resolve} indicates that the alias has changed the python program +is responsible for getting the \var{data} from the alias object and +modifying the resource. + + diff --git a/Doc/libmacspeech.tex b/Doc/libmacspeech.tex new file mode 100644 index 0000000..7c71c44 --- /dev/null +++ b/Doc/libmacspeech.tex @@ -0,0 +1,83 @@ +\section{Built-in module \sectcode{macspeech}} +\bimodindex{macspeech} + +This module provides an interface to the Macintosh Speech Manager, +allowing you to let the macintosh utter phrases. You need a version of +the speech manager extension (version 1 and 2 have been tested) in +your \code{Extensions} folder for this to work. The module does not +provide full access to all features of the Speech Manager yet. + +\begin{funcdesc}{Available}{} +Test availability of the Speech Manager extension (and, on the +PowerPC, the Speech Manager shared library). Returns 0 or 1. +\end{funcdesc} + +\begin{funcdesc}{Version}{} +Return the (integer) version of the Speech Manager. +\end{funcdesc} + +\begin{funcdesc}{SpeakString}{str} +Utter the string \var{str} using the default voice, +asynchronously. This aborts any speech that may still be active from +prior \code{SpeakString} invocations. +\end{funcdesc} + +\begin{funcdesc}{Busy}{} +Return the number of speech channels busy, system-wide. +\end{funcdesc} + +\begin{funcdesc}{CountVoices}{} +Return the number of different voices available. +\end{funcdesc} + +\begin{funcdesc}{GetIndVoice}{num} +Return a voice object for voice number \var{num}. +\end{funcdesc} + +\subsection{voice objects} +Voice objects contain the description of a voice. It is currently not +yet possible to access the parameters of a voice. + +\renewcommand{\indexsubitem}{(voice object method)} + +\begin{funcdesc}{GetGender}{} +Return the gender of the voice: 0 for male, 1 for female and -1 for neuter. +\end{funcdesc} + +\begin{funcdesc}{NewChannel}{} +Return a new speech channel object using this voice. +\end{funcdesc} + +\subsection{speech channel objects} +A speech channel object allows you to speak strings with slightly more +control than \code{SpeakString()}, and allows you to use multiple +speakers at the same time. Please note that channel pitch and rate are +interrelated in some way, so that to make your macintosh sing you will +have to adjust both. + +\renewcommand{\indexsubitem}{(speech channel object method)} +\begin{funcdesc}{SpeakText}{str} +Start uttering the given string. +\end{funcdesc} + +\begin{funcdesc}{Stop}{} +Stop babbling. +\end{funcdesc} + +\begin{funcdesc}{GetPitch}{} +Returns the current pitch of the channel, as a floating-point number. +\end{funcdesc} + +\begin{funcdesc}{SetPitch}{pitch} +Set the pitch of the channel. +\end{funcdesc} + +\begin{funcdesc}{GetRate}{} +Get the speech rate (utterances per minute) of the channel as a +floating point number. +\end{funcdesc} + +\begin{funcdesc}{SetRate}{rate} +Set the speech rate of the channel. +\end{funcdesc} + diff --git a/Doc/mac/libmacconsole.tex b/Doc/mac/libmacconsole.tex new file mode 100644 index 0000000..1a09e6b --- /dev/null +++ b/Doc/mac/libmacconsole.tex @@ -0,0 +1,108 @@ +\section{Built-in module \sectcode{macconsole}} +\bimodindex{macconsole} + +This module is available on the Macintosh, provided Python has been +built using the Think C compiler. It provides an interface to the +Think console package, with which basic text windows can be created. + +\begin{datadesc}{options} +An object allowing you to set various options when creating windows, +see below. +\end{datadesc} + +\begin{datadesc}{C_ECHO} +\dataline{C_NOECHO} +\dataline{C_CBREAK} +\dataline{C_RAW} +Options for the \code{setmode} method. \var{C_ECHO} and \var{C_CBREAK} +enable character echo, the other two disable it, \var{C_ECHO} and +\var{C_NOECHO} enable line-oriented input (erase/kill processing, +etc). +\end{datadesc} + +\begin{funcdesc}{copen}{} +Open a new console window. Returns a console window object. +\end{funcdesc} + +\begin{funcdesc}{fopen}{fp} +Return the console window object corresponding with the given file +object. \var{Fp} should be one of \var{sys.stdin}, \var{sys.stdout} or +\var{sys.stderr}. +\end{funcdesc} + +\subsection{macconsole options object} +These options are examined when a window is created: + +\renewcommand{\indexsubitem}{(macconsole option)} +\begin{datadesc}{top} +\dataline{left} +The origin of the window. +\end{datadesc} + +\begin{datadesc}{nrows} +\dataline{ncols} +The size of the window. +\end{datadesc} + +\begin{datadesc}{txFont} +\dataline{txSize} +\dataline{txStyle} +The font, fontsize and fontstyle to be used in the window. +\end{datadesc} + +\begin{datadesc}{title} +The title of the window. +\end{datadesc} + +\begin{datadesc}{pause_atexit} +If set non-zero, the window will wait for user action before closing +the window. +\end{datadesc} + +\subsection{console window object} + +\renewcommand{\indexsubitem}{(console window method)} + +\begin{datadesc}{file} +The file object corresponding to this console window. If the file is +buffered, you should call \code{file.flush()} between \code{write()} +and \code{read()} calls. +\end{datadesc} + +\begin{funcdesc}{setmode}{mode} +Set the input mode of the console to \var{C_ECHO}, etc. +\end{funcdesc} + +\begin{funcdesc}{settabs}{n} +Set the tabsize to \var{n} spaces. +\end{funcdesc} + +\begin{funcdesc}{cleos}{} +Clear to end-of-screen. +\end{funcdesc} + +\begin{funcdesc}{cleol}{} +Clear to end-of-line. +\end{funcdesc} + +\begin{funcdesc}{inverse}{onoff} +Enable inverse-video mode: characters with the high bit set are +displayed in inverse video (this disables the upper half of a +non-ascii character set). +\end{funcdesc} + +\begin{funcdesc}{gotoxy}{x\, y} +Set the cursor to position \code{(x, y)}. +\end{funcdesc} + +\begin{funcdesc}{hide}{} +Hide the window, remembering the contents. +\end{funcdesc} + +\begin{funcdesc}{show}{} +Show the window again. +\end{funcdesc} + +\begin{funcdesc}{echo2printer}{} +Copy everything written to the window to the printer as well. +\end{funcdesc} diff --git a/Doc/mac/libmacfs.tex b/Doc/mac/libmacfs.tex new file mode 100644 index 0000000..86d108a --- /dev/null +++ b/Doc/mac/libmacfs.tex @@ -0,0 +1,120 @@ +\section{Built-in module \sectcode{macfs}} +\bimodindex{macfs} + +This module provides access to macintosh FSSpec handling, the Alias +Manager, finder aliases and the Standard File package. + +Whenever a function or method expects a \var{file} argument, this +argument can be one of three things: (1) a full or partial macintosh +pathname, (2) an FSSpec object or (3) a 3-tuple \code{(wdRefNum, +parID, name)} as described in Inside Mac VI. A description of aliases +and the standard file package can also be found there. + +\begin{funcdesc}{FSSpec}{file} +Create an FSSpec object for the specified file. +\end{funcdesc} + +\begin{funcdesc}{RawFSSpec}{data} +Create an FSSpec object given the raw data for the C structure for the +FSSpec. +\end{funcdesc} + +\begin{funcdesc}{RawAlias}{data} +Create an Alias object given the raw data for the alias. +\end{funcdesc} + +\begin{funcdesc}{ResolveAliasFile}{file} +Resolve an alias file. Returns a 3-tuple \code{(fsspec, isfolder, +aliased)} where \var{fsspec} is the resulting FSSpec object, +\var{isfolder} is true if \var{fsspec} points to a folder and +\var{aliased} is true if the file was an alias in the first place +(otherwise the FSSpec object for the file itself is returned). +\end{funcdesc} + +\begin{funcdesc}{StandardGetFile}{\optional{type\, ...}} +Present the user with a standard ``open onput file'' +dialog. Optionally, you can pass up to four 4-char file types to limit +the files the user can choose from. The function returns an FSSpec +object and a flag indicating that the user completed the dialog +without cancelling. +\end{funcdesc} + +\begin{funcdesc}{StandardPutFile}{prompt\, \optional{default}} +Present the user with a standard ``open output file'' +dialog. \var{prompt} is the prompt string, and the optional +\var{default} argument initialized the output file name. The function +returns an FSSpec object and a flag indicating that the user completed +the dialog without cancelling. +\end{funcdesc} + +\begin{funcdesc}{GetDirectory}{} +Present the user with a non-standard ``select a directory'' +dialog. Returns an FSSpec object and a success-indicator. +\end{funcdesc} + +\subsection{FSSpec objects} + +\renewcommand{\indexsubitem}{(FSSpec object method)} +\begin{datadesc}{data} +The raw data from the FSSpec object, suitable for passing +to other applications, for instance. +\end{datadesc} + +\begin{funcdesc}{as_pathname}{} +Return the full pathname of the file described by the FSSpec object. +\end{funcdesc} + +\begin{funcdesc}{as_tuple}{} +Return the \code{(wdRefNum, parID, name)} tuple of the file described +by the FSSpec object. +\end{funcdesc} + +\begin{funcdesc}{NewAlias}{\optional{file}} +Create an Alias object pointing to the file described by this +FSSpec. If the optional \code{file} parameter is present the alias +will be relative to that file, otherwise it will be absolute. +\end{funcdesc} + +\begin{funcdesc}{NewAliasMinimal}{} +Create a minimal alias pointing to this file. +\end{funcdesc} + +\begin{funcdesc}{GetCreatorType}{} +Return the 4-char creator and type of the file. +\end{funcdesc} + +\begin{funcdesc}{SetCreatorType}{creator\, type} +Set the 4-char creator and type of the file. +\end{funcdesc} + +\subsection{alias objects} + +\renewcommand{\indexsubitem}{(alias object method)} +\begin{datadesc}{data} +The raw data for the Alias record, suitable for storing in a resource +or transmitting to other programs. +\end{datadesc} + +\begin{funcdesc}{Resolve}{\optional{file}} +Resolve the alias. If the alias was created as a relative alias you +should pass the file relative to which it is. Returns the FSSpec for +the file pointed to and a flag indicating whether the alias object +itself was modified during the search process. +\end{funcdesc} + +\begin{funcdesc}{GetInfo}{num} +An interface to the C routine \code{GetAliasInfo()}. +\end{funcdesc} + +\begin{funcdesc}{Update}{file\, \optional{file2}} +Update the alias to point to the \var{file} given. If \var{file2} is +present a relative alias will be created. +\end{funcdesc} + +Note that is currently not possible to directly manipulate a resource +as an alias object. Hence, after calling \var{Update} or after +\var{Resolve} indicates that the alias has changed the python program +is responsible for getting the \var{data} from the alias object and +modifying the resource. + + diff --git a/Doc/mac/libmacspeech.tex b/Doc/mac/libmacspeech.tex new file mode 100644 index 0000000..7c71c44 --- /dev/null +++ b/Doc/mac/libmacspeech.tex @@ -0,0 +1,83 @@ +\section{Built-in module \sectcode{macspeech}} +\bimodindex{macspeech} + +This module provides an interface to the Macintosh Speech Manager, +allowing you to let the macintosh utter phrases. You need a version of +the speech manager extension (version 1 and 2 have been tested) in +your \code{Extensions} folder for this to work. The module does not +provide full access to all features of the Speech Manager yet. + +\begin{funcdesc}{Available}{} +Test availability of the Speech Manager extension (and, on the +PowerPC, the Speech Manager shared library). Returns 0 or 1. +\end{funcdesc} + +\begin{funcdesc}{Version}{} +Return the (integer) version of the Speech Manager. +\end{funcdesc} + +\begin{funcdesc}{SpeakString}{str} +Utter the string \var{str} using the default voice, +asynchronously. This aborts any speech that may still be active from +prior \code{SpeakString} invocations. +\end{funcdesc} + +\begin{funcdesc}{Busy}{} +Return the number of speech channels busy, system-wide. +\end{funcdesc} + +\begin{funcdesc}{CountVoices}{} +Return the number of different voices available. +\end{funcdesc} + +\begin{funcdesc}{GetIndVoice}{num} +Return a voice object for voice number \var{num}. +\end{funcdesc} + +\subsection{voice objects} +Voice objects contain the description of a voice. It is currently not +yet possible to access the parameters of a voice. + +\renewcommand{\indexsubitem}{(voice object method)} + +\begin{funcdesc}{GetGender}{} +Return the gender of the voice: 0 for male, 1 for female and -1 for neuter. +\end{funcdesc} + +\begin{funcdesc}{NewChannel}{} +Return a new speech channel object using this voice. +\end{funcdesc} + +\subsection{speech channel objects} +A speech channel object allows you to speak strings with slightly more +control than \code{SpeakString()}, and allows you to use multiple +speakers at the same time. Please note that channel pitch and rate are +interrelated in some way, so that to make your macintosh sing you will +have to adjust both. + +\renewcommand{\indexsubitem}{(speech channel object method)} +\begin{funcdesc}{SpeakText}{str} +Start uttering the given string. +\end{funcdesc} + +\begin{funcdesc}{Stop}{} +Stop babbling. +\end{funcdesc} + +\begin{funcdesc}{GetPitch}{} +Returns the current pitch of the channel, as a floating-point number. +\end{funcdesc} + +\begin{funcdesc}{SetPitch}{pitch} +Set the pitch of the channel. +\end{funcdesc} + +\begin{funcdesc}{GetRate}{} +Get the speech rate (utterances per minute) of the channel as a +floating point number. +\end{funcdesc} + +\begin{funcdesc}{SetRate}{rate} +Set the speech rate of the channel. +\end{funcdesc} + |