Re: a text versions of docs for Eu?
- Posted by _tom (admin) Jun 09, 2014
- 1696 views
SunPsych08 said...
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
Here is a sample of "plain text" API that is easy to produce. It is a portion of the std/console.e include file. Is this what you are looking for?
_tom
Console
Information
has_console
include console.e
namespace console
public function has_console()
determines if the process has a console (terminal) window.
Returns:
An atom,
1 if there is more than one process attached to the current console,
0 if a console does not exist or only one process (Euphoria) is attached to
the current console.
Comments:
On Unix systems always returns 1 .
On Windows client systems earlier than Windows XP the function always returns 0 .
On Windows server systems earlier than Windows Server 2003 the function always returns 0 .
Example 1:
include std/console.e
if has_console() then
printf(1, "Hello Console!")
end if
key_codes
include console.e
namespace console
public function key_codes(object codes = 0)
gets and sets the keyboard codes used internally by Euphoria.
Parameters:
codes : Either a sequence of exactly 256 integers or an atom (the default).
Returns:
A sequence,
of the current 256 keyboard codes, prior to any changes that
this function might make.
Comments:
When codes is a atom then no change to the existing codes is made, otherwise
the set of 256 integers in codes completely replaces the existing codes.
Example 1:
include std/console.e
sequence kc
kc = key_codes() -- Get existing set.
kc[KC_LEFT] = 263 -- Change the code for the left-arrow press.
key_codes(kc) -- Set the new codes.
Key Code Names
These are the names of the index values for each of the 256 key code values.
See Also:
:key_codes
KC_LBUTTON
include console.e
namespace console
public constant KC_LBUTTON
set_keycodes
include console.e
namespace console
public function set_keycodes(object kcfile)
changes the default codes returned by the keyboard.
Parameters:
kcfile : Either the name of a text file or the handle of an opened (for reading) text file.
Returns:
An integer,
0 means no error.
-1 means that the supplied file could not me loaded in to a :map.
-2 means that a new key value was not an integer.
-3 means that an unknown key name was found in the file.
Comments:
The text file is expected to contain bindings for one or more keyboard codes.
The format of the files is a set of lines, one line per key binding, in the
form KEYNAME = NEWVALUE. The KEYNAME is the same as the constants but without
the "KC_" prefix. The key bindings can be in any order.
Example 1:
-- doskeys.txt file containing some key bindings
F1 = 260
F2 = 261
INSERT = 456
set_keycodes( "doskeys.txt" )
See Also:
:key_codes

