Merge subset of commit '4a6ca9e91e82da3047bd0029296e00e9030a3686' of git://github...
[cl-gtk2.git] / gdk / gdk.objects.lisp
index a7e6d65..b62007e 100644 (file)
   (:bilevel 0)
   (:full 1))
 
+(define-g-enum "GdkInterpType"
+    gdk-interp-type
+    (:export t :type-initializer "gdk_interp_type_get_type")
+  (:nearest 0)
+  (:tiles 1)
+  (:bilinear 2)
+  (:hyper 3))
+
+(define-g-enum "GdkPixbufRotation"
+    gdk-pixbuf-rotation
+    (:export t :type-initializer "gdk_pixbuf_rotation_get_type")
+  (:none 0)
+  (:counterclockwise 90)
+  (:upsidedown 180)
+  (:clockwise 270))
+
 (define-g-enum "GdkColorspace" colorspace ()
   :rgb)
 
          do (setf (aref result i) (mem-aref ptr el-type i)))
       result)))
 
+(defmethod translate-to-foreign (value (type fixed-array))
+  (if (null value)
+      (null-pointer)
+      (foreign-alloc (fixed-array-element-type type) :count (length value) :initial-contents value)))
+
+(defmethod free-translated-object (value (type fixed-array) param)
+  (declare (ignore param))
+  (unless (null-pointer-p value)
+    (foreign-free value)))
+
 (define-g-boxed-cstruct rectangle "GdkRectangle"
   (x :int :initform 0)
   (y :int :initform 0)
              (axes (fixed-array :double 2))
              (state :uint)
              (button :uint)
-             (device (g-object device))
+             (device (g-object gdk-device))
              (x-root :double)
              (y-root :double))
             ((:scroll) event-scroll
              (y :double)
              (state modifier-type)
              (direction scroll-direction)
-             (device (g-object device))
+             (device (g-object gdk-device))
              (x-root :double)
              (y-root :double))
             ((:motion-notify) event-motion
              (axes (fixed-array :double 2))
              (state modifier-type)
              (is-hint :int16)
-             (device (g-object device))
+             (device (g-object gdk-device))
              (x-root :double)
              (y-root :double))
             ((:expose) event-expose
             ((:proximity-in
               :proximity-out) event-proximity
              (time :uint32)
-             (device (g-object device)))
+             (device (g-object gdk-device)))
             ((:client-event) event-client
              (message-time gdk-atom)
              (data-format :ushort)
   ((:cffi visual colormap-visual (g-object visual)
           "gdk_colormap_get_visual" nil)
    (:cffi screen colormap-screen (g-object screen)
-          "gdk_colormap_get_screeen" nil)))
+          "gdk_colormap_get_screen" nil)))
 
 (define-g-object-class "GdkScreen" screen (:type-initializer "gdk_screen_get_type")
   ((font-options screen-font-options "font-options" "gpointer" t t)