[Top] [Prev] [Next]

context

Context - graphics environment

Synopsis

include "draw.m";
draw:= load Draw Draw->PATH;
Context: adt
{
  screen:  ref Screen;
  display: ref Display;
  cir:     chan of int;
  ckbd:    chan of int;
  cptr:    chan of ref Pointer;
  ctoappl: chan of int;
  ctomux:  chan of int;
};

Description

The Context abstract data type encapsulates the data types and channels used by an interactive application. A reference to the Context is passed as the first argument to an application when it begins execution:

include "draw.m"; 
Command: module 
{
     init:  fn(nil: ref Draw->Context; nil: list of string);
};

Most programs do not create Contexts but rather inherit one from their parent, typically a shell or window system.

General Interfaces
screen

The Screen adt to which the application is connected; may be nil. See screen.

display

The Display adt to which the application is connected; may be nil. See display.

MUX Interfaces
cir

A channel of type int that delivers events from an infrared remote control device, if one is present. See the discussion below and ir for more information.

ckbd

A channel of type int that delivers keystrokes from a keyboard.

cptr

A channel of type ref Pointer that delivers events from a pointing device such as a mouse.

ctoappl

A channel of type int that delivers control messages to the application from the Mux application multiplexer. One message is defined:

MAtop

Requests the application to make its set of windows fully visible.

ctomux

A channel of type int used by the application to send messages to the Mux regarding the application's use of system devices. The defined messages are:

AMstartir

The application is ready to accept IR-data on the cir channel.

AMstartkbd

The application is ready to accept keyboard data on the ckbd channel.

AMstartptr

The application is ready to accept Pointer data on the cptr channel.

AMnewpin

The application needs a PIN.

AMexit

An application should send this message before it exits, to allow the Mux to recover resources.

See Also
ir

for description of the cir channel.



[Top] [Prev] [Next]

infernosupport@lucent.com
Copyright © 1996,Lucent Technologies, Inc. All rights reserved.