From 8106b1b40e6616234d66fbe8e29f96769a250340 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Sat, 14 Nov 2009 03:53:18 +0300 Subject: [PATCH] Add Gdk/Selections --- gdk/cl-gtk2-gdk.asd | 3 +- gdk/gdk.selections.lisp | 97 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 gdk/gdk.selections.lisp diff --git a/gdk/cl-gtk2-gdk.asd b/gdk/cl-gtk2-gdk.asd index 2a7c3d4..2996f52 100644 --- a/gdk/cl-gtk2-gdk.asd +++ b/gdk/cl-gtk2-gdk.asd @@ -22,5 +22,6 @@ (:file "gdk.cursor") (:file "gdk.windows") (:file "gdk.events") - (:file "gdk.key-values")) + (:file "gdk.key-values") + (:file "gdk.selections")) :depends-on (:cl-gtk2-glib :cffi :cl-gtk2-pango)) \ No newline at end of file diff --git a/gdk/gdk.selections.lisp b/gdk/gdk.selections.lisp new file mode 100644 index 0000000..878f35e --- /dev/null +++ b/gdk/gdk.selections.lisp @@ -0,0 +1,97 @@ +(in-package :gdk) + +(defparameter *selection-primary* "PRIMARY") +(export '*selection-primary*) +(defparameter *selection-secondary* "SECONDARY") +(export '*selection-secondary*) +(defparameter *selection-clipboard* "CLIPBOARD") +(export '*selection-clipboard*) +(defparameter *target-bitmap* "BITMAP") +(export '*target-bitmap*) +(defparameter *target-colormap* "COLORMAP") +(export '*target-colormap*) +(defparameter *target-drawable* "DRAWABLE") +(export '*target-drawable*) +(defparameter *target-pixmap* "PIXMAP") +(export '*target-pixmap*) +(defparameter *target-string* "STRING") +(export '*target-string*) +(defparameter *selection-type-atom* "ATOM") +(export '*selection-type-atom*) +(defparameter *selection-type-bitmap* "BITMAP") +(export '*selection-type-bitmap*) +(defparameter *selection-type-colormap* "COLORMAP") +(export '*selection-type-colormap*) +(defparameter *selection-type-drawable* "DRAWABLE") +(export '*selection-type-drawable*) +(defparameter *selection-type-integer* "INTEGER") +(export '*selection-type-integer*) +(defparameter *selection-type-pixmap* "PIXMAP") +(export '*selection-type-pixmap*) +(defparameter *selection-type-window* "WINDOW") +(export '*selection-type-window*) +(defparameter *selection-type-string* "STRING") +(export '*selection-type-string*) + +(defcfun gdk-selection-owner-set :boolean + (owner (g-object gdk-window)) + (selection gdk-atom-as-string) + (time :uint32) + (send-event :boolean)) + +(export 'gdk-selection-owner-set) + +(defcfun gdk-selection-owner-set-for-display :boolean + (display (g-object display)) + (owner (g-object gdk-window)) + (selection gdk-atom-as-string) + (time :uint32) + (send-event :boolean)) + +(export 'gdk-selection-owner-set-for-display) + +(defcfun gdk-selection-owner-get (g-object gdk-window) + (selection gdk-atom-as-string)) + +(export 'gdk-selection-owner-get) + +(defcfun gdk-selection-owner-get-for-display (g-object gdk-window) + (display (g-object display)) + (selection gdk-atom-as-string)) + +(export 'gdk-selection-owner-get-for-display) + +(defcfun gdk-selection-convert :void + (requestor (g-object gdk-window)) + (selection gdk-atom-as-string) + (target gdk-atom-as-string) + (time :uint32)) + +(export 'gdk-selection-convert) + +(defcfun gdk-selection-property-get :int + (requestor (g-object gdk-window)) + (selection gdk-atom-as-string) + (target gdk-atom-as-string) + (time :uint32)) + +(export 'gdk-selection-property-get) + +(defcfun gdk-selection-send-notify :void + (requestor native-window) + (selection gdk-atom-as-string) + (target gdk-atom-as-string) + (property gdk-atom-as-string) + (time :uint32)) + +(export 'gdk-selection-send-notify) + +(defcfun gdk-selection-send-notify-for-display :void + (display (g-object display)) + (requestor native-window) + (selection gdk-atom-as-string) + (target gdk-atom-as-string) + (property gdk-atom-as-string) + (time :uint32)) + +(export 'gdk-selection-send-notify-for-display) -- 1.7.10.4