Method and apparatus for user-interface enhancement

An automated method and apparatus for determining the extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements. The invention includes providing a computer coupled with a user-interface having an extent of enhancement capabilities available to the user. The invention automatically determines the extent, and generates control signals to employ the enhancements within the extent. The control signals are then transmitted from the computer to the user-interface.

FIELD OF THE INVENTION

The invention is generally directed to computer or data processing systems, and more particularly is directed to user-interfaces for such computer or data processing systems.

BACKGROUND OF THE INVENTION

For various computer systems and networked computer systems, there are commands, for example unix commands (usually small programs)that produce plain ASCII text as output. These commands typically write their output to a generic file or file descriptor within a program, for example stdout for the unix system. For the example of Stdout, this may be a reference to a user's terminal window, computer network browser window or the like, which would cause the output to be displayed in that terminal or browser window. Alternatively, Stdout may be a reference to a named file on the filesystem, or it may be a reference to a pipe which would cause the output text to become the input of another command.

It is important that these text producing programs are able to output only plain text because, as just stated, their output may become the input of another program, and the second program expects and can process only plain ASCII text as its input. Some of these text producing commands are Is, find, grep, od, whereis, who, whoami, xd, etc.

As explained above, plain text is necessary as input for other commands. However, when text is output to a terminal window for a user (human) to read and analyze, the human is more productive if that text is colored or highlighted in a sensible manner to aid the human in processing the information contained in the text. Most modern terminal windows are capable of interpreting and processing embedded control sequences and highlighting or coloring surrounding text according to these control sequences.

Unfortunately, the required control sequences vary depending upon the terminal window being used. For instance, to turn on red foreground, the hpterm terminal requires the sequence <Esc>&v 1 S, but the dtterm and color-xterm terminals require the sequence <Esc> 31 m , where in both cases <Esc> is the ASCII escape character (numbered 27 in decimal and 1 b in hexadecimal).

To enable text producing commands to output both plain text and text with control sequences, a software provider could write two or more versions of each text producing command, one to output plain text only and the other(s)to output text with control sequences. Or the software provider could write a single version of the command with additional command line options to turn on or off the output of control sequences and to determine which group of control sequences to use.

However, both such schemes would place an additional burden upon the user. With the former scheme, the user would: i)have to know that two versions exist; ii) realize that he is or is not sending the output of the text producing command to another program; and iii) remember the correct command name, i. e. the name for the one that produces control sequences or the name for the one that doesn't (depending on what he wants), and type the correct name.

Additionally, the former scheme is limited by requiring two or more versions of the command with nearly the same functionality. This results in increased disk space to store multiple versions of the command, and possibly more bugs or defects because the multiple versions, although very similar in functionality, may not share any source code.

With the latter scheme, the user would have to i) realize that he or she is not sending the output of the text producing command to another program, ii) remember what the command line options are to produce or not produce control sequences embedded in the output text (depending on what he or she wants), iii) remember the command option to select terminal window type he or she is currently using, and iiii) type the correct options.

Given these difficulties a single text producing program would ideally output only plain text when its output is going to a file or as input to another program, and would output the same plain text but with embedded control sequences that will provide display enhancements in the terminal window, for example, highlight and/or color the plain text, in a way meaningful to the user.

Furthermore, a single text producing command would ideally differentiate among terminal window types and output the correct control sequences for the terminal window being used.

What is needed is an automated method and apparatus for determining an extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements.

SUMMARY OF THE INVENTION

The invention provides an automated method and apparatus for determining the extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements.

If information is presented employing user-interface enhancement capabilities, for example capabilities for coloring or highlighting selected text in a sensible manner, then the information is more understandable and more easily read and analyzed, and accordingly the user is more productive. The invention advantageously provides for automatic employment of such capabilities without burdening the user.

Briefly, and in general terms the invention includes providing a computer coupled with a user-interface, and automatically determining the extent of available enhancement capabilities of the user-interface. The invention generates control signals to employ the enhancements within the extent, and transmits the control signals from the computer to the user-interface.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In FIG. 1 a simplified block diagram illustrates a preferred embodiment of the invention. As shown, the invention includes a suitably programmed computer. Coupled with the computer is a user-interface, for example a video display terminal, without enhancement capabilities. For contrasting illustrative purposes, also shown is another user-interface with an extent of enhancement capabilities, for example, including color highlighting capabilities. As representatively illustrated by double headed arrows in FIG. 1 , each of the two user-interfaces are responsively coupled with the computer, for example, through a computer network, wherein the computer executes suitable network protocol software. As will be discussed in greater detail subsequently herein, the invention advantageously provides automatic determination of respective extent of any enhancement capabilities of each of the user-interfaces coupled with the computer.

Of course, it should be understood that the invention is not limited to color highlighting capabilities. Other enhancement capabilities may be employed in conjunction with the invention with beneficial results. Examples of other enhancement capabilities include, but are not limited to: text is slightly blurred or shadowed for de-emphasis; text is spoken in different people's voices, each voice conveying a different emphasis or meaning; text is spoken in monotone for de-emphasis; text is spoken in different voices (deep versus high; male versus female; differing regional accents; fast versus slow articulation pace; differing emotional inflections); text is sung for emphasis, different background music or sound effects are played while the text is spoken or displayed, text is physically raised for emphasis, the user interface and/or depiction vibrate or move to give emphasis to text.

In FIG. 1 , within the block of the user-interface WITHOUT enhancement capabilities is an example depicting a display of output from the standard unix command Is (executed initially in default mode and then with the I option.) It should be noted that the lines that starts with $ are the prompt and the command typed by the user. As shown in FIG. 1 , the user-interface WITHOUT enhancement capabilities generates its exemplary display depiction in response to control signals (including ASCII encoded text), which it receives through the computer network from the computer.

Within the block of the user-interface WITH enhancement capabilities is an alternative example depicting an enhanced display of output from the standard unix command Is. For this example where the extent of enhancement capabilities includes color highlighting capabilities, file names of executable files (duplex, libwindow.sl) are highlighted with a green background color, names of symbolic links (libwin.a, libwin.sl) are highlighted with a teal background color, and directory names (utils) are highlighted with a yellow background color. As shown in FIG. 1 , the example of the user-interface WITH enhancement capabilities generates its alternative enhanced display depiction in response to alternative control signals (including embedded control codes within the ASCII encoded text) that it receives through the computer network from the computer.

Such different color highlight backgrounds are representatively illustrated in FIG. 1 using boxes having a respective different line style type corresponding to each different color. Accordingly, in FIG. 1 file names of executable files (duplex, libwindow.sl) are shown boxed with a stippled . . . line style type, names of symbolic links (libwin.a, libwin.sl) are shown boxed with a solid line style type, and directory names (utils) are shown boxed with a dashed - - - line style type.

In the preferred embodiment, computer functions are implemented within the computer by appropriate software running on one or more processors of the computer, or by appropriate computer hardware, or by appropriate combinations thereof. Accordingly, such functions are representatively illustrated in FIG. 1 by various functional blocks. As particularly shown, the computer includes an analyzer for automatically determining the respective extent of enhancement capabilities of each of the user-interfaces coupled with the computer. Also included is a generator of respective control signals as shown in FIG. 1 to employ enhancements within the respective extent of each of the user-interfaces. Also included is a transmitter of the respective control signals for conveyance thereof from the computer each of the user-interfaces, preferably using the computer network and the network protocol software.

As shown in FIG. 1 , and as discussed in greater detail subsequently herein, the analyzer includes a generator and evaluator of respective file descriptors corresponding to each of the user-interfaces. In the preferred embodiment, these provide for determining whether such file descriptors reference a respective terminal window of the user-interfaces. Terminal window as used herein is defined sufficiently broad so as to include terminal window, browser window and the like.

As shown in FIG. 1 , the analyzer also includes a environment variable generator and evaluator. The analyzer is adapted for accessing a set of records of terminal window types and for determining whether the environment variable corresponds to a member of the set. The control signal generator is adapted for determining sequences of the embedded control codes based on the corresponding member record.

In the preferred embodiment, the invention automatically enables a single version of a text producing program (such as the example Is) to output only plain text when necessarily limited by the extent of user-interface enhancement capabilities available to the user, and to output the same text with embedded control sequences for user-interface enhancements, for example color and/or highlight, when the text will be viewed by a user in a terminal window having such user-interface capabilities. Furthermore the invention enables a text producing program to output the correct control sequences for the terminal window where the output will be viewed by a user.

Upon startup of appropriate software of an extended text producing program incorporating the functional blocks of the analyzer just discussed, the computer automatically determines whether its output will go to a terminal window by calling the POSIX. 1 standard function isatty( ) for the file descriptor where output will be sent (typically stdout). If isatty( ) returns 1, the file descriptor references a terminal window and the extended program examines the environment variable, TERM. and from this determines which group of control sequences it will output. Accordingly, if isatty( ) returns 1 and TERM contains a known terminal window type name, the extended text producing program engages the signal generator and signal transmitter depicted as functional blocks in FIG. 1 for purposes of outputting text to the user-interface WITHOUT enhancement capabilities, and alternatively outputting text with the correct embedded control sequences to the user-interface WITH enhancement capabilities.

In the preferred embodiment, the signal generator is embodied using software that automatically sets a pointer to point to (or passing a pointer) to an array that contains the correct control sequences, where in the case of not outputing control sequences the pointer is set to point to an array of empty strings. Alternatively, a global variable is set indicating to its various functions they should produce control sequences and which sequences or pass such a variable to its various text producing functions, where the functions have been extended to check this variable and produce control sequences accordingly.

For example, the following Appendix 1 includes C source code (and pseudocode/comments), Is.c, which particularly illustrates:

1. The function SetFormats( ) , which calls isatty( ) and checks the environment variable TERM as discussed previously herein.

2. The function SetFormats( ) illustrates pointer usage as discussed previously herein. SetFormats( ) sets a pointer, FORMATS , to an array of control sequences based on the output of issatty( ) and the environment variable.

Another alternative way of embodying the signal generator and transmitter for outputting text with the correct embedded control sequences is creating an instance of an object that produces the control sequences. Yet another alternative way is setting function pointers to point to functions that produce control sequences.

Example source code for creating the desired object instance is shown in the following Appendix 2, which includes a listing of C code, term.cpp . The constructor for the class Driver (see Driver::Driver( ) in the code) calls isatty( ) and checks the environment variable TERM as discussed previously herein. This constructor creates a different front end depending upon the results of calling isatty( ) and checking TERM . It creates an AnsiFront or a HpFront , or a generic Front each of which output a different set of control sequences or none at all.

As discussed, the invention provides an automated method and apparatus for determining the extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements. Although specific embodiments of the invention have been described and illustrated, the invention is not to be limited to the specific forms or arrangements of parts so described and illustrated, and various modifications and changes can be made without departing from the scope and spirit of the invention. Within the scope of the appended claims, therefore, the invention may be practiced otherwise than as specifically described and illustrated.