~ubuntu-branches/debian/experimental/gtk+2.0/experimental

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/gtk-Drag-and-Drop.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-02-24 10:01:31 UTC
  • mfrom: (1.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100224100131-ffa6289zwkyknce7
Tags: 2.19.6-1
* New upstream development release:
  + debian/patches/070_mandatory-relibtoolize.patch:
    - Regenerated for the new version.
  + debian/rules,
    debian/libgtk-directfb-2.0-0.symbols,
    debian/libgtk2.0-0.symbols:
    - Update SHVER to 2.19.6 for the new API and add new symbols.
* debian/patches/090_directfb-map-virtual-modifiers.patch:
  + Update to add just another stub to fix the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
9
9
<link rel="prev" href="gtk-Clipboards.html" title="Clipboards">
10
10
<link rel="next" href="GtkIconTheme.html" title="GtkIconTheme">
11
 
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
352
352
<span class="type">"drag-motion"</span> callback for that. Here's an example which selects
353
353
the action to use depending on whether the control key is pressed or not:
354
354
</p>
355
 
<div class="informalexample">
356
 
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
357
 
    <tbody>
358
 
      <tr>
359
 
        <td class="listing_lines" align="right"><pre>1
360
 
2
361
 
3
362
 
4
363
 
5
364
 
6
365
 
7
366
 
8
367
 
9
368
 
10
369
 
11
370
 
12
371
 
13
372
 
14
373
 
15
374
 
16</pre></td>
375
 
        <td class="listing_code"><pre class="programlisting"><span class="type">static</span> <span class="type">void</span>
 
355
<div class="informalexample"><pre class="programlisting">
 
356
static void
376
357
drag_motion (GtkWidget *widget,
377
358
             GdkDragContext *context,
378
359
             gint x,
382
363
  GdkModifierType mask;
383
364
 
384
365
  gdk_window_get_pointer (gtk_widget_get_window (widget),
385
 
                          <span class="number">NULL</span>, <span class="number">NULL</span>, &amp;mask);
386
 
  <span class="keyword">if</span> (mask &amp; GDK_CONTROL_MASK)
 
366
                          NULL, NULL, &amp;mask);
 
367
  if (mask &amp; GDK_CONTROL_MASK)
387
368
    gdk_drag_status (context, GDK_ACTION_COPY, time);
388
 
  <span class="keyword">else</span>
 
369
  else
389
370
    gdk_drag_status (context, GDK_ACTION_MOVE, time);
390
 
}</pre></td>
391
 
      </tr>
392
 
    </tbody>
393
 
  </table>
394
 
</div>
395
 
 
 
371
}
 
372
</pre></div>
396
373
<div class="variablelist"><table border="0">
397
374
<col align="left" valign="top">
398
375
<tbody>
512
489
</tr>
513
490
<tr>
514
491
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
515
 
<td> list of droppable targets, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use
516
 
   gtk_drag_dest_get_target_list (<em class="parameter"><code>widget</code></em>).
517
 
</td>
 
492
<td>allow-none. <acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>. </td>
518
493
</tr>
519
494
<tr>
520
495
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
566
541
</tr>
567
542
<tr>
568
543
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
569
 
<td> list of droppable targets, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none
570
 
</td>
 
544
<td> list of droppable targets, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none. <acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>. </td>
571
545
</tr>
572
546
</tbody>
573
547
</table></div>
1387
1361
</tr>
1388
1362
<tr>
1389
1363
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
1390
 
<td> list of draggable targets, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none
1391
 
</td>
 
1364
<td> list of draggable targets, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none. <acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>. </td>
1392
1365
</tr>
1393
1366
</tbody>
1394
1367
</table></div>
1483
1456
</div>
1484
1457
<div class="footer">
1485
1458
<hr>
1486
 
          Generated by GTK-Doc V1.12</div>
 
1459
          Generated by GTK-Doc V1.13</div>
1487
1460
</body>
1488
1461
</html>
 
 
b'\\ No newline at end of file'