HP OpenVMS Systems Documentation
Common Desktop Environment: Programmer's Overview
7 Optional Integration
Contents of Chapter:
Note: In addition to incorporating any components described in this section into your application, you should also follow the basic integration steps outlined in Chapter 5, "Basic Application Integration." The components discussed in Chapter 6, "Recommended Integration," are critical to making your application highly integrated with the desktop.
For more information on optional integration, see the CDE Programmer's Guide.
control widgets are designed to ease porting OPEN LOOK and Microsoft Windows applications to the Common Desktop Environment by providing equivalent functionality in Common Desktop Environment Motif. The Common Desktop Environment Motif widgets library libDtWidget contains widgets and functions that are used to provide common functionality across all Common Desktop Environment applications. The widgets provided include:
Note: The Common Desktop Environment supports all Motif 1.2 widgets. See Appendix A, "Common Desktop Environment Motif," for more information on Common Desktop Environment Motif.
Compatibility with Motif 2.0The APIs of the DtSpinBox and DtComboBox widgets are similar to the Motif 2.0 release of XmSpinBox and XmComboBox widgets. The APIs are designed so an application can easily switch to the Motif 2.0 version of these widgets. To switch, change the Dt names for the class, types, and creation routines to Xm. For example, change all occurrences of DtSpinBox in your code to XmSpinBox. This information is supplied in case you choose to port your application to Motif 2.0, but it is not a recommendation that you do so.
Note: The Common Desktop Environment does not guarantee strict API or binary compatibility between its widgets and the Motif 2.0 widgets.
Related DocumentationFor more information on Common Desktop Environment Motif control widgets, see the relevant man pages and the CDE Programmer's Guide.
Data typing provides an extension to the attributes of files and data beyond what is provided by traditional UNIX file systems. These extensions include typing and attribute management. Use the data-typing API if your application receives data from external sources and must act on it. For example, your application might want to display an icon or execute an action that has a system-wide definition.
The Common Desktop Environment File Manager and Common Desktop Environment Mail attachment window use data typing to determine the icon and actions associated with a file. For example, for a C file filename.c, File Manager uses the .c extension to determine the file's data type, C_SOURCE. It then uses C_SOURCE to determine the icon file name for the icon that it can use for filename.c.
The external database loading API consists of two functions:
Use DtDbReLoadNotify() to request notification of actions and data-types database reload events. It registers an application's interest in database reload messages.
Your application should reload the database whenever it changes, so that the end user will notice updates without having to restart the application.CDE Programmer's Guide and also in man pages in the man3 directory.
Note: If your application uses any of the data-typing APIs, or loads the actions and data-types database, it must first initialize the libDtSvc library by calling either DtInitialize() or DtAppInitialize(). Refer to the DtInitialize(3) or DtAppInitialize(3) man page for more information.
Related DocumentationFor more information on data typing, see the relevant man pages and the CDE Programmer's Guide.
Use the action invocation API so that your application uses the same mechanisms as the rest of the desktop. The user can then experience uniform desktop behavior.
The action functions in the libDtSvc library provide a way to invoke desktop actions (such as Open and Print) for files or buffers. They contain parameters that enable you to modify an action's behavior. The action invocation API consists of the following functions:
Note: If your application uses any of the action invocation APIs, it must first initialize the libDtSvc library by calling either DtInitialize() or DtAppInitialize(). Refer to the DtInitialize(3) or DtAppInitialize(3) man page for more information.
Related DocumentationFor more information on actions, see the relevant man pages and the CDE Programmer's Guide.
The Workspace Manager API provides functions for applications that need to know in which workspaces their windows reside, or that need to have some control over how the windows are placed in the workspaces. Additionally, the API enables applications to monitor changes to the overall workspace state, such as which workspace is the current one.
The Common Desktop Environment does not require applications to use the Workspace Manager API to run on the desktop. Most desktop applications can run as expected without knowledge of the Workspace Manager. In particular, if your application has a single, main, top-level window and complies with ICCCM 1.1 and Motif 1.2, you do not have to integrate with the Common Desktop Environment Workspace Manager for the application to run on the desktop.
However, more complex applications with multiple top-level windows need to use the Workspace Manager API in conjunction with the Session Manager API to properly save and restore the application's state. The Workspace Manager API enables an application to find out which workspaces each of its windows is in. The API also enables an application to display its windows in the correct workspace when the session resumes.
The Workspace Manager API addresses the following tasks:
Note: If your application uses any of the Workspace Manager APIs, it must first initialize the libDtSvc library by calling either DtInitialize() or DtAppInitialize(). Refer to the DtInitialize(3) or DtAppInitialize(3) man page for more information.
Related DocumentationFor more information on Workspace Manager, see the relevant man pages and the CDE Programmer's Guide.
DEC VT220-like terminal with extensions). The Terminal Emulator widget library, libDtTerm, provides the DtTerm widget for use in adding a terminal emulator window to a GUI. If you include a terminal emulator in your application, use Common Desktop Environment Motif widgets to add display enhancements to it such as pop-up menus and scroll bars.
The Common Desktop Environment Terminal Emulator, which is a part of the run-time environment, is a window that behaves as a terminal, enabling access to traditional terminal-based applications from within the desktop. The DtTerm widget is the foundation for the desktop run-time terminal emulator, dtterm.
The libDtTerm library includes a set of convenience functions to create, access, and support the DtTerm widget.
Include the Dt/Term.h header file to access libDtTerm APIs in your application.
Related DocumentationFor more information on the DtTerm widget, see the relevant man pages.
For more information on the desktop terminal emulator, see the terminal emulator help volume, the relevant man pages, or the CDE User's Guide.
Related DocumentationFor more information on the Text Editor widget, see the relevant man pages and the CDE Programmer's Guide.
Calendar consists of:
The development environment provides a library for client access to the Calendar data. It is extensible in that it allows users to define their own calendar entry attributes.The library provides a client callback mechanism for notification of database updates.
The calendar daemon implements the services behind the library of calendar and scheduling API calls. It supports deleting, inserting, and modifying calendar entries. It also manages calendar reminders and supports the creation and removal of the Calendar database. It also provides mechanisms for retrieving Calendar data.
Calendar entry data integrates with the desktop through drag and drop and the ToolTalk messaging interfaces.
The calendar and scheduling API is an implementation of the X.400 Application Programming Interface Association (XAPIA) Calendaring and Scheduling API 1.0. Use the calendar and scheduling API to integrate your application with Calendar, or to develop your own calendar application.
Include the csa/csa.h header file to access libcsa APIs in your application.
Related DocumentationFor more information on the calendar, see the relevant man pages, the Calendar help volume, and the CDE Programmer's Guide.
(which is dtksh) provides a way to engage in graphic user interaction through shell scripts. The user interface capabilities are based on the Common Desktop Environment Motif widget set, the Xt Intrinsics, and the X11 library.
dtksh is a version of ksh-93 extended to access many X, Xt, Motif, and Common Desktop Environment facilities. ksh-93 is a version of Korn shell, the command shell and programming language ksh. dtksh extends ksh to provide support for:
Related DocumentationFor more information on dtksh, see the relevant man pages and CDE Desktop KornShell User's Guide.