Used :already-referenced flag on gdk-gc-new and widget-create-pango-layout
[cl-gtk2.git] / gtk / gtk.widget.lisp
index 5be60b9..a70ec15 100644 (file)
   (accel-signal :string)
   (accel-group g-object)
   (accel-key :uint)
-  (accel-mods gdk-modifier-type)
+  (accel-mods modifier-type)
   (accel-flags accel-flags))
 
 (export 'widget-add-accelerator)
   (widget g-object)
   (accel-group g-object)
   (accel-key :uint)
-  (accel-mods gdk-modifier-type))
+  (accel-mods modifier-type))
 
 (export 'widget-remove-accelerator)
 
 
 (defcfun gtk-widget-intersect :boolean
   (widget g-object)
-  (area (g-boxed-ptr rectangle))
-  (intersection (g-boxed-ptr rectangle :in-out)))
+  (area (g-boxed-foreign rectangle))
+  (intersection (g-boxed-foreign rectangle :in-out)))
 
 (defun widget-intersect (widget rectangle)
   (let ((result (make-rectangle :x 0 :y 0 :width 0 :height 0)))
 
 (export 'widget-get-pango-context)
 
-(defcfun (widget-create-pango-layout "gtk_widget_create_pango_layout") (g-object gdk::pango-layout)
+(defcfun (widget-create-pango-layout "gtk_widget_create_pango_layout") (g-object gdk::pango-layout :already-referenced)
   (widget (g-object widget))
   (text :string))
 
          (class (g-type-class-ref type)))
     (unwind-protect
          (let ((g-param-spec (gtk-widget-class-find-style-property class property-name)))
-           (unless g-param-spec (error "Widget ~A has no style-property named '~A'" widget property-name))
+           (when (null-pointer-p g-param-spec) (error "Widget ~A has no style-property named '~A'" widget property-name))
            (foreign-slot-value g-param-spec 'gobject:g-param-spec :value-type))
       (g-type-class-unref class))))
 
 
 (defcfun gtk-widget-get-snapshot g-object
   (widget g-object)
-  (clip-rectangle (g-boxed-ptr rectangle)))
+  (clip-rectangle (g-boxed-foreign rectangle)))
 
 (defun widget-snapshot (widget &optional clip-rectangle)
   (gtk-widget-get-snapshot widget clip-rectangle))