Library sys_info

GEOS-SC:  Library sys_info



Classes

InputManager
The InputManager class provides a mechanism by which drivers can deliver input to applications.
InputMonitor
InputMonitor objects are used to filter incoming input events.

Back to the top of sys_info


Data

enum Boolean;
enum Result;
typedef signed char int8;
typedef unsigned char uint8;
typedef short int16;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
typedef uint32 uintp;
typedef float float32;
typedef double float64;
typedef unsigned int bit32;
typedef unsigned int bitfield;
typedef unsigned char *baddr;
const int32 INT8_MAX = 127;
const int32 INT8_MIN = -128;
const int32 INT16_MAX = 32767;
const int32 INT16_MIN = -32768;
const int32 INT32_MAX = 2147483647;
const int32 INT32_MIN = (-2147483647 - 1);
const uint32 UINT8_MAX = 0xFF;
const uint32 UINT16_MAX = 0xFFFF;
const uint32 UINT32_MAX = 0xFFFFFFFF;
typedef uint32 Timeout;
const Timeout TIMEOUT_FOREVER = UINT32_MAX;
const Timeout TIMEOUT_POLL = 0;
typedef char TCHAR;
typedef uint16 WCHAR;
#define ASSERT(expr)
#define ASSERTS(expr, str)
#define ASSERT_WARN(expr)
#define ASSERTS_WARN(expr, str)
#define EC_FAIL(str)
#define EC_WARN(str)
#define NEC(x)
#define EC(x)
#define INSTANCE_ASSERT(expr)
#define INSTANCE_ASSERTS(expr, str)
#define _EC_INSTANCE(stmnt)
#define PARAM_ASSERT(expr)
#define PARAM_ASSERTS(expr, str)
#define _EC_PARAM(stmnt)
enum InputEventType
// Types defined by standard C and C++
typedef long unsigned int size_t;
typedef void *malloc_t;

Back to the top of sys_info


Global Functions

void USE_IT(variable);
type Max(type x, type y);
type Min(type x, type y);
typedef void (VoidFuncOneArg)(void *arg);
#define PTR2INT(p) ((char *)(p) - (char *)0)
const TCHAR* _TEXT(char* str);
TCHAR _CHAR(char ch);
// Error Checking (EC) macros
dll_link void AssertFail(const char* file, int line, const char* string);
dll_link void AssertWarn(const char* file, int line, const char* string);
#define VERIFY(expr, test) (expr)
#define VERIFY_WARN(expr, test) (expr)
// Useful numerical functions
void Swap( int16& aa, int16& bb );
void Swap( int32& aa, int32& bb );
int32 Sign( int32 aa )
int32 Abs( int32 aa ) ;
int32 Min3( int32 aa, int32 bb, int32 cc ) ;
int32 Max3( int32 aa, int32 bb, int32 cc ) ;
// Unicode, SJIS and JIS conversion functions
Boolean UnicodeToSJISConversionPossible(TCHAR character);
Boolean SJISToUnicodeConversionPossible(TCHAR character);
TCHAR UnicodeToSJIS(TCHAR character);
TCHAR SJISToUnicode(TCHAR character);
TCHAR SJISToJIS(TCHAR character);

Back to the top of sys_info


void USE_IT(variable);

#include <basedef.h>

This is actually a #define macro that allows you to use an argument that is otherwise not used in a function. This prevents "arg not used" warnings.

Parameters:

in arg
A function argument.

Example:
   int
   MyFunction(int param)
   {
       USE_IT(param);
       return 5;
   }
   

Prototype:

void USE_IT(variable);

Back to the top of sys_info


type Max(type x, type y);

#include <basedef.h>

A #define macro that returns the bigger of two arguments. The items compared must have a '>' operator associated with them (true of all integral and floating point types).

Parameters:

in x
One of the arguments. It is evaluated twice, so be careful about using a function call.
in y
The other argument; it is also evaluted twice.

Return value: x if x is larger; otherwise y.

See also: Min()

Prototype:

type Max(type x, type y);

Back to the top of sys_info


type Min(type x, type y);

#include <basedef.h>

Returns the smaller of two arguments. The items compared must have a '<' operator associated with them (true of all integral and floating point types).

Parameters:

in x
One of the arguments. It is evaluated twice, so be careful about using a function call.
in y
The other argument; it is also evaluted twice.

Return value: x if x is smaller; otherwise y.

See also: Max()

Prototype:

type Min(type x, type y);

Back to the top of sys_info


enum Boolean;

#include <basedef.h>

A Boolean value is used whenever something is either TRUE or FALSE. It is not used as a success or failure result code.

For example, the WinRectangle::Contains() method returns a Boolean, but Array::Append() does not.

FALSE
A value of zero.
TRUE
A non-zero value.

Note that when comparing a Boolean value, you should always compare against FALSE. E.g. (variable == FALSE) or (variable != FALSE).

See also: Result

Declared as:

enum Boolean {
    FALSE,
    TRUE
};

Back to the top of sys_info


enum Result;

#include <basedef.h>

An error value returned when a function or method can succeed or fail. It is not used as a boolean TRUE/FALSE or yes/no value.

For example, Array::Append() returns a Result (it can succeed or fail), but WinRectangle::Contains() does not (it returns whether something is true or not).

Note that when comparing a Result value, you should always compare against SUCCESS. E.g. (variable == SUCCESS) or (variable != SUCCESS).

SUCCESS
A value of zero.
FAILURE
A non-zero value specific to the function called.

See also: Boolean

Declared as:

enum Result {
    SUCCESS = 0,
    FAILURE = -1
};

Back to the top of sys_info


typedef signed char int8;

#include <basedef.h>

A signed 8-bit integer. Use in preference to char or signed char.

See also: uint8, int16, uint16, int32, uint32, float32, bit32, bitfield, INT8_MIN, INT8_MAX

Declared as:

typedef        signed char        int8;

Back to the top of sys_info


typedef unsigned char uint8;

#include <basedef.h>

An unsigned 8-bit integer. Use in preference to unsigned char.

See also: int8, int16, uint16, int32, uint32, float32, bit32, bitfield, UINT8_MAX

Declared as:

typedef        unsigned char        uint8;

Back to the top of sys_info


typedef short int16;

#include <basedef.h>

A signed 16-bit integer. Use in preference to short.

See also: int8, uint8, uint16, int32, uint32, float32, bit32, bitfield, INT16_MIN, INT16_MAX

Declared as:

typedef        short                int16;

Back to the top of sys_info


typedef unsigned short uint16;

#include <basedef.h>

An unsigned 16-bit integer. Use in preference to unsigned short.

See also: int8, uint8, int16, int32, uint32, float32, bit32, bitfield, UINT16_MAX

Declared as:

typedef        unsigned short        uint16;

Back to the top of sys_info


typedef int int32;

#include <basedef.h>

A signed 32-bit integer. Use in preference to int.

See also: int8, uint8, int16, uint16, uint32, float32, bit32, bitfield, INT32_MIN, INT32_MAX

Declared as:

typedef        int                int32;

Back to the top of sys_info


typedef unsigned int uint32;

#include <basedef.h>

An unsigned 32-bit integer. Use in preference to unsigned int.

See also: int8, uint8, int16, uint16, int32, float32, bit32, uintp bitfield, UINT32_MAX

Declared as:

typedef        unsigned int        uint32;

Back to the top of sys_info


typedef uint32 uintp;

#include <basedef.h>

An unsigned integer that is large enough to hold both a uint32 and a pointer. Use in preference to uint32 or (void *) in places where either type may need to be stored in a single variable.

See also: int8, uint8, int16, uint16, int32, float32, bit32, bitfield, UINT32_MAX

Declared as:

typedef        uint32 uintp;

Back to the top of sys_info


typedef float float32;

#include <basedef.h>

A 32-bit floating point value. Use in preference to float.

See also: int8, uint8, int16, uint16, int32, uint32, bit32, bitfield, float64

Declared as:

typedef float                    float32;

Back to the top of sys_info


typedef double float64;

#include <basedef.h>

A 64-bit floating point value. Use in preference to double.

See also: int8, uint8, int16, uint16, int32, uint32, bit32, bitfield, float32

Declared as:

typedef double          float64;

Back to the top of sys_info


typedef unsigned int bit32;

#include <basedef.h>

An unsigned 32-bit value. Use in preference to uint32 when the value is treated as a collection of bits rather than a number.

See also: int8, uint8, int16, uint16, int32, uint32, float32, bitfield

Declared as:

typedef        unsigned int        bit32;                /* 32 changable bits. */

Back to the top of sys_info


typedef unsigned int bitfield;

#include <basedef.h>

An unsigned integer. Use as the type for all bitfields.

See also: int8, uint8, int16, uint16, int32, uint32, float32, bit32

Declared as:

typedef        unsigned int        bitfield;        /* bitfield entry */

Back to the top of sys_info


typedef unsigned char *baddr;

#include <basedef.h>

A pointer into memory.

This type is deprecated. New code should not use it, and it will not appear in future versions.

Declared as:

typedef        unsigned char        *baddr;

Back to the top of sys_info


const int32 INT8_MAX = 127;

#include <basedef.h>

The maximum value an int8 variable can hold.

See also: int8, INT8_MIN

Declared as:

const int32 INT8_MAX = 127;

Back to the top of sys_info


const int32 INT8_MIN = -128;

#include <basedef.h>

The minimum value an int8 variable can hold.

See also: int8, INT8_MAX

Declared as:

const int32 INT8_MIN = -128;

Back to the top of sys_info


const int32 INT16_MAX = 32767;

#include <basedef.h>

The maximum value an int16 variable can hold.

See also: int16, INT16_MIN

Declared as:

const int32 INT16_MAX = 32767;

Back to the top of sys_info


const int32 INT16_MIN = -32768;

#include <basedef.h>

The minimum value an int16 variable can hold.

See also: int16, INT16_MAX

Declared as:

const int32 INT16_MIN = -32768;

Back to the top of sys_info


const int32 INT32_MAX = 2147483647;

#include <basedef.h>

The maximum value an int32 variable can hold.

See also: int32, INT32_MIN

Declared as:

const int32 INT32_MAX = 2147483647;

Back to the top of sys_info


const int32 INT32_MIN = (-2147483647 - 1);

#include <basedef.h>

The minimum value an int32 variable can hold.

See also: int32, INT32_MAX

Declared as:

const int32 INT32_MIN = (-2147483647 - 1);

Back to the top of sys_info


const uint32 UINT8_MAX = 0xFF;

#include <basedef.h>

The maximum value a uint8 variable can hold. There is no UINT8_MIN equivalent, because it is zero.

See also: uint8

Declared as:

const uint32 UINT8_MAX = 0xFF;

Back to the top of sys_info


const uint32 UINT16_MAX = 0xFFFF;

#include <basedef.h>

The maximum value a uint16 variable can hold. There is no UINT16_MIN equivalent, because it is zero.

See also: uint16

Declared as:

const uint32 UINT16_MAX = 0xFFFF;

Back to the top of sys_info


const uint32 UINT32_MAX = 0xFFFFFFFF;

#include <basedef.h>

The maximum value a uint32 variable can hold. There is no UINT32_MIN equivalent, because it is zero.

Declared as:

const uint32 UINT32_MAX        = 0xFFFFFFFF;

Back to the top of sys_info


typedef uint32 Timeout;

#include <basedef.h>

A Timeout is the number of milliseconds before a given call should time out. There are 1000 milliseconds in every second. It is used as an argument for methods that can potentially block waiting for some resource. Classes that use Timeout include MessageQueue, Semaphore, and Thread.

Both the value 0 and UINT32_MAX should not be used; instead use the special values TIMEOUT_FOREVER or TIMEOUT_POLL.

The special values TIMEOUT_FOREVER and TIMEOUT_POLL can be used when a standard timeout period is not desired. TIMEOUT_FOREVER indicates no timeout should occur (and the method can potentially wait forever), and TIMEOUT_POLL is used when the call should not delay at all.

Declared as:

typedef uint32 Timeout;

Back to the top of sys_info


const Timeout TIMEOUT_FOREVER = UINT32_MAX;

#include <basedef.h>

TIMEOUT_FOREVER is a special Timeout value that indicates a call should never return with a "timeout" error. The call can potentially block forever.

See also: Timeout

Declared as:

const Timeout TIMEOUT_FOREVER = UINT32_MAX;

Back to the top of sys_info


const Timeout TIMEOUT_POLL = 0;

#include <basedef.h>

TIMEOUT_POLL is a special Timeout value that indicates the call should never block.

See also: Timeout

Declared as:

const Timeout TIMEOUT_POLL = 0;

Back to the top of sys_info


typedef void (VoidFuncOneArg)(void *arg);

#include <basedef.h>

VoidFuncOneArg is a typedef for a function that take one void* argument and returns void.

See also: Timer::Start()

Prototype:

typedef void (VoidFuncOneArg)(void *arg);

Back to the top of sys_info


#define PTR2INT(p) ((char *)(p) - (char *)0)

#include <basedef.h>

Turns a pointer type into an integral value.

Parameters:

in p
The pointer.

Return value: An integral value that holds the address p points to.

See also: INT2PTR()

Prototype:

 #define PTR2INT(p) ((char *)(p) - (char *)0)

Back to the top of sys_info


typedef char TCHAR;

#include <basedef.h>

Variables of type TCHAR are text characters (either Unicode or ASCII). TCHAR variables require one byte under single-byte character sets (SBCS, in effect when DO_DBCS is not #defined) and two bytes under double-byte character sets (DBCS, in effect when DO_DBCS is #defined).

Use TCHAR rather than another integral type whenever the value could be either a Unicode or ASCII character.

Always use TCHAR in preference to wchar_t.

See also: _TEXT()

Declared as:

typedef char TCHAR;

Back to the top of sys_info


const TCHAR* _TEXT(char* str);

#include <basedef.h>

The _TEXT() macro is applied to string constants.

Under DBCS it instructs the compiler to use 2 bytes per character when storing the string constant. Under SBCS it has no effect, but should be used for portability.

Parameters:

in str
Some string constant (enclosed in double quotes).

Return value: Pointer to a TCHAR.

Example:

One might apply the macro when adding text to a dialog box:

       DisplayWarningDialog(_TEXT("File not found!"));
    

See also: TCHAR()

Prototype:

const TCHAR* _TEXT(char* str);

Back to the top of sys_info


TCHAR _CHAR(char ch);

#include <basedef.h>

The _CHAR() macro is applied to character constants. Under DBCS it marks character constants for special handling. Under SBCS it has no effect but should be used for portability.

Parameters:

in ch
Some character constant (enclosed in single quotes).

Return value: TCHAR.

See also: TCHAR()

Prototype:

TCHAR _CHAR(char ch);

Back to the top of sys_info


typedef uint16 WCHAR;

#include <basedef.h>

Variables of type WCHAR are always 2-byte Unicode characters, even if the system is being compiled with no double-byte character support (DBCS).

In general, code should use TCHAR whenever the value could be either a Unicode or ASCII character. Uses of WCHAR should be restricted to those that must assume the character is Unicode.

See also: _TEXT()

Declared as:

typedef uint16 WCHAR;

Back to the top of sys_info


dll_link void AssertFail(const char* file, int line, const char* string);

#include <ec.h>

This function is EC-only and so is compiled into the code only when ERROR_CHECK is defined for the C preprocessor.

Do a failed assertion for this platform. Do not call this function directly. If you want to always fail, use EC_FAIL(). It is often useful to set breakpoints on this function within the debugger, however.

The behavior of AssertFail() is platform-dependent, but it will always halt the system.

Parameters:

in file
The file the EC macro is on, expanded from the preprocessor macro __FILE__.
in line
The line the EC macro is on, expanded from the preprocessor macro __LINE__.
in string
The string associated with the EC macro. It is displayed in the failure message (platform-dependent).

See also: ASSERT(), ASSERTS(), EC_FAIL()

Prototype:

dll_link void AssertFail(const char* file, int line, const char* string);

Back to the top of sys_info


dll_link void AssertWarn(const char* file, int line, const char* string);

#include <ec.h>

This function is EC-only and so is compiled into the code only when ERROR_CHECK is defined for the C preprocessor.

Do an assertion warning for this platform. Do not call this function directly. If you want to always warn, use EC_WARN(). It is sometimes useful to set breakpoints on this function within the debugger, however.

The behavior of AssertWarn() is platform-dependent, but it will never halt the system. Instead it will issue a warning and continue.

Parameters:

in file
The file the EC macro is on, expanded from the preprocessor macro __FILE__.
in line
The line the EC macro is on, expanded from the preprocessor macro __LINE__.
in string
The string associated with the EC macro. It is displayed in the failure warning (platform-dependent).

See also: ASSERT(), ASSERTS(), EC_FAIL()

Prototype:

dll_link void AssertWarn(const char* file, int line, const char* string);

Back to the top of sys_info


#define ASSERT(expr)

#include <ec.h>

An EC utility that halts the program if the passed expression evaluates to FALSE.

The file, line, and expression text are provided to the user in some way at the time of the failure (see AssertFail()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

Parameters:

in expr
An expression that should evaluate to a non-zero value.

See also: ASSERTS(), EC_FAIL(), ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()

Declared as:

 #define ASSERT(expr)

Back to the top of sys_info


#define ASSERTS(expr, str)

#include <ec.h>

An EC utility that halts the program if the passed expression evaluates to FALSE.

The file, line, and passed string are provided to the user in some way at the time of the failure (see AssertFail()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

Parameters:

in expr
An expression that should evaluate to a non-zero value.

See also: ASSERT(), EC_FAIL(), ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()

Declared as:

 #define ASSERTS(expr, str)

Back to the top of sys_info


#define ASSERT_WARN(expr)

#include <ec.h>

An EC utility that issues a warning if the passed expression evaluates to FALSE.

The file, line, and expression text are provided to the user in some way at the time of the warning (see AssertWarn()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

Parameters:

in expr
An expression that should evaluate to a non-zero value.

See also: ASSERTS(), EC_FAIL(), ASSERTS_WARN(), EC_WARN(), AssertWarn()

Declared as:

 #define ASSERT_WARN(expr)

Back to the top of sys_info


#define ASSERTS_WARN(expr, str)

#include <ec.h>

An EC utility that issues a warning if the passed expression evaluates to FALSE.

The file, line, and supplied string are provided to the user in some way at the time of the warning (see AssertWarn()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

Parameters:

in expr
An expression that should evaluate to a non-zero value.

See also: ASSERTS(), EC_FAIL(), ASSERT_WARN(), EC_WARN(), AssertWarn()

Declared as:

 #define ASSERTS_WARN(expr, str)

Back to the top of sys_info


#define EC_FAIL(str)

#include <ec.h>

An EC utility that halts the program if called.

The file, line, and supplied string are provided to the user in some way at the time of the failure (see AssertFail()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

See also: ASSERTS(),ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()

Declared as:

 #define EC_FAIL(str)

Back to the top of sys_info


#define EC_WARN(str)

#include <ec.h>

An EC utility that issues a warning if called.

The file, line, and supplied string are provided to the user in some way at the time of the warning (see AssertWarn()).

This macro generates code only when ERROR_CHECK is defined for the C preprocessor.

See also: ASSERTS(), EC_FAIL(), ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()

Declared as:

 #define EC_WARN(str)

Back to the top of sys_info


#define VERIFY(expr, test) (expr)

#include <ec.h>

VERIFY is like ASSERT, except that the expr is still evaluated when in non-EC.

This is provided because its use can be justified in certain cases, but convince yourself why the error condition doesn't need to be checked in production code before doing so.

For instance, any error that could result from user error or lack of resources should not be checked with VERIFY. Errors that either never result assuming bug-free code or that get caught later on with non-ec checks can be checked with VERIFY.

See also: ASSERT, VERIFY_WARN()

Prototype:

 #define VERIFY(expr, test) (expr)

Back to the top of sys_info


#define VERIFY_WARN(expr, test) (expr)

#include <ec.h>

VERIFY_WARN is like ASSERT_WARN, except that the expr is still evaluated when in non-EC.

This is provided because its use can be justified in certain cases, but convince yourself why the error condition doesn't need to be checked in production code before doing so.

For instance, any error that could result from user error or lack of resources should not be checked with VERIFY_WARN. Errors that either never result assuming bug-free code or that get caught later on with non-ec checks can be checked with VERIFY_WARN.

See also: ASSERT()

Prototype:

 #define VERIFY_WARN(expr, test) (expr)

Back to the top of sys_info


#define NEC(x)

#include <ec.h>

A macro that inlines its parameter in code when error-checking is turned OFF. For example, NEC(x--); is compiled only if error- checking is turned off.

Parameters:

in x
Some text.

See also: EC()

Declared as:

 #define NEC(x)

Back to the top of sys_info


#define EC(x)

#include <ec.h>

A macro that inlines its parameter in code only if error-checking is turned ON. For example, EC(printf("Entered third if statement.\n")); is compiled only if error-checking is turned on.

Parameters:

in x
Some text.

See also: NEC()

Declared as:

 #define EC(x)

Back to the top of sys_info


#define INSTANCE_ASSERT(expr)

#include <ec.h>

Equivalent to ASSERT(), but typically used in checking an object's instance data.

It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).

See also: ASSERT(), INSTANCE_ASSERTS()

Declared as:

 #define INSTANCE_ASSERT(expr)

Back to the top of sys_info


#define INSTANCE_ASSERTS(expr, str)

#include <ec.h>

Equivalent to ASSERTS(), but typically used in checking an object's instance data.

It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).

See also: ASSERTS(), INSTANCE_ASSERT()

Declared as:

 #define INSTANCE_ASSERTS(expr, str)

Back to the top of sys_info


#define _EC_INSTANCE(stmnt)

#include <ec.h>

Equivalent to EC(), but typically used in checking an object's instance data.

It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).

See also: ASSERT(), INSTANCE_ASSERTS()

Declared as:

 #define _EC_INSTANCE(stmnt)

Back to the top of sys_info


#define PARAM_ASSERT(expr)

#include <ec.h>

Equivalent to ASSERT(), but should be used to check a function's parameters.

It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).

See also: ASSERT(), PARAM_ASSERTS()

Declared as:

 #define PARAM_ASSERT(expr)

Back to the top of sys_info


#define PARAM_ASSERTS(expr, str)

#include <ec.h>

Equivalent to ASSERTS(), but should be used to check a function's parameters.

It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).

See also: ASSERTS(), PARAM_ASSERT()

Declared as:

 #define PARAM_ASSERTS(expr, str)

Back to the top of sys_info


#define _EC_PARAM(stmnt)

#include <ec.h>

Equivalent to EC(), but should be used to check a function's parameters.

It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).

See also: EC(), _EC_INSTANCE()

Declared as:

 #define _EC_PARAM(stmnt)

Back to the top of sys_info


enum InputEventType

#include <inputmgr.h>

InputEventType enumerated type to be used when identifying input events in the input monitor chain. It is typically associated with up to four arguments, which are passed to InputMonitor::ProcessEvent.

IET_POINTER
Pointer event. arg1 = PointerAction. arg2 = PointerState. arg3 = x position of event. arg4 = y position of event.

IET_CHAR
Key event. arg1 = TCHAR. arg2 = ShiftState. arg3 = ToggleState. arg4 = CharFlags.

IET_INK_QUERY
Query if a press should be ink or a pointer. arg1 = x position of pointer press. arg2 = y position of pointer press.

IET_INK
Ink. arg1 = Ink.

IET_INFO_FOR_INK_MONITOR
arg1 = InkMonitorInfoEvent. arg2 = Width of ink. arg3 = Pointer to window. arg4 = Colorant (color of ink).
IET_HARD_ICON_PRESSED
arg1 = Index of the hard icon that was pressed.

Declared as:

enum InputEventType {
    IET_POINTER,
    IET_CHAR,
    IET_INK_QUERY,
    IET_INK,
    IET_INFO_FOR_INK_MONITOR,
    IET_HARD_ICON_PRESSED

Back to the top of sys_info


void Swap( int16& aa, int16& bb );

#include <numerics.h>

Swaps two int16 values.

Parameters:

in aa
A value to swap.
in bb
A value to swap.
out aa
Now has the value of bb.
out bb
Now has the value of aa.

Status: Frozen

Prototype:

inline void
Swap( int16&  aa, int16&  bb );

(Function defined inline.)

Back to the top of sys_info


void Swap( int32& aa, int32& bb );

#include <numerics.h>

Swaps two int32 values.

Parameters:

in aa
A value to swap.
in bb
A value to swap.
out aa
Now has the value of bb.
out bb
Now has the value of aa.

Status: Frozen

Prototype:

inline void
Swap( int32&  aa, int32&  bb );

(Function defined inline.)

Back to the top of sys_info


int32 Sign( int32 aa )

#include <numerics.h>

Returns the numeric sign of a value.

Parameters:

in aa
The value to use.

Return value: 1 if the value is positive, 0 if the value is zero, -1 if the value is negative.

Status: Frozen

Prototype:

inline int32
Sign( int32 aa )
                          

(Function defined inline.)

Back to the top of sys_info


int32 Abs( int32 aa ) ;

#include <numerics.h>

Returns the absolute value of the argument. A negative becomes positive.

Parameters:

in aa
The number to take the absoulte value of.

Return value: The absolute value.

Status: Frozen

Prototype:

inline int32
Abs( int32 aa )
                            ;

(Function defined inline.)

Back to the top of sys_info


int32 Min3( int32 aa, int32 bb, int32 cc ) ;

#include <numerics.h>

Returns the minimum of three values.

Parameters:

in aa
One of the values.
in bb
One of the values.
in cc
One of the values.

Return value: The smallest of the three arguments.

See also: Max3()

Status: Frozen

Prototype:

inline int32
Min3( int32  aa, int32  bb, int32  cc )
                                      ;

(Function defined inline.)

Back to the top of sys_info


int32 Max3( int32 aa, int32 bb, int32 cc ) ;

#include <numerics.h>

Returns the maximum of three values.

Parameters:

in aa
One of the values.
in bb
One of the values.
in cc
One of the values.

Return value: The largest of the three arguments.

See also: Min3()

Status: Frozen

Prototype:

inline int32
Max3( int32  aa, int32  bb, int32  cc )
                                      ;

(Function defined inline.)

Back to the top of sys_info


Boolean UnicodeToSJISConversionPossible(TCHAR character);

#include <sjisxlat.h>

Return whether a given Unicode character can be converted into a SJIS character.

Note that the Unicode -> SJIS tables are mostly standard, but can be customized for each device.

Parameters:

in character
A Unicode character

Return value: TRUE if the Unicode character is defined in SJIS, FALSE otherwise.

See also: SJISToUnicodeConversionPossible(), UnicodeToSJIS()

Status: Frozen.

Prototype:

Boolean UnicodeToSJISConversionPossible(TCHAR character);

Back to the top of sys_info


Boolean SJISToUnicodeConversionPossible(TCHAR character);

#include <sjisxlat.h>

Return whether a given SJIS character can be converted into a Unicode character.

Note that the SJIS -> Unicode tables are mostly standard, but can be customized for each device.

Parameters:

in character
A SJIS character

Return value: TRUE if the SJIS character is defined in Unicode, FALSE otherwise.

See also: UnicodeToSJISConversionPossible(), SJISToUnicode()

Status: Frozen.

Prototype:

Boolean SJISToUnicodeConversionPossible(TCHAR character);

Back to the top of sys_info


TCHAR UnicodeToSJIS(TCHAR character);

#include <sjisxlat.h>

Convert a Unicode character into a SJIS character.

Parameters:

in character
A Unicode character.

Return value: Zero if the given Unicode character has no SJIS character (error case), otherwise the corresponding SJIS character.

See also: SJISToUnicode()

Status: Frozen.

Prototype:

TCHAR UnicodeToSJIS(TCHAR character);

Back to the top of sys_info


TCHAR SJISToUnicode(TCHAR character);

#include <sjisxlat.h>

Convert a SJIS character into a Unicode character.

Parameters:

in character
A SJIS character.

Return value: Zero if the given SJIS character has no Unicode character (error case), otherwise the corresponding Unicode character.

See also: UnicodeToSJIS()

Status: Frozen.

Prototype:

TCHAR SJISToUnicode(TCHAR character);

Back to the top of sys_info


TCHAR SJISToJIS(TCHAR character);

#include <sjisxlat.h>

Convert a SJIS character to a JIS character.

Parameters:

in character
A SJIS character.

Return value: The corresponding JIS character.

Status: Frozen.

Prototype:

TCHAR SJISToJIS(TCHAR character);

Back to the top of sys_info


typedef long unsigned int size_t;

#include <stdtypes.h>

The type used by memory allocation routines to specify the size of a memory block.

Declared as:

typedef long unsigned int   size_t;

Back to the top of sys_info


typedef void *malloc_t;

#include <stdtypes.h>

The pointer type used by memory allocation routines such as malloc() and realloc().

Declared as:

typedef void *malloc_t;

Back to the top of sys_info


Generated from source by Geoworks on Sat Dec 12 18:30:47 1998 .