Services menu
Encyclopedia
The Services menu is a user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 element in a computer operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

. The services are programs that accept input from the user selection, process it, and optionally put the result back in the clipboard. The concept originated in the NeXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

 operating system, from which it was carried over into Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 and GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

. Similar features can be emulated on other operating systems.

Mac OS X

Apple
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

 advertises the Services menu in connection with other features of its operating system. For example, it's possible to desktop search
Desktop search
Desktop search is the name for the field of search tools which search the contents of a user's own computer files, rather than searching the Internet...

 for a piece of text by selecting it with the mouse and using the service from Spotlight
Spotlight (software)
Spotlight is a system-wide desktop search feature of Apple's Mac OS X operating system. Spotlight is a selection-based search system, which creates a virtual index of all items and files on the system. It is designed to allow the user to quickly locate a wide variety of items on the computer,...

. Other central services are Grab
Grab (software)
Grab is an application created by Apple Computer for Mac OS X, used to take screenshots. Grab is also present in OS X's progenitors NeXTSTEP and OPENSTEP. It supports capturing a marquee selection, whole window, whole screen, and timed screen. Grab can be found in the Utilities folder under...

 for taking screenshots, and the system spell checker
Spell checker
In computing, a spell checker is an application program that flags words in a document that may not be spelled correctly. Spell checkers may be stand-alone capable of operating on a block of text, or as part of a larger application, such as a word processor, email client, electronic dictionary,...

. The concept is similar to a GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 equivalent of a Unix pipe, allowing arbitrary data to be processed and passed between programs.

Services can be implemented as application services, which expose a portion of the functionality of an application to operate on selected data, usually without displaying an interface, or they may be standalone services which are small utilities to manipulate data, such as transforming the case of selected text or cropping an image to use as an icon. Their simple, one-purpose nature and the fact that they don't require a GUI to be designed makes writing standalone services popular beginner's Mac OS X programming projects

Since many applications install their entries without asking the user, the OS X services menu tends to clog up with dozens of entries quickly. Most users only will ever use a small subset of the possible options, therefore cutting down and customizing the menu makes it both faster and more pleasant to use. Prior to Mac OS X Snow Leopard, third party software is required to do this; in Snow Leopard, the Services menu can be customized from the Keyboard pane of System Preferences
System Preferences
System Preferences is an application included with the Mac OS X operating system that allows users to modify various system settings which are divided into separate preference panes...

.

Emulation

From the point of view of software, the Services menu is a means of inter-process communication
Inter-process communication
In computing, Inter-process communication is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for message passing, synchronization, shared...

. To the user, it is an interface for executing actions on selected data. The emulation of the Services menu is based on the fact that there are several ways this can be achieved in an operating system. Even in Mac OS X, there is an alternative system called the context menu
Context menu
A context menu is a menu in a graphical user interface that appears upon user interaction, such as a right mouse click or middle click mouse operation...

 handler, which is carried over from classic Mac OS.

In the X Window System
X Window System
The X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...

, any data selected in an application is available to all other programs. Thus the Services menu can be an application which retrieves the current selection, and lets the user choose an action. Missing is the part about returning the processed data back to the originating application. Instead, the service can open a new window to show the results.

Alternatively, the service could replace the current cut buffer with the results of the operation, leaving the user only to perform a paste (since different toolkits implement copy/select and paste commands differently, and probably not under external program control).

External links

  • Services menu emulation
  • Service Scrubber OS X utility for customizing the services menu
  • ThisService OS X utility that can create a service from either an AppleScript
    AppleScript
    AppleScript is a scripting language created by Apple Inc. and built into Macintosh operating systems since System 7. The term "AppleScript" may refer to the scripting system itself, or to particular scripts that are written in the AppleScript language....

     or Shell script
    Shell script
    A shell script is a script written for the shell, or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK