Re: UI-Question



   From: Miguel de Icaza <miguel@nuclecu.unam.mx>
   Date: Fri, 27 Mar 1998 16:58:22 -0600

   I am interested in which kind of data can be passed to a service: only
   marked text?  Would there be any other way to invoke it?

A particular service looks something like this (example from the
OmniImageFilter image conversion service on my nextstep 3.3 box):

Filter: convertToTIFF

	Identification of the functionality within the program, i.e. the
	name of the method to be invoked.

Port: OmniImageFilter

	The port on which this service will be listening.

User Data: jpeg

	Eh...

Send Type: NXFilenamePboardType:jpeg

	The paste board type that is input to the service.  This can be
	empty for a service that takes no input.

Return Type: NXTIFFPboardType

	The paste board type of the output from this service.  Thus, the
	send and return types tell you that this service can generate a
	pixel image from a filename with the `jpeg' extension.

Executable: OmniImageFilter

	The program to be started if the port registered for this service
	does not exist.  This program resides in the same directory as the
	file describing this service.  Obviously, this program should
	create the port upon startup.

Concluding, *anything* can be passed.  A pasteboard is something on which
you can provide multiple representations of (supposedly) the same data.
For example, a word proc can provide MySuperWordProc1.2DataPasteboardType
for the full thing, HTML4.0PasteboardType for a conversion of the full
thing, presumably loosing some of the fancy things, and ASCIIPBoardType,
for only the text.  All these types are declared on the paste board, and
the receiver of the data can request the particular representation it
understands (best).  Paste boards are used for copy/paste operations, but
Font and Ruler paste boards also exist, so one can copy font information
or ruler information without needing to copy contents (only the meta stuff
is then copied).  Drag and Drop also employ a (separate) paste board (but
obviously with the same underlying machinery).  Paste boards are handled
by a separate paste board server (pbs).  Quite cool.  --Tiggr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]