[gtk-cffi-cvs] CVS gtk-cffi/gtk
CVS User rklochkov
rklochkov at common-lisp.net
Sat Aug 18 13:55:28 UTC 2012
Update of /project/gtk-cffi/cvsroot/gtk-cffi/gtk
In directory tiger.common-lisp.net:/tmp/cvs-serv14447/gtk
Modified Files:
button.lisp entry.lisp gtk-cffi.asd package.lisp
style-context.lisp
Added Files:
adjustment.lisp switch.lisp
Log Message:
Added GtkSwitch GtkEntryCompletion GtkEntryBuffer
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/button.lisp 2012/08/12 17:42:30 1.4
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/button.lisp 2012/08/18 13:55:28 1.5
@@ -1,7 +1,8 @@
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; button.lisp --- Wrappers for GtkButton, GtkCheckButton, GtkToggleButton,
-;;; GtkScaleButton, GtkRadioButton, GtkVolumeButton
+;;; GtkScaleButton, GtkRadioButton, GtkVolumeButton,
+;;; GtkLockButton
;;;
;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
;;;
@@ -189,3 +190,14 @@
(defmethod gconstructor ((volume-button volume-button) &key)
(gtk-volume-button-new))
+
+(defclass lock-button (button)
+ ())
+
+(defcfun gtk-lock-button-new :pointer (permission pobject))
+
+(defmethod gconstructor ((lock-button lock-button) &key permission)
+ (initialize lock-button 'permission)
+ (gtk-lock-button-new permission))
+
+(defslot lock-button permission pobject)
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/entry.lisp 2012/08/12 17:42:30 1.5
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/entry.lisp 2012/08/18 13:55:28 1.6
@@ -43,6 +43,56 @@
(init-slots entry-buffer)
+(defclass entry-completion (g-object)
+ ())
+
+(defcfun gtk-entry-completion-new :pointer)
+(defcfun gtk-entry-completion-new-with-area :pointer (area pobject))
+
+(defmethod gconstructor ((entry-completion entry-completion)
+ &key area &allow-other-keys)
+ (initialize entry-completion 'area)
+ (if area
+ (gtk-entry-completion-new-with-area area)
+ (gtk-entry-completion-new)))
+
+(defslots entry-completion
+ model pobject
+ minimum-key-length :int
+ text-columns :int
+ inline-complection :boolean
+ inline-selection :boolean
+ popup-completion :boolean
+ popup-set-width :boolean
+ popup-single-match :boolean)
+
+(deffuns entry-completion
+ (:get entry pobject)
+ (compute-prefix (:string :free-from-foreign t) (key :string))
+ (complete :void)
+ (:get completion-prefix :string)
+ (insert-prefix :void)
+ (insert-action-text :void (index :int) (text :string))
+ (insert-action-markup :void (index :int) (markup :string))
+ (delete-action :void (index :int)))
+
+(defcfun gtk-entry-completion-set-match-func :void
+ (entry-completion pobject) (func pfunction) (data pdata) (notify :pointer))
+
+(defcallback cb-match-func :boolean
+ ((entry-completion pobject) (key :string) (tree-iter (object tree-iter))
+ (data pdata))
+ (funcall data entry-completion key tree-iter))
+
+(defgeneric (setf match-func) (func entry-completion &key data destroy-notify)
+ (:method (func (entry-completion entry-completion) &key data destroy-notify)
+ (set-callback entry-completion gtk-entry-completion-set-match-func
+ cb-match-func func data destroy-notify)))
+(save-setter entry-completion match-func)
+
+(init-slots entry-completion)
+
+
(defclass entry (widget)
())
@@ -62,7 +112,7 @@
buffer pobject
activates-default :boolean
has-frame :boolean
- inner-border (:pointer (:struct border))
+ inner-border (struct border)
width-chars :int
alignment :float
placeholder-text :string
@@ -78,7 +128,13 @@
(:get text-length :uint16)
(:set invisible-char unichar)
(unset-invisible-char :void)
- (:get layout pobject))
+ (:get layout pobject)
+ (layout-index-to-text-index :int (layout-index :int))
+ (text-index-to-layout-index :int (layout-index :int))
+ (progress-pulse :void)
+ (im-context-filter-keypress :boolean (event pobject))
+ (reset-im-context :void))
+
@@ -91,6 +147,11 @@
(gtk-entry-get-text-area entry r)
r)))
-
+(defcfun gtk-entry-get-layout-offsets :void (entry pobject)
+ (x :pointer) (y :pointer))
+
+(defmethod layout-offsets ((entry entry))
+ (with-foreign-outs-list ((x :int) (y :int)) :ignore
+ (gtk-entry-get-layout-offsets entry x y)))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/gtk-cffi.asd 2012/08/12 17:42:30 1.23
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/gtk-cffi.asd 2012/08/18 13:55:28 1.24
@@ -43,7 +43,8 @@
((:file widget)
(:file invisible :depends-on (widget))
(:file actionable :depends-on (widget))
- (:file activatable :depends-on (widget))))
+ (:file activatable :depends-on (widget))
+ (:file switch :depends-on (actionable activatable))))
(defsystem gtk-cffi-misc
:description "Interface to GTK/Glib via CFFI"
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/package.lisp 2012/08/12 17:42:30 1.24
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/package.lisp 2012/08/18 13:55:28 1.25
@@ -11,7 +11,7 @@
(:use #:common-lisp #:alexandria #:iterate
#:cffi-objects #:g-object-cffi #:g-lib-cffi #:gdk-cffi
#:gtk-cffi-utils)
- (:shadow #:image #:window)
+ (:shadow #:image #:window #:switch)
(:export
;;;; common
#:gtk-init
@@ -390,6 +390,12 @@
#:minus-button
#:volume-button
+
+ #:lock-button
+ ; slot
+ #:permission
+
+ #:switch
#:box
;; box slots
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/style-context.lisp 2012/08/12 17:42:30 1.3
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/style-context.lisp 2012/08/18 13:55:28 1.4
@@ -1,10 +1,10 @@
(in-package :gtk-cffi)
- (defcstruct* border
- (left :int16)
- (right :int16)
- (top :int16)
- (bottom :int16))
+(defcstruct* border
+ (left :int16)
+ (right :int16)
+ (top :int16)
+ (bottom :int16))
(defclass style-context (g-object)
(provider (styles :initform nil)))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/adjustment.lisp 2012/08/18 13:55:28 NONE
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/adjustment.lisp 2012/08/18 13:55:28 1.1
;;;
;;; adjustment.lisp -- GtkAdjustment
;;;
;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
;;;
(in-package :gtk-cffi)
(defclass adjustment (g-object)
())
(defcfun gtk-adjustment-new :pointer
(value :double) (lower :double) (upper :double)
(step-increment :double) (page-increment :double) (page-size :double))
(defmethod gconstructor ((adjustment adjustment) &key value lower upper
step-increment page-increment page-size)
(initialize adjustment '(value lower upper
step-increment page-increment page-size))
(gtk-adjustment-new value lower upper
step-increment page-increment page-size))
(defslots adjustment
value :double
lower :double
page-increment :double
page-size :double
step-increment :double
upper :double)
(deffuns adjustment
(clamp-page :void (lower :double) (upper :double))
(changed :void)
(value-changed :void)
(:get minimum-increment :double))
(defcfun gtk-adjustment-configure :pointer
(adjustment pobject) (value :double) (lower :double) (upper :double)
(step-increment :double) (page-increment :double) (page-size :double))
(defmethod reinitialize-instance ((adjustment adjustment)
&key value lower upper
step-increment page-increment page-size)
(gtk-adjustment-configure adjustment value lower upper
step-increment page-increment page-size))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/switch.lisp 2012/08/18 13:55:28 NONE
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/switch.lisp 2012/08/18 13:55:28 1.1
;;;
;;; switch.lisp -- GtkSwitch
;;;
;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
;;;
(in-package :gtk-cffi)
(defclass switch (widget actionable activatable) ())
(defcfun gtk-switch-new :pointer)
(defmethod gconstructor ((switch switch) &key &allow-other-keys)
(gtk-switch-new))
(defslot switch active :boolean)
(init-slots switch)
More information about the gtk-cffi-cvs
mailing list