chiark / gitweb /
Added misc classes and slots
[clg] / gtk / gtktypes.lisp
index 51a9d14c37d03a176978180cbb7e6ed4546853ce..3e72cad97f8cb71c070524f3941cad907b922831 100644 (file)
@@ -1,5 +1,5 @@
 ;; Common Lisp bindings for GTK+ v2.0.x
-;; Copyright (C) 1999-2001 Espen S. Johnsen <esj@stud.cs.uit.no>
+;; Copyright (C) 1999-2001 Espen S. Johnsen <espen@users.sourceforge.org>
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -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.7 2001-05-29 15:56:58 espen Exp $
+;; $Id: gtktypes.lisp,v 1.22 2004-12-17 00:42:55 espen Exp $
 
 
 (in-package "GTK")
@@ -31,8 +31,31 @@ (defclass requisition (boxed)
     :accessor requisition-height
     :initarg :height
     :type int))
-  (:metaclass boxed-class)
-  (:alien-name "GtkRequisition"))
+  (:metaclass boxed-class))
+
+
+(defclass allocation (struct)
+  ((x
+    :allocation :alien
+    :accessor allocation-width
+    :initarg :x
+    :type int)
+   (y
+    :allocation :alien
+    :accessor allocation-width
+    :initarg :width
+    :type int)
+   (width
+    :allocation :alien
+    :accessor allocation-width
+    :initarg :width
+    :type int)
+   (height
+    :allocation :alien
+    :accessor allocation-height
+    :initarg :height
+    :type int))
+  (:metaclass struct-class))
 
 (defclass border (boxed)
   ((left
@@ -55,42 +78,53 @@ (defclass border (boxed)
     :accessor border-bottom
     :initarg :bottom
     :type int))
-  (:metaclass boxed-class)
-  (:alien-name "GtkBorder"))
+  (:metaclass boxed-class))
 
-(defclass adjustment (%object)
-  ((lower
-    :allocation :alien
-    :accessor adjustment-lower
-    :initarg :lower
-    :type single-float)
-   (upper
+(defclass stock-item (struct)
+  ((id
     :allocation :alien
-    :accessor adjustment-upper
-    :initarg :upper
-    :type single-float)
-   (value
+    :accessor stock-item-id
+    :initarg :id
+    :type string)
+   (label
     :allocation :alien
-    :accessor adjustment-value
-    :initarg :value
-    :type single-float)
-   (step-increment
+    :accessor stock-item-label
+    :initarg :label
+    :type string)
+   (modifier
     :allocation :alien
-    :accessor adjustment-step-increment
-    :initarg :step-increment
-    :type single-float)
-   (page-increment
+    :accessor stock-item-modifier
+    :initarg :modifier
+    :type gdk:modifier-type)
+   (keyval
     :allocation :alien
-    :accessor adjustment-page-increment
-    :initarg :page-increment
-    :type single-float)
-   (page-size
+    :accessor stock-item-keyval
+    :initarg :keyval
+    :type int)
+   (translation-domain
     :allocation :alien
-    :accessor adjustment-page-size
-    :initarg :page-size
-    :type single-float))
-  (:metaclass gobject-class)
-  (:alien-name "GtkAdjustment"))
+    :accessor stock-item-translation-domain
+    :initarg :translation-domain
+    :type string))
+  (:metaclass struct-class))
+
+;; We don't really need to access any of these slots, but we need to
+;; specify the size of the struct somehow 
+(defclass tree-iter (boxed)
+  ((stamp :allocation :alien :type int)
+   (user-data :allocation :alien :type pointer)
+   (user-data2 :allocation :alien :type pointer)
+   (user-data3 :allocation :alien :type pointer))
+  (:metaclass boxed-class))
+
+
+;; (defclass tree-path (boxed)
+;;   ((depth :allocation :alien :type int)
+;;    (indices  :allocation :alien :type pointer))
+;;   (:metaclass boxed-class))
+
+(deftype tree-path () '(vector integer))
+(register-type 'tree-path "GtkTreePath")
 
 
 (define-types-by-introspection "Gtk"
@@ -98,580 +132,764 @@ (define-types-by-introspection "Gtk"
   ("GtkObject" :ignore t)
   ("GtkRequisition" :ignore t)
   ("GtkBorder" :ignore t)
-  ("GtkAdjustment" :ignore t)
-
-  ;; Temporary disabled
-  ("GtkCellRenderer" :ignore-prefix t)
+  ("GtkTreeIter" :ignore t)
+  ("GtkTreePath" :ignore t)
+;  ("GtkStyle" :ignore t)
 
   ;; Manual override
+  ("GtkWidget"
+   :slots
+   ((child-slots
+     :allocation :instance
+     :accessor widget-child-slots
+     :type container-child)
+    (window
+     :allocation :virtual
+     :getter "gtk_widget_get_window"
+     :unbound nil
+     :reader widget-window
+     :type gdk:window)
+    (state
+     :allocation :virtual
+     :getter "gtk_widget_get_state"
+     :setter "gtk_widget_set_state"
+     :accessor widget-state
+     :initarg :state
+     :type state-type)
+    (colormap
+     :allocation :virtual
+     :getter "gtk_widget_get_colormap"
+     :setter "gtk_widget_set_colormap"
+     :unbound nil
+     :initarg :colormap
+     :accessor widget-colormap
+     :type gdk:colormap)
+    (visual
+     :allocation :virtual
+     :getter "gtk_widget_get_visual"
+     :unbound nil
+     :reader widget-visual
+     :type gdk:visual)
+    (direction
+     :allocation :virtual
+     :getter "gtk_widget_get_direction"
+     :setter "gtk_widget_set_direction"
+     :accessor widget-direction
+     :initarg :direction
+     :type text-direction)
+    (composite-name
+     :allocation :virtual
+     :getter "gtk_widget_get_composite_name"
+     :setter "gtk_widget_set_composite_name"
+     :accessor widget-composite-name
+     :initarg :composite-name
+     :type string)
+    (settings
+     :allocation :virtual
+     :getter "gtk_widget_get_settings"
+     :unbound nil
+     :accessor widget-settings
+     :type settings)
+    (child-visible
+     :allocation :virtual
+     :getter "gtk_widget_get_child_visible"
+     :setter "gtk_widget_set_child_visible"
+     :accessor widget-child-visible-p
+     :initarg :child-visible
+     :type boolean)
+    (width-request
+     :merge t :unbound -1)
+    (height-request
+     :merge t :unbound -1)))
+     
+  ("GtkContainer"
+   :slots
+   ((child
+     :ignore t)
+    (children
+     :allocation :virtual
+     :getter container-children
+     :setter (setf container-children))
+    (focus-child
+     :allocation :virtual
+     :getter "gtk_container_get_focus_child"
+     :setter "gtk_container_set_focus_child"
+     :accessor container-focus-child
+     :initarg :focus-child
+     :type widget)
+    (focus-chain
+     :allocation :virtual
+     :getter container-focus-chain
+     :setter (setf container-focus-chain))
+    (focus-hadjustment
+     :allocation :virtual
+     :getter "gtk_container_get_focus_hadjustment"
+     :setter "gtk_container_set_focus_hadjustment"
+     :accessor container-focus-hadjustment
+     :initarg :focus-hadjustment
+     :type adjustment)
+    (focus-vadjustment
+     :allocation :virtual
+     :getter "gtk_container_get_focus_vadjustment"
+     :setter "gtk_container_set_focus_vadjustment"
+     :accessor container-focus-vadjustment
+     :initarg :focus-vadjustment
+     :type adjustment)))
+      
+  ("GtkBin"
+   :slots
+   ((child
+     :allocation :virtual
+     :getter "gtk_bin_get_child"
+     :setter (setf bin-child)
+     :reader bin-child
+     :type widget)))
+
+  ("GtkWindow"
+   :slots
+   ((gravity
+     :allocation :virtual
+     :getter "gtk_window_get_gravity"
+     :setter "gtk_window_set_gravity"
+     :accessor window-gravity
+     :initarg :gravity
+     :type gdk:gravity)
+    (focus-widget
+     :allocation :virtual
+     :getter "gtk_window_get_focus"
+     :setter "gtk_window_set_focus"
+     :accessor window-focus-widget
+     :initarg :focus-widget
+     :type widget)
+    (default-widget
+     :allocation :virtual
+     :getter "gtk_window_get_default"
+     :setter "gtk_window_set_default"
+     :accessor window-default-widget
+     :initarg :default-widget
+     :type widget)
+    (decorated
+     :allocation :virtual
+     :getter "gtk_window_get_decorated"
+     :setter "gtk_window_set_decorated"
+     :accessor window-decorated-p
+     :initarg :decorated
+     :type boolean)
+    (has-frame
+     :allocation :virtual
+     :getter "gtk_window_get_has_frame"
+     :setter "gtk_window_set_has_frame"
+     :accessor window-has-frame-p
+     :initarg :has-frame
+     :type boolean)
+    (role
+     :allocation :virtual
+     :getter "gtk_window_get_role"
+     :setter "gtk_window_set_role"
+     :accessor window-role
+     :initarg :role
+     :type string)
+    (type-hint
+     :allocation :virtual
+     :getter "gtk_window_get_type_hint"
+     :setter "gtk_window_set_type_hint"
+     :accessor window-type-hint
+     :initarg :type-hint
+     :type gdk:window-type-hint)
+    (icon
+     :allocation :virtual
+     :getter window-icon
+     :setter (setf window-icon)
+     :initarg :icon)
+    (mnemonic-modifier
+     :allocation :virtual
+     :getter "gtk_window_get_mnemonic_modifier"
+     :setter "gtk_window_set_mnemonic_modifier"
+     :accessor window-mnemonic-modifier
+     :initarg :mnemonic-modifier
+     :type gdk:modifier-type)
+    (transient-for
+     :allocation :virtual
+     :getter "gtk_window_get_transient_for"
+     :setter "gtk_window_set_transient_for"
+     :accessor window-transient-for
+     :initarg :transient-for
+     :type window)))
   
-  ;; Not needed
-  ("GtkFundamentalType" :ignore t)
-  ("GtkArgFlags" :ignore t)
-  ;; Deprecated
-  ("GtkCList" :ignore-prefix t)
-  ("GtkCTree" :ignore-prefix t)
-  ("GtkList" :ignore t)
-  ("GtkTree" :ignore t)
-  ("GtkTreeItem" :ignore t)
-  ("GtkText" :ignore-prefix t)
-  ("GtkPacker" :ignore-prefix t)
-  ("GtkPixmap" :ignore t)
-  ("GtkPreview" :ignore-prefix t)
-  ("GtkTipsQuery" :ignore t)
-  ("GtkOldEditable" :ignore t))
-  
-  
-
-#|
-(deftype color-type ()
-  '(enum
-    :foreground
-    :background
-    :light
-    :dark
-    :mid
-    :text
-    :base
-    :white
-    :black))
-
-
-(defclass style (gobject)
-  ((white
-    :allocation :virtual
-    :location style-white
-    :initarg :white
-    :type gdk:color)
-   (black
-    :allocation :virtual
-    :location style-black
-    :initarg :black
-    :type gdk:color)
-   (font
-    :allocation :virtual
-    :location ("gtk_style_get_font" "gtk_style_set_font")
-    :accessor style-font
-    :initarg :font
-    :type gdk:font))
-  (:metaclass gobject-class)
-  (:alien-name "GtkStyle"))
-
-
-;(deftype accel-entry () 'pointer) ; internal?
-
+  ("GtkTooltips"
+   :slots
+   ((enabled
+     :allocation :virtual
+     :getter "gtk_tooltips_get_enabled"
+     :setter (setf tooltips-enabled-p)
+     :reader tooltips-enabled-p
+     :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)
+    (right-justified
+     :allocation :virtual
+     :getter "gtk_menu_item_get_right_justified"
+     :setter "gtk_menu_item_set_right_justified"
+     :accessor menu-item-right-justified-p
+     :initarg :right-justified
+     :type boolean)
+    (submenu
+     :allocation :virtual
+     :getter "gtk_menu_item_get_submenu"
+     :setter (setf menu-item-submenu)
+     :reader menu-item-submenu
+     :initarg :submenu
+     :type menu-item)))
+
+  ("GtkColorSelectionDialog"
+   :slots
+   ((colorsel
+     :allocation :alien
+     :reader color-selection-dialog-colorsel
+     :type widget)
+    (ok-button
+     :allocation :alien
+     :reader color-selection-dialog-ok-button
+     :type widget)
+    (cancel-button
+     :allocation :alien
+     :reader color-selection-dialog-cancel-button
+     :type widget)
+    (help-button
+     :allocation :alien
+     :reader color-selection-dialog-help-button
+     :type widget)))
+
+  ("GtkScrolledWindow"
+   :slots
+   ((hscrollbar
+     :allocation :alien
+     :reader scrolled-window-hscrollbar
+     :type widget)
+    (vscrollbar
+     :allocation :alien
+     :reader scrolled-window-vscrollbar
+     :type widget)))
 
-(defclass tooltips (%object)
-  ((delay
-    :allocation :virtual
-    :location ("gtk_tooltips_get_delay" "gtk_tooltips_set_delay")
-    :accessor tooltips-delay
-    :type unsigned-int)
-   (enabled
-    :allocation :virtual
-    :location ("gtk_tooltips_get_enabled" (setf tooltips-enabled-p))
-    :reader tooltips-enabled-p
-    :initarg :enabled
-    :type boolean))
-  (:metaclass object-class)
-  (:alien-name "GtkTooltips"))
-
-
-(defclass widget (object)
-  ((child-slots
-    :allocation :instance
-    :accessor widget-child-slots
-    :type container-child)
-   (state
-    :allocation :virtual
-    :location ("gtk_widget_get_state" "gtk_widget_set_state")
-    :accessor widget-state
-    :initarg :state
-    :type state-type)
-   (window
-    :allocation :virtual
-    :location "gtk_widget_get_window"
-    :reader widget-window
-    :type gdk:window)
-   (colormap
-    :allocation :virtual
-    :location "gtk_widget_get_colormap"
-    :reader widget-colormap
-    :type gdk:colormap)
-   (visual
-    :allocation :virtual
-    :location "gtk_widget_get_visual"
-    :reader widget-visual
-    :type gdk:visual))
-  (:metaclass object-class)
-  (:alien-name "GtkWidget"))
-
-
-
-(defclass accel-label (label)
-   (width
-    :allocation :virtual
-    :location "gtk_accel_label_get_accel_width"
-    :reader width
-    :type unsigned-int))
-  (:metaclass widget-class)
-  (:alien-name "GtkAccelLabel"))
-
-
-(defclass container (widget)
-   (children
-    :allocation :virtual
-    :location container-children)
-   (focus-child
-    :allocation :virtual
-    :location ("gtk_container_get_focus_child" "gtk_container_set_focus_child")
-    :accessor container-focus-child
-    :initarg :focus-child
-    :type widget)
-   (focus-hadjustment
-    :allocation :virtual
-    :location (nil "gtk_container_set_focus_hadjustment")
-    :writer (setf container-focus-hadjustment)
-    :initarg :focus-hadjustment
-    :type adjustment)   
-   (focus-vadjustment
-    :allocation :virtual
-    :location (nil "gtk_container_set_focus_vadjustment")
-    :writer (setf container-focus-vadjustment)
-    :initarg :focus-vadjustment
-    :type adjustment))
-  (:metaclass widget-class)
-  (:alien-name "GtkContainer"))
-
-
-
-(defclass bin (container)
-  ((child
-    :allocation :virtual
-    :location bin-child
-    :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkBin"))
-
-
-
-(defclass radio-button (check-button)
-  ((group
-    :allocation :virtual
-    :location ("gtk_radio_button_group")
-    :reader radio-button-group
-    :type (static (gslist widget))))
-  (:metaclass container-class)
-  (:alien-name "GtkRadioButton"))
-
-(defclass option-menu (button)
-  ((menu
+  ("GtkPaned"
+   :slots
+   ((child1
     :allocation :virtual
-    :location ("gtk_option_menu_get_menu" (setf option-menu-menu))
-    :reader option-menu-menu
-    :initarg :menu
+    :getter paned-child1
+    :setter (setf paned-child1)
+    :initarg :child1
     :type widget)
-   (history
-    :allocation :virtual
-    :location (nil "gtk_option_menu_set_history")
-    :writer (setf option-menu-history)
-    :initarg :history
-    :type unsigned-int))
-  (:metaclass container-class)
-  (:alien-name "GtkOptionMenu"))
-
-(defclass menu-item (item)
-  ((label
-    :allocation :virtual
-    :location menu-item-label
-    :initarg :label
-    :type string)
-   (submenu
-    :allocation :virtual
-    :location ("gtk_menu_item_get_submenu" (setf menu-item-submenu))
-    :reader menu-item-submenu
-    :initarg :submenu
-    :type menu-item)
-   (placement
-    :allocation :virtual
-    :location ("gtk_menu_item_get_placement" "gtk_menu_item_set_placement")
-    :accessor menu-item-placement
-    :initarg :placement
-    :type submenu-placement)
-   (toggle-indicator
-    :allocation :virtual
-    :location ("gtk_menu_item_get_show_toggle"
-              (setf menu-item-toggle-indicator-p))
-    :reader menu-item-toggle-indicator-p
-    :initarg :toggle-indicator
-    :type boolean)
-   (submenu-indicator
-    :allocation :virtual
-    :location ("gtk_menu_item_get_show_submenu"
-              (setf menu-item-submenu-indicator-p))
-    :reader menu-item-submenu-indicator-p
-    :initarg :submenu-indicator
-    :type boolean))
-  (:metaclass container-class)
-  (:alien-name "GtkMenuItem"))
-
-
-(defclass radio-menu-item (check-menu-item)
-  ((group
+   (child2
     :allocation :virtual
-    :location ("gtk_radio_menu_item_group")
-    :reader radio-menu-item-group
-    :type (static (gslist widget))))
-  (:metaclass container-class)
-  (:alien-name "GtkRadioMenuItem"))
-
-
-
-(defclass dialog (window)
-  ((main-box
-    :allocation :alien
-    :reader dialog-main-box
-    :type widget)
-   (action-area
-    :allocation :alien
-    :reader dialog-action-area
-    :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkDialog"))
+    :getter paned-child2
+    :setter (setf paned-child2)
+    :initarg :child2
+    :type widget)))
 
+  ("GtkMenu"
+   :slots
+   ((accel-group
+     :allocation :virtual
+     :getter "gtk_menu_get_accel_group"
+     :setter "gtk_menu_set_accel_group"
+     :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"
+     :setter (setf menu-active)
+     :reader menu-active
+     :initarg :active
+     :type widget)
+    (tornoff
+     :allocation :virtual
+     :getter "gtk_menu_get_tearoff_state"
+     :setter "gtk_menu_set_tearoff_state"
+     :accessor menu-tornoff-p
+     :initarg :tearoff
+     :type boolean)))
+
+  ("GtkToolbar"
+   :slots
+   ((tooltips
+     :allocation :virtual
+     :getter "gtk_toolbar_get_tooltips"
+     :setter "gtk_toolbar_set_tooltips"
+     :accessor toolbar-tooltips-p
+     :initarg :tooltips
+     :type boolean)
+    (icon-size
+     :allocation :virtual
+     :getter "gtk_toolbar_get_icon_size"
+     :setter "gtk_toolbar_set_icon_size"
+     :accessor toolbar-icon-size
+     :initarg :icon-size
+     :type icon-size)
+    (toolbar-style
+     :allocation :property
+     :pname "toolbar-style"
+     :initarg :toolbar-style
+     :accessor toolbar-style
+     :type toolbar-style)))
+
+  ("GtkNotebook"
+   :slots
+   ((current-page
+     :allocation :virtual
+     :getter notebook-current-page
+     :setter (setf notebook-current-page)
+     :initarg :current-page)
+    (page :ignore t)))
+  
+  ("GtkRuler"
+   :slots
+   ((metric
+     :allocation :virtual
+     :getter "gtk_ruler_get_metric"
+     :setter "gtk_ruler_set_metric"
+     :accessor ruler-metric
+     :initarg :metric
+     :type metric-type)))
+
+  ("GtkProgressBar"
+   :slots
+   ; deprecated properties
+   ((bar-style :ignore t)
+    (adjustment :ignore t)
+    (activity-step :ignore t)
+    (activity-blocks :ignore t)
+    (discrete-blocks :ignore t)))
+
+  ("GtkTable"
+   :slots
+   ((column-spacing
+     :allocation :virtual
+     :getter "gtk_table_get_default_col_spacing"
+     :setter "gtk_table_set_col_spacings"
+     :initarg :column-spacing
+     :type unsigned-int)
+    (row-spacing
+     :allocation :virtual
+     :getter "gtk_table_get_default_row_spacing"
+     :setter "gtk_table_set_row_spacings"
+     :initarg :row-spacing
+     :type unsigned-int)))
+
+  ("GtkDialog"
+   :slots
+   ((vbox
+     :allocation :virtual
+     :getter "gtk_dialog_get_vbox"
+     :reader dialog-vbox
+     :type widget)
+    (action-area
+     :allocation :virtual
+     :getter "gtk_dialog_get_action_area"
+     :reader dialog-action-area
+     :type widget)))
 
-(defclass color-selection-dialog (dialog)
-  ((colorsel
-    :allocation :alien
-    :reader color-selection-dialog-colorsel
-    :type widget)
-   (ok-button
-    :allocation :alien
-    :reader color-selection-dialog-ok-button
-    :type widget)
-   (cancel-button
-    :allocation :alien
-    :reader color-selection-dialog-cancel-button
-    :type widget)
-   (help-button
-    :allocation :alien
-    :reader color-selection-dialog-help-button
-    :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkColorSelectionDialog"))
+  ("GtkCombo"
+   :slots
+   ((entry
+     :allocation :virtual
+     :getter "gtk_combo_get_entry"
+     :reader combo-entry
+     :type entry)))
+  
+  ("GtkRadioButton"
+   :slots
+   ((group
+     :allocation :virtual
+     :getter "gtk_radio_button_get_group"
+     :reader radio-button-group
+     :type (copy-of (gslist widget)))))
 
+  ("GtkRadioMenuItem"
+   :slots
+   ((group
+     :allocation :virtual
+     :getter "gtk_radio_menu_item_get_group"
+     :reader radio-menu-item-group
+     :type (static (gslist widget)))))
 
-(defclass file-selection (window)
-  ((filename
-    :allocation :virtual
-    :location ("gtk_file_selection_get_filename"
-              "gtk_file_selection_set_filename")
-    :accessor file-selection-filename
-    :initarg :filename
-    :type string)
-    (action-area
+  ("GtkFileSelection"
+   :slots
+   ((action-area
      :allocation :virtual
-     :location "gtk_file_selection_get_action_area"
+     :getter "gtk_file_selection_get_action_area"
      :reader file-selection-action-area
      :type widget)
     (ok-button
      :allocation :virtual
-     :location "gtk_file_selection_get_ok_button"
+     :getter "gtk_file_selection_get_ok_button"
      :reader file-selection-ok-button
      :type widget)
     (cancel-button
      :allocation :virtual
-     :location "gtk_file_selection_get_cancel_button"
+     :getter "gtk_file_selection_get_cancel_button"
      :reader file-selection-cancel-button
-     :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkFileSelection"))
-
-
-(defclass scrolled-window (bin)
-   (hscrollbar
-    :allocation :virtual
-    :location "gtk_scrolled_window_get_hscrollbar"
-    :accessor scrolled-window-hscrollbar
-    :type widget)
-   (vscrollbar
-    :allocation :virtual
-    :location "gtk_scrolled_window_get_vscrollbar"
-    :accessor scrolled-window-vscrollbar
-    :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkScrolledWindow"))
-
-
-(defclass button-box (box)
-  ((spacing
-    :allocation :virtual
-    :location ("gtk_button_box_get_spacing" "gtk_button_box_set_spacing")
-    :accessor button-box-spacing
-    :initarg :spacing
-    :type int)
-   (child-min-width
-    :allocation :alien
-    :offset #.(size-of 'int)
-    :accessor button-box-child-min-width
-    :initarg :child-min-width
-    :type int)
-   (child-min-height
-    :allocation :alien
-    :accessor button-box-child-min-height
-    :initarg :child-min-height
-    :type int)
-   (child-ipad-x
-    :allocation :alien
-    :accessor button-box-child-ipad-x
-    :initarg :child-ipad-x
-    :type int)
-   (child-ipad-y
-    :allocation :alien
-    :accessor button-box-child-ipad-y
-    :initarg :child-ipad-y
-    :type int)
-   (layout
-    :allocation :virtual
-    :location ("gtk_button_box_get_layout" "gtk_button_box_set_layout")
-    :accessor button-box-layout
-    :initarg :layout
-    :type button-box-style))
-  (:metaclass container-class)
-  (:alien-name "GtkButtonBox"))
+     :type widget)))
 
+  ("GtkLayout"
+   :slots
+   ((bin-window
+     :allocation :virtual
+     :getter "gtk_layout_get_bin_window"
+     :reader layout-bin-window
+     :type gdk:window)))
 
+  ("GtkFixed"
+   :slots
+   ((has-window
+     :allocation :virtual
+     :getter "gtk_fixed_get_has_window"
+     :setter "gtk_fixed_set_has_window"
+     :reader fixed-has-window-p
+     :initarg :has-window
+     :type boolean)))
+
+  ("GtkRange"
+   :slots
+   ((value
+     :allocation :virtual
+     :getter "gtk_range_get_value"
+     :setter "gtk_range_set_value"
+     :initarg :value
+     :accessor range-value
+     :type double-float)
+   (upper
+     :allocation :virtual
+     :getter range-upper
+     :setter (setf range-upper)
+     :initarg :upper)
+   (lower
+     :allocation :virtual
+     :getter range-lower
+     :setter (setf range-lower)
+     :initarg :lower)
+   (step-increment
+     :allocation :virtual
+     :getter range-step-increment
+     :setter (setf range-step-increment)
+     :initarg :step-increment)
+   (page-increment
+     :allocation :virtual
+     :getter range-page-increment
+     :setter (setf range-page-increment)
+     :initarg :page-increment)))
+
+  ("GtkImage"
+   :slots
+   ((file :ignore t)))
+       
+  ("GtkEditable"
+   :slots
+   ((editable
+     :allocation :virtual
+     :getter "gtk_editable_get_editable"
+     :setter "gtk_editable_set_editable"
+     :reader editable-editable-p
+     :initarg :editable
+     :type boolean)
+    (position
+     :allocation :virtual
+     :getter "gtk_editable_get_position"
+     :setter "gtk_editable_set_position"
+     :reader editable-position
+     :initarg :position
+     :type int)
+    (text
+     :allocation :virtual
+     :getter editable-text
+     :setter (setf editable-text)
+     :initarg text)))
 
-(defclass color-selection (vbox)
-  ((use-opacity
-    :allocation :virtual
-    :location ("gtk_color_selection_get_use_opacity"
-              "gtk_color_selection_set_use_opacity")
-    :accessor color-selection-use-opacity-p
-    :initarg :use-opacity
-    :type boolean)
-   (use-palette
-    :allocation :virtual
-    :location ("gtk_color_selection_get_use_palette"
-              "gtk_color_selection_set_use_palette")
-    :accessor color-selection-use-palette-p
-    :initarg :use-palette
-    :type boolean)
-   (color
-    :allocation :virtual
-    :location color-selection-color
-    :initarg :color)
-   (old-color
-    :allocation :virtual
-    :location color-selection-old-color
-    :initarg :old-color
-    :type (vector double-float 4)))
-  (:metaclass container-class)
-  (:alien-name "GtkColorSelection"))
+  ("GtkFileChooser"
+   :slots
+   ((filename
+     :allocation :virtual
+     :getter "gtk_file_chooser_get_filename"
+     :setter "gtk_file_chooser_set_filename"
+     :accessor file-chooser-filename
+     :initarg :filename
+     :type string)
+    (current-name
+     :allocation :virtual
+     :setter "gtk_file_chooser_set_current_name"
+     :accessor file-choser-current-name
+     :initarg :current-name
+     :type string)
+    (current-folder
+     :allocation :virtual
+     :setter "gtk_file_chooser_set_current_folder"
+     :setter "gtk_file_chooser_get_current_folder"
+     :accessor file-choser-current-folder
+     :initarg :current-folder
+     :type string)
+    (uri
+     :allocation :virtual
+     :getter "gtk_file_chooser_get_uri"
+     :setter "gtk_file_chooser_set_uri"
+     :accessor file-choser-uri
+     :initarg :uri
+     :type string)
+    (current-folder-uri
+     :allocation :virtual
+     :setter "gtk_file_chooser_set_current_folder_uri"
+     :setter "gtk_file_chooser_get_current_folder_uri"
+     :accessor file-choser-current-folder-uri
+     :initarg :current-folder-uri
+     :type string)))
+
+  ("GtkTreeView"
+   :slots
+   ((columns
+     :allocation :virtual
+     :getter "gtk_tree_view_get_columns"
+     :reader tree-view-columns 
+     :type (glist tree-view-column))
+    (selection
+     :allocation :virtual
+     :getter "gtk_tree_view_get_selection"
+     :reader tree-view-selection
+     :type tree-selection)))
 
+  ("GtkTreeModel"
+   :slots
+   ((n-columns
+     :allocation :virtual
+     :getter "gtk_tree_model_get_n_columns"
+     :reader tree-model-n-columns 
+     :type int)))
 
+  ("GtkTreeSelection"
+   :slots
+   ((mode
+     :allocation :virtual
+     :getter "gtk_tree_selection_get_mode"
+     :setter "gtk_tree_selection_set_mode"
+     :accessor tree-selection-mode
+     :initarg :mode
+     :type selection-mode)
+    (tree-view
+     :allocation :virtual
+     :getter "gtk_tree_selection_get_mode"
+     :reader tree-selection-mode
+     :type tree-view)))
 
+  ("GtkComboBox"
+   :slots
+   ((active-iter
+     :allocation :virtual
+     :getter "gtk_combo_box_get_active_iter"
+     :setter "gtk_combo_box_set_active_iter"
+     :accessor combo-box-active-iter 
+     :type tree-iter)))
+
+  ("GtkTextBuffer"
+   :slots
+   ((line-count
+     :allocation :virtual
+     :getter "gtk_text_buffer_get_line_count"
+     :reader text-buffer-line-count
+     :type int)
+    (char-count
+     :allocation :virtual
+     :getter "gtk_text_buffer_get_char_count"
+     :reader text-buffer-char-count
+     :type int)
+    (modified
+     :allocation :virtual
+     :getter "gtk_text_buffer_get_modified"
+     :setter "gtk_text_buffer_set_modified"
+     :accessor text-buffer-modifed-p
+     :type boolean)))
+
+  ("GtkTextView"
+   :slots
+   ((default-attributes
+     :allocation :virtual
+     :getter "gtk_text_view_get_default_attributes"
+     :reader text-view-default-attributes
+     :type text-attributes)))
 
-(defclass paned (container)
-   (position
-    :allocation :virtual
-    :location ("gtk_paned_get_position" "gtk_paned_set_position")
-    :accessor paned-position
-    :initarg :position
-    :type int)
-   (child1
-    :allocation :virtual
-    :location paned-child1
-    :initarg :child1
-    :type widget)
-   (child2
-    :allocation :virtual
-    :location paned-child2
-    :initarg :child2
-    :type widget))
-  (:metaclass container-class)
-  (:alien-name "GtkPaned"))
+  ("GtkTextTagTable"
+   :slots
+   ((size
+     :allocation :virtual
+     :getter "gtk_text_tag_table_get_size"
+     :reader text-tag-table-size
+     :type int)))
 
+  ("GtkTextTag"
+   :slots
+   ((priority
+     :allocation :virtual
+     :getter "gtk_text_tag_get_priority"
+     :setter "gtk_text_tag_set_priority"
+     :accessor text-tag-priority
+     :type int)
+    (weight
+     :merge t :type pango:weight)))
+
+  ("GtkUIManager"
+   :type ui-manager
+   :slots
+   ((action-groups
+     :allocation :virtual
+     :getter "gtk_ui_manager_get_action_groups"
+     :reader ui-manager-action-groups
+     :type (copy-of (glist action-group)))
+    (accel-group
+     :allocation :virtual
+     :getter "gtk_ui_manager_get_accel_group"
+     :reader ui-manager-accel-group
+     :type accel-group)))
 
-(defclass layout (container)
-  ((hadjustment
-    :allocation :virtual
-    :location ("gtk_layout_get_hadjustment" "gtk_layout_set_hadjustment")
-    :accessor layout-hadjustment
-    :initarg :hadjustment
-    :type adjustment)
-   (vadjustment
-    :allocation :virtual
-    :location ("gtk_layout_get_vadjustment" "gtk_layout_set_vadjustment")
-    :accessor layout-vadjustment
-    :initarg :vadjustment
-    :type adjustment)
-   (x-size
-    :allocation :virtual
-    :location layout-x-size
-    :initarg :x-size)
-   (y-size
-    :allocation :virtual
-    :location layout-y-size
-    :initarg :y-size)
-   (x-offset
-    :allocation :alien
-    :offset #.(+ (size-of 'pointer) (* (size-of 'int) 2))
-    :accessor layout-x-offset
-    :initarg :x-offset
-    :type unsigned-int)
-   (y-offset
-    :allocation :alien
-    :accessor layout-y-offset
-    :initarg :y-offset
-    :type unsigned-int))
-  (:metaclass container-class)
-  (:alien-name "GtkLayout"))
+  ("GtkUIManagerItemType"
+   :type ui-manager-item-type)
 
+  ("GtkToggle"
+   :slots
+   ((accelerator
+     :allocation :virtual
+     :getter action-accelerator)))
 
+  ("GtkToggleAction"
+   :slots
+   ((active
+     :allocation :virtual
+     :getter "gtk_toggle_action_get_active"
+     :setter "gtk_toggle_action_set_active"
+     :initarg :active
+     :accessor toggle-action-active-p
+     :type boolean)))
+
+  ("GtkRadioAction"
+   :slots
+   ((group
+     :allocation :virtual
+     :getter "gtk_radio_button_get_group"
+     :reader radio-button-group
+     :type (copy-of (gslist widget)))
+    (%value
+     :allocation :property  :pname "value"
+     :readable nil :type int)
+    (value 
+     :allocation :virtual
+     :getter radio-action-value)))
 
-(defclass menu (menu-shell)
-  ((accel-group
-    :allocation :virtual
-    :location ("gtk_menu_get_accel_group" "gtk_menu_set_accel_group")
-    :accessor menu-accel-group
-    :initarg :accel-group
-    :type accel-group)
-   (tornoff
-    :allocation :virtual
-    :location ("gtk_menu_get_tearoff_state" "gtk_menu_set_tearoff_state")
-    :accessor menu-tornoff-p
-    :initarg :tearoff
-    :type boolean)
-   (title
-    :allocation :virtual
-    :location ("gtk_menu_get_title" "gtk_menu_set_title")
-    :accessor menu-title
-    :initarg :title
-    :type string))
-  (:metaclass container-class)
-  (:alien-name "GtkMenu"))
 
+  ;; Not needed
+  ("GtkFundamentalType" :ignore t)
+  ("GtkArgFlags" :ignore t)
 
-(defclass table-child (container-child)
-   (x-expand
-    :allocation :virtual
-    :location table-child-x-expand-p
-    :initarg :x-expand
-    :type boolean)   
-   (y-expand
-    :allocation :virtual
-    :location table-child-y-expand-p
-    :initarg :y-expand
-    :type boolean)
-   (x-shrink
-    :allocation :virtual
-    :location table-child-x-shrink-p
-    :initarg :x-shrink
-    :type boolean)   
-   (y-shrink
-    :allocation :virtual
-    :location table-child-y-shrink-p
-    :initarg :y-shrink
-    :type boolean)   
-   (x-fill
-    :allocation :virtual
-    :location table-child-x-fill-p
-    :initarg :x-fill
-    :type boolean)   
-   (y-fill
-    :allocation :virtual
-    :location table-child-y-fill-p
-    :initarg :y-fill
-    :type boolean))
-  (:metaclass child-class))
   
+  ;; Deprecated widgets
+  ("GtkCList" :ignore-prefix t)
+  ("GtkCTree" :ignore-prefix t)
+  ("GtkList" :ignore t)
+  ("GtkListItem" :ignore t)
+  ("GtkTree" :ignore t)
+  ("GtkTreeItem" :ignore t)
+  ("GtkItemFactory" :ignore t)
+  ("GtkText" :ignore t)
+  ("GtkPacker" :ignore-prefix t)
+  ("GtkPixmap" :ignore t)
+  ("GtkPreview" :ignore-prefix t)
+  ("GtkProgres" :ignore t)
+  ("GtkTipsQuery" :ignore t)
+  ("GtkOldEditable" :ignore t)
+  ("GtkCombo" :ignore t)
+  ("GtkOptionMenu" :ignore t)
 
-(defclass toolbar (container)
-   (tooltips
-    :allocation :virtual
-    :location ("gtk_toolbar_get_tooltips" "gtk_toolbar_set_tooltips")
-    :accessor toolbar-tooltips-p
-    :initarg :tooltips
-    :type boolean))
-  (:metaclass container-class)
-  (:alien-name "GtkToolbar"))
+  ;; What are these?
+  ("GtkFileSystemModule" :ignore t)
+  ("GtkIMModule" :ignore t)
+  ("GtkThemeEngine" :ignore t)
 
+  )
 
 
-(defclass combo (hbox)
-  ((entry
+(defclass text-iter (boxed)
+  ((buffer
     :allocation :virtual
-    :location "gtk_combo_get_entry"
-    :reader combo-entry
-    :type entry))
-  (:metaclass widget-class)
-  (:alien-name "GtkCombo"))
-  
-
-(defclass ruler (widget)
-   (metric
+    :getter "gtk_text_iter_get_buffer"
+    :reader text-iter-buffer
+    :type text-buffer)
+   (offset
     :allocation :virtual
-    :location (nil "gtk_ruler_set_metric")
-    :accessor ruler-metric
-    :initarg :metric
-    :type metric-type))
-  (:metaclass widget-class)
-  (:alien-name "GtkRuler"))
-
-(defclass scale (range)
-   (value-width
+    :getter "gtk_text_iter_get_offset"
+    :setter "gtk_text_iter_set_offset"
+    :accessor text-iter-offset
+    :type int)
+   (line
     :allocation :virtual
-    :location "gtk_scale_get_value_width"
-    :reader ruler-value-width
-    :type int))
-  (:metaclass widget-class)
-  (:alien-name "GtkScale"))
-
-
-
-(defclass progress (widget)
-   (format-string
+    :getter "gtk_text_iter_get_line"
+    :setter "gtk_text_iter_set_line"
+    :accessor text-iter-line
+    :type int)
+   (line-offset
     :allocation :virtual
-    :location ("gtk_progress_get_format_string"
-              "gtk_progress_set_format_string")
-    :accessor progress-format-string
-    :initarg :format-string
-    :type string)
-   (adjustment
+    :getter "gtk_text_iter_get_line_offset"
+    :setter "gtk_text_iter_set_line_offset"
+    :accessor text-iter-line-offset
+    :type int)
+   (line-index
     :allocation :virtual
-    :location ("gtk_progress_get_adjustment"
-              "gtk_progress_set_adjustment")
-    :accessor progress-adjustment
-    :initarg :adjustment
-    :type adjustment)
-   (percentage
+    :getter "gtk_text_iter_get_line_index"
+    :setter "gtk_text_iter_set_line_index"
+    :accessor text-iter-line-index
+    :type int)
+   (visible-line-index
     :allocation :virtual
-    :location ("gtk_progress_get_current_percentage"
-              "gtk_progress_set_percentage")
-    :accessor progress-percentage
-    :initarg :percentage
-    :type single-float)
-   (value
+    :getter "gtk_text_iter_get_visible_line_index"
+    :setter "gtk_text_iter_set_visible_line_index"
+    :accessor text-iter-visible-line-index
+    :type int)
+   (visible-line-offset
     :allocation :virtual
-    :location ("gtk_progress_get_value" "gtk_progress_set_value")
-    :accessor progress-value
-    :initarg :value
-    :type single-float)
-  (:metaclass widget-class)
-  (:alien-name "GtkProgress"))
-  
-
-(defclass progress-bar (progress)
-   (activity-blocks ;; deprecated
-    :allocation :param
-    :accessor progress-bar-activity-blocks
-    :initarg :activity-blocks
-    :type unsigned-int)
-  (:metaclass widget-class)
-  (:alien-name "GtkProgressBar"))
-
-
-|#
+    :getter "gtk_text_iter_get_visible_line_offset"
+    :setter "gtk_text_iter_set_visible_line_offset"
+    :accessor text-iter-visible-line-offset
+    :type int)
+   ;; Workaround to get correct size 
+   (dummy14
+     :allocation :alien :offset #.(* 13 (size-of 'pointer))
+     :type pointer))
+  (:metaclass boxed-class 
+   ;; I am pretty sure this was working in older versons on CMUCL
+   :size #.(* 14 (size-of 'pointer))))