; -*- scheme -*-

;; DnD functions ...

(define-func gtk_drag_get_data
  none
  ((GtkWidget widget)
   (GdkDragContext context)
   (GdkAtom target)
   (uint time)))

(define-func gtk_drag_finish
  none
  ((GdkDragContext context)
   (bool success)
   (bool del)
   (uint time)))

(define-func gtk_drag_get_source_widget
  GtkWidget
  ((GdkDragContext context)))

(define-func gtk_drag_highlight
  none
  ((GtkWidget widget)))

(define-func gtk_drag_unhighlight
  none
  ((GtkWidget widget)))

;; gtk_drag_dest_set

(define-func gtk_drag_dest_set_proxy
  none
  ((GtkWidget widget)
   (GdkWindow proxy_window)
   (GdkDragProtocol protocol)
   (bool use_coordinates)))

(define-func gtk_drag_dest_unset
  none
  ((GtkWidget widget)))

;; gtk_drag_source_set

(define-func gtk_drag_source_unset
  none
  ((GtkWidget widget)))

(define-func gtk_drag_source_set_icon
  none
  ((GtkWidget widget)
   (GdkColormap colormap)
   (GdkPixmap pixmap)
   (GdkBitmap mask)))

;; gtk_drag_begin

(define-func gtk_drag_set_icon_widget
  none
  ((GdkDragContext context)
   (GtkWidget widget)
   (int hot_x) (int hot_y)))

(define-func gtk_drag_set_icon_pixmap
  none
  ((GdkDragContext context)
   (GdkColormap colormap)
   (GdkPixmap pixmap)
   (GdkBitmap mask)
   (int hot_x) (int hot_y)))

(define-func gtk_drag_set_icon_default
  none
  ((GdkDragContext context)))

(define-func gtk_drag_set_default_icon
  none
  ((GdkColormap colormap)
   (GdkPixmap pixmap)
   (GdkBitmap mask)
   (int hot_x) (int hot_y)))

; this is GDK, but useful for programs at the GTK level ...
(define-func gdk_drag_status
  none
  ((GdkDragContext context)
   (GdkDragAction action)
   (uint time)))

;; Selection functions ...

(define-func gdk_atom_intern
  GdkAtom
  ((string atom_name)
   (int only_if_exists (= "FALSE"))))

(define-func gdk_atom_name
  string
  ((GdkAtom atom)))

(define-func gtk_selection_owner_set
  int
  ((GtkWidget widget)
   (GdkAtom selection)
   (uint time)))

(define-func gtk_selection_add_target
  none
  ((GtkWidget widget)
   (GdkAtom selection)
   (GdkAtom target)
   (uint info)))

(define-func gtk_selection_convert
  int
  ((GtkWidget widget)
   (GdkAtom selection)
   (GdkAtom target)
   (uint time)))

;; gtk_selection_data_set -- implemented as method in pygtk.

(define-func gtk_selection_remove_all
  none
  ((GtkWidget widget)))