| |
3. Drag and Drop | 3-1 |
| ..3.1 Overview | 3-1 |
| ..3.2 Drag and Drop User Interface | 3-2 |
| .....3.2.1 Overview | 3-2 |
| .....3.2.2 Initiating the Drag | 3-3 |
| .....3.2.3 Visual Feedback | 3-3 |
| .....3.2.4 The Drop | 3-3 |
| ..3.3 Implementing Drag and Drop | 3-4 |
| .....3.3.1 Sourcing a Drag | 3-4 |
| .....3.3.2 Receiving a Drop | 3-5 |
| ..3.4 Drag and Drop Programming Example: OLIT Toolkit | 3-7 |
| ..3.5 Summary of Files and Functions | 3-7 |
| ..3.6 Module dnd.h | 3-8 |
| ..3.7 Module main.c | 3-8 |
| .....3.7.1 Function main() | 3-16 |
| .....3.7.2 Function DropTargetCB() | 3-16 |
| .....3.7.3 Other Important Functions | 3-17 |
| ..3.8 Module requestor.c | 3-17 |
| .....3.8.1 Function requestor() | 3-32 |
| .....3.8.2 Function GetSelection() | 3-33 |
| .....3.8.3 Function init_state() | 3-33 |
| .....3.8.4 Function make_request() | 3-33 |
| .....3.8.5 Load Functions | 3-33 |
| .....3.8.6 Debugging Functions | 3-33 |
| |
| ..3.9 Module owner.c | 3-33 |
| .....3.9.1 Function owner() | 3-42 |
| .....3.9.2 Function ConvertSelection() | 3-43 |
| .....3.9.3 Function TransactionState() | 3-43 |
| .....3.9.4 Conversion Functions | 3-43 |
| ..3.10 Resource File | 3-43 |
| ..3.11 Makefile | 3-44 |
| ..3.12 Data Type Registration | 3-45 |
4. Implementing Drag and Drop |
| ..with DeskSet | 4-1 |
| ..4.1 DeskSet Drag and Drop Handshaking | 4-2 |
| .....4.1.1 Handshaking--Simplest Case | 4-2 |
| .....4.1.2 Handshaking with _SUN_AVAILABLE_TYPES | 4-3 |
| .....4.1.3 Specifying _SUN_ENUMERATION_ITEM | 4-3 |
| ..4.2 DeskSet Drag and Drop Target Atoms | 4-4 |
| .....4.2.1 ICCCM Target Atoms | 4-4 |
| .....4.2.2 DeskSet Target Atoms | 4-5 |
| ..4.3 Drag and Drop and Editors | 4-8 |
| ..4.4 Drag and Drop Example: XView Toolkit | 4-10 |
| ..4.5 Further DeskSet Integration Information | 4-10 |
5. Classing Engine | 5-1 |
| ..5.1 Overview | 5-1 |
| ..5.2 File Type Registration | 5-2 |
| ..5.3 Classing Engine Usage | 5-3 |
| |
| ..5.4 Adding and Changing Classing Engine File Types and |
| ......Attributes | 5-5 |
| .....5.4.1 Classing Engine Database | 5-5 |
| .....5.4.2 Namespace Tables | 5-6 |
| .....5.4.3 File Type Identification | 5-6 |
| .....5.4.4 Types Namespace Table | 5-8 |
| .....5.4.5 Adding a New File Type | 5-11 |
| .....5.4.6 Syntax of ASCII Database Description File | 5-14 |
| .....5.4.7 Binder | 5-15 |
| ..5.5 Accessing the Classing Engine Database | 5-17 |
| .....5.5.1 Example Program--Querying the Classing Engine |
| ..........Database | 5-17 |
| .....5.5.2 Example Program--CE Mapping Functions | 5-25 |
| ..5.6 The Classing Engine API | 5-27 |
| .....5.6.1 Mapping Functions | 5-28 |
| .....5.6.2 Error Reporting | 5-28 |
| .....5.6.3 Location of Namespace Managers | 5-28 |
| ..5.7 Reading from the Classing Engine Database | 5-29 |
| .....5.7.1 Initializing the Classing Engine | 5-29 |
| .....5.7.2 Determining if the Classing Engine Databases Changed |
| ..........5-29 |
| .....5.7.3 Closing the Classing Engine | 5-29 |
| .....5.7.4 Determining Which Databases are Available | 5-30 |
| .....5.7.5 Accessing a Namespace | 5-30 |
| .....5.7.6 Accessing an Entry in a Namespace Table | 5-30 |
| |
| .....5.7.7 Getting an Attribute Handle | 5-31 |
| .....5.7.8 Getting an Attribute | 5-31 |
| .....5.7.9 Getting the Size of an Attribute | 5-31 |
| ....5.7.10 Getting an Attribute's Type String | 5-32 |
| ....5.7.11 Getting a Namespace Entry | 5-32 |
| ....5.7.12 Mapping Through Namespaces | 5-32 |
| ....5.7.13 Mapping Through Entries | 5-33 |
| ....5.7.14 Mapping Through Attributes | 5-33 |
| ....5.7.15 Mapping Through the Attributes of a Namespace . | 5-34 |
| ....5.7.16 Getting the Name of a Namespace | 5-34 |
| ....5.7.17 Getting the Name of an Attribute | 5-34 |
| ....5.7.18 Determining Which Database Contains an Entry | 5-34 |
| ..5.8 Classing Engine Utility Programs | 5-35 |
| .....5.8.1 ce_db_build | 5-35 |
| .....5.8.2 cd_db_merge | 5-35 |
6. The ToolTalk Service | 6-1 |
| ..6.1 The ToolTalk Service Overview | 6-2 |
| ..6.2 ToolTalk Scenarios | 6-2 |
| ...Using the ToolTalk Desktop Services Message Set | 6-3 |
| ...Using the ToolTalk Document and Media Exchange Message Set |
| ..........6-5 |
| ..6.3 How Applications Use ToolTalk Messages | 6-7 |
| ...Sending ToolTalk Messages | 6-7 |
| ...Message Patterns | 6-8 |
| |
| ...Receiving ToolTalk Messages | 6-8 |
| ..6.4 ToolTalk Message Distribution | 6-9 |
| ...Process-Oriented Messages | 6-9 |
| ...Object-Oriented Messages | 6-9 |
| ...Determining Message Delivery | 6-9 |
| ..6.5 Modifying Your Application to Use the ToolTalk Service | 6-10 |
7. The ToolTalk Service and |
| ..DeskSet Integration | 7-1 |
| ..7.1 The ToolTalk Messaging Protocol | 7-1 |
| .....7.1.1 How the Tooltalk Protocol Works | 7-2 |
| .....7.1.2 New Duties of the Handler | 7-2 |
| ..7.2 The ToolTalk Message Sets | 7-3 |
| ..7.3 Example ToolTalk Messaging Scenarios | 7-3 |
| .....7.3.1 Display Request | 7-4 |
| .....7.3.2 Edit Request | 7-4 |
| .....7.3.3 Editing with the Open Request | 7-5 |
| ..7.4 Example Tooltalk Program with Deskset | 7-5 |
| .....7.4.1 Files for this Example | 7-6 |
| .....7.4.2 olit_tt.c | 7-7 |
| .....7.4.3 tt_code.c | 7-11 |
| .....7.4.4 tt_callbacks.c | 7-16 |
| .....7.4.5 types.file | 7-29 |
| .....7.4.6 Resources | 7-30 |
| .....7.4.7 Makefile | 7-31 |
| |
A. Drag and Drop User Interface Specification | A-1 |
| ...A.1 Executive Summary | A-1 |
| ...A.2 Introduction | A-2 |
| ...A.3 Formal Definition | A-5 |
| ...A.4 The Source | A-6 |
| ...A.5 The Destination | A-8 |
| ...A.6 To Copy or Not to Copy? | A-17 |
| ...A.7 Loading Data | A-19 |
| ...A.8 Data Format Conversion | A-20 |
| ...A.9 Handling Multiple Source Objects | A-21 |
| ..A.10 Visual Feedback | A-21 |
| ..A.11 Input Focus Management | A-28 |
| ..A.12 Error Handling | A-28 |
| ..A.13 Undoing the Effects of Drag and Drop | A-29 |
| ..A.14 Canceling a Drag Operation in Progress | A-29 |
| ..A.15 Deviations from the OPEN LOOK Style Guidelines | A-30 |
| ..A.16 Drag and Drop Target Engineering Specification | A-31 |
B. Examining a Classing Engine Database | B-1 |
C. Vendor Data Type Registration | C-1 |
| ...C.1 Drag and Drop Data Types | C-1 |
| ...C.2 Classing Engine File Types and Attributes | C-2 |
| ...C.3 ToolTalk Type Information | C-4 |
D. ToolTalk Example Program for XView Toolkit | D-1 |
| ...D.1 ttreceive.c | D-2 |
| |
| ...D.2 ttsend.c | D-4 |
| ...D.3 ttdig.h | D-7 |
E. Drag and Drop Programming Example for XView Toolkit | E-1 |
| ...E.1 Opening Declarations | E-2 |
| ...E.2 Function: Main() | E-4 |
| ...E.3 Function: create_user_interface() | E-5 |
| ...E.4 Function: DnD_init() | E-6 |
| ...E.5 Function: drop_proc() | E-7 |
| ...E.6 Function: get_primary_selection() | E-10 |
| ...E.7 Function: load_file_proc() | E-12 |
F. The ToolTalk Desktop Services Message Set | F-1 |
| ...F.1 General Description of the ToolTalk Desktop Services Message |
| ......Set | F-1 |
| ...F.2 Desktop Definitions and Conventions | F-1 |
| ...F.3 The ToolTalk Desktop Services Message Set | F-4 |
G. The ToolTalk Document and Media Exchange Message Set . | G-1 |
| ...G.1 General Tooltalk Message Definitions and Conventions. | G-2 |
| ...G.2 Media Exchange Definitions and Conventions | G-6 |
| ..Glossary | Glossary-1 |
| ..Index | 1 |