next up previous
Next: xdrawablearray Up: simxlib Previous: xdisplay

x_display


     NAME
	  x_display - part of Simula to	Xlib interface

     DESCRIPTION
	     Xlib_Display class	X_Display(theDisplayName);
	     text theDisplayName; ! The	X Server to connect to;
	  See XDisplay,	this part of the implementation	 contains  few
	  operations	 of    common	 interest.    The    parameter
	  'theDisplayName' is the name of  the	machine	 where	the  X
	  Server  is  executing. Notext	means the same computer	as the
	  client, or if	the environment	variable

	  See XEventManager for	how Input/Output to the	Window	Server
	  is managed, only 'Synchronize' is meaningfull	to call	of the
	  'Events' operations, from application	code.  WMop-operations
	  are only meaningfull to use when writing WindowManagers, not
	  in general applications.

	  Objects of class  'XVisualInfoList'  and  'XVisualInfo'  are
	  returned   by	 procedure  GetVisualInfo.  Objects  of	 class
	  'XColorMap'	   are	     related	   to	    procedures
	  Install/UninstallColorMap. These three classes are described
	  in the section on Screen.

	  SUPERS: Xlib_Display,	Xlib_Object
	  KIND:	Abstract
	  INIT:	Initilized by subclass XDisplay
	  Sequencing: (<Ident> <Events>	<Windows> <Color> <Database>
	  <Select>
	  :	       <WMop> )*
	  : Ident=ConnectionNumber/DisplayName/ParseGeometry
	  : Events=NextEvent/Flush/QLength/Sync/Synchronize
	  :	DisplayMotionBufferSize//EventsQueued/Pending
	  :
	  GetInputFocus/LastKnownRequestProcessed/NextRequest/NoOp
	  : Windows=QueryTree/RestackWindows
	  : Color=GetVisualInfo/InstallColormap/UninstallColormap
	  : DataBase=GetErrorDatabaseText/GetErrorText/InternAtom
	  :
	  Select=ConvertSelection/GetSelectionOwner/SetSelectionOwner/
	  :	RotateBuffers
	  : WMop=SetScreenSaver/ActivateScreenSaver/GetScreenSaver/
	  :	ForceScreenSaver/ResetScreenSaver/AddHost/RemoveHost/
	  :
	  SetCloseDownMode/DisableAccessControl/EnableAccessControl/
	  :	SetAccessControl/ProtocolRevision/ProtocolVersion/
	  :	ServerVendor/VendorRelease

     IDENTIFICATION
     ConnectionNumber
	     Integer Procedure ConnectionNumber;
	  Returns the file descriptor  number  of  the	pipe  used  to
	  communicate with the X server.

     DisplayName
	     Text Procedure DisplayName;
	  Returns the actual name of the server	 connected  to,	 After
	  possible  expansion  of  the 'DISPLAY' environment variable.
	  Default name is ":0.0" - screen 0 on current machine.

     ParseGeometry
	     Integer Procedure
	     ParseGeometry(parsestring,x_return,y_return,
	     width_return,height_return);
	     Name  x_return,y_return,width_return,height_return;
	     Text parsestring; ! input parameter;
	     Integer x_return; ! defined if XValue set.;
	     integer y_return; ! defined if YValue set.;
	     integer width_return; ! defined if	WidthValue set.;
	     integer height_return; ! defined if HeightValue set.;
	  Extract geometry information from a string:

	  Parsestring: [=] [<width>x<height] [{+-}<xoffset>{+-
	  }<yoffset>]
	  Returns mask where each bit tells if the corresponding value
	  (x,  y, width, height) was found in the parsed string. Value
	  returned is equal to one, or sum of some of these constants:

	  NoValue
	  XValue
	  YValue
	  WidthValue
	  HeightValue
	  AllValues   =	XValue+YValue+WidthValue+HeightValue
	  XNegative
	  YNegative

     EVENT MANAGING
     Synchronize
	     Boolean Procedure Synchronize(Animate);
	     Boolean Animate;
	  If  Animate  is  true,  ouput	  is   reported	  to   XServer
	  immediately.	 No  buffering	in client is going on. Will be
	  slow but is usefull during debugging.	The previous state  is
	  returned, false means	buffered output.

     NextEvent
	     Procedure NextEvent(Area);
	     integer array Area; ! Must	be at least integer (0:24).;
	  Fetches the next event from the input	queue. If no event  is
	  available,  the  routine blocks the Simula program until one
	  is received (used by XEventManager only).

     Flush
	     Procedure Flush;
	  Send all buffered messages to	the X server.

     QLength
	     Integer Procedure QLength;
	  Returns the  current	length	of  the	 input	queue  of  the
	  display.

     Sync
	     Procedure Sync(Discard);
	     Boolean Discard;
	  Flush	the request buffer and wait for	 all  requests	to  be
	  processed by the server.

     DisplayMotionBufferSize
	     Integer Procedure DisplayMotionBufferSize;
	  Returns the size of the motion history buffer.

     EventsQueued
	     Integer Procedure EventsQueued(Mode);
	     Integer Mode;!=Queued(Already/AfterReading/AfterFlush);
	  Returns the number of	events in the input queue.

     Pending
	     Integer Procedure Pending;
	  Flushes the request buffer and returns the number  of	 input
	  events pending.

     GetInputFocus
	     procedure GetInputFocus(focus_return,revert_to_return);
	     Name focus_return,revert_to_return;
	     ref(X_Drawable) focus_return;
	     ref(X_Drawable) revert_to_return;
	  Return the window that currently has the input focus.

     LastKnownRequestProcessed
	     Integer Procedure LastKnownRequestProcessed;
	  Return the ID	number of  the	request	 known	to  have  been
	  processed by the X server.

     NextRequest
	     Integer Procedure NextRequest;
	  Returns the ID number	of the next request to be issued.

     NoOp
	     Procedure NoOp;
	  Sends	a noop-request to the X	server.	Can be used to measure
	  network response times.

     WINDOW MANAGING
     QueryTree
	     procedure QueryTree(Target,root,parent,children);
	     name root,parent,children;
	     ref(X_Drawable) Target; ! Parameter;
	     ref(X_Drawable) root; ! result;
	     ref(X_Drawable) parent; ! result;
	     ref(XDrawableArray) children; ! result;
	  Return information  about  a	windows	 position  within  the
	  window hierarchy.

     RestackWindows
	     Procedure RestackWindows(windows,nwindows);
	     ref (XLib_Window) array windows;
	     integer nwindows;
	  Change the stacking order of the specified windows.

     COLOR MANAGING
     GetVisualInfo
	     ref (XVisualInfoList) procedure GetVisualInfo(vinfo_mask,
	     vinfo_template);
	     integer vinfo_mask;
	     ref (XVisualInfo) vinfo_template;
	  Return the visualinfolist matching the  specified  template.
	  vinfo_mask defined which attributes to use as	selectors, use
	  one or several of the	following constants (can be added):

	     VisualNoMask      VisualIDMask	 VisualScreenMask
	     VisualDepthMask   VisualClassMask	 VisualRedMaskMask
	     VisualGreenMaskMask     VisualBlueMaskMask
	     VisualColormapSizeMask  VisualBitsPerRGBMask
	     VisualAllMask= sum	of the above

     InstallColormap
	     Procedure InstallColormap(TheColorMap);
	     ref (XColorMap) TheColorMap;
	  Install a colormap into the X	server.

     UninstallColormap
	     Procedure UninstallColormap(colormap);
	     ref (XColorMap) colormap;
	  Remove an installed colormap.

     DATABASE OPERATION
     GetErrorDatabaseText
	     text Procedure
	     GetErrorDatabaseText(AplName,Message,default);
	     text AplName,Message,default;
	  -- What should "Message" contain ?? --

	  Obtain error messages	from the error database.

     GetErrorText
	     text procedure GetErrorText(ErrorCode);
	     integer ErrorCode;

	  Obtain a textual description of an error code.

     InternAtom
	     Integer Procedure InternAtom(atom_name,only_if_exists);
	     Text atom_name;
	     Boolean only_if_exists;
	  Return an atom for the given property	name string.

     SELECT OPERATION
     ConvertSelection
	     Procedure
	     ConvertSelection(selection,target,property,requestor,time);
	     Integer selection,target,property,time;
	     ref (Xlib_Window) requestor;
	  Use the value	of a selection.

     GetSelectionOwner
	     ref (Xlib_window) procedure GetSelectionOwner(selection);
	     Integer selection;
	  Return the owner of a	selection.

     SetSelectionOwner
	     Procedure SetSelectionOwner(selection,owner,time);
	     Integer selection,	time;
	     ref (Xlib_window) owner;
	  Set the owner	of a selection.

     RotateBuffers
	     Procedure RotateBuffers(rotate);
	     Integer rotate;
	  Rotate the contents of  the  cut  buffers  between  the  cut
	  buffer.

     WINDOWMANAGER OPERATION
     Screen saver constants
	  prefer_blanking= DontPreferBlanking PreferBlanking
	  DefaultBlanking
	  ??? =	DisableScreenSaver DisableScreenInterval
	  allow_exposures= DontAllowExposures AllowExposures
	  DefaultExposures
	  Mode=	ScreenSaverReset ScreenSaverActive

     SetScreenSaver
	     Procedure SetScreenSaver(timeout, interval,
	     prefer_blanking, allow_exposures);
	     Integer timeout;
	     integer interval;
	     integer prefer_blanking;
	     !=(DontPrefer/Prefer/Default)Blanking;
	     integer allow_exposures;
	     !=(DontAllow/Allow/Default)Exposures;
	  Set screen saver parameters.
     ActivateScreenSaver
	     Procedure ActivateScreenSaver;
	     XActivateScreenSaver(XID);
	  Activates the	screen saver if	available.

     GetScreenSaver
	     Procedure GetScreenSaver(timeout_return,interval_return,
	     prefer_blanking_return,allow_exposures_return);
	     Name
	     timeout_return,interval_return,prefer_blanking_return,
	     allow_exposures_return;
	     integer timeout_return;
	     integer interval_return;
	     integer
	     prefer_blanking_return;!:=(DontPrefer/Prefer/Default)Blanking;
	     integer
	     allow_exposures_return;!:=(DontAllow/Allow/Default)Exposures;
	  Get the current screen saver parameters.

     ForceScreenSaver
	     Procedure ForceScreenSaver(Mode);
	     Integer Mode;!= ScreenSaverReset ScreenSaverActive;
	  Turn the screen saver	on or off

     ResetScreenSaver
	     Procedure ResetScreenSaver;
	  Make the screen visible.

     AddHost
	     Procedure AddHost(Family,Address);
	     integer Family;   !=Family(Internet/DECnet/Chaos);
	     text Address;
	  Adds a remote	host to	the list of hosts permitted to connect
	  to the display.

     RemoveHost
	     Procedure RemoveHost(Family,Address);
	     integer Family;   ! See Xlib_display for allowed values;
	     text Address;
	  Removes a remote host	to the	list  of  hosts	 permitted  to
	  connect to the display.

     SetCloseDownMode
	     Procedure SetCloseDownMode(Close_Mode);
	     Integer Close_Mode;
	     !=DestroyAll/RetainPermanent/RetainTemporary;
	  Defines what happens to the resources	of the client when the
	  connection to	the server is closed.

     DisableAccessControl
	     Procedure DisableAccessControl;
	  Allow	acces to the X server from any host.
     EnableAccessControl
	     Procedure EnableAccessControl;
	  Switch off uncontrolled access to the	X server.

     SetAccessControl
	     Procedure SetAccessControl(mode);
	     Integer mode; !=EnableAccess/DisableAccess;
	  Enable or disable control of accesses	to the X server

     ProtocolRevision
	     Integer Procedure ProtocolRevision;
	  Returns the minor protocol revision number of	the X server.

     ProtocolVersion
	     Integer Procedure ProtocolVersion;
	  Returns the protocol version of the X	server.

     ServerVendor
	     Text Procedure ServerVendor;
	  Returns a text identifying the producer of the X server.

     VendorRelease
	     Integer Procedure VendorRelease;
	  Return a number identifying the revision  number  of	the  X
	  Server.