Xview Developer's Notes
Total Page:16
File Type:pdf, Size:1020Kb
XView Developer’s Notes 2550 Garcia Avenue Mountain View, CA 94043 U.S.A. A Sun Microsystems, Inc. Business 1994 Sun Microsystems, Inc. 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A. 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 of Sun and its licensors, if any. Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems, licensed from UNIX System Laboratories, Inc., a wholly owned subsidiary of Novell, Inc., and the University of California, respectively. Third-party font software in this product is protected by copyright and licensed from Sun’s font suppliers. 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. The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications. TRADEMARKS Sun, the Sun logo, Sun Microsystems, Sun Microsystems Computer Corporation, SunSoft, the SunSoft logo, Solaris, SunOS, OpenWindows, DeskSet, ONC, ONC+, and NFS are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and certain other countries. UNIX is a registered trademark of Novell, Inc., in the United States and other countries; X/Open Company, Ltd., is the exclusive licensor of such trademark. OPEN LOOK® is a registered trademark of Novell, Inc. PostScript and Display PostScript are trademarks of Adobe Systems, Inc. All other product names mentioned herein are the trademarks of their respective owners. All SPARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International, Inc. SPARCstation, SPARCserver, SPARCengine, SPARCstorage, SPARCware, SPARCcenter, SPARCclassic, SPARCcluster, SPARCdesign, SPARC811, SPARCprinter, UltraSPARC, microSPARC, SPARCworks, and SPARCompiler are licensed exclusively to Sun Microsystems, Inc. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. X Window System is a product of the Massachusetts Institute of Technology. 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. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. Please Recycle Contents Preface. xv Part 1 —Miscellaneous XView Issues 1. Motif and XView Interoperability . 3 Motif and XView Client Interoperability . 3 Selections . 3 Drag and Drop . 4 Motif Window Manager and XView Client Interoperability . 4 XView Clients with Two Base Windows. 4 Window Decoration. 4 XView Text Editor Client . 4 Focus Follows Mouse . 5 2. O’Reilly Corrections and Supplements . 7 Corrections to the XView Programming Manual. 7 long_seln.c . 7 PANEL_EVENT_PROC. 8 iii notify_next_event_func. 8 notice.c . 8 Corrections to the XView Reference Manual . 9 CMS_COLOR_COUNT. 9 Supplementary XView Documentation. 9 Joining Canvas Views . 10 XV_HELP_DATA. 10 XV_FOCUS_RANK . 10 Scrollbars . 11 XView Panel Architecture. 15 Panel Drop Targets. 16 Compiling XView Programs. 17 Part 2 —Internationalizing XView Applications 3. Introducing Internationalized XView . 21 Internationalization Features . 22 Wide Characters and Multibyte Characters . 22 Input Method . 23 Font Sets . 23 Compiling XView Programs. 23 4. Character Encoding. 25 Encodings Used in Asian Locales . 26 When to Use Multibyte and Wide Character . 27 When to Use Compound Text . 27 EUC Programming Issues. 27 iv XView Developer’s Notes—August 1994 Screen Columns . 28 Wide Character Attributes and Functions . 29 5. Input Method. 31 Purpose of Input Methods . 31 Input Method Operation. 32 Input Method Screen Regions . 32 Input Method Styles . 34 Specifying Styles . 34 Determining the Default Style . 35 Enabling and Disabling the Input Method . 36 Input Method Architecture. 36 Implicit Commit of Preedit Text. 38 Customizing Input Method Callbacks . 39 6. XView API for Internationalization. 41 Canvases . 41 Canvas Input Context . 42 Canvas Input Method . 42 CANVAS_IM_PREEDIT_FRAME . 42 Cursors . 42 File Chooser . 42 File Lists . 44 Fonts . 45 Font Set API . 46 Glyph Fonts . 50 Contents v Font Set Definitions . 50 Compatibility Issues . 51 Portability Issues . 52 Frames . 52 History. 53 Icons. 53 Menus . 53 Notices. 54 Panels . 54 PANEL_VALUE_STORED_LENGTH_WCS. 55 PANEL_ITEM_IC_ACTIVE . 56 PANEL_LIST_ROW_VALUES_WCS. 57 PANEL_MASK_CHAR_WC. 57 Implicit Commit. 57 Pathnames. 57 Resources . 58 Selections . 61 Server Images . 62 Text Subwindows. 63 Multibyte and Wide Character API. 63 Programming Considerations for Text Subwindow Multibyte API . 64 Other Text Subwindow Information . 68 TTY Subwindows. 71 vi XView Developer’s Notes—August 1994 Windows: Handling Input . 71 Enabling the Input Method . 72 Input Method and Input Context . 74 Choosing Input Style. 74 Customizing Implicit Commit . ..