DndDragS.sgm 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. <!-- $XConsortium: DndDragS.sgm /main/8 1996/09/08 20:02:44 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN25.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN25.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>DtDndDragStart</RefEntryTitle>
  13. <ManVolNum>library call</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Function>DtDndDragStart</Function>,
  17. <Function>DtDndVaDragStart</Function>
  18. </RefName>
  19. <RefPurpose>initiate a drag
  20. </RefPurpose>
  21. </RefNameDiv>
  22. <RefSynopsisDiv>
  23. <FuncSynopsis Remap="ANSI">
  24. <FuncSynopsisInfo>#include &lt;Dt/Dnd.h>
  25. </FuncSynopsisInfo>
  26. <FuncDef>Widget <Function>DtDndDragStart</Function></FuncDef>
  27. <ParamDef>Widget <Parameter>dragSource</Parameter></ParamDef>
  28. <ParamDef>XEvent *<Parameter>event</Parameter></ParamDef>
  29. <ParamDef>DtDndProtocol <Parameter>protocol</Parameter></ParamDef>
  30. <ParamDef>Cardinal <Parameter>numItems</Parameter></ParamDef>
  31. <ParamDef>unsigned char <Parameter>operations</Parameter></ParamDef>
  32. <ParamDef>XtCallbackList <Parameter>convertCallback</Parameter></ParamDef>
  33. <ParamDef>XtCallbackList <Parameter>dragFinishCallback</Parameter></ParamDef>
  34. <ParamDef>ArgList <Parameter>argList</Parameter></ParamDef>
  35. <ParamDef>Cardinal <Parameter>argCount</Parameter></ParamDef>
  36. </FuncSynopsis>
  37. <FuncSynopsis Remap="ANSI">
  38. <FuncDef>Widget <Function>DtDndVaDragStart</Function></FuncDef>
  39. <ParamDef>Widget <Parameter>dragSource</Parameter></ParamDef>
  40. <ParamDef>XEvent *<Parameter>event</Parameter></ParamDef>
  41. <ParamDef>DtDndProtocol <Parameter>protocol</Parameter></ParamDef>
  42. <ParamDef>Cardinal <Parameter>numItems</Parameter></ParamDef>
  43. <ParamDef>unsigned char <Parameter>operations</Parameter></ParamDef>
  44. <ParamDef>XtCallbackList <Parameter>convertCallback</Parameter></ParamDef>
  45. <ParamDef>XtCallbackList <Parameter>dragFinishCallback</Parameter></ParamDef>
  46. <ParamDef>...</ParamDef>
  47. </FuncSynopsis>
  48. </RefSynopsisDiv>
  49. <RefSect1>
  50. <Title>DESCRIPTION</Title>
  51. <Para>The
  52. <Function>DtDndDragStart</Function> and
  53. <Function>DtDndVaDragStart</Function> functions initiate a Motif drag, with drag visuals appropriate to the
  54. type of data being dragged,
  55. and updates the translation table of the drag context.
  56. Either of the functions
  57. is called from the application's event handler, which interprets
  58. mouse events to determine when a drag should begin.
  59. </Para>
  60. <Para>The only difference between
  61. <Function>DtDndDragStart</Function> and
  62. <Function>DtDndVaDragStart</Function> is how the argument list is passed.
  63. The argument list is passed as an
  64. <StructName Role="typedef">ArgList</StructName> to
  65. <Function>DtDndDragStart</Function> and using
  66. <Symbol Role="Variable">varargs</Symbol> for
  67. <Function>DtDndVaDragStart</Function>.</Para>
  68. <Para>The
  69. <Emphasis>dragSource</Emphasis> argument is the widget that received the event that triggered the drag.
  70. </Para>
  71. <Para>The
  72. <Symbol Role="Variable">event</Symbol> argument is the button press or button motion event that triggered the drag.
  73. </Para>
  74. <Para>The
  75. <Symbol Role="Variable">protocol</Symbol> argument specifies the protocol used for the data transfer.
  76. Valid values are:
  77. </Para>
  78. <VariableList>
  79. <VarListEntry>
  80. <Term>DtDND_TEXT_TRANSFER</Term>
  81. <ListItem>
  82. <Para>A list of text is being transferred.
  83. </Para>
  84. </ListItem>
  85. </VarListEntry>
  86. <VarListEntry>
  87. <Term>DtDND_FILENAME_TRANSFER</Term>
  88. <ListItem>
  89. <Para>A list of file names is being transferred.
  90. </Para>
  91. </ListItem>
  92. </VarListEntry>
  93. <VarListEntry>
  94. <Term>DtDND_BUFFER_TRANSFER</Term>
  95. <ListItem>
  96. <Para>A list of memory buffers is being transferred.
  97. </Para>
  98. </ListItem>
  99. </VarListEntry>
  100. </VariableList>
  101. <Para>The
  102. <Emphasis>numItems</Emphasis> argument specifies the number of items being dragged.
  103. </Para>
  104. <Para>The
  105. <Symbol Role="Variable">operations</Symbol> argument indicates which operations the
  106. <Emphasis>dragSource</Emphasis> supports.
  107. The operations are:
  108. </Para>
  109. <VariableList>
  110. <VarListEntry>
  111. <Term>XmDROP_COPY</Term>
  112. <ListItem>
  113. <Para>Copy operations are valid.
  114. </Para>
  115. </ListItem>
  116. </VarListEntry>
  117. <VarListEntry>
  118. <Term>XmDROP_LINK</Term>
  119. <ListItem>
  120. <Para>Link operations are valid.
  121. </Para>
  122. </ListItem>
  123. </VarListEntry>
  124. <VarListEntry>
  125. <Term>XmDROP_MOVE</Term>
  126. <ListItem>
  127. <Para>Move operations are valid.
  128. </Para>
  129. </ListItem>
  130. </VarListEntry>
  131. </VariableList>
  132. <Para>A drag source can support any combination of these operations.
  133. A combination of operations is specified by the
  134. bitwise inclusive OR of several operation values.
  135. For example, to support the move and copy operations,
  136. the application can specify:
  137. </Para>
  138. <InformalExample Remap="indent">
  139. <ProgramListing>XmDROP_MOVE | XmDROP_COPY
  140. </ProgramListing>
  141. </InformalExample>
  142. <Para>The
  143. <Emphasis>convertCallback</Emphasis> argument is a callback function that
  144. is invoked when a drop has started and the drop site has requested
  145. data from the drag source.
  146. The
  147. <Emphasis>convertCallback</Emphasis> is responsible for providing the data that is transferred to the drop site.
  148. <![ %CDE.C.CDE; [
  149. <!-- this is omitted from X/Open because it is info not--><!-- typically stated there about Motif callbacks-->The arguments for the
  150. <Emphasis>convertCallback</Emphasis> are the Motif Drag Context, an
  151. <StructName Role="typedef">XtPointer</StructName> to application-supplied client data,
  152. and an
  153. <StructName Role="typedef">XtPointer</StructName> to a
  154. <StructName Role="typedef">DtDndConvertCallbackStruct</StructName> structure.
  155. ]]></Para>
  156. <Para>The
  157. <Emphasis>dragFinishCallback</Emphasis> argument is a callback function that
  158. is invoked when the drag and drop transaction is complete.
  159. The
  160. <Emphasis>dragFinishCallback</Emphasis> is called after the
  161. <Emphasis>convertCallback</Emphasis>, if applicable.
  162. (The
  163. <Emphasis>convertCallback</Emphasis> is called only after a drop has started
  164. on an eligible drop site, whereas
  165. <Emphasis>dragFinishCallback</Emphasis> is called after the drag finishes,
  166. whether or not a drop occurred.)
  167. The
  168. <Emphasis>dragFinishCallback</Emphasis> should reset any drag motion handler and free any memory allocated
  169. by the drag source during the drag and drop transaction.
  170. <![ %CDE.C.CDE; [The arguments
  171. for the
  172. <Emphasis>dragFinishCallback</Emphasis> are the Motif Drag Context, an
  173. <StructName Role="typedef">XtPointer</StructName> to application-supplied client data,
  174. and an
  175. <StructName Role="typedef">XtPointer</StructName> to a
  176. <StructName Role="typedef">DtDndDragFinishCallbackStruct</StructName> structure.
  177. ]]></Para>
  178. <RefSect2>
  179. <Title>Argument Value Pairs</Title>
  180. <Para>The
  181. <Function>DtDndDragStart</Function> and
  182. <Function>DtDndVaDragStart</Function> functions support the following optional argument-value pairs.
  183. Motif resources can be set via the argument list as well,
  184. provided they are not resources that are used by the drag and drop subsystem;
  185. see
  186. <Literal>Motif Resources</Literal>.</Para>
  187. <VariableList>
  188. <VarListEntry>
  189. <Term><SystemItem Class="Resource">DtNsourceIcon</SystemItem> (<StructName Role="typedef">Widget</StructName>)</Term>
  190. <ListItem>
  191. <Para>Specifies the
  192. <Classname>XmDragIcon</Classname> used to represent the data being dragged.
  193. This icon is created using either
  194. &cdeman.DtDndCreateSourceIcon; or
  195. &cdeman.XmCreateDragIcon;. If
  196. <SystemItem Class="Resource">DtNsourceIcon</SystemItem> is
  197. <SystemItem Class="Constant">NULL</SystemItem>, then a default icon is used, which is appropriate for the data
  198. begin dragged.
  199. The default value is
  200. <SystemItem Class="Constant">NULL</SystemItem>.</Para>
  201. </ListItem>
  202. </VarListEntry>
  203. <VarListEntry>
  204. <Term><SystemItem Class="Resource">DtNbufferIsText</SystemItem> (<StructName Role="typedef">Boolean</StructName>)</Term>
  205. <ListItem>
  206. <Para>Specifies whether the dragged buffer should also be sourced
  207. as text, allowing the buffer to be dropped onto text widgets.
  208. This attribute is only valid if
  209. <Symbol Role="Variable">protocol</Symbol> <SystemItem Class="Constant">DtDND_BUFFER_TRANSFER</SystemItem> and is ignored for other transfers.
  210. If
  211. <SystemItem Class="Resource">DtNbufferIsText</SystemItem> is True, the buffer is sourced as text in addition
  212. to being sourced as buffers;
  213. if it is False, the buffers are sourced only as buffers.
  214. <![ %CDE.C.CDE; [</Para>
  215. </ListItem>
  216. </VarListEntry>
  217. <VarListEntry>
  218. <Term><SystemItem Class="Resource">DtNdropOnRootCallback</SystemItem></Term>
  219. <ListItem>
  220. <Para>Specifies the callback to be invoked when the drop occurs on the desktop.
  221. This callback is only for use by specialized clients such as file managers.
  222. If
  223. <SystemItem Class="Resource">DtNdropOnRootCallback</SystemItem> is
  224. <SystemItem Class="Constant">NULL</SystemItem>, then drops onto the desktop background are not allowed.
  225. The default value is
  226. <SystemItem Class="Constant">NULL</SystemItem>. ]]></Para>
  227. </ListItem>
  228. </VarListEntry>
  229. </VariableList>
  230. </RefSect2>
  231. <RefSect2>
  232. <Title>Callbacks</Title>
  233. <Para>Once the rendezvous with the drop site has been accomplished,
  234. the application-provided callback functions are called
  235. to perform the transfer of the dragged data.
  236. </Para>
  237. <Para>First, the
  238. <Emphasis>convertCallback</Emphasis> is called with a
  239. <Symbol Role="Variable">reason</Symbol> of
  240. <SystemItem Class="Constant">DtCR_DND_CONVERT_DATA</SystemItem>. The application must set the
  241. <StructName Role="typedef">DtDndContext</StructName> fields appropriate to the transfer protocol to
  242. provide the data to be transferred to the drop site.
  243. </Para>
  244. <Para>If the drag operation is
  245. <SystemItem Class="Constant">XmDROP_MOVE</SystemItem> and the drop site requests that the move be completed,
  246. the
  247. <Emphasis>convertCallback</Emphasis> is called again with a
  248. <Symbol Role="Variable">reason</Symbol> of
  249. <SystemItem Class="Constant">DtCR_DND_CONVERT_DELETE</SystemItem>. The application should delete its version of the dragged data.
  250. </Para>
  251. <Para>Once the data transfer is complete, the
  252. <Emphasis>dragFinishCallback</Emphasis> is called with a
  253. <Symbol Role="Variable">reason</Symbol> of
  254. <SystemItem Class="Constant">DtCR_DND_DRAG_FINISH</SystemItem>. The application should free any memory allocated in the
  255. <Emphasis>convertCallback</Emphasis> and restore any application state.
  256. </Para>
  257. </RefSect2>
  258. <RefSect2>
  259. <Title>Callback Information</Title>
  260. <Para>Each of the callbacks for
  261. <Function>DtDndDragStart</Function> and
  262. <Function>DtDndVaDragStart</Function> has an associated callback structure.
  263. These callbacks cannot be used with the
  264. <Function>XtAddCallback</Function>(3) interface.
  265. </Para>
  266. <Para>A pointer to the following structure is passed to the
  267. <Emphasis>convertCallback</Emphasis>:</Para>
  268. <InformalExample Remap="indent">
  269. <ProgramListing>typedef struct {
  270. int <Symbol Role="Variable">reason</Symbol>;
  271. XEvent *<Symbol Role="Variable">event</Symbol>;
  272. DtDndContext *<Emphasis>dragData</Emphasis>;
  273. DtDndStatus <Symbol Role="Variable">status</Symbol>;
  274. } DtDndConvertCallbackStruct, *DtDndConvertCallback;
  275. </ProgramListing>
  276. </InformalExample>
  277. <Para>The
  278. <Symbol Role="Variable">reason</Symbol> argument indicates why the callback was invoked.
  279. The possible reasons for this callback are:
  280. </Para>
  281. <VariableList>
  282. <VarListEntry>
  283. <Term>DtCR_DND_CONVERT_DATA</Term>
  284. <ListItem>
  285. <Para>The callback provides the requested data by setting appropriate
  286. fields in the
  287. <Emphasis>dragData</Emphasis> structure.
  288. </Para>
  289. </ListItem>
  290. </VarListEntry>
  291. <VarListEntry>
  292. <Term>DtCR_DND_CONVERT_DELETE</Term>
  293. <ListItem>
  294. <Para>The callback completes the
  295. <SystemItem Class="Constant">XmDROP_MOVE</SystemItem> operation by deleting its copy of the dragged data.
  296. </Para>
  297. </ListItem>
  298. </VarListEntry>
  299. </VariableList>
  300. <Para>The
  301. <Symbol Role="Variable">event</Symbol> argument
  302. points to the
  303. <StructName Role="typedef">XEvent</StructName> that triggered the callback.
  304. </Para>
  305. <Para>The
  306. <Emphasis>dragData</Emphasis> argument
  307. specifies the
  308. <StructName Role="typedef">DtDndContext</StructName> that contains the data to be dragged.
  309. If the
  310. <Symbol Role="Variable">reason</Symbol> argument
  311. is
  312. <SystemItem Class="Constant">DtCR_DND_CONVERT_DATA,</SystemItem> the application must provide the data by setting the relevant fields in the
  313. <StructName Role="typedef">DtDndContext</StructName>, as described in the following
  314. <Literal>Structures</Literal> section.
  315. If the
  316. <Symbol Role="Variable">reason</Symbol> argument is
  317. <SystemItem Class="Constant">DtCR_DND_CONVERT_DELETE</SystemItem>, the application must delete the original data that
  318. completes a move operation.
  319. </Para>
  320. <Para>The
  321. <Symbol Role="Variable">status</Symbol> argument
  322. indicates the status of the conversion.
  323. The application can set this to
  324. <SystemItem Class="Constant">DtDND_FAILURE</SystemItem> to cancel the conversion and consequently the drag and drop operation.
  325. The value of
  326. <Symbol Role="Variable">status</Symbol> is normally
  327. <SystemItem Class="Constant">DtDND_SUCCESS</SystemItem>.</Para>
  328. <Para>A pointer to the following structure is passed to the
  329. <Emphasis>dragFinishCallback</Emphasis>:</Para>
  330. <InformalExample Remap="indent">
  331. <ProgramListing>typedef struct {
  332. int <Symbol Role="Variable">reason</Symbol>;
  333. XEvent *<Symbol Role="Variable">event</Symbol>;
  334. DtDndContext *<Emphasis>dragData</Emphasis>;
  335. Widget <Emphasis>sourceIcon</Emphasis>;
  336. } DtDndDragFinishCallbackStruct, *DtDndDragFinishCallback;
  337. </ProgramListing>
  338. </InformalExample>
  339. <Para>The
  340. <Symbol Role="Variable">reason</Symbol> argument
  341. indicates why the callback was invoked.
  342. The valid reason for this callback is
  343. <SystemItem Class="Constant">DtCR_DND_DRAG_FINISH</SystemItem>.</Para>
  344. <Para>The
  345. <Symbol Role="Variable">event</Symbol> argument
  346. points to the
  347. <StructName Role="typedef">XEvent</StructName> that triggered the callback.
  348. </Para>
  349. <Para>The
  350. <Emphasis>sourceIcon</Emphasis> argument
  351. specifies the source icon registered in the call to
  352. <Function>DtDndDragStart</Function>. This widget is provided to allow the application to free data associated
  353. with the source icon and optionally destroy the source icon.
  354. </Para>
  355. <Para>The
  356. <Emphasis>dragData</Emphasis> argument specifies the
  357. <StructName Role="typedef">DtDndContext</StructName> that contains the data that was dragged.
  358. The application should free any
  359. data it associated with the
  360. <Emphasis>dragData</Emphasis>.</Para>
  361. </RefSect2>
  362. <RefSect2>
  363. <Title>Structures</Title>
  364. <Para>The following structures are used by the drag source in the
  365. <Emphasis>convertCallback</Emphasis> and
  366. <Emphasis>dragFinishCallback</Emphasis> to communicate data between the application and the drag and drop subsystem.
  367. The
  368. <StructName Role="typedef">DtDndContext</StructName> structure is passed to these callbacks as
  369. <Emphasis>dragData</Emphasis> in the callback structure appropriate to the callback.
  370. </Para>
  371. <Para>In the
  372. <Emphasis>convertCallback</Emphasis>, the application that is acting as the drag source is responsible for filling
  373. in the
  374. <StructName Role="typedef">DtDndContext</StructName> structure with the data being transferred.
  375. </Para>
  376. <Para>In the
  377. <Emphasis>dragFinishCallback</Emphasis>, the application acting as the drag source is responsible for freeing any
  378. data it allocated for use in the
  379. <StructName Role="typedef">DtDndContext</StructName> structure.
  380. </Para>
  381. <InformalExample Remap="indent">
  382. <ProgramListing>typedef struct _DtDndContext {
  383. DtDndProtocol <Symbol Role="Variable">protocol</Symbol>;
  384. int <Emphasis>numItems</Emphasis>;
  385. union {
  386. XmString *<Symbol Role="Variable">strings</Symbol>;
  387. String *<Emphasis>files</Emphasis>;
  388. DtDndBuffer *<Emphasis>buffers</Emphasis>;
  389. } <Symbol Role="Variable">data</Symbol>;
  390. } DtDndContext;
  391. </ProgramListing>
  392. </InformalExample>
  393. <Para>The
  394. <Symbol Role="Variable">protocol</Symbol> argument indicates the data transfer protocol under which the data in the
  395. <StructName Role="typedef">DtDndContext</StructName> is being transferred.
  396. Valid values are:
  397. </Para>
  398. <VariableList>
  399. <VarListEntry>
  400. <Term>DtDND_TEXT_TRANSFER</Term>
  401. <ListItem>
  402. <Para>A list of text is being transferred.
  403. </Para>
  404. </ListItem>
  405. </VarListEntry>
  406. <VarListEntry>
  407. <Term>DtDND_FILENAME_TRANSFER</Term>
  408. <ListItem>
  409. <Para>A list of file names is being transferred.
  410. </Para>
  411. </ListItem>
  412. </VarListEntry>
  413. <VarListEntry>
  414. <Term>DtDND_BUFFER_TRANSFER</Term>
  415. <ListItem>
  416. <Para>A list of memory buffers is being transferred.
  417. </Para>
  418. </ListItem>
  419. </VarListEntry>
  420. </VariableList>
  421. <Para>The
  422. <Emphasis>numItems</Emphasis> argument indicates the number of items being transferred.
  423. </Para>
  424. <Para>The
  425. <Symbol Role="Variable">data</Symbol> argument is a union containing data that
  426. should be stored and read in the format
  427. corresponding to the specified
  428. <Symbol Role="Variable">protocol</Symbol>. The data structures corresponding to the transfer protocols are as follows.
  429. </Para>
  430. <Para>The
  431. <Symbol Role="Variable">strings</Symbol> argument is valid if the
  432. <Symbol Role="Variable">protocol</Symbol> is
  433. <SystemItem Class="Constant">DtDND_TEXT_TRANSFER</SystemItem>. The
  434. <Symbol Role="Variable">strings</Symbol> argument is an array of pointers to Motif strings
  435. containing the text being transferred.
  436. </Para>
  437. <Para>The
  438. <Emphasis>files</Emphasis> argument is valid if the
  439. <Symbol Role="Variable">protocol</Symbol> is
  440. <SystemItem Class="Constant">DtDND_FILENAME_TRANSFER</SystemItem>. It is an array of pointers to the names of the files being transferred.
  441. The file names have been converted to local host file names
  442. where possible.
  443. </Para>
  444. <Para>The
  445. <Emphasis>buffers</Emphasis> argument is valid if the
  446. <Symbol Role="Variable">protocol</Symbol> is
  447. <SystemItem Class="Constant">DtDND_BUFFER_TRANSFER</SystemItem>. It is an array of pointers to
  448. <StructName Role="typedef">DtDndBuffer</StructName> structures containing the meory buffers being transferred.
  449. </Para>
  450. <Para>The following structure is used with
  451. <SystemItem Class="Constant">DtDND_FILENAME_TRANSFER</SystemItem>:</Para>
  452. <InformalExample Remap="indent">
  453. <ProgramListing>typedef struct _DtDndBuffer {
  454. void *<Emphasis>bp</Emphasis>;
  455. int <Symbol Role="Variable">size</Symbol>;
  456. string <Symbol Role="Variable">name</Symbol>;
  457. } DtDndBuffer;
  458. </ProgramListing>
  459. </InformalExample>
  460. <Para>The
  461. <Emphasis>bp</Emphasis> argument points to the buffer data being transferred.
  462. </Para>
  463. <Para>The
  464. <Symbol Role="Variable">size</Symbol> argument indicates the number of bytes in the buffer.
  465. </Para>
  466. <Para>The
  467. <Symbol Role="Variable">name</Symbol> argument points to the name of the buffer.
  468. </Para>
  469. </RefSect2>
  470. <RefSect2>
  471. <Title>Motif Resources</Title>
  472. <Para>When it calls
  473. &cdeman.XmDragStart;, the
  474. <Function>DtDndDragStart</Function> function sets Motif resources;
  475. the application must not modify the values of any of these resources.
  476. Resources other than those listed here
  477. can be used and are passed through to the underlying
  478. <Function>XmDragStart</Function> call.
  479. </Para>
  480. <Para>The following resources are modified by
  481. <Function>DtDndDragStart</Function> and
  482. <Function>DtDndVaDragStart</Function> in the Motif Drag Context:
  483. </Para>
  484. <ItemizedList>
  485. <ListItem><Para><SystemItem Class="Resource">XmNblendModel</SystemItem></Para></ListItem>
  486. <ListItem><Para><SystemItem Class="Resource">XmNclientData</SystemItem></Para></ListItem>
  487. <ListItem><Para><SystemItem Class="Resource">XmNconvertProc</SystemItem></Para></ListItem>
  488. <ListItem><Para><SystemItem Class="Resource">XmNcursorBackground</SystemItem></Para></ListItem>
  489. <ListItem><Para><SystemItem Class="Resource">XmNcursorForeground</SystemItem></Para></ListItem>
  490. <ListItem><Para><SystemItem Class="Resource">XmNdragDropFinishCallback</SystemItem></Para></ListItem>
  491. <ListItem><Para><SystemItem Class="Resource">XmNdragOperations</SystemItem></Para></ListItem>
  492. <ListItem><Para><SystemItem Class="Resource">XmNdropFinishCallback</SystemItem></Para></ListItem>
  493. <ListItem><Para><SystemItem Class="Resource">XmNdropStartCallback</SystemItem></Para></ListItem>
  494. <ListItem><Para><SystemItem Class="Resource">XmNexportTargets</SystemItem></Para></ListItem>
  495. <ListItem><Para><SystemItem Class="Resource">XmNnumExportTargets</SystemItem></Para></ListItem>
  496. <ListItem><Para><SystemItem Class="Resource">XmNsourcePixmapIcon</SystemItem></Para></ListItem>
  497. <ListItem><Para><SystemItem Class="Resource">XmNtopLevelEnterCallback</SystemItem></Para></ListItem>
  498. </ItemizedList>
  499. <Para>The following resources are modified by
  500. <Function>DtDndDragStart</Function> and
  501. <Function>DtDndVaDragStart</Function> in the Motif Drag Icon:
  502. </Para>
  503. <ItemizedList>
  504. <ListItem><Para><SystemItem Class="Resource">XmNattachment</SystemItem></Para></ListItem>
  505. <ListItem><Para><SystemItem Class="Resource">XmNdepth</SystemItem></Para></ListItem>
  506. <ListItem><Para><SystemItem Class="Resource">XmNheight</SystemItem></Para></ListItem>
  507. <ListItem><Para><SystemItem Class="Resource">XmNhotX</SystemItem></Para></ListItem>
  508. <ListItem><Para><SystemItem Class="Resource">XmNhotY</SystemItem></Para></ListItem>
  509. <ListItem><Para><SystemItem Class="Resource">XmNmask</SystemItem></Para></ListItem>
  510. <ListItem><Para><SystemItem Class="Resource">XmNoffsetX</SystemItem></Para></ListItem>
  511. <ListItem><Para><SystemItem Class="Resource">XmNoffsetY</SystemItem></Para></ListItem>
  512. <ListItem><Para><SystemItem Class="Resource">XmNpixmap</SystemItem></Para></ListItem>
  513. <ListItem><Para><SystemItem Class="Resource">XmNwidth</SystemItem></Para></ListItem>
  514. </ItemizedList>
  515. </RefSect2>
  516. </RefSect1>
  517. <RefSect1>
  518. <Title>RETURN VALUE</Title>
  519. <Para>Upon successful completion, the
  520. <Function>DtDndDragStart</Function> function returns the drag context widget created
  521. when the Motif drag is started;
  522. otherwise, it returns
  523. <SystemItem Class="Constant">NULL</SystemItem> if the drag could not be started.
  524. </Para>
  525. </RefSect1>
  526. <RefSect1>
  527. <Title>SEE ALSO</Title>
  528. <Para>&cdeman.Dt.Dnd.h;, &cdeman.DtDtsFileToDataType;, &cdeman.DtDndCreateSourceIcon;, &cdeman.DtDndDropRegister;, &cdeman.DtDndDropRegister;, <![ %CDE.C.CDE; [&cdeman.DtDndDropUnregister;, &cdeman.XmCreateDragIcon;, &cdeman.XmDragContext;, &cdeman.XmDragIcon;, &cdeman.XmDragStart;. ]]><![ %CDE.C.XO; [<Function>DtDndDropUnregister</Function>; <Function>XmCreateDragIcon</Function>, <Function>XmDragContext</Function>, <Function>XmDragIcon</Function>, <Function>XmDragStart</Function> in the &str-ZM;.
  529. ]]></Para>
  530. </RefSect1>
  531. </RefEntry>
  532. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->