---
name: "Gtk2::Gdk::DragContext"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::Gdk::DragContext"
---

# Gtk2::Gdk::DragContext(3pm)

wrapper for GdkDragContext

## NAME

Gtk2::Gdk::DragContext - wrapper for GdkDragContext

## HIERARCHY

```
  Glib::Object
  +----Gtk2::Gdk::DragContext
```

## METHODS

### dragcontext = Gtk2::Gdk::DragContext-\>new

### $context-\>abort ($time\_)

- •

  `$time_` (unsigned)

### scalar = $dc-\>action

### scalar = $dc-\>actions

### dragaction = $context-\>get\_actions

Since: gtk+ 2.22

### dragcontext = Gtk2::Gdk::DragContext-\>begin ($window, ...)

- •

  `$window` (Gtk2::Gdk::Window)

- •

  ... (list) of Gtk2::Gdk::Atom's

### scalar = $dc-\>dest\_window

### boolean = $context-\>drag\_drop\_succeeded

Since: gtk+ 2.6

### $context-\>drop ($time\_)

- •

  `$time_` (unsigned)

### $context-\>drop\_finish ($success, $time\_=GDK\_CURRENT\_TIME)

- •

  `$success` (boolean)

- •

  `$time_` (unsigned)

### $context-\>drop\_reply ($ok, $time\_=GDK\_CURRENT\_TIME)

- •

  `$ok` (boolean)

- •

  `$time_` (unsigned)

### (dest\_window, protocol) = $context-\>find\_window ($drag\_window, $x\_root, $y\_root)

- •

  `$drag_window` (Gtk2::Gdk::Window)

- •

  `$x_root` (integer)

- •

  `$y_root` (integer)

### (dest\_window, protocol) = $context-\>find\_window\_for\_screen ($drag\_window, $screen, $x\_root, $y\_root)

- •

  `$drag_window` (Gtk2::Gdk::Window)

- •

  `$screen` (Gtk2::Gdk::Screen)

- •

  `$x_root` (integer)

- •

  `$y_root` (integer)

Since: gtk+ 2.2

### $context-\>finish ($success, $del, $time\_)

- •

  `$success` (boolean)

- •

  `$del` (boolean)

- •

  `$time_` (unsigned)

### $context-\>set\_icon\_default

### $context-\>set\_icon\_name ($icon\_name, $hot\_x, $hot\_y)

- •

  `$icon_name` (string)

- •

  `$hot_x` (integer)

- •

  `$hot_y` (integer)

Since: gtk+ 2.8

### $context-\>set\_icon\_pixbuf ($pixbuf, $hot\_x, $hot\_y)

- •

  `$pixbuf` (Gtk2::Gdk::Pixbuf)

- •

  `$hot_x` (integer)

- •

  `$hot_y` (integer)

### $context-\>set\_icon\_pixmap ($colormap, $pixmap, $mask, $hot\_x, $hot\_y)

- •

  `$colormap` (Gtk2::Gdk::Colormap)

- •

  `$pixmap` (Gtk2::Gdk::Pixmap)

- •

  `$mask` (Gtk2::Gdk::Bitmap or undef)

- •

  `$hot_x` (integer)

- •

  `$hot_y` (integer)

### $context-\>set\_icon\_stock ($stock\_id, $hot\_x, $hot\_y)

- •

  `$stock_id` (string)

- •

  `$hot_x` (integer)

- •

  `$hot_y` (integer)

### $context-\>set\_icon\_widget ($widget, $hot\_x, $hot\_y)

- •

  `$widget` (Gtk2::Widget)

- •

  `$hot_x` (integer)

- •

  `$hot_y` (integer)

### scalar = $dc-\>is\_source

### list = $context-\>list\_targets

Since: gtk+ 2.22

### boolean = $context-\>motion ($dest\_window, $protocol, $x\_root, $y\_root, $suggested\_action, $possible\_actions, $time\_)

- •

  `$dest_window` (Gtk2::Gdk::Window)

- •

  `$protocol` (Gtk2::Gdk::DragProtocol)

- •

  `$x_root` (integer)

- •

  `$y_root` (integer)

- •

  `$suggested_action` (Gtk2::Gdk::DragAction)

- •

  `$possible_actions` (Gtk2::Gdk::DragAction)

- •

  `$time_` (unsigned)

### scalar = $dc-\>protocol

### (ret, protocol) = Gtk2::Gdk::DragContext-\>get\_protocol\_for\_display ($display, $xid)

- •

  `$display` (Gtk2::Gdk::Display)

- •

  `$xid` (unsigned)

Since: gtk+ 2.2

### (ret, protocol) = Gtk2::Gdk::DragContext-\>get\_protocol ($xid)

- •

  `$xid` (unsigned)

### dragaction = $context-\>get\_selected\_action

Since: gtk+ 2.22

### atom = $context-\>get\_selection

### widget = $context-\>get\_source\_widget

### scalar = $dc-\>source\_window

### window = $context-\>get\_source\_window

Since: gtk+ 2.22

### scalar = $dc-\>start\_time

### $context-\>status ($action, $time\_=GDK\_CURRENT\_TIME)

- •

  `$action` (Gtk2::Gdk::DragAction)

- •

  `$time_` (unsigned)

### scalar = $dc-\>suggested\_action

### dragaction = $context-\>get\_suggested\_action

Since: gtk+ 2.22

### list = $dc-\>targets

Returns a list of Gtk2::Gdk::Atom's, the targets.

## ENUMS AND FLAGS

### flags Gtk2::Gdk::DragAction

- •

  'default' / 'GDK\_ACTION\_DEFAULT'

- •

  'copy' / 'GDK\_ACTION\_COPY'

- •

  'move' / 'GDK\_ACTION\_MOVE'

- •

  'link' / 'GDK\_ACTION\_LINK'

- •

  'private' / 'GDK\_ACTION\_PRIVATE'

- •

  'ask' / 'GDK\_ACTION\_ASK'

### enum Gtk2::Gdk::DragProtocol

- •

  'motif' / 'GDK\_DRAG\_PROTO\_MOTIF'

- •

  'xdnd' / 'GDK\_DRAG\_PROTO\_XDND'

- •

  'rootwin' / 'GDK\_DRAG\_PROTO\_ROOTWIN'

- •

  'none' / 'GDK\_DRAG\_PROTO\_NONE'

- •

  'win32-dropfiles' / 'GDK\_DRAG\_PROTO\_WIN32\_DROPFILES'

- •

  'ole2' / 'GDK\_DRAG\_PROTO\_OLE2'

- •

  'local' / 'GDK\_DRAG\_PROTO\_LOCAL'

## SEE ALSO

Gtk2, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
