Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 8

PtDndFetch_t

Structure that defines data types a widget accepts from a drag-and-drop event

Synopsis:

typedef struct ptdndfetch PtDndFetch_t;

struct ptdndfetch {
    char              *type_name;
    char              *description;
    int unsigned       transport;
    int unsigned       select_flags;
    void              *user_data;
    PtSelectFunc_t    *select_cb;
    PtRequestFunc_t   *request_cb;
    TransportMalloc_t *transport_malloc;
    void              *transport_malloc_cb_data;
    };

Description:

The PtDndFetch_t structure is used to define the data types a widget accepts from a drag-and-drop event. It contains at least the following members:

type_name
A string that must match the type string in the data being dropped.
description
A regular expression that's compared with the description of the data being dropped. A description of NULL is a “don't care” and matches all descriptions.
transport
Indicates the acceptable transport methods to get the data. A value of ~0 means that any method is acceptable. See <PhTransport.h> for the defined transport types.
select_flags
Flags that control various aspects of data selection and interaction in a drag-and-drop operation:
user_data
A convenient place to keep a reference. An index into the PtDndFetch_t array is provided to the Pt_CB_DND callback when invoked due to a drop, which makes finding user_data easy.
select_cb
If provided, this callback is invoked and its return value is used to determine if a piece of the data being dragged should be selected for drop acceptance or not. The return value of the function must be a transport type to select the data, or 0 to prevent that data from being unpacked on a drop event. See <PhTransport.h> for the defined transport types.
request_cb
An optional callback that's called before asking the source for data. The parameters of the data request can be modified in the callback, or the request can be canceled altogether.
transport_malloc
An optional allocation function that's called when unpacking drag-and-drop data. It's useful for placing portions of unpacking data into shared memory areas and so on.
transport_malloc_cb_data
Data that's passed to the transport_malloc function.

Classification:

Photon

See also:

PtCreateTransportCtrl(), PtDndSelect(), PtInitDnd(), PtTransportType()

Drag and Drop chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 165

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptdndfetch_t.html on line 165