chiark / gitweb /
Bindings to lots of widgets updated and completed
authorespen <espen>
Wed, 29 Dec 2004 21:17:36 +0000 (21:17 +0000)
committerespen <espen>
Wed, 29 Dec 2004 21:17:36 +0000 (21:17 +0000)
gtk/alien/glue.c
gtk/gtk.lisp
gtk/gtktypes.lisp

index 5f419862bd6b0ca9edcbca1dc48de55067fbf11a..228ec3f2f4568e8f0991cae3db996ac4b7451c15 100644 (file)
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* $Id: glue.c,v 1.5 2004-12-26 11:51:21 espen Exp $ */
+/* $Id: glue.c,v 1.6 2004-12-29 21:17:37 espen Exp $ */
 
 
 #include <gtk/gtk.h>
@@ -73,6 +73,12 @@ gtk_container_get_focus_child (GtkContainer *container)
   return container->focus_child;
 }
 
+gboolean
+gtk_container_get_reallocate_redraws (GtkContainer *container)
+{
+  return container->reallocate_redraws;
+}
+
 
 /* Dialog */
 
@@ -106,25 +112,22 @@ gtk_window_get_group (GtkWindow *window)
 
 
 
-/* Layout */
+/* Window */
 
-GdkWindow*
-gtk_layout_get_bin_window (GtkLayout *layout)
+GdkScreen*
+gtk_menu_get_screen (GtkMenu *menu)
 {
-  return layout->bin_window;
+  return (GdkScreen*)g_object_get_data (G_OBJECT (menu), "gtk-menu-explicit-screen");
 }
 
 
-/* Drawing area */
 
-void
-gtk_drawing_area_get_size (GtkDrawingArea *darea, gint *width, gint *height)
-{
-  GtkWidget *widget;
+/* Layout */
 
-  widget = GTK_WIDGET (darea);
-  *width = widget->allocation.width;
-  *height = widget->allocation.height;
+GdkWindow*
+gtk_layout_get_bin_window (GtkLayout *layout)
+{
+  return layout->bin_window;
 }
 
 
index b76bff5329a4b05a9b0e0d13fade520bb860fd21..f47058816e4ab600dd59d36ed4047f9709b68190 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtk.lisp,v 1.27 2004-12-26 11:51:21 espen Exp $
+;; $Id: gtk.lisp,v 1.28 2004-12-29 21:17:36 espen Exp $
 
 
 (in-package "GTK")
@@ -73,13 +73,19 @@ (defbinding accel-label-refetch () boolean
   (accel-label accel-label))
 
 
+;;; Accessible
+
+(defbinding accessible-connect-widget-destroyed () nil
+  (accessible accessible))
+
+
 ;;; Adjustment
 
-(defmethod shared-initialize ((adjustment adjustment) names &key value)
+(defmethod initialize-instance ((adjustment adjustment) &key value)
   (prog1
       (call-next-method)
     ;; we need to make sure that the value is set last, otherwise it
-    ;; may be outside current limits
+    ;; may be outside current limits and ignored
     (when value
       (setf (slot-value adjustment 'value) value))))
 
@@ -96,10 +102,6 @@ (defbinding adjustment-clamp-page () nil
   (upper single-float))
 
 
-;;; Arrow -- no functions
-
-
-
 ;;; Aspect frame
 
 
@@ -132,7 +134,7 @@ (defbinding box-pack-end () nil
   (fill boolean)
   (padding unsigned-int))
 
-(defun box-pack (box child &key end expand fill (padding 0))
+(defun box-pack (box child &key end (expand t) (fill t) (padding 0))
   (if end
       (box-pack-end box child expand fill padding)
     (box-pack-start box child expand fill padding)))
@@ -162,6 +164,12 @@ (defbinding box-set-child-packing () nil
 
 ;;; Button
 
+(defmethod initialize-instance ((button button) &rest initargs &key stock)
+  (if stock
+      (apply #'call-next-method button :label stock :use-stock t initargs)
+    (call-next-method)))
+
+
 (defbinding button-pressed () nil
   (button button))
 
@@ -201,11 +209,7 @@ (defbinding calendar-unmark-day () int
 (defbinding calendar-clear-marks () nil
   (calendar calendar))
 
-(defbinding calendar-display-options () nil
-  (calendar calendar)
-  (options calendar-display-options))
-
-(defbinding (calendar-date "gtk_calendar_get_date") () nil
+(defbinding calendar-get-date () nil
   (calendar calendar)
   (year unsigned-int :out)
   (month unsigned-int :out)
@@ -218,31 +222,6 @@ (defbinding calendar-thaw () nil
   (calendar calendar))
 
 
-
-;;; Cell editable
-
-
-
-;;; Cell renderer
-
-
-
-;;; Cell renderer pixbuf -- no functions
-
-
-
-;;; Cell renderer text
-
-
-
-;;; Cell renderer toggle -- no functions
-
-
-
-;;; Check button -- no functions
-
-
-
 ;;; Check menu item
 
 (defbinding check-menu-item-toggled () nil
@@ -267,20 +246,26 @@ (defbinding (color-selection-is-adjusting-p
 
 ;;;; Combo Box
 
-(defmethod shared-initialize ((combo-box combo-box) names &key model content)
-  (unless model
-    (setf 
-     (combo-box-model combo-box) 
-     (make-instance 'list-store :column-types '(string)))
-    (unless (typep combo-box 'combo-box-entry)
-      (let ((cell (make-instance 'cell-renderer-text)))
-       (cell-layout-pack combo-box cell :expand t)
-       (cell-layout-add-attribute combo-box cell :text 0)))
-    (when content
-      (map 'nil #'(lambda (text)
-                   (combo-box-append-text combo-box text))
-          content)))
-    (call-next-method))
+(defmethod initialize-instance ((combo-box combo-box) &rest initargs 
+                               &key model content active)
+  (remf initargs :active)
+  (if model
+      (apply #'call-next-method combo-box initargs)
+    (progn
+      (apply #'call-next-method combo-box 
+       :model (make-instance 'list-store :column-types '(string))
+       initargs)
+      (unless (typep combo-box 'combo-box-entry)
+       (let ((cell (make-instance 'cell-renderer-text)))
+         (cell-layout-pack combo-box cell :expand t)
+         (cell-layout-add-attribute combo-box cell :text 0)))))
+  (when content
+    (mapc #'(lambda (text)
+             (combo-box-append-text combo-box text))
+         content))
+  (when active
+    (setf (combo-box-active combo-box) active)))
+
 
 ;; (defmethod shared-initialize :after ((combo-box combo-box) names &key active)
 ;;   (when active
@@ -313,7 +298,7 @@ (defbinding combo-box-popdown () nil
 
 ;;;; Combo Box Entry
 
-(defmethod shared-initialize ((combo-box-entry combo-box-entry) names &key model)
+(defmethod initialize-instance ((combo-box-entry combo-box-entry) &key model)
   (call-next-method)
   (unless model
     (setf (combo-box-entry-text-column combo-box-entry) 0)))
@@ -461,25 +446,21 @@ (defmethod (setf container-children) (children (dialog dialog))
   (setf (container-children (dialog-vbox dialog)) children))
 
 
-
-;;; Drawing area
-
-(defbinding drawing-area-get-size () nil
-  (drawing-area drawing-area)
-  (width int :out)
-  (height int :out))
-
-
 ;;; Entry
 
-(defbinding  entry-get-layout () pango:layout
-  (entry entry))
-
 (defbinding entry-get-layout-offsets () nil
   (entry entry)
   (x int :out)
   (y int :out))
 
+(defbinding entry-layout-index-to-text-index () int
+  (entry entry)
+  (layout-index int))
+
+(defbinding entry-text-index-to-layout-index () int
+  (entry entry)
+  (text-index int))
+
 
 ;;; Entry Completion
 
@@ -520,41 +501,44 @@ (defbinding image-set-from-file () nil
   (image image)
   (filename pathname))
 
-(defbinding image-set-from-pixmap () nil
-  (image image)
-  (pixmap gdk:pixmap)
-  (mask gdk:bitmap))
+(defmethod (setf image-pixmap) ((data vector) (image image))
+  (multiple-value-bind (pixmap mask) (gdk:pixmap-create data)
+    (setf (image-pixmap image) pixmap)
+    (setf (image-mask image) mask)))
+
+(defmethod initialize-instance ((image image) &rest initargs &key pixmap file)
+  (cond
+   ((typep pixmap 'vector)
+    (multiple-value-bind (pixmap mask) (gdk:pixmap-create pixmap)
+      (apply #'call-next-method image :pixmap pixmap :mask mask initargs)))
+   (file
+    (prog1
+       (call-next-method)
+      (image-set-from-file image file)))
+   ((call-next-method))))
 
-(defbinding image-set-from-stock () nil
-  (image image)
-  (stock-id string)
-  (icon-size icon-size))
+(defun create-image (source &optional mask)
+  (etypecase source
+    (gdk:pixbuf (make-instance 'image :pixbuf source))
+    (string (make-instance 'image :stock source))
+    (pathname (make-instance 'image :file source))
+    ((or list vector) (make-instance 'image :pixmap source))
+    (gdk:pixmap (make-instance 'image :pixmap source :mask mask))))
 
-(defun image-set-from-pixmap-data (image pixmap-data)
-  (multiple-value-bind (pixmap mask) (gdk:pixmap-create pixmap-data)
-    (image-set-from-pixmap image pixmap mask)))
 
-(defun image-set-from-source (image source)
-  (etypecase source
-    (pathname (image-set-from-file image source))
-    (string (if (stock-lookup source)
-               (setf (image-stock image) source)
-             (image-set-from-file image source)))
-    (vector (image-set-from-pixmap-data image source))))
+;;; Image menu item
 
+(defmethod initialize-instance ((item image-menu-item) &rest initargs &key image)
+  (if (and image (not (typep image 'widget)))
+      (apply #'call-next-method item :image (create-image image) initargs) 
+    (call-next-method)))
 
-(defmethod shared-initialize ((image image) names &rest initargs 
-                             &key file pixmap source)
-  (prog1
-      (if (vectorp pixmap)
-         (progn
-           (remf initargs :pixmap)
-           (apply #'call-next-method image names initargs))
-       (call-next-method))
-    (cond
-      (file (image-set-from-file image file))
-      ((vectorp pixmap) (image-set-from-pixmap-data image pixmap))
-      (source (image-set-from-source image source)))))
+
+(defmethod (setf image-menu-item-image) ((widget widget) (item image-menu-item))
+  (setf (slot-value item 'image) widget))
+
+(defmethod (setf image-menu-item-image) (image (item image-menu-item))
+  (setf (image-menu-item-image item) (create-image image)))
 
 
 ;;; Label
@@ -569,12 +553,6 @@ (defbinding label-select-region () nil
   (start int)
   (end int))
 
-(defbinding label-get-text () string
-  (label label))
-
-(defbinding label-get-layout () pango:layout
-  (label label))
-
 (defbinding label-get-selection-bounds () boolean
   (label label)
   (start int :out)
@@ -596,12 +574,11 @@ (defun radio-button-add-to-group (button1 button2)
   (%radio-button-set-group button1 (%radio-button-get-group button2)))
 
 
-(defmethod initialize-instance ((button radio-button)
-                               &rest initargs &key group-with)
-  (declare (ignore initargs))
-  (call-next-method)
-  (when group-with
-    (radio-button-add-to-group button group-with)))
+(defmethod initialize-instance ((button radio-button) &key group)
+  (prog1
+      (call-next-method)
+    (when group
+      (radio-button-add-to-group button group))))
 
 
 ;;; Item
@@ -619,30 +596,28 @@ (defbinding item-toggle () nil
 
 ;;; Menu item
 
+(defmethod initialize-instance ((item menu-item) &key label)
+  (prog1
+      (call-next-method)
+    (when label
+      (setf (menu-item-label item) label))))
+
+
 (defun (setf menu-item-label) (label menu-item)
   (make-instance 'accel-label
    :label label :xalign 0.0 :yalign 0.5 :accel-widget menu-item
-   :visible t :parent menu-item)
+   :use-underline (menu-item-use-underline-p menu-item)
+   :visible t  :parent menu-item)
   label)
 
 (defun menu-item-label (menu-item)
-  (with-slots (child) menu-item
-    (when (typep child 'label)
-      (label-label child))))
+  (when (and (slot-boundp menu-item 'child) 
+            (typep (bin-child menu-item) 'label))
+    (label-label (bin-child menu-item))))
 
-(defbinding %menu-item-set-submenu () nil
-  (menu-item menu-item)
-  (submenu menu))
-
-(defbinding %menu-item-remove-submenu () nil
+(defbinding menu-item-remove-submenu () nil
   (menu-item menu-item))
 
-(defun (setf menu-item-submenu) (submenu menu-item)
-  (if (not submenu)
-      (%menu-item-remove-submenu menu-item)
-    (%menu-item-set-submenu menu-item submenu))
-  submenu)
-
 (defbinding menu-item-set-accel-path () nil
   (menu-item menu-item)
   (accel-path string))
@@ -665,6 +640,16 @@ (defbinding menu-item-toggle-size-allocate () nil
   (allocation int))
 
 
+;;; Menu tool button
+
+#+gtk2.6
+(defbinding menu-tool-button-set-arrow-tip () nil
+  (menu-tool-button menu-tool-button)
+  (tooltips tooltips)
+  (tip-text string)
+  (tip-private string))
+
+
 ;;; Message dialog
 
 (defmethod initialize-instance ((dialog message-dialog) &rest initargs 
@@ -721,15 +706,33 @@ (defun radio-menu-item-add-to-group (item1 item2)
   "Add ITEM1 to the group which ITEM2 belongs to."
   (%radio-menu-item-set-group item1 (%radio-menu-item-get-group item2)))
 
-(defmethod initialize-instance ((item radio-menu-item)
-                               &rest initargs &key group-with)
-  (declare (ignore initargs))
+(defmethod initialize-instance ((item radio-menu-item) &key group)
   (prog1
       (call-next-method)
-    (when group-with
-      (radio-menu-item-add-to-group item group-with))))
+    (when group
+      (radio-menu-item-add-to-group item group))))
   
 
+;;; Radio tool button
+
+(defbinding %radio-tool-button-get-group () pointer
+  (radio-tool-button radio-tool-button))
+
+(defbinding %radio-tool-button-set-group () nil
+  (radio-tool-button radio-tool-button)
+  (group pointer))
+
+(defun radio-tool-button-add-to-group (button1 button2)
+  "Add BUTTON1 to the group which BUTTON2 belongs to."
+  (%radio-tool-button-set-group button1 (%radio-tool-button-get-group button2)))
+
+
+(defmethod initialize-instance ((button radio-tool-button) &key group)
+  (prog1
+      (call-next-method)
+    (when group
+      (radio-tool-button-add-to-group button group))))
+
 
 ;;; Toggle button
 
@@ -737,7 +740,6 @@ (defbinding toggle-button-toggled () nil
   (toggle-button toggle-button))
 
 
-
 ;;; Window
 
 (defmethod initialize-instance ((window window) &rest initargs 
@@ -1023,16 +1025,17 @@ (defbinding scrolled-window-add-with-viewport () nil
    (scrolled-window scrolled-window)
    (child widget))
 
-
-
-
-
+(defmethod initialize-instance ((window scrolled-window) &rest initargs 
+                               &key policy)
+  (if policy
+      (apply #'call-next-method window 
+       :vscrollbar-policy policy :hscrollbar-policy policy initargs)
+    (call-next-method)))
 
 
 ;;; Statusbar
 
-(defbinding (statusbar-context-id "gtk_statusbar_get_context_id")
-    () unsigned-int
+(defbinding statusbar-get-context-id () unsigned-int
   (statusbar statusbar)
   (context-description string))
 
@@ -1281,6 +1284,10 @@ (defbinding menu-shell-select-item () nil
   (menu-shell menu-shell)
   (menu-item menu-item))
 
+(defbinding menu-shell-select-first () nil
+  (menu-shell menu-shell)
+  (search-sensitive boolean))
+
 (defbinding menu-shell-deselect () nil
   (menu-shell menu-shell))
 
@@ -1289,6 +1296,8 @@ (defbinding menu-shell-activate-item () nil
   (menu-item menu-item)
   (fore-deactivate boolean))
 
+(defbinding menu-shell-cancel () nil
+  (menu-shell menu-shell))
 
 
 ;;; Menu
@@ -1308,7 +1317,15 @@ (defbinding menu-reorder-child (menu menu-item position) nil
   (menu-item menu-item)
   ((%menu-position menu position) int))
 
-(def-callback-marshal %menu-popup-callback (nil (x int) (y int) (push-in boolean)))
+(defbinding menu-attach () nil
+  (menu menu)
+  (menu-item menu-item)
+  (left-attach unsigned-int)
+  (right-attach unsigned-int)
+  (top-attach unsigned-int)
+  (bottom-attach unsigned-int))
+
+(def-callback-marshal %menu-position-func (nil (menu menu) (x int) (y int) (push-in boolean)))
 
 (defbinding %menu-popup () nil
   (menu menu)
@@ -1325,7 +1342,7 @@ (defun menu-popup (menu button activate-time &key callback parent-menu-shell
       (with-callback-function (id callback)
        (%menu-popup 
         menu parent-menu-shell parent-menu-item 
-        (callback %menu-popup-callback) id button activate-time))
+        (callback %menu-position-func) id button activate-time))
     (%menu-popup
      menu parent-menu-shell parent-menu-item nil 0 button activate-time)))
  
@@ -1353,6 +1370,28 @@ (defun (setf menu-active) (menu child)
   (%menu-set-active menu (%menu-position menu child))
   child)
   
+(defcallback %menu-detach-func (nil (widget widget) (menu menu))
+  (funcall (object-data menu 'detach-func) widget menu))
+
+(defbinding %menu-attach-to-widget () nil
+  (menu menu)
+  (widget widget)
+  ((callback %menu-detach-func) pointer))
+
+(defun menu-attach-to-widget (menu widget function)
+  (setf (object-data menu 'detach-func) function)
+  (%menu-attach-to-widget menu widget))
+
+(defbinding menu-detach () nil
+  (menu menu))
+
+#+gtk2.6
+(defbinding menu-get-for-attach-widget () (copy-of (glist widget))
+  (widget widget))
+
+(defbinding menu-set-monitor () nil
+  (menu menu)
+  (monitor-num int))
 
 
 ;;; Table
@@ -1493,9 +1532,11 @@ (defun toolbar-insert (toolbar position element
             (etypecase icon
               (null nil)
               (widget icon)
-              ((or pathname string vector)
+              (string (make-instance 'image :stock icon))
+              (pathname (make-instance 'image :file icon))
+              ((or list vector)
                (make-instance 'image 
-                :source icon ; :icon-size (toolbar-icon-size toolbar)
+                :pixmap icon ; :icon-size (toolbar-icon-size toolbar)
                 )))
             numpos))
           ((error "Invalid element type: ~A" element)))))
@@ -1546,6 +1587,30 @@ (defbinding toolbar-unset-style () nil
   (toolbar toolbar))
 
 
+;;; Tool item
+
+(defbinding tool-item-retrieve-proxy-menu-item () widget
+  (tool-item tool-item))
+
+(defbinding (tool-item-proxy-menu-item 
+            "gtk_tool_item_get_proxy_menu_item") () menu-item
+  (tool-item tool-item)
+  (menu-item-id string))
+
+(defbinding %tool-item-set-proxy-menu-item () nil
+  (tool-item tool-item)
+  (menu-item-id string)
+  (menu-item menu-item))
+
+(defun (setf tool-item-proxy-menu-item) (menu-item menu-item-id tool-item)
+  (%tool-item-set-proxy-menu-item menu-item-id tool-item menu-item)
+   menu-item)
+
+#+gtk2.6
+(defbinding tool-item-rebuild-menu () nil
+  (tool-item tool-item))
+
+
 ;;; Editable
 
 (defbinding editable-select-region (editable &optional (start 0) end) nil
@@ -1558,12 +1623,11 @@ (defbinding editable-get-selection-bounds (editable) nil
   (start int :out)
   (end int :out))
 
-(defbinding editable-insert-text
-    (editable text &optional (position 0)) nil
+(defbinding editable-insert-text (editable text &optional (position 0)) nil
   (editable editable)
   (text string)
   ((length text) int)
-  ((or position -1) int :in-out))
+  (position editable-position :in-out))
 
 (defun editable-append-text (editable text)
   (editable-insert-text editable text nil))
@@ -1606,6 +1670,22 @@ (defbinding editable-delete-selection () nil
 
 ;;; Spin button
 
+(defbinding spin-button-configure () nil
+  (spin-button spin-button)
+  (adjustment adjustment)
+  (climb-rate double-float)
+  (digits unsigned-int))
+
+(defbinding spin-button-set-range () nil
+  (spin-button spin-button)
+  (min double-float)
+  (max double-float))
+
+(defbinding spin-button-get-range () nil
+  (spin-button spin-button)
+  (min double-float :out)
+  (max double-float :out))
+
 (defun spin-button-value-as-int (spin-button)
   (round (spin-button-value spin-button)))
 
@@ -1758,9 +1838,16 @@ (defbinding tooltips-set-tip () nil
   (tip-text string)
   (tip-private string))
 
+(defbinding tooltips-data-get () tooltips-data
+  (widget widget))
+
 (defbinding tooltips-force-window () nil
   (tooltips tooltips))
 
+(defbinding tooltips-get-info-from-tip-window () boolean
+  (tip-window window)
+  (tooltips tooltips :out)
+  (current-widget widget :out))
 
 
 ;;; Rc
index a31f9fa2816d1493ad5bdb86551625a8ba659f6f..79eb33b54627d754692fd4703cc23ff6fffbaa52 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtktypes.lisp,v 1.26 2004-12-26 11:51:21 espen Exp $
+;; $Id: gtktypes.lisp,v 1.27 2004-12-29 21:17:37 espen Exp $
 
 
 (in-package "GTK")
@@ -126,6 +126,16 @@ (defclass tree-iter (boxed)
 (deftype tree-path () '(vector integer))
 (register-type 'tree-path "GtkTreePath")
 
+(deftype editable-position () '(or int (enum (:start 0) (:end -1))))
+
+;; Forward definitions
+(defclass widget (%object)
+  ()
+  (:metaclass gobject-class))
+(defclass container (widget)
+  ()
+  (:metaclass gobject-class))
+
 
 (define-types-by-introspection "Gtk"
   ;; Manually defined
@@ -200,12 +210,22 @@ (define-types-by-introspection "Gtk"
      
   ("GtkContainer"
    :slots
-   ((child
-     :ignore t)
+   ((child :ignore t)
     (children
      :allocation :virtual
      :getter container-children
-     :setter (setf container-children))
+     :setter (setf container-children)
+     ;; The following doesn't work because gtk_container_get_children doesn't
+     ;; increase the reference count of the children
+;     :getter "gtk_container_get_children"
+;     :reader container-children
+;     :type (glist widget)
+     )
+    (child-type
+     :allocation :virtual
+     :getter "gtk_containerchild_type"
+     :reader container-child-type
+     :type gtype)
     (focus-child
      :allocation :virtual
      :getter "gtk_container_get_focus_child"
@@ -230,7 +250,14 @@ (define-types-by-introspection "Gtk"
      :setter "gtk_container_set_focus_vadjustment"
      :accessor container-focus-vadjustment
      :initarg :focus-vadjustment
-     :type adjustment)))
+     :type adjustment)
+    (reallocate-redraws
+     :allocation :virtual
+     :getter "gtk_container_get_reallocate_redraws"
+     :setter "gtk_container_set_reallocate_redraws"
+     :accessor container-reallocate-redraws
+     :initarg :reallocate-redraws
+     :type boolean)))
       
   ("GtkBin"
    :slots
@@ -312,31 +339,18 @@     (default-height :merge t :unbound -1)))
      :initarg :enabled
      :type boolean)))
   
-  ("GtkOptionMenu"
-   :slots
-   ((menu
-     :allocation :virtual
-     :getter "gtk_option_menu_get_menu"
-     :setter (setf option-menu-menu)
-     :reader option-menu-menu
-     :initarg :menu
-     :type menu)
-    (history
-     :allocation :virtual
-     :getter "gtk_option_menu_get_history"
-     :setter "gtk_option_menu_set_history"
-     :accessor option-menu-history
-     :initarg :history
-     :type unsigned-int)))
-
   ("GtkMenuItem"
    :slots
    ((label
      :allocation :virtual
      :getter menu-item-label
      :setter (setf menu-item-label)
-     :initarg :label
      :type string)
+    (use-underline
+     :allocation :user-data
+     :initform nil
+     :initarg :use-underline
+     :accessor menu-item-use-underline-p)
     (right-justified
      :allocation :virtual
      :getter "gtk_menu_item_get_right_justified"
@@ -347,10 +361,10 @@     (default-height :merge t :unbound -1)))
     (submenu
      :allocation :virtual
      :getter "gtk_menu_item_get_submenu"
-     :setter (setf menu-item-submenu)
-     :reader menu-item-submenu
+     :setter "gtk_menu_item_set_submenu"
+     :accessor menu-item-submenu
      :initarg :submenu
-     :type menu-item)))
+     :type widget)))
 
   ("GtkColorSelectionDialog"
    :slots
@@ -408,13 +422,6 @@     (default-height :merge t :unbound -1)))
      :accessor menu-accel-group
      :initarg :accel-group
      :type accel-group)
-    (title
-     :allocation :virtual
-     :getter "gtk_menu_get_title"
-     :setter "gtk_menu_set_title"
-     :accessor menu-title
-     :initarg :title
-     :type string)
     (active
      :allocation :virtual
      :getter "gtk_menu_get_active"
@@ -422,12 +429,25 @@     (default-height :merge t :unbound -1)))
      :reader menu-active
      :initarg :active
      :type widget)
-    (tornoff
+    (screen
+     :allocation :virtual
+     :getter "gtk_menu_get_screen"
+     :setter "gtk_menu_set_screen"
+     :accessor menu-screen
+     :initarg :screen
+     :type gdk:screen)
+    (attach-widget
+     :allocation :virtual
+     :getter "gtk_menu_get_attach_widget"
+     :reader menu-attach-widget
+     :type widget)
+    #-gtk2.6
+    (tearoff-state
      :allocation :virtual
      :getter "gtk_menu_get_tearoff_state"
      :setter "gtk_menu_set_tearoff_state"
-     :accessor menu-tornoff-p
-     :initarg :tearoff
+     :accessor menu-tearoff-state-p
+     :initarg :tearoff-state
      :type boolean)))
 
   ("GtkToolbar"
@@ -453,6 +473,34 @@     (default-height :merge t :unbound -1)))
      :accessor toolbar-style
      :type toolbar-style)))
 
+  ("GtkToolItem"
+   :slots
+   ((drag-window
+     :allocation :virtual
+     :getter "gtk_tool_item_get_drag_window"
+     :setter "gtk_tool_item_set_drag_window"
+     :accessor tool-item-drag-window
+     :initarg :drag-window
+     :type boolean)))
+
+  ("GtkToggleToolButton"
+   :slots
+   ((active
+     :allocation :virtual
+     :getter "gtk_toggle_tool_button_get_active"
+     :setter "gtk_toggle_tool_button_get_active"
+     :accessor toggle-tool-button-active-p
+     :initarg :active
+     :type boolean)))
+
+  ("GtkRadioToolButton"
+   :slots
+   ((group
+     :allocation :virtual
+     :getter "gtk_radio_tool_button_get_group"
+     :reader radio-tool-button-group
+     :type (copy-of (gslist widget)))))
+
   ("GtkNotebook"
    :slots
    ((current-page
@@ -481,6 +529,16 @@     (default-height :merge t :unbound -1)))
     (activity-blocks :ignore t)
     (discrete-blocks :ignore t)))
 
+  ("GtkHandleBox"
+   :slots
+   ; deprecated property
+   ((shadow :ignore t)))
+
+  ("GtkFrame"
+   :slots
+   ; deprecated property
+   ((shadow :ignore t)))
+
   ("GtkTable"
    :slots
    ((column-spacing
@@ -509,14 +567,23 @@     (default-height :merge t :unbound -1)))
      :reader dialog-action-area
      :type widget)))
 
-  ("GtkCombo"
+  ("GtkEntry"
    :slots
-   ((entry
+   ((layout
      :allocation :virtual
-     :getter "gtk_combo_get_entry"
-     :reader combo-entry
-     :type entry)))
-  
+     :getter "gtk_entry_get_layout"
+     :reader entry-layout
+     :type pango:layout)
+    (completion
+     :getter "gtk_entry_get_completion"
+     :setter "gtk_entry_set_completion"
+     :initarg :completion
+     :accessor entry-completion
+     :type entry-completion)
+    (max-length :merge t :unbound 0)
+    #+gtk2.6
+    (with-chars :merge t :unbound -1)))
+
   ("GtkEntryCompletion"
    :slots
    ((entry
@@ -524,11 +591,9 @@     (default-height :merge t :unbound -1)))
      :getter "gtk_entry_completion_get_entry"
      :reader entry-completion-entry
      :type entry)
-    (minimum-key-length
-     :merge t :unbound -1)
+    (minimum-key-length :merge t :unbound -1)
     #+gtk2.6
-    (text-column
-     :merge t :unbound -1)))
+    (text-column :merge t :unbound -1)))
 
   ("GtkRadioButton"
    :slots
@@ -544,7 +609,7 @@     (default-height :merge t :unbound -1)))
      :allocation :virtual
      :getter "gtk_radio_menu_item_get_group"
      :reader radio-menu-item-group
-     :type (static (gslist widget)))))
+     :type (copy-of (gslist widget)))))
 
   ("GtkFileSelection"
    :slots
@@ -614,8 +679,18 @@     (default-height :merge t :unbound -1)))
 
   ("GtkImage"
    :slots
-   ((file :ignore t)))
-       
+   ((file :ignore t)
+    #+gtk2.6
+    (pixel-size :merge t :unbound -1)))
+
+  ("GtkLabel"
+   :slots
+   ((layout
+     :allocation :virtual
+     :getter "gtk_label_get_layout"
+     :reader label-layout
+     :type pango:layout)))
+
   ("GtkEditable"
    :slots
    ((editable
@@ -631,7 +706,7 @@     (default-height :merge t :unbound -1)))
      :setter "gtk_editable_set_position"
      :reader editable-position
      :initarg :position
-     :type int)
+     :type editable-position)
     (text
      :allocation :virtual
      :getter editable-text
@@ -804,7 +879,7 @@     (default-height :merge t :unbound -1)))
    ((group
      :allocation :virtual
      :getter "gtk_radio_button_get_group"
-     :reader radio-button-group
+     :reader radio-action-group
      :type (copy-of (gslist widget)))
     (%value
      :allocation :property  :pname "value"
@@ -894,3 +969,23 @@ (defclass text-iter (boxed)
   (:metaclass boxed-class 
    ;; I am pretty sure this was working in older versons on CMUCL
    :size #.(* 14 (size-of 'pointer))))
+
+
+(defclass tooltips-data (struct)
+  ((tooltips
+    :allocation :alien
+    :reader tooltips-data-tooltips
+    :type tooltips)
+   (widget
+    :allocation :alien
+    :reader tooltips-data-widget
+    :type widget)
+   (tip-text
+    :allocation :alien
+    :reader tooltips-data-tip-text
+    :type string)
+   (tip-private
+    :allocation :alien
+    :reader tooltips-data-tip-private
+    :type string))
+  (:metaclass struct-class))