Chapter 19 Drag and Drop 433
19.1 Drag and Drop Objects 435
19.2 Registering Drop-sites 436
19.2.1 Adding and Deleting Regions 436
19.2.2 Handling Events 437
19.2.2.1 Preview events 438
19.2.2.2 Event forwarding 438
19.2.2.3 Handling drop and preview events 438
19.3 Sourcing the Drag 439
19.3.1 Initiating the Drop Operation 440
19.3.2 Interaction with the Selection Package 441
19.3.3 Defining the Drag/Accept Cursor 441
19.3.4 Timeout Value 442
19.4 Receiving a Drop 442
19.4.0.1 The move operation 443
19.4.0.2 The done procedure 443
19.5 Sample Program-Sourcing a Drag 444
19.6 Sample Program-Drop Site Item and Destination 450
19.7 Drag and Drop Package Summary 456
Chapter 20 The Notifier 459
20.1 Basic Concepts 459
20.1.1 Mainline Input Handling 459
20.1.2 Event-driven Input Handling 460
20.2 Functions of the Notifier 460
20.3 How the Notifier Works 461
20.3.1 Restrictions 461
20.3.1.1 System calls to avoid 462
20.4 What is a Notifier Client? 463
20.4.1 Types of Interaction 463
20.5 Signal Handling 464
20.5.1 Signals to Avoid 464
20.5.2 A Replacement for signal() 465
20.5.3 Timers 467
20.5.4 Handling SIGTERM 470
20.5.5 Handling SIGCHLD 471
20.5.5.1 Reaping dead processes 472
20.6 Interaction with RPC 473
20.7 Client Events 474
20.7.1 Receiving Client Events 475
20.7.2 Posting Client Events 476
20.7.2.1 Actual delivery time 477
20.7.3 Posting with an Argument 477
20.7.4 Posting Destroy Events 478
20.7.5 Delivery Time of Destroy Events 479