NAME
|
omero, Ocp – Plan B portable window system |
SYNOPSIS
|
omero [ –A ] [ –dDCFLBMTS ] [ –n addr ] [ –p ] [ –V volspec ] [ –t mouseaddr
[ initprog ]
Ocp from to |
DESCRIPTION
|
Omero is the Plan B window system and the Graphical User Interface
resource volume, as described in omero(1). It services a tree
of files (i.e., a volume) to implement a Plan B GUI service. Upon
starting, it runs ox(1) to permit the user to edit, execute commands
and browse the system. Besides, the script initprog is
executed if given as a parameter. Most users use /bin/owins as
the omero startup script. By default, omero listens for clients (authenticating them) at tcp!*!11007. Options –A, –n, and –V can change this behaviour and are like those of other Plan B volume servers. See planb(4) for a description. Uppercase options are used for debugging and may lead to very verbose executions. Omero provides GUI components known as panels, like rows, columns, buttons, sliders, and others described below. Each panel is represented by a directory that contains a ctl, a data, and a lck file. Panels can be created and deleted by making and removing such directories. Besides the three files mentioned above, rows and columns have one extra subdirectory for each one of the panels they contain. The order of the files contained in a directory is representative and corresponds to the order used to show their panels in the screen, which is usually the order of their creation. The order in the screen is left to right for rows and top to down for columns. The file system can be used to move, copy (i.e replicate), and delete graphical items serviced by omero. Ocp is a script that copies omero panels from a directory to another in response to user mouse commands. The applications affected are usually unaware of this if they are using omero(2). The name of a directory determines the type of panel it represents. A name is of the form type:name (eg. text:ox.3442) where type is any of row, col, image, text, label, button, tag, gauge, slider, page, and draw. Usually, name is a string randomized by the application to permit any two names to cohexist within the same directory (i.e., within the same container panel). Omero uses the file /dev/snarf as the clipboard, to put there the bytes when a cut operation snarfs them. The file /dev/sel is updated by omero with the file system path for the last text panel where some text was selected. This is a helper for executing commands that operate on selected text. Panel Files Both files are complete descriptions (i.e. they are not streams), which means that tools like tar(1) can be used to copy a hierarchy of panels from one place to another (maybe at different machines), and the resulting GUI would be similar. If the application is using omero(2), it would properly handle all the copies of its interface.
Panel directories also contain a lck file used to synchronize
multiple processes that operate on the same set of panels. An
open of this file is refused if the panel (or any of its containers
up to the root) is on hold. Opening the file puts the file on
hold until the file is closed. Programs that want to gain a coarse
lock on a
panel must keep this file open during the locked operation. This
is done by Ocp while a panel is being copied, and by most omero
programs while creating and removing panels. Omero uses this mechanism
also to synchronize a move operation performed using the mouse.
Deletions using the mouse are always obeyed.
If the open of lck fails, the expected behaviour is to retry several
times for a few seconds at most. Therefore, the lock should not
be kept for a long time. Panels
Image panels hold Plan 9 images as data. The size of the panel
is that of the image. Its ctl file contains
Page is like image but grows depending on available space and allows mouse interaction to see images bigger than the space available.
Text is a text panel that permits edition. The contents of the
data file is the text being edited. See omero(1), and ox(1) for
a description of the user interface. Its ctl file contains
Besides the requests that can be made for these attributes text
panels understand other control requests:
redoto redo the last undone operation. cut to cut the selection. paste
Label is a read–only fixed–size tag. By default, the text of the label matches its name (without the type prefix). The data file can be used to change this. Button is a label that sends execution events for both look and execute requests (mouse buttons 2 and 3). Gauge shows a numeric value between 0 and 100 using a graphical representation of a gauge. Slider is a gauge than can be adjusted by the user using the left button.
Draw is a graphical panel for vector graphics. It draws the commands
contained in its data file. Currently, draw knows the following
commands:
Attributes and control requests
showundoes this. dirty
addr netaddr
nomin
Events
|
SOURCE
|
/sys/src/cmd/omero |
SEE ALSO
|
omero(1), ox(1), and omero(2). |
BUGS
|
There is no way to replicate a panel within the a single container,
there may be only one file with a given name. Besides, this service
is young, there may be some other bugs. All the comunication is
plain text and thus can be eavesdropped. Some support for encryption
should be added. |