Common Desktop Environment 1.0 Programmer's Overview
Total Page:16
File Type:pdf, Size:1020Kb
Common Desktop Environment 1.0 Programmer’s Overview This edition of the Common Desktop Environment Advanced User’s and System Administrator’s Guide applies to AIX Version 4.2, and to all subsequent releases of these products until otherwise indicated in new releases or technical newsletters. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. The code and documentation for the DtComboBox and DtSpinBox widgets were contributed by Interleaf, Inc. Copyright 1993, Interleaf, Inc. Copyright 1993, 1994, 1995 Hewlett-Packard Company Copyright 1993, 1994, 1995 International Business Machines Corp. Copyright 1993, 1994, 1995 Sun Microsystems, Inc. Copyright 1993, 1994, 1995 Novell, Inc. All rights reserved. This product and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization. All rights reserved. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and AR 52.227-19. Part 1 —Common Desktop Environment Architectural Overview 1. Architectural Overview. 1 Conceptual Overview. 1 Data Interaction GUIs. 2 Multiuser Collaboration. 3 Desktop Management. 4 Motif GUI Engine. 7 Integration Technologies. 9 Part 1 —Common Desktop Environment Development Environment Overview 2. Development Enviroment Considerations. 12 Common Desktop Environment Characteristics. 12 Underlying Foundations. 13 Running Existing Applications. 14 Libraries and Header Files. 14 Demo Programs. 14 Man Pages. 15 Development Environment Directory Structure. 15 3. Developing an Application. 16 4. Developing an Application. 17 Levels of Desktop Integration. 17 Desktop Naming Conventions. 17 Public and Private Interfaces. 18 Guidelines for Common Desktop Environment Databases. 18 Application Initialization and libDtSvc. 18 Application Builder. 18 5. Portability and Maintenance. 19 Portability Issues. 19 Common Desktop Environment Motif Widget Binary Compatibility Guidelines. 21 6. Basic Application Integration. 21 Basic Integration Features. 22 Organization of Basic Integration Information. 22 Basic Integration Tasks. 22 7. Recommended Integration. 23 Help System. 23 ToolTalk Messaging Service. 24 Contents iii 8. Session Manager. 26 Drag and Drop. 27 Internationalization. 28 Standard Font Names. 29 Displaying Error Messages from Your Application. 31 User Customization Issues. 32 9. Optional Integration. 33 Common Desktop Environment Motif Control Widgets 34 Data Typing. 36 Action Invocation. 38 Workspace Manager. 38 Terminal Emulator Widget. 39 Text Editor Widget. 40 Calendar. 41 Desktop KornShell (dtksh). 42 Appendix A. Common Desktop Environment Motif 42 Features Added to Motif. 42 Enhancements to Existing Motif Functionality. 43 Motif Libraries. 43 Demo Programs. 44 Appendix B. Component and Guideline Reference. 44 Index . 49 iv CDE Programmer’s Overview Preface The Common Desktop Environment: Programmer’s Overview provides a high–level view of the Common Desktop Environment development environment and the developer documentation set. Read this book first before starting application design and development. Note: In this manual, the terms (the) Common Desktop Environment and the desktop are used interchangeably. Outside of the Preface, this manual omits the Common Desktop Environment prefix when referring to a Common Desktop Environment development or run–time environment manual. For example, the Common Desktop Environment: Programmer’s Overview is referred to as the Programmer’s Overview. Who Should Use This Book Read the Programmer’s Overview if you are: • An application developer who wants to develop a new Common Desktop Environment application, or integrate an existing OSF/Motif or OPEN LOOK application into the desktop • A manager, architect, or project lead interested in designing a project involving applications that will run on the Common Desktop Environment desktop For the remainder of this manual, OSF/Motif is referred to as Motif. How This Book Is Organized The Programmer’s Overview is divided into two parts. Part I contains an architectural overview of the Common Desktop Environment, including high–level information on both the run–time and development environments. Part II contains information useful to know before developing an application, and describes the development environment components. This section provides brief descriptions of the chapters and appendixes contained in this manual. “Architectural Overview” presents an overview of the Common Desktop Environment architecture. “Development Environment Considerations” discusses information you should know about the environment before you start to develop an application. “Developing an Application” presents information specific to developing a Common Desktop Environment application, such as naming conventions and guidelines to follow. “Portability and Maintenance” discusses issues pertaining to writing portable and maintainable applications. “Basic Application Integration” summarizes how to make your application launch–integrated (that is, started by double–clicking an icon on the desktop). “Recommended Integration” provides overviews of all components and guidelines that you should use so your application has the same look and feel as, and interoperates well with, other Common Desktop Environment desktop applications. “Optional Integration” provides overviews of the components to incorporate into your application as needed for added functionality. “Common Desktop Environment Motif” describes the differences between Motif 1.2.3 and Common Desktop Environment Motif. Preface v “Component and Guide Reference” lists in alphabetical order all development environment components and guidelines, with associated library, header files, and documentation. Related Books For information on Motif, see: • OSF/Motif Programmer’s Guide, Release 1.2, by Open Software Foundation, 11 Cambridge Center, Cambridge, MA 02142, published by PTR Prentice Hall, Englewood Cliffs, NJ 07632 • OSF/Motif Programmer’s Reference, Release 1.2, by Open Software Foundation, 11 Cambridge Center, Cambridge, MA 02142, published by PTR Prentice Hall, Englewood Cliffs, NJ 07632 • OSF/Motif Reference Guide, by Douglas A. Young, published by PTR Prentice Hall, Englewood Cliffs, NJ 07632 • OSF/Motif 1.2 Style Guide, by Open Software Foundation, 11 Cambridge Center, Cambridge, MA 02142, published by PTR Prentice Hall, Englewood Cliffs, NJ 07632 Note: The Common Desktop Environment: Style Guide and Certification Checklist is an extension of the OSF/Motif 1.2 Style Guide to the Common Desktop Environment. • OSF Application Environment Specification (AES) User Environment Volume, Revision C, by Open Software Foundation, 11 Cambridge Center, Cambridge, MA 02142, published by PTR Prentice Hall, Englewood Cliffs, NJ 07632 Motif 1.2 IEEE Std 1295 standard, which you can order from: IEEE Service Center 445 Hoes Lane P.O. Box 1331 Piscataway, NJ 08855 For information on POSIX, see the IEEE Std 1003.1–1990 standard, which you can order from: IEEE Service Center 445 Hoes Lane P.O. Box 1331 Piscataway, NJ 08855 For information on Xlib, see: • Xlib Programming Manual for Version 11 (Volume 1) by Adrian Nye, published by O’Reilly & Associates, Sebastopol, CA, 95472 • Xlib Reference Manual for Version 11 (Volume 2), published by O’Reilly & Associates, Sebastopol, CA, 95472 For information on Xt, see: • X Toolkit Intrinsics Programming Manual, (Volume 4) by Adrian Nye and Tim O’Reilly, published by O’Reilly and Associates, Sebastopol, CA 95472. • X Toolkit Intrinsics Reference Manual, (Volume 5) edited by Tim O’Reilly, published by O’Reilly and Associates, Sebastopol, CA 95472. For more information on ToolTalk, see: • The ToolTalk Service: An Inter–Operability Solution, published by SunSoft Press and PTR Prentice Hall, Englewood Cliffs, NJ 07632, ISBN 0–13–088717–X vi CDE Programmer’s Overview • ToolTalk and Open Protocols: Inter–Application Communication, by Astrid Julienne and Brian Holtz, published by SunSoft Press and PTR Prentice Hall, Englewood Cliffs, NJ 07632, ISBN 013–031055–7 In addition to the Programmer’s Overview, the development environment documentation set consists of: • Common Desktop Environment: Style Guide and Certification Checklist • Common Desktop Environment: Application Builder User’s Guide • Common Desktop Environment: Programmer’s Guide • Common Desktop Environment: Help System Author’s and Programmer’s Guide • Common Desktop Environment: ToolTalk Messaging Overview • Common Desktop Environment: Internationalization Programmer’s Guide • Common Desktop Environment: Desktop KornShell User’s Guide • Common Desktop Environment: Glossary • Online man pages For more information on these development environment books, see the following section, “Development Environment Documentation.” The run–time environment documentation set consists of: • Common Desktop Environment: User’s Guide • Common Desktop Environment: Advanced User’s and System Administrator’s Guide • Online