Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

draganddrop(3w)  —  OLIT Widget Set

NAMES

OlDnDAllocTransientAtom, OlDnDBeginSelectionTransaction, OlDnDChangeDropSitePreviewHints, OlDnDOwnSelection, OlDnDOwnSelectionIncremental, OlDnDDeliverPreviewMessage, OlDnDDeliverTriggerMessage, OlDnDDestroyDropSite, OlDnDDisownSelection OlDnDDragAndDrop, OlDnDDragNDropDone, OlDnDEndSelectionTransaction, OlDnDErrorDuringSelectionTransaction, OlDnDFreeTransientAtom, OlDnDGetCurrentSelectionsForWidget, OlDnDGetDropSitesOfWidget, OlDnDGetDropSitesOfWindow, OlDnDGetWidgetOfDropSite, OlDnDGetWindowOfDropSite, OlDnDInitializeDragState, OlDnDQueryDropSiteInfo, OlDnDRegisterWidgetDropSite, OlDnDRegisterWindowDropSite, OlDnDUpdateDropSiteGeometry, OlDnDWidgetConfiguredInHier − drag and drop functions

DESCRIPTION

Drag and Drop is a gesture in which the user "picks up" a representation of data or objects on the desktop, drags it across the desktop, and drops it on some other part of the desktop.  Drag and drop effectively transfers information from one part of the desktop to another part of the desktop. 

Examples of Drag and Drop operations are:

—Picking up a file from a file manager and dropping it on a trash can to delete the file. 

—Selecting arbitrary text in a text editor, and subsequently dragging and dropping it on another text editor to execute a quick cut and paste. 

—Selecting a region in a spreadsheet application and dragging and dropping it to a desktop publishing package to create a hot link in the editor to the spreadsheet data. 

DROP SITE MANIPULATION

A drop site is a collection of rectangles within a widget or window of an application that can receive a drop.  These rectangles are "sensitive" to drops on them.  When a user performs a drop over one of the sensitive rectangles of a drop site, the owner of the dropsite is notified that some other agent on the desktop is prepared to provide data via a selection transfer. 

Drop sites can provide feedback to the user during a drop operation when the drop site is intersected during a drag operation. A mechanism exists to indicate that a drop site should be notified of an intersection with the drag gesture. See the Delivering Preview Messages section below. 

The owner of a drop site, i.e the agent that registered the drop site, must maintain the geometry and global registration (interest) of the drop site in synchronisation with the geometry, map state and visibility of the widget or window associated with the drop site. 

The current Drag and Drop API contains the following functions for manipulation of drop sites:

—register a widget based drop site

—register a window based drop site

—update a drop site’s geometry

—update a drop site’s preview hints

—delete an existing drop site

—query a drop site’s geometry

—get a window associated with a drop site

—get a widget associated with a drop site

—get the drop sites for a widget

—get the drop sites for a window

DROP SITE MANIPULATION STRUCTURES

OlDnDDropSiteID

Synopsis:

typedef struct oldnd_drop_site ∗OlDnDDropSiteID

is an opaque reference to a particular instance of a drop site. 

OlDnDSiteRect

Synopsis:

typedef struct {
int  x, y;
unsigned int  width, height;
} OlDnDSiteRect, ∗OlDnDSiteRectPtr;
 

The structure describes the drop site rectangle. The (x, y) pair defines the origin of the drop site rectangle in the co-ordinate space of the drop site’s owning widget or window. The (width, height) pair define the dimensions of this rectangle of the drop site. Drop sites can include multiple rectangles. 

OlDnDSitePreviewFlags

Synopsis:

typedef enum {
OlDnDSitePreviewNone,
OlDnDSitePreviewEnterLeave,
OlDnDSitePreviewMotion,
OlDnDSitePreviewBoth,
OlDnDSitePreviewDefaultSite
OlDnDSitePreviewForwarded,
OlDnDSitePreviewInsensitive,
} OlDnDSitePreviewHints;

The structure specifies preview characteristics. 

OlDnDSitePreviewNone specifies previewing.  TRUE specifies no previewing. 

OlDnDSitePreviewEnterLeave specifies whether or not to preview Enter/Leave events. 

OlDnDSitePreviewMotion specifies previewing of motion events. 

OlDnDSitePreviewBoth specifies previewing of Enter/Leave and motion events. 

OlDnDSitePreviewDefaultSite specifies that the drop site is the default site for drop site forwarding on this application shell.  Note that a default drop site is the site nominated to receive drops forwarded byt the window manager decorations or icons. 

DROP SITE MANIPULATION CALLBACKS

OlDnDTMNotifyProc

Synopsis:

#include <Xol/OlDnDVCX.h>
 . . .
typedef Boolean (∗OlDnDTMNotifyProc)(

is the function prototype for the drop operation trigger message notifier. This notifier, associated with a particular drop site at registration, is invoked when a drop operation occurs on its associated drop site. 

widget is the owning widget of the drop site

window is the owning window of the drop site

root_x is the root-relative x coordinate at which the drop occurred

root_y is the root-relative y coordinate at which the drop occurred

selection is the selection atom for the selection transfer of the drop information. 

time is the timestamp of the trigger message

dropsiteid is the id of the drop site on which the drop occurred

operation is either OlDnDTriggerCopyOp or OlDnDTriggerMoveOp

send_done if TRUE the selection holder expects to be notified at the end of the selection transaction that it has been completed and that no further transactions associated with this drop will occur. This notification is achieved by calling OlDnDDragNDropDone() when the selection transaction is completed successfully. 

closure is user defined data

OlDnDDragNDropDone

Synopsis:

#include <Xol/OlDnDVCX.h>
 . . .
typedef OlDnDPreviewMessageNotifyProc (∗OlDnDPMNotifyProc)(

OlDnDPMNotifyProc

Synopsis:

#include <OlCursors.h>
 . . .
extern Pixmap OlGet75PercentGrey(

The procedure is the function prototype for the drop site preview message notifier. This notifier is associated with a particular drop site at registration.  It is invoked when a drop operation in progess either enters, leaves, or moves across the drop site.  Which of these actions invokes the notifier depends on the current value of the drop site’s preview_hints. 

widget is the owning widget of the drop site

window is the owning window of the drop site

root_x is the root-relative x coordinate of preview "event"

root_y root relative-y coordinate of preview "event"

detail is the event type, either Enter, Leave or Motion. 

time is the time of "preview" event

dropsiteid is the id of the drop site on which the preview occurred

closure is user defined data

DROP SITE MANIPULATION FUNCTIONS

OlDnDRegisterWidgetDropSite

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
OlDnDDropSiteID OlDnDRegisterWidgetDropSite(

The function creates a drop site associated with a particular widget.  A widget must be realized, that is it must have an X Window associated with it, before you can create a drop site for it.  Gadgets can support drop sites and use their windowed ancestor’s X Window in association with the registered drop site.  Drop sites are automatically destroyed when their owning widgets die. 

widget is the widget to which the drop site belongs. 

preview_hints is an enum of type OlDnDSitePreviewHints that defines the type(s) of preview events this drop site is interested in receiving during a drag across it. 

sites is a list of which defines the rectangles in the cordinate system of the widget that defines the drop site. 

num_sites is the number of rectangles defining the drop site. 

tm_notify is a function pointer of type OlDnDTMNotifyProc that is called when a drop occurs on this drop site

pm_notify is a function pointer of type OlDnDPMNotifyProc.  It is invoked when a drop operation in progess either enters, leaves, or moves across the drop site.  Which action invokes the notifier depends on the current value of the drop site’s preview_hints. 

closure is a user defined parameter which is passed to the tm_notify and pm_notify functions when they are called. 

OlDnDRegisterWindowDropSite

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
OlDnDDropSiteID OlDnDRegisterWindowDropSite(

The procedure registers a window-based drop site. It creates a drop site associated with a particular X Window and is useful for toolkit applications that mix ‘raw’ X windows with widgets. Drop sites are automatically destroyed when their owning windows die. The window must be an inferior of a widgets window. 

window is the window to which the drop site belongs. 

preview_hints is an enum of type OlDnDSitePreviewHints that defines the type(s) of preview events this drop site is interested in receiving during a drag across it. 

sites is a list of OlSiteRect which defines the rectangles in the cordinate system of the window that defines this drop site.  .HP num_sites is the number of rectangles defining this drop site. 

tm_notify is a function pointer of type OlDnDTMNotifyProc that is called when a drop occurs on the drop site

pm_notify is a function pointer of type OlDnDPMNotifyProc which is called,  It is invoked when a drop operation in progess either enters, leaves, or moves across the drop site.  Which action invokes the notifier depends on the current value of the drop site’s preview_hints. 

closure is a user-defined parameter that is passed to the tm_notify and pm_notify functions when they are called. 

OlDnDUpdateDropSiteGeometry

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDUpdateDropSiteGeometry(

The function alters the geometry of a drop site. Changes in the geometry of a drop site are caused by changes in the geometry of the widget or window that owns the drop site. To reduce client-server traffic, the Drag and Drop implementation does not automatically track changes in the window that owns a drop site.  The creator of a drop site is responsible for maintaining the geometry of the site to reflect any changes in the widget or window that owns the site. 

dropsiteid is the id of the drop site to be updated

site_rects is the new list of site rectangles for the drop site

num_sites is the number of rectangles in the new rectangle list. 

OlDnDWidgetConfiguredInHier

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDWidgetConfiguredInHier(

OlDnDChangeDropSitePreviewHints

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDUpdateDropSiteGeometry(

The procedure updates a drop site’s preview hints.  During the lifetime of a drop site it may be necessary to alter the nature of its previewing interest.   Use to overwrite the existing preview hints for a drop site and update the drop site interest list appropriately. 

dropsiteid is the id of the drop site

hints is the new preview flag settings for this site
 

OlDnDDestroyDropSite

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDDestroyDropSite(

The explictly destroys a drop site. Note that when a drop site’s widget or window is destroyed, all drop sites associated with that widget or window are automatically destroyed. 

dropsiteid is the id of the drop site

OlDnDQueryDropSiteInfo

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDQueryDropSiteInfo(

The function retrieves information about a particular drop site. The function returns if the query was successful.  Otherwise it returns

dropsiteid is the id of the drop site to be queried. 

widget is the address of a variable of type For drop sites registered on windows, this parameter is the id of the most immediate window ancestor associated with a widget. 

window is the address of a variable of type Window which returns the id of the window that owns the drop site.  Set this parameter to if no query on the window id is required. For gadgets, this is the window id of its windowed ancestor. 

hints is the address of a variable of type which returns the current hints for the drop site.  Set this parameter to if no query on the preview hints is required. 

site_rects is the address of a variable of type which returns a pointer to an array that contains the current geometry of the drop site. This parameter may be set to if no query on the site geometry is required.  Clients must use to deallocate the memory used by the array when they no longer require it. 

num_rects is the address of an  unsigned int variable that returns the number of .JL OlSiteRect structures specified for the drop site.  Set this parameter to if the site_rects parameter is

OlDnDGetWidgetOfDropSite

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Widget OlDnDGetWidgetOfDropSite(

The function returns the id of the widget associated with a drop site. If the drop site was registered with returns the id of the widget that is the most immediate ancestor of the associated window. 

dropsiteid is the id of the drop site. 

OlDnDGet-WindowOfDropSite

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Window OlDnDGetWindowOfDropSite(

The function returns the window id that the drop site was associated with. If the drop site was registered with a gadget then returns the window id of the gadget’s windowed parent. 

dropsiteid is the id of the drop site. 

OlDnDGetDrop-SitesOfWidget

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
OlDnDDropSiteID ∗OlDnDGetDropSitesOfWidget(

The obtains the currently registered list of drop sites for a particular widget instance. The function returns a pointer to an OlDnDDropSiteID array that is an enumeration of the drop sites currently registered for the widget. Clients should use on this return value  to deallocate the array when it is no longer needed.  If there are no drop sites registered or the function fails, OlDnDGetDropSitesOfWidget returns NULL. 

widget is the widget id

num_sites is the address of a variable of type This variable returns the number of currently registered drop sites for the widget.  The number of currently registered drop sites is the same as the number of elements in the array pointed to by the function return value. 

OlDnDGetDrop-SitesOfWindow

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
OlDnDDropSiteID ∗OlDnDGetDropSitesOfWindow(

The function obtains the currently registered list of drop sites for a particular window. The function returns a pointer to an array that is an enumeration of the drop sites currently registered for the window. Clients should use on this return value  to deallocate the array when it is no longer needed.  If there are no drop sites registered or the function fails, .JL OlDnDGetDropSitesOfWindow returns

window is the window id

num_sites is the address of a variable of type which returns the number of currently registered drop sites for this window.  The number of currently registered drop sites is the same as the number of elements in the array pointed to by the function return value. 

THE DRAG AND DROP OPERATION

The drag and drop operation consists of several stages, each of which has a set of associated functions in the OLIT API. The stages are:

—asserting ownership of a selection for the data transfer

—grabbing the cursor for animation

—initializing the drag state

—processing the drag events and previewing

—delivering the trigger or drop message

—handling the X selection transaction to transfer the data

—tidying up the drag, freeing the cursor grab and clearing the selection. 

USING SELECTIONS WITH DRAG AND DROP

To obscure protocol implementation from the application developer, the Drag and Drop API, includes a number of special wrapper functions around the normal Xt Selection package to handle this underlying protocol. The developer must be aware that use of these interfaces to the drag and drop selection is essential to ensure proper operation of the selection transfer. 

OlDnDOwnSelection

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDOwnSelection(

The procedure is identical in semantics to the Xt function except for the additional parameter state_cb (see above). 

OlDnDOwn-SelectionIncremental

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDOwnSelectionIncremental(

The function is identical in semantics to the Xt function except for the additional parameter state_cb (see above).  #

OlDnDDisownSelection

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDDisownSelection(

The function is identical in semantics to the Xt function

OlDnDTransactionStateCallback

The and functions have a function pointer as their last parameter. This function is invoked as a result of drag and drop protocol events during the drag and drop selection transaction. 

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
typedef void OlDnDTransactionStateCallback(

The structure is defined as:

typedefenum oldnd_transaction_state {
OlDnDTransactionBegins,
OlDnDTransactionEnds,
OlDnDTransactionDone,
OlDnDTransactionRequestorError,
OlDnDTransactionRequestorWindowDeath
} OlDnDTransactionState;
 

The callback is invoked with the following values when the requestor of the selection (i.e the drop site) invokes the following functions:

—OlDnDBeginSelectionTransaction() - OlDnDTransactionBegins

—OlDnDEndSelectionTransaction() - OlDnDTransactionEnds

—OlDnDDragNDropDone() - OlDnDTransactionDone

A requestor may notify the selection holder of an error by calling the .JL OlDnDErrorDuringSelectionTransaction() function.   This invokes the callback with a state value of

If the requesting client is lost during the selection transfer because its window dies, the state callback will be invoked with a state value of

widget is the selection holder. 

selection is the selection atom

state is the protocol event that has occurred

timestamp when the event occurred. 

OlDnDBegin-SelectionTransaction

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDBeginSelectionTransaction(

The function is used in conjuction with the function to provide a positive handshake indicating a selection transaction. 

It invokes the selection holder’s transaction state callback (specified by the and functions) with a state parameter of

widget is the requesting widget or the drop site owner. 

selection the selection atom passed in the trigger notify procedure. 

timestamp is the server timestamp for the current time. 

ack_action_cb is the callback to notify the requestor that the holder received the begin notification. The parameter takes the value

closure user data passed to ack_action_cb . 

OlDnDEndSelectionTransaction

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDEndSelectionTransaction(

The function provides a positive handshake between the selection requestor and holder. 

It invokes the selection holders transaction state callback (registered with the and functions) with a state parameter of

widget is the widget id of the owner of the dropsite. 

selection is the selection atom. 

timestamp is the current server time. 

ack_action_cb is the callback to inform the requestor that the holder has successfully received the end notification. When it is invoked, the OlDnDTransactionState parameter takes the value

closure is user data passed to the ack_action_cb . 

OlDnDErrorDuring-SelectionTransaction

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDErrorDuringSelectionTransaction(

The function can be called at any time during the selection transfer by the requestor to inform the selection holder that there is an error. The subsequent behaviour of the holder is undefined by this protocol.  invokes the selection holder’s protocol state callback (registered with or with a protocol state parameter value of

widget is the id of the drop site owner. 

selection is the selection atom for the transaction. 

timestamp is the current server time. 

ack_action_cb is the callback to inform the requestor that the selection holder has successfully received the error notification. When it is invoked the OlDnDTransactionState paramater takes the value OlDnDTransactionError. 

closure is user data passed to ack_action_cb. 

OlDnDProtocolActionCbP

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
typedefOlDnDProtocolActionCallbackProc(∗OlDnDProtocolActionCbP)(

 

The function prototype describes the callback function called when a selection holder acknowledges the receipt of a protocol message generated by the requestor functions:

—OlDnDBeginSelectionTransaction()

—OlDnDEndSelectionTransaction()

—OlDnDErrrorDuringSelectionTransaction()

—OlDnDDragNDropDone()

widget is the id of the drop site owner. 

selection is the selection atom. 

timestamp is the current server time. 

ack_ok specifies whether or not the holder acknowledged the action. 

closure is user data. 

DELIVERING PREVIEW MESSAGES

During the drag and drop operation, both the source and potential destinations of the drag and drop operation may want to provide the user with some dynamic visual feedback of some aspect of the drag and drop operation.  For example, a file manager application could change the file folder icon state when a drop cursor crosses it to signify that files can be placed in that folder via drop.  The drag and drop cursor could change state when it is over a sensitive area for drops.  To do this, the drag source must deliver "preview" events to drop sites as the drag operation progresses.  For this purpose, a special client, called the drop site database manager, monitors the state of the drop sites on the screen and provides this information to the drag source client.  The DSDM must be running, for previewing to take place. 

OlDnDDeliverPreviewMessage

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDDeliverPreviewMessage(

attempts to deliver Enter, Leave and Motion events to any drop sites currently under the (root_x, root_y) position on the root window specified. To preview drop sites, the DSDM (DropSite Database Manager) client must be running in order to provide the source client with up-to-date drop site information. 

The function returns TRUE if it finds a drop site to deliver an event to.  Otherwise it returns FALSE. 
 

widget is the DnD Selection owner widget id. 

root is the root window id. 

root_x is the root-relative x screen co-ordinate at which OlDnDDeliverPreviewMessage attempts to preview delivery. 

root_y is the root-relative y screen co-ordinate at which OlDnDDeliverPreviewMessage attempts to preview delivery. 

timestamp is the current server time. 

OlDnDDragAndDrop

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDDragAndDrop(

The function provides a simple interface for processing the mouse and keyboard events during a drop and drop operation. Before calling this function, you should call OlGrabDragCursor or XGrabPointer to effectively grab pointer events. 
OlDnDDragAndDrop issues an XGrabKeyboard to obtain keystrokes during the drag operation. It then inserts a raw event handler on the widget specified for the pointer and key events and initializes the drag and drop system with OlDnDInitializeDragState. Then it proceeds to process the event stream, delivering preview messages where appropriate via OlDnDDeliverPreviewMessage until the drag completes or is aborted. The function returns the x, y location and the window that the pointer was in when the operation completed.  It also returns the necessary root information.

widget is the widget id of the selection holder

window is the address of a variable of type which returns the window id containing the pointer

x is the address of a variable of type which returns the x-location of the pointer relative to the containing window

y is a pointer to a variable of type which returns the y-location of the pointer relative to the containing window. 

root_info is a pointer to a variable of type which returns information about the root-relative pointer location. 

typedef struct_ol_dnd_root_info {
Windowroot_window;
Positionroot_x;
Positionroot_y;
Timedrop_timestamp;
} OlDnDDragNDropInfo, ∗OlDnDDragNDropInfoPtr;

OlDnDInitializeDragState

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDInitializeDragState(

The function is called prior to commencing delivery of preview messages to cause the drag and drop system to download drop site previewing information from the DSDM. It returns TRUE if the download was successful.  Otherwise it returns FALSE. 

widget is the widget id of the selection holder

OlDnDClearDragState

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDClearDragState(

The function must be called upon completion of the previewing phase of a drag and drop gesture to clear internal state within the drag and drop system. 

widget is the widget id of the selection holder

 

DELIVERING TRIGGER MESSAGES

Once the Drop gesture has occurred, the dragging client must notify the drop site on which the drop gesture occurred, to initiate the X Selection transfer that exchanges the data between the dragging client and the drop target client. 
 

OlDnDDeliverTriggerMessage

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDDeliverTriggerMessage(

The function is called by the dragging client to deliver a trigger message to a target drop site on the root window at the coordinates specified. 
 
The calling client is responsible for establishing a timeout period. If the drop target doesn’t send selection conversion requests during this period it should take appropriate action.  OlDnDDeliverTriggerMessage returns TRUE if it finds a drop site to dispatch a trigger message to at the root (x,y).  Otherwise it returns FALSE.

widget is the widget id of the selection holder

root is the root window id

root_x is the root relative x coordinate of the point to which a trigger message should be dispatched

root_y is the root relative y coordinate of the point to which a trigger message should be dispatched

selection is the selection atom that the requestor should use to effect the selection transfer

operation is a trigger operation that copies or moves the selected data. 

time is the current server time
 

DRAG AND DROP CONVENIENCE ROUTINES

Since selection transactions are used extensively throughout this protocol it is necessary to use many atoms that are resources for the lifetime of the server. It is convenient to provide a mechanism to share these atoms. 
 

OlDnDAllocTransientAtom

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Atom OlDnDAllocTransientAtom(

The function allocates a reusable "transient" atom suitable for use in a drag and drop selection transaction upon this widget. 

widget is the id of the widget about to assert ownership of a selection using the atom returned from this call. 
 

OlDnDFreeTransientAtom

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
void OlDnDFreeTransientAtom(

The function frees the transient atom specified for use by other drop sites. 

widget is the widget with which the transient atom was associated. 

transient is the selection atom. 

 

OlDnDGetCurrent-SelectionsForWidget

Synopsis:

#include <Xol/OpenLook.h>
#include <Xol/OlDnDVCX.h>
 . . .
Boolean OlDnDGetCurrentSelectionsForWidget(

The function returns a list of atoms currently held as drag and drop selections for the specified widget. If OlDnDGetCurrentSelectionsForWidget finds any, it returns TRUE.  Otherwise it returns FALSE. 
 
The caller must call XtFree() on the pointer returned in the atom’s parameter to free the store allocated when no longer required.

widget is the widget id to be queried.  atoms is a pointer to a variable of type Atom ∗ which returns a pointer to an array of atoms that are currently held as selections. 

num_atoms is a pointer to a variable of type Cardinal which returns the number of atoms returned. 
 
 
 
 
 
 
 

Version 3.0  —  Last change: 19 July 91

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026