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/ptaddresponsetype.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/ptaddresponsetype.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/ptaddresponsetype.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/ptaddresponsetype.html on line 8
Add data to the response chain
PhTransportLink_t *
PtAddResponseType(
PtTransportCtrl_t *ctrl,
PtRequestables_t *requestable,
char *type,
char *desc,
int unsigned transport,
char *packing_type,
void *vdata,
int unsigned vdata_size,
int unsigned const flags );
ph
PtAddResponseType() adds data to the response chain
of the transport-control structure pointed to by ctrl.
This chain is a queue of data that can be or has been requested by the
destination of a drag-and-drop operation.
The source of a drag-and-drop operation can call
PtAddResponseType() when it's packing the data to be dragged or
when a destination actually requests the data.
If a destination has already requested the data, the library automatically
sends the data to the destination immediately.
This function searches a list of the data that has already been requested
and, if the
request for this data has been made, provides the data to the requester.
- ctrl
- A pointer to the
PtTransportCtrl_t
structure that controls the drag-and-drop operation.
- requestable
- A pointer to the description of the requestable data.
- type
- A descriptive type name, such as image, text,
filename, or files.
This is simply added to the header for the packed data.
- desc
- The specifics of what's in the data.
The extractor uses a regular-expression match against the description to
determine if the data should be unpacked or discarded.
This is simply added to the header for the packed data.
- transport
- The available transport types that can be specified when requesting
data from the source:
- Ph_TRANSPORT_INLINE
- The data being transported is in memory and can be unpacked immediately.
- Ph_TRANSPORT_FILEREF
- The data being transported is in the temporary file(s) named in
the inlined data.
- Ph_TRANSPORT_SHMEM
- The data being transported is in the temporary shared object(s)
named in the inlined data.
- Ph_TRANSPORT_STREAM
- The data being transported will be inlined a small piece at a time.
- Ph_TRANSPORT_NAMED_STREAM
- The data being transported will be inlined a small piece at a time.
The streamed data is named so multiple streams of data can be transferred
serially.
- Ph_TRANSPORT_FILE_STREAM
- The contents of files streamed using extended named streams.
This is like the named stream but with extra information with each data
block, including file information and so on.
The requester of data must choose one of the available request
transport types when requesting delivery of additional data.
- packing_type
- The packing method to be used (Ph_PACK_RAW,
Ph_PACK_STRING, or Ph_PACK_STRUCT).
- vdata
- A pointer to the data to be transported.
- vdata_size
- The size of the data pointed to by vdata.
- flags
- Flags that affect the operation:
- Ph_DONT_COPY — refer to the data to be transported
instead of physically copying the data to the transport control's stream
buffers.
|
If this bit is set, any modifications to the data that occur between
packing and actual transport of the data will be reflected in the
data transported.
|
A pointer to the
PhTransportLink_t
structure containing the data just added, or
NULL if there isn't enough memory.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PhTransportLink_t,
PtTransportCtrl_t,
PtTransportRequestable(),
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/ptaddresponsetype.html on line 242
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/ptaddresponsetype.html on line 242