[mcclim-cvs] CVS mcclim/Backends/gtkairo
dlichteblau
dlichteblau at common-lisp.net
Sun Nov 19 15:55:12 UTC 2006
Update of /project/mcclim/cvsroot/mcclim/Backends/gtkairo
In directory clnet:/tmp/cvs-serv24909
Modified Files:
cairo-ffi.lisp gadgets.lisp gtk-ffi.lisp medium.lisp port.lisp
Added Files:
ffi.lisp
Log Message:
New file ffi.lisp for generated FFI code. gtk-ffi.lisp and cairo-ffi.lisp
still have definitions that need to be maintained manually.
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/cairo-ffi.lisp 2006/11/05 17:29:11 1.7
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/cairo-ffi.lisp 2006/11/19 15:55:08 1.8
@@ -79,32 +79,33 @@
;; enums
+;; (can't look these up yet, why?)
-(cffi:defcenum cairo_format
+(cffi:defcenum cairo_format_t
:argb32 :rgb24 :a8 :a1)
-(cffi:defcenum cairo_operator
+(cffi:defcenum cairo_operator_t
:clear
:src :over :in :out :atop
:dest :dest_over :dest_in :dest_out :dest_atop
:xor :add :saturate)
-(cffi:defcenum cairo_fill_rule
+(cffi:defcenum cairo_fill_rule_t
:winding :even_odd)
-(cffi:defcenum cairo_line_cap
+(cffi:defcenum cairo_line_cap_t
:butt :round :square)
-(cffi:defcenum cairo_line_join
+(cffi:defcenum cairo_line_join_t
:miter :round :bevel)
-(cffi:defcenum cairo_font_slant
+(cffi:defcenum cairo_font_slant_t
:normal :italic :oblique)
-(cffi:defcenum cairo_font_weight
+(cffi:defcenum cairo_font_weight_t
:normal :bold)
-(cffi:defcenum cairo_status
+(cffi:defcenum cairo_status_t
:success
:no_memory
:invalid_restore
@@ -126,721 +127,19 @@
:file_not_found
:invalid_dash)
-(cffi:defcenum cairo_filter
+(cffi:defcenum cairo_filter_t
:fast :good :best :nearest :bilinear :gaussian)
-(cffi:defcenum cairo_extend
+(cffi:defcenum cairo_extend_t
:none :repeat :reflect)
-
-;;; Functions for manipulating state objects
-
-(defcfun "cairo_create"
- :pointer
- (surface :pointer))
-
-(defcfun "cairo_reference"
- :void
- (cr :pointer))
-
-(defcfun "cairo_destroy"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_save"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_restore"
- :void
- (cr :pointer))
-
-;;; XXX: Replace with cairo_current_gstate/cairo_set_gstate
-
-;;;(defcfun "cairo_copy"
-;;; :void
-;;; (destination :pointer)
-;;; (source :pointer))
-
-;;; Modify state
-
-;;;(defcfun "cairo_set_target_surface"
-;;; :void
-;;; (cr :pointer)
-;;; (surface :pointer))
-;;;
-;;;(defcfun "cairo_set_target_image"
-;;; :void
-;;; (cr :pointer)
-;;; (data :pointer) ;(* (unsigned 8))
-;;; (format cairo_format)
-;;; (width :int)
-;;; (height :int)
-;;; (stride :int))
-
-(def-cairo-fun "cairo_set_operator"
- :void
- (cr :pointer)
- (op cairo_operator))
-
-;;; Colors
-
-(def-cairo-fun "cairo_set_source_rgb"
- :void
- (cr :pointer)
- (red :double)
- (green :double)
- (blue :double))
-
-(def-cairo-fun "cairo_set_source_rgba"
- :void
- (cr :pointer)
- (red :double)
- (green :double)
- (blue :double)
- (alpha :double))
-
-(def-cairo-fun "cairo_set_source"
- :void
- (cr :pointer)
- (pattern :pointer))
-
-(def-cairo-fun "cairo_set_tolerance"
- :void
- (cr :pointer)
- (tolerance :double))
-
-(def-cairo-fun "cairo_set_fill_rule"
- :void
- (cr :pointer)
- (fill_rule cairo_fill_rule))
-
-(def-cairo-fun "cairo_set_line_width"
- :void
- (cr :pointer)
- (w :double))
-
-(def-cairo-fun "cairo_set_line_cap"
- :void
- (cr :pointer)
- (line_cap cairo_line_cap))
-
-(def-cairo-fun "cairo_set_line_join"
- :void
- (cr :pointer)
- (line_join cairo_line_join))
-
-(def-cairo-fun "cairo_set_dash"
- :void
- (cr :pointer)
- (dashes :pointer) ;*double
- (ndash :int)
- (offset :double))
-
-(def-cairo-fun "cairo_set_miter_limit"
- :int
- (cr :pointer)
- (limit :double))
-
-;;; Transformations
-
-(def-cairo-fun "cairo_translate"
- :void
- (cr :pointer)
- (tx :double)
- (ty :double))
-
-(def-cairo-fun "cairo_scale"
- :void
- (cr :pointer)
- (sx :double)
- (sy :double))
-
-(def-cairo-fun "cairo_rotate"
- :void
- (cr :pointer)
- (angle :double))
-
-(def-cairo-fun "cairo_set_matrix"
- :void
- (cr :pointer)
- (matrix :pointer))
-
-(def-cairo-fun "cairo_identity_matrix"
- :void
- (cr :pointer))
-
-;;;(defcfun "cairo_transform_point"
-;;; :void
-;;; (cr :pointer)
-;;; (x :pointer) ;*double
-;;; (y :pointer) ;*double
-;;; )
-
-;;;(defcfun "cairo_transform_distance"
-;;; :void
-;;; (cr :pointer)
-;;; (dx :pointer) ;*double
-;;; (dy :pointer) ;*double
-;;; )
-
-;;;(defcfun "cairo_inverse_transform_point"
-;;; :void
-;;; (cr :pointer)
-;;; (x :pointer) ;*double
-;;; (y :pointer) ;*double
-;;; )
-;;;
-;;;(defcfun "cairo_inverse_transform_distance"
-;;; :void
-;;; (cr :pointer)
-;;; (dx :pointer) ;*double
-;;; (dy :pointer) ;*double
-;;; )
-
-;;; Path creation functions
-
-(def-cairo-fun "cairo_new_path"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_move_to"
- :void
- (cr :pointer)
- (x :double)
- (y :double))
-
-(def-cairo-fun "cairo_line_to"
- :void
- (cr :pointer)
- (x :double)
- (y :double))
-
-(def-cairo-fun "cairo_curve_to"
- :void
- (cr :pointer)
- (x1 :double)
- (y1 :double)
- (x2 :double)
- (y2 :double)
- (x3 :double)
- (y3 :double))
-
-(def-cairo-fun "cairo_arc"
- :void
- (cr :pointer)
- (xc :double)
- (yc :double)
- (radius :double)
- (angle1 :double)
- (angle2 :double))
-
-(def-cairo-fun "cairo_arc_negative"
- :void
- (cr :pointer)
- (xc :double)
- (yc :double)
- (radius :double)
- (angle1 :double)
- (angle2 :double))
-
-(def-cairo-fun "cairo_rel_move_to"
- :void
- (cr :pointer)
- (dx :double)
- (dy :double))
-
-(def-cairo-fun "cairo_rel_line_to"
- :void
- (cr :pointer)
- (dx :double)
- (dy :double))
-
-(def-cairo-fun "cairo_rel_curve_to"
- :void
- (cr :pointer)
- (dx1 :double)
- (dy1 :double)
- (dx2 :double)
- (dy2 :double)
- (dx3 :double)
- (dy3 :double))
-
-(def-cairo-fun "cairo_rectangle"
- :void
- (cr :pointer)
- (x :double)
- (y :double)
- (w :double)
- (h :double))
-
-(def-cairo-fun "cairo_close_path"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_stroke"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_fill"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_copy_page"
- :void
- (cr :pointer))
-
-(def-cairo-fun "cairo_show_page"
- :void
- (cr :pointer))
-
-;;; Insideness testing
-
-(def-cairo-fun "cairo_in_stroke"
- :int
- (cr :pointer)
- (x :double)
- (y :double))
-
-(def-cairo-fun "cairo_in_fill"
- :int
- (cr :pointer)
- (x :double)
- (y :double))
-
-;;; Rectangular extents
-
-(def-cairo-fun "cairo_stroke_extents"
- :void
- (cr :pointer)
- (x1 :pointer) ;*double
- (y1 :pointer) ;*double
- (x2 :pointer) ;*double
- (y2 :pointer) ;*double
- )
-
-(def-cairo-fun "cairo_fill_extents"
- :void
- (cr :pointer)
- (x1 :pointer) ;*double
- (y1 :pointer) ;*double
- (x2 :pointer) ;*double
- (y2 :pointer) ;*double
- )
-
-(def-cairo-fun "cairo_reset_clip"
- :void
- (cr :pointer))
-
-;; Note: cairo_clip does not consume the current path
-(def-cairo-fun "cairo_clip"
- :void
- (cr :pointer))
-
-;;; Font/Text functions
-
-
-;; This interface is for dealing with text as text, not caring about the
-;; font object inside the the cairo_t.
-
-(def-cairo-fun "cairo_select_font_face"
- :void
- (cr :pointer)
- (family :string)
- (slant cairo_font_slant)
- (weight cairo_font_weight))
-
-(def-cairo-fun "cairo_set_font_size"
- :void
- (cr :pointer)
- (size :double))
-
-;;;(defcfun "cairo_transform_font"
-;;; :void
-;;; (cr :pointer)
-;;; (matrix :pointer))
-
-(def-cairo-fun "cairo_show_text"
- :void
- (cr :pointer)
- (string :string))
-
-(def-cairo-fun "cairo_show_glyphs"
- :void
- (cr :pointer)
- (glyphs :pointer)
- (num_glyphs :int))
-
-;;;(def-cairo-fun "cairo_current_font"
-;;; :pointer
-;;; (cr :pointer))
-;;;
-(def-cairo-fun "cairo_font_extents"
[378 lines skipped]
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gadgets.lisp 2006/11/12 20:37:14 1.9
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gadgets.lisp 2006/11/19 15:55:10 1.10
@@ -136,8 +136,8 @@
(gtk_tree_selection_set_mode
(list-pane-selection sheet)
(if (eq (climi::list-pane-mode sheet) :exclusive)
- :browse
- :multiple))
+ :GTK_SELECTION_BROWSE
+ :GTK_SELECTION_MULTIPLE))
(gtk-list-reset-selection sheet)
(let ((ancestor
(and (sheet-parent sheet) (sheet-parent (sheet-parent sheet))))
@@ -369,20 +369,20 @@
(defmethod handle-event
((pane native-scrollbar) (event scrollbar-change-value-event))
(case (event-scroll-type event)
- (:jump
+ (:gtk_scroll_jump
(let ((value
(clamp (gadget-min-value pane)
(event-value event)
(gadget-max-value pane))))
(setf (gadget-value pane :invoke-callback nil) value)
(drag-callback pane (gadget-client pane) (gadget-id pane) value)))
- (:step_backward
+ (:gtk_scroll_step_backward
(scroll-up-line-callback pane (gadget-client pane) (gadget-id pane)))
- (:step_forward
+ (:gtk_scroll_step_forward
(scroll-down-line-callback pane (gadget-client pane) (gadget-id pane)))
- (:page_backward
+ (:gtk_scroll_page_backward
(scroll-up-page-callback pane (gadget-client pane) (gadget-id pane)))
- (:page_forward
+ (:gtk_scroll_page_forward
(scroll-down-page-callback pane (gadget-client pane) (gadget-id pane)))))
(defmethod handle-event
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gtk-ffi.lisp 2006/11/12 20:12:19 1.14
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gtk-ffi.lisp 2006/11/19 15:55:10 1.15
@@ -43,9 +43,21 @@
(cffi:load-foreign-library "libgtk-win32-2.0-0.dll"))
(defmacro defcfun (name rtype &rest argtypes)
- `(cffi:defcfun (,name ,(intern (string-upcase name) :clim-gtkairo))
- ,rtype
- , at argtypes))
+ (if (and (eq rtype 'cairo_status_t)
+ (not (equal name "cairo_status")))
+ `(def-cairo-fun ,name ,rtype , at argtypes)
+ `(cffi:defcfun (,name ,(intern (string-upcase name) :clim-gtkairo))
+ ,rtype
+ , at argtypes)))
+
+(defmacro defcenum (name &rest values)
+ `(progn
+ (cffi:defcenum ,name , at values)
+ ,@(loop
+ for pair in values
+ for key = (if (listp pair) (car pair) pair)
+ collect `(defconstant ,(intern (symbol-name key) :clim-gtkairo)
+ (cffi:foreign-enum-value ',name ,key)))))
;;; Here's a hack to wait on GTK's Xlib Display's socket file descriptor
@@ -131,20 +143,6 @@
(gdk_threads_leave)))))
-;;; Error handling:
-
-(defcfun "gdk_error_trap_push" :void)
-(defcfun "gdk_error_trap_pop" :int)
-
-#-(or win32 mswindows windows)
-(cffi:defcfun "XGetErrorText"
- :void
- (display :pointer)
- (code :int)
- (buf :pointer)
- (length :int))
-
-
;;; GROVELME
;; must be a separate structure definition in order for padding on AMD64
@@ -301,133 +299,10 @@
(data0 :uint64)
(data1 :uint64))
-(cffi:defcenum gdkfunction
- :copy :invert :xor :clear :and :and_reverse :and_invert :noop :or :equiv
- :or_reverse :copy_invert :or_invert :nand :nor :set)
-
-(cffi:defcenum gtkscrolltype
- :none :jump :step_backward :step_forward :page_backward :page_forward
- :step_up :step_down :page_up :page_down :step_left :step_right :page_left
- :page_right :start :end)
-
-(cffi:defcenum gtkselectionmode
- :none :single :browse :multiple)
-
-
-;;; GTK functions
(defconstant GTK_WINDOW_TOPLEVEL 0)
(defconstant GTK_WINDOW_POPUP 1)
-(defcfun "gtk_init"
- :void
- (argc :int)
- (argv :pointer))
-
-(defcfun "gtk_events_pending"
- :int)
-
-(defcfun "gtk_main_iteration_do"
- :void
- (block :int))
-
-(defcfun "gtk_window_new"
- :pointer
- (type :int))
-
-(defcfun "gtk_widget_destroy"
- :void
- (window :pointer))
-
-(defcfun "gtk_widget_show_all"
- :void
- (widget :pointer))
-
-(defcfun "gtk_widget_hide_all"
- :void
- (widget :pointer))
-
-(defcfun "gtk_widget_show"
- :void
- (widget :pointer))
-
-(defcfun "gtk_widget_hide"
- :void
- (widget :pointer))
-
-(defcfun "gtk_window_resize"
- :void
- (window :pointer)
- (width :int)
- (height :int))
-
-(defcfun "gtk_window_move"
- :void
- (window :pointer)
- (x :int)
- (y :int))
-
-(defcfun "gtk_drawing_area_new"
- :pointer)
-
-(defcfun "gtk_widget_set_size_request"
- :void
- (widget :pointer)
- (width :int)
- (height :int))
-
-(defcfun "gtk_widget_get_size_request"
- :void
- (widget :pointer)
- (width :pointer)
- (height :pointer))
-
-(defcfun "gtk_widget_size_request"
- :void
- (widget :pointer)
- (requisition :pointer))
-
-(defcfun "gtk_container_add"
- :void
- (parent :pointer)
- (child :pointer))
-
-(defcfun "gdk_cairo_create"
- :pointer
- (gdk-window :pointer))
-
-(defcfun "gtk_fixed_new"
- :pointer
- )
-
-(defcfun "gtk_fixed_put"
- :void
- (fixed :pointer)
- (child :pointer)
- (x :int)
- (y :int))
-
-(defcfun "gtk_fixed_move"
- :void
- (fixed :pointer)
- (child :pointer)
- (x :int)
- (y :int))
-
-(defcfun "gtk_fixed_set_has_window"
- :void
- (fixed :pointer)
- (windowp :int))
-
-(defcfun "g_signal_connect_data"
- :void
- (object :pointer)
- (event :string)
- (callback :pointer)
- (data :pointer)
- (destroy_data :pointer)
- (flags :int))
-
(defun g-signal-connect (object event callback &optional data)
(g_signal_connect_data object
event
@@ -436,552 +311,14 @@
(cffi:null-pointer)
0))
-(defcfun "gtk_widget_add_events"
- :void
- (widget :pointer)
- (events :int))
-
-(defcfun "gtk_widget_set_events"
- :void
- (widget :pointer)
- (events :int))
-
-(defcfun "gtk_widget_get_events"
- :int
- (widget :pointer))
-
-(defcfun "gtk_widget_grab_focus"
- :void
- (widget :pointer))
-
-(defcfun "gtk_widget_set_double_buffered"
- :void
- (widget :pointer)
- (enable :int))
-
-(defcfun "gdk_display_flush"
- :void
- (display :pointer))
-
-(defcfun "gdk_display_get_default"
- :pointer)
-
-(defcfun "gdk_display_get_pointer"
- :void
- (display :pointer)
- (screen :pointer)
- (x :pointer)
- (y :pointer)
- (mask :pointer))
-
-(defcfun "gtk_widget_get_pointer"
- :void
- (widget :pointer)
- (x :pointer)
- (y :pointer))
-
-(defcfun "gdk_screen_get_default"
- :pointer
- )
-
-(defcfun "gdk_screen_get_height"
- :int
- (screen :pointer))
-
-(defcfun "gdk_screen_get_width"
- :int
- (screen :pointer))
-
-(defcfun "gdk_screen_get_height_mm"
- :int
- (screen :pointer))
-
-(defcfun "gdk_screen_get_width_mm"
- :int
- (screen :pointer))
-
-(defcfun "gdk_pointer_grab"
- :int
- (gdkwindow :pointer)
- (owner_events :int)
- (event_mask :int)
- (confine_to :pointer)
- (cursor :pointer)
- (time :uint32))
-
-(defcfun "gdk_pointer_ungrab"
- :void
- (time :uint32))
-
-(defcfun "gdk_threads_enter"
- :void)
-
-(defcfun "gdk_threads_leave"
- :void)
-
-(defcfun "gdk_threads_init"
- :void)
-
-(defcfun "g_thread_init"
- :void
- (fns :pointer))
-
-(defcfun "gdk_flush"
- :void)
-
-(defcfun "gdk_window_begin_paint_rect"
- :void
- (window :pointer)
- (rect :pointer))
-
-(defcfun "gdk_window_end_paint"
- :void
- (window :pointer))
-
-(defcfun "gdk_window_get_root_origin"
- :void
- (window :pointer)
- (x :pointer)
- (y :pointer))
-
-(defcfun "gtk_widget_modify_bg"
- :void
- (widget :pointer)
- (state :int)
- (color :pointer))
-
-(defcfun "gtk_window_set_default_size"
- :void
- (window :pointer)
- (width :int)
- (height :int))
-
-(defcfun "gtk_widget_size_allocate"
- :void
- (widget :pointer)
- (allocation :pointer))
-
-(defcfun "gtk_widget_queue_resize"
- :void
- (widget :pointer))
-
-(defcfun "gtk_window_set_geometry_hints"
- :void
- (window :pointer)
- (widget :pointer)
- (geometry :pointer)
- (mask :int))
-
-(defcfun "gdk_screen_get_root_window"
- :pointer
- (screen :pointer))
-
-(defcfun "gdk_pixmap_new"
- :pointer
- (drawable :pointer)
- (width :int)
- (height :int)
- (depth :int))
-
-(defcfun "gdk_drawable_unref"
- :void
- (drawable :pointer))
-
-(defcfun "gdk_drawable_get_depth"
- :int
- (drawable :pointer))
-
-(defcfun "gdk_gc_new"
- :pointer
- (drawable :pointer))
-
-(defcfun "gdk_gc_unref"
- :void
- (drawable :pointer))
-
-(defcfun "gdk_gc_set_function"
- :void
- (gc :pointer)
- (function gdkfunction))
-
-(defcfun "gdk_draw_drawable"
- :void
- (drawable :pointer)
- (gc :pointer)
- (src-drawable :pointer)
- (xsrc :int)
- (ysrc :int)
- (xdest :int)
- (ydest :int)
- (width :int)
- (height :int))
-
-(defcfun "gdk_draw_rectangle"
- :void
- (drawable :pointer)
- (gc :pointer)
- (filled :int)
- (x :int)
- (y :int)
- (width :int)
- (height :int))
-
-(defcfun "gdk_gc_set_rgb_fg_color"
- :void
- (gc :pointer)
- (color :pointer))
-
-(defcfun "gtk_button_new"
- :pointer
- )
-
-(defcfun "gtk_button_new_with_label"
- :pointer
- (label :string))
-
-(defcfun "gtk_menu_item_new_with_label"
- :pointer
- (label :string))
-
-(defcfun "gtk_menu_bar_new"
- :pointer
- )
-
-(defcfun "gtk_menu_shell_append"
- :void
- (menu :pointer)
[379 lines skipped]
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/medium.lisp 2006/11/05 21:23:12 1.11
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/medium.lisp 2006/11/19 15:55:11 1.12
@@ -224,7 +224,7 @@
(cairo_surface_flush to-surface)
(let ((gc (gdk_gc_new to-drawable))
(region (flipping-region medium)))
- (gdk_gc_set_function gc :xor)
+ (gdk_gc_set_function gc :GDK_XOR)
(gdk_draw_drawable to-drawable gc from-drawable
(floor (bounding-rectangle-min-x region))
(floor (bounding-rectangle-min-y region))
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/port.lisp 2006/11/12 11:45:21 1.9
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/port.lisp 2006/11/19 15:55:11 1.10
@@ -80,7 +80,7 @@
(with-gtk ()
;; FIXME: hier koennten wir mindestens ein anderes --display uebergeben
;; wenn wir wollten
- (gtk_init 0 (cffi:null-pointer))
+ (gtk_init (cffi:null-pointer) (cffi:null-pointer))
(let ((cr (gdk_cairo_create
(gdk_screen_get_root_window (gdk_screen_get_default)))))
(setf (metrik-medium port)
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/ffi.lisp 2006/11/19 15:55:12 NONE
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/ffi.lisp 2006/11/19 15:55:12 1.1
;;; -*- Mode: Lisp; -*-
(in-package :clim-gtkairo)
(defcenum GdkEventMask
(:GDK_EXPOSURE_MASK 2)
(:GDK_POINTER_MOTION_MASK 4)
(:GDK_POINTER_MOTION_HINT_MASK 8)
(:GDK_BUTTON_MOTION_MASK 16)
(:GDK_BUTTON1_MOTION_MASK 32)
(:GDK_BUTTON2_MOTION_MASK 64)
(:GDK_BUTTON3_MOTION_MASK 128)
(:GDK_BUTTON_PRESS_MASK 256)
(:GDK_BUTTON_RELEASE_MASK 512)
(:GDK_KEY_PRESS_MASK 1024)
(:GDK_KEY_RELEASE_MASK 2048)
(:GDK_ENTER_NOTIFY_MASK 4096)
(:GDK_LEAVE_NOTIFY_MASK 8192)
(:GDK_FOCUS_CHANGE_MASK 16384)
(:GDK_STRUCTURE_MASK 32768)
(:GDK_PROPERTY_CHANGE_MASK 65536)
(:GDK_VISIBILITY_NOTIFY_MASK 131072)
(:GDK_PROXIMITY_IN_MASK 262144)
(:GDK_PROXIMITY_OUT_MASK 524288)
(:GDK_SUBSTRUCTURE_MASK 1048576)
(:GDK_SCROLL_MASK 2097152)
(:GDK_ALL_EVENTS_MASK 4194302))
(defcenum GdkWindowHints
(:GDK_HINT_POS 1)
:GDK_HINT_MIN_SIZE
(:GDK_HINT_MAX_SIZE 4)
(:GDK_HINT_BASE_SIZE 8)
(:GDK_HINT_ASPECT 16)
(:GDK_HINT_RESIZE_INC 32)
(:GDK_HINT_WIN_GRAVITY 64)
(:GDK_HINT_USER_POS 128)
(:GDK_HINT_USER_SIZE 256))
(cffi:defcstruct Depth
(depth :int) ;int
(nvisuals :int) ;int
(visuals :pointer) ;Visual *
)
(defcenum GdkEventType
(:GDK_NOTHING -1)
:GDK_DELETE
:GDK_DESTROY
:GDK_EXPOSE
:GDK_MOTION_NOTIFY
:GDK_BUTTON_PRESS
:GDK_2BUTTON_PRESS
:GDK_3BUTTON_PRESS
:GDK_BUTTON_RELEASE
:GDK_KEY_PRESS
:GDK_KEY_RELEASE
:GDK_ENTER_NOTIFY
:GDK_LEAVE_NOTIFY
:GDK_FOCUS_CHANGE
:GDK_CONFIGURE
:GDK_MAP
:GDK_UNMAP
:GDK_PROPERTY_NOTIFY
:GDK_SELECTION_CLEAR
:GDK_SELECTION_REQUEST
:GDK_SELECTION_NOTIFY
:GDK_PROXIMITY_IN
:GDK_PROXIMITY_OUT
:GDK_DRAG_ENTER
:GDK_DRAG_LEAVE
:GDK_DRAG_MOTION
:GDK_DRAG_STATUS
:GDK_DROP_START
:GDK_DROP_FINISHED
:GDK_CLIENT_EVENT
:GDK_VISIBILITY_NOTIFY
:GDK_NO_EXPOSE
:GDK_SCROLL
:GDK_WINDOW_STATE
:GDK_SETTING
:GDK_OWNER_CHANGE
:GDK_GRAB_BROKEN)
(defcenum GdkModifierType
(:GDK_SHIFT_MASK 1)
:GDK_LOCK_MASK
(:GDK_CONTROL_MASK 4)
(:GDK_MOD1_MASK 8)
(:GDK_MOD2_MASK 16)
(:GDK_MOD3_MASK 32)
(:GDK_MOD4_MASK 64)
(:GDK_MOD5_MASK 128)
(:GDK_BUTTON1_MASK 256)
(:GDK_BUTTON2_MASK 512)
(:GDK_BUTTON3_MASK 1024)
(:GDK_BUTTON4_MASK 2048)
(:GDK_BUTTON5_MASK 4096)
(:GDK_RELEASE_MASK 1073741824)
(:GDK_MODIFIER_MASK 1073750015))
(defcenum GtkStateType
:GTK_STATE_NORMAL
:GTK_STATE_ACTIVE
:GTK_STATE_PRELIGHT
:GTK_STATE_SELECTED
:GTK_STATE_INSENSITIVE)
(defcenum GdkDragAction
(:GDK_ACTION_DEFAULT 1)
:GDK_ACTION_COPY
(:GDK_ACTION_MOVE 4)
(:GDK_ACTION_LINK 8)
(:GDK_ACTION_PRIVATE 16)
(:GDK_ACTION_ASK 32))
(defcenum GdkCrossingMode
:GDK_CROSSING_NORMAL
:GDK_CROSSING_GRAB
:GDK_CROSSING_UNGRAB)
(defcenum GdkFunction
:GDK_COPY
:GDK_INVERT
:GDK_XOR
:GDK_CLEAR
:GDK_AND
:GDK_AND_REVERSE
:GDK_AND_INVERT
:GDK_NOOP
:GDK_OR
:GDK_EQUIV
:GDK_OR_REVERSE
:GDK_COPY_INVERT
:GDK_OR_INVERT
:GDK_NAND
:GDK_NOR
:GDK_SET)
(defcenum GdkDragProtocol
:GDK_DRAG_PROTO_MOTIF
:GDK_DRAG_PROTO_XDND
:GDK_DRAG_PROTO_ROOTWIN
:GDK_DRAG_PROTO_NONE
:GDK_DRAG_PROTO_WIN32_DROPFILES
:GDK_DRAG_PROTO_OLE2
:GDK_DRAG_PROTO_LOCAL)
(defcenum GdkNotifyType
:GDK_NOTIFY_ANCESTOR
:GDK_NOTIFY_VIRTUAL
:GDK_NOTIFY_INFERIOR
:GDK_NOTIFY_NONLINEAR
:GDK_NOTIFY_NONLINEAR_VIRTUAL
:GDK_NOTIFY_UNKNOWN)
(defcenum GtkWindowType
:GTK_WINDOW_TOPLEVEL
:GTK_WINDOW_POPUP)
(defcenum GConnectFlags
(:G_CONNECT_AFTER 1)
:G_CONNECT_SWAPPED)
(defcenum GtkScrollType
:GTK_SCROLL_NONE
:GTK_SCROLL_JUMP
:GTK_SCROLL_STEP_BACKWARD
:GTK_SCROLL_STEP_FORWARD
:GTK_SCROLL_PAGE_BACKWARD
:GTK_SCROLL_PAGE_FORWARD
:GTK_SCROLL_STEP_UP
:GTK_SCROLL_STEP_DOWN
:GTK_SCROLL_PAGE_UP
:GTK_SCROLL_PAGE_DOWN
:GTK_SCROLL_STEP_LEFT
:GTK_SCROLL_STEP_RIGHT
:GTK_SCROLL_PAGE_LEFT
:GTK_SCROLL_PAGE_RIGHT
:GTK_SCROLL_START
:GTK_SCROLL_END)
(cffi:defcstruct Screen
(ext_data :pointer) ;XExtData *
(display :pointer) ;struct _XDisplay *
(root :unsigned-long) ;Window
(width :int) ;int
(height :int) ;int
(mwidth :int) ;int
(mheight :int) ;int
(ndepths :int) ;int
(depths :pointer) ;Depth *
(root_depth :int) ;int
(root_visual :pointer) ;Visual *
(default_gc :pointer) ;GC
(cmap :unsigned-long) ;Colormap
(white_pixel :unsigned-long) ;long unsigned int
(black_pixel :unsigned-long) ;long unsigned int
(max_maps :int) ;int
(min_maps :int) ;int
(backing_store :int) ;int
(save_unders :int) ;int
(root_input_mask :long) ;long int
)
(defcenum GdkGrabStatus
:GDK_GRAB_SUCCESS
:GDK_GRAB_ALREADY_GRABBED
:GDK_GRAB_INVALID_TIME
:GDK_GRAB_NOT_VIEWABLE
:GDK_GRAB_FROZEN)
(defcenum GtkSelectionMode
:GTK_SELECTION_NONE
:GTK_SELECTION_SINGLE
:GTK_SELECTION_BROWSE
:GTK_SELECTION_MULTIPLE
(:GTK_SELECTION_EXTENDED 3))
(defcfun "gtk_check_button_new_with_label"
:pointer
(label :string) ;const gchar *
)
(defcfun "cairo_set_matrix"
:void
(arg0 :pointer) ;cairo_t *
(arg1 :pointer) ;const cairo_matrix_t *
)
(defcfun "gdk_screen_get_width"
:int
(screen :pointer) ;GdkScreen *
)
(defcfun "gtk_widget_size_request"
:void
(widget :pointer) ;GtkWidget *
(requisition :pointer) ;GtkRequisition *
)
(defcfun "cairo_line_to"
:void
(arg0 :pointer) ;cairo_t *
(arg1 :double) ;double
(arg2 :double) ;double
)
(defcfun "gtk_init"
:void
(argc :pointer) ;int *
(argv :pointer) ;char ***
)
(defcfun "gdk_window_get_root_origin"
:void
(window :pointer) ;GdkWindow *
(x :pointer) ;gint *
(y :pointer) ;gint *
)
(defcfun "cairo_reference"
:pointer
(arg0 :pointer) ;cairo_t *
)
(defcfun "cairo_font_extents"
:void
(arg0 :pointer) ;cairo_t *
(arg1 :pointer) ;cairo_font_extents_t *
)
(defcfun "g_signal_connect_data"
:unsigned-long
(instance :pointer) ;gpointer
(detailed_signal :string) ;const gchar *
(c_handler :pointer) ;GCallback
(data :pointer) ;gpointer
(destroy_data :pointer) ;GClosureNotify
(connect_flags GConnectFlags))
(defcfun "gdk_screen_get_height_mm"
:int
(screen :pointer) ;GdkScreen *
)
(defcfun "cairo_surface_create_similar"
:pointer
(arg0 :pointer) ;cairo_surface_t *
(arg1 cairo_content_t)
(arg2 :int) ;int
(arg3 :int) ;int
)
(defcfun "gtk_adjustment_set_value"
:void
(adjustment :pointer) ;GtkAdjustment *
(value :double) ;gdouble
)
(defcfun "cairo_pattern_reference"
:pointer
(arg0 :pointer) ;cairo_pattern_t *
)
(defcfun "cairo_glyph_extents"
:void
(arg0 :pointer) ;cairo_t *
(arg1 :pointer) ;cairo_glyph_t *
(arg2 :int) ;int
(arg3 :pointer) ;cairo_text_extents_t *
)
(defcfun "gtk_widget_hide_all"
:void
(widget :pointer) ;GtkWidget *
)
(defcfun "gtk_widget_destroy"
:void
(widget :pointer) ;GtkWidget *
)
(defcfun "gtk_tree_view_new_with_model"
:pointer
(model :pointer) ;GtkTreeModel *
)
(defcfun "gdk_display_flush"
:void
(display :pointer) ;GdkDisplay *
)
(defcfun "gtk_tree_view_column_add_attribute"
:void
(tree_column :pointer) ;GtkTreeViewColumn *
(cell_renderer :pointer) ;GtkCellRenderer *
(attribute :string) ;const gchar *
(column :int) ;gint
)
(defcfun "cairo_font_face_status"
cairo_status_t
(arg0 :pointer) ;cairo_font_face_t *
)
(defcfun "g_value_set_string"
:void
(value :pointer) ;GValue *
(v_string :string) ;const gchar *
)
(defcfun "cairo_get_target"
:pointer
(arg0 :pointer) ;cairo_t *
)
(defcfun "gtk_window_resize"
:void
(window :pointer) ;GtkWindow *
(width :int) ;gint
(height :int) ;gint
)
(defcfun "gtk_widget_modify_bg"
:void
(widget :pointer) ;GtkWidget *
(state GtkStateType)
(color :pointer) ;const GdkColor *
)
(defcfun "cairo_pattern_destroy"
:void
(arg0 :pointer) ;cairo_pattern_t *
)
(defcfun "gtk_list_store_newv"
:pointer
(n_columns :int) ;gint
(types :pointer) ;GType *
)
(defcfun "gtk_scale_set_digits"
:void
(scale :pointer) ;GtkScale *
(digits :int) ;gint
)
(defcfun "gdk_gc_set_rgb_fg_color"
[937 lines skipped]
More information about the Mcclim-cvs
mailing list