From 5c7296a0dc78174654aa243805fdc0862b267c92 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Wed, 18 Mar 2009 18:04:26 +0300 Subject: [PATCH] added GtkWidgetx --- gtk/gtk.asd | 1 + gtk/gtk.generated-classes.lisp | 134 ++++++----- gtk/gtk.object.lisp | 11 + gtk/gtk.package.lisp | 3 - gtk/gtk.widget.lisp | 493 +++++++++++++++++++++++++++++++++++++++- 5 files changed, 575 insertions(+), 67 deletions(-) create mode 100644 gtk/gtk.object.lisp diff --git a/gtk/gtk.asd b/gtk/gtk.asd index 0be89b8..3046e3e 100644 --- a/gtk/gtk.asd +++ b/gtk/gtk.asd @@ -3,6 +3,7 @@ :serial t :components ((:file "gtk.package") (:file "gtk.misc") + (:file "gtk.object") (:file "gtk.objects") (:file "gtk.generated-classes") (:file "gtk.main_loop_events") diff --git a/gtk/gtk.generated-classes.lisp b/gtk/gtk.generated-classes.lisp index 21fed18..9724f75 100644 --- a/gtk/gtk.generated-classes.lisp +++ b/gtk/gtk.generated-classes.lisp @@ -7,15 +7,15 @@ (:export t :type-initializer "gtk_size_group_mode_get_type") (:none 0) (:horizontal 1) (:vertical 2) (:both 3)) +(define-g-enum "GtkUnit" unit (:export t :type-initializer "gtk_unit_get_type") + (:pixel 0) (:points 1) (:inch 2) (:mm 3)) + (define-g-enum "GtkPrintStatus" print-status (:export t :type-initializer "gtk_print_status_get_type") (:initial 0) (:preparing 1) (:generating-data 2) (:sending-data 3) (:pending 4) (:pending-issue 5) (:printing 6) (:finished 7) (:finished-aborted 8)) -(define-g-enum "GtkUnit" unit (:export t :type-initializer "gtk_unit_get_type") - (:pixel 0) (:points 1) (:inch 2) (:mm 3)) - (define-g-enum "GtkRecentSortType" recent-sort-type (:export t :type-initializer "gtk_recent_sort_type_get_type") (:none 0) (:mru 1) (:lru 2) (:custom 3)) @@ -38,16 +38,16 @@ "gtk_tree_view_column_sizing_get_type") (:grow-only 0) (:autosize 1) (:fixed 2)) -(define-g-enum "GtkProgressBarStyle" progress-bar-style - (:export t :type-initializer "gtk_progress_bar_style_get_type") - (:continuous 0) (:discrete 1)) - (define-g-enum "GtkProgressBarOrientation" progress-bar-orientation (:export t :type-initializer "gtk_progress_bar_orientation_get_type") (:left-to-right 0) (:right-to-left 1) (:bottom-to-top 2) (:top-to-bottom 3)) +(define-g-enum "GtkProgressBarStyle" progress-bar-style + (:export t :type-initializer "gtk_progress_bar_style_get_type") + (:continuous 0) (:discrete 1)) + (define-g-enum "GtkUpdateType" update-type (:export t :type-initializer "gtk_update_type_get_type") (:continuous 0) (:discontinuous 1) (:delayed 2)) @@ -82,14 +82,14 @@ (:export t :type-initializer "gtk_toolbar_style_get_type") (:icons 0) (:text 1) (:both 2) (:both-horiz 3)) -(define-g-enum "GtkJustification" justification - (:export t :type-initializer "gtk_justification_get_type") - (:left 0) (:right 1) (:center 2) (:fill 3)) - (define-g-enum "GtkWrapMode" wrap-mode (:export t :type-initializer "gtk_wrap_mode_get_type") (:none 0) (:char 1) (:word 2) (:word-char 3)) +(define-g-enum "GtkJustification" justification + (:export t :type-initializer "gtk_justification_get_type") + (:left 0) (:right 1) (:center 2) (:fill 3)) + (define-g-enum "GtkButtonBoxStyle" button-box-style (:export t :type-initializer "gtk_button_box_style_get_type") (:default-style 0) (:spread 1) (:edge 2) (:start 3) (:end 4) @@ -108,14 +108,14 @@ (:export t :type-initializer "gtk_pack_direction_get_type") (:ltr 0) (:rtl 1) (:ttb 2) (:btt 3)) -(define-g-enum "GtkPolicyType" policy-type - (:export t :type-initializer "gtk_policy_type_get_type") - (:always 0) (:automatic 1) (:never 2)) - (define-g-enum "GtkCornerType" corner-type (:export t :type-initializer "gtk_corner_type_get_type") (:top-left 0) (:bottom-left 1) (:top-right 2) (:bottom-right 3)) +(define-g-enum "GtkPolicyType" policy-type + (:export t :type-initializer "gtk_policy_type_get_type") + (:always 0) (:automatic 1) (:never 2)) + (define-g-enum "GtkSensitivityType" sensitivity-type (:export t :type-initializer "gtk_sensitivity_type_get_type") (:auto 0) (:on 1) (:off 2)) @@ -562,28 +562,28 @@ (define-g-interface "GtkFileChooser" file-chooser (:export t :type-initializer "gtk_file_chooser_get_type") - (local-only file-chooser-local-only "local-only" "gboolean" - t t) + (use-preview-label file-chooser-use-preview-label + "use-preview-label" "gboolean" t t) (do-overwrite-confirmation file-chooser-do-overwrite-confirmation "do-overwrite-confirmation" "gboolean" t t) - (use-preview-label file-chooser-use-preview-label - "use-preview-label" "gboolean" t t) - (preview-widget-active file-chooser-preview-widget-active - "preview-widget-active" "gboolean" t t) - (show-hidden file-chooser-show-hidden "show-hidden" - "gboolean" t t) - (action file-chooser-action "action" "GtkFileChooserAction" - t t) + (select-multiple file-chooser-select-multiple + "select-multiple" "gboolean" t t) (extra-widget file-chooser-extra-widget "extra-widget" "GtkWidget" t t) + (show-hidden file-chooser-show-hidden "show-hidden" + "gboolean" t t) (file-system-backend file-chooser-file-system-backend "file-system-backend" "gchararray" nil nil) (preview-widget file-chooser-preview-widget "preview-widget" "GtkWidget" t t) (filter file-chooser-filter "filter" "GtkFileFilter" t t) - (select-multiple file-chooser-select-multiple - "select-multiple" "gboolean" t t) + (action file-chooser-action "action" "GtkFileChooserAction" + t t) + (local-only file-chooser-local-only "local-only" "gboolean" + t t) + (preview-widget-active file-chooser-preview-widget-active + "preview-widget-active" "gboolean" t t) (:cffi current-name file-chooser-current-name (:string :free-to-foreign t :encoding :utf-8) nil "gtk_file_chooser_set_current_name") @@ -630,24 +630,24 @@ (define-g-interface "GtkRecentChooser" recent-chooser (:export t :type-initializer "gtk_recent_chooser_get_type") - (show-icons recent-chooser-show-icons "show-icons" - "gboolean" t t) - (local-only recent-chooser-local-only "local-only" - "gboolean" t t) + (select-multiple recent-chooser-select-multiple + "select-multiple" "gboolean" t t) (filter recent-chooser-filter "filter" "GtkRecentFilter" t t) (show-tips recent-chooser-show-tips "show-tips" "gboolean" t t) - (limit recent-chooser-limit "limit" "gint" t t) - (select-multiple recent-chooser-select-multiple - "select-multiple" "gboolean" t t) - (sort-type recent-chooser-sort-type "sort-type" - "GtkRecentSortType" t t) (recent-manager recent-chooser-recent-manager "recent-manager" "GtkRecentManager" nil nil) + (limit recent-chooser-limit "limit" "gint" t t) (show-not-found recent-chooser-show-not-found "show-not-found" "gboolean" t t) + (sort-type recent-chooser-sort-type "sort-type" + "GtkRecentSortType" t t) + (show-icons recent-chooser-show-icons "show-icons" + "gboolean" t t) (show-private recent-chooser-show-private "show-private" + "gboolean" t t) + (local-only recent-chooser-local-only "local-only" "gboolean" t t)) (define-g-interface "GtkToolShell" tool-shell @@ -698,7 +698,20 @@ "gchararray" t t) (tooltip-text widget-tooltip-text "tooltip-text" "gchararray" t t) - (window widget-window "window" "GdkWindow" t nil))) + (window widget-window "window" "GdkWindow" t nil) + (:cffi direction widget-direction text-direction + "gtk_widget_get_direction" "gtk_widget_set_direction") + (:cffi composite-name widget-composite-name + (g-string :free-from-foreign t :free-to-foreign t) + "gtk_widget_get_composite_name" + "gtk_widget_set_composite_name") + (:cffi redraw-on-allocate widget-redraw-on-allocate + :boolean nil "gtk_widget_set_redraw_on_allocate") + (:cffi accessible widget-accessible g-object + "gtk_widget_get_accessible" nil) + (:cffi tooltip-window widget-tooltip-window g-object + "gtk_widget_get_tooltip_window" + "gtk_window_set_tooltip_window"))) (define-g-object-class "GtkContainer" container (:superclass widget :export t :interfaces @@ -708,7 +721,16 @@ "guint" t t) (resize-mode container-resize-mode "resize-mode" "GtkResizeMode" t t) - (child container-child "child" "GtkWidget" nil t))) + (child container-child "child" "GtkWidget" nil t) + (:cffi focus-child container-focus-child g-object + "gtk_container_get_focus_child" + "gtk_container_set_focus_child") + (:cffi vadjustment-child container-vadjustment-child + g-object "gtk_container_get_vadjustment_child" + "gtk_container_set_vadjustment_child") + (:cffi hadjustment-child container-hadjustment-child + g-object "gtk_container_get_hadjustment_child" + "gtk_container_set_hadjustment_child"))) (define-g-object-class "GtkBin" bin (:superclass container :export t :interfaces @@ -1497,12 +1519,6 @@ :type-initializer "gtk_recent_chooser_widget_get_type") nil) -(define-g-object-class "GtkFileChooserDefault" file-chooser-default - (:superclass v-box :export t :interfaces - ("AtkImplementorIface" "GtkBuildable" "GtkFileChooser" - "GtkFileChooserEmbed")) - nil) - (define-g-object-class "GtkHBox" h-box (:superclass box :export t :interfaces ("AtkImplementorIface" "GtkBuildable") @@ -1879,12 +1895,6 @@ "update-policy" "GtkSpinButtonUpdatePolicy" t t) (value spin-button-value "value" "gdouble" t t))) -(define-g-object-class "GtkFileChooserEntry" file-chooser-entry - (:superclass entry :export t :interfaces - ("AtkImplementorIface" "GtkBuildable" "GtkCellEditable" - "GtkEditable")) - nil) - (define-g-object-class "GtkRuler" ruler (:superclass widget :export t :interfaces ("AtkImplementorIface" "GtkBuildable") @@ -2453,35 +2463,35 @@ "gtk-enable-tooltips" "gboolean" t t) (gtk-button-images settings-gtk-button-images "gtk-button-images" "gboolean" t t) - (gtk-toolbar-style settings-gtk-toolbar-style - "gtk-toolbar-style" "GtkToolbarStyle" t t) - (gtk-toolbar-icon-size settings-gtk-toolbar-icon-size - "gtk-toolbar-icon-size" "GtkIconSize" t t) - (gtk-label-select-on-focus - settings-gtk-label-select-on-focus - "gtk-label-select-on-focus" "gboolean" t t) - (gtk-menu-images settings-gtk-menu-images - "gtk-menu-images" "gboolean" t t) (gtk-can-change-accels settings-gtk-can-change-accels "gtk-can-change-accels" "gboolean" t t) (gtk-menu-popup-delay settings-gtk-menu-popup-delay "gtk-menu-popup-delay" "gint" t t) (gtk-menu-popdown-delay settings-gtk-menu-popdown-delay "gtk-menu-popdown-delay" "gint" t t) - (gtk-color-palette settings-gtk-color-palette - "gtk-color-palette" "gchararray" t t) (gtk-entry-select-on-focus settings-gtk-entry-select-on-focus "gtk-entry-select-on-focus" "gboolean" t t) (gtk-entry-password-hint-timeout settings-gtk-entry-password-hint-timeout "gtk-entry-password-hint-timeout" "guint" t t) + (gtk-label-select-on-focus + settings-gtk-label-select-on-focus + "gtk-label-select-on-focus" "gboolean" t t) + (gtk-menu-images settings-gtk-menu-images + "gtk-menu-images" "gboolean" t t) (gtk-scrolled-window-placement settings-gtk-scrolled-window-placement "gtk-scrolled-window-placement" "GtkCornerType" t t) (gtk-menu-bar-popup-delay settings-gtk-menu-bar-popup-delay - "gtk-menu-bar-popup-delay" "gint" t t))) + "gtk-menu-bar-popup-delay" "gint" t t) + (gtk-color-palette settings-gtk-color-palette + "gtk-color-palette" "gchararray" t t) + (gtk-toolbar-style settings-gtk-toolbar-style + "gtk-toolbar-style" "GtkToolbarStyle" t t) + (gtk-toolbar-icon-size settings-gtk-toolbar-icon-size + "gtk-toolbar-icon-size" "GtkIconSize" t t))) (define-g-object-class "GtkRcStyle" rc-style (:superclass g-object :export t :interfaces nil diff --git a/gtk/gtk.object.lisp b/gtk/gtk.object.lisp new file mode 100644 index 0000000..fca168c --- /dev/null +++ b/gtk/gtk.object.lisp @@ -0,0 +1,11 @@ +(in-package :gtk) + +(defcstruct %gtk-object + (parent-instance gobject::%g-initially-unowned) + (flags :uint32)) + +(defun gtk-object-flags-as-integer (object) + (foreign-slot-value (pointer object) '%gtk-object 'flags)) + +(defun (setf gtk-object-flags-as-integer) (new-value object) + (setf (foreign-slot-value (pointer object) '%gtk-object 'flags) new-value)) \ No newline at end of file diff --git a/gtk/gtk.package.lisp b/gtk/gtk.package.lisp index c8fc5ff..ab19f54 100644 --- a/gtk/gtk.package.lisp +++ b/gtk/gtk.package.lisp @@ -3,9 +3,6 @@ (:export #:register-object-type #:gtk-main #:gtk-main-quit - #:gtk-widget-queue-draw - #:gtk-widget-show-all - #:gtk-widget-create-pango-layout #:dialog-run #:object-destroy #:text-buffer-insert diff --git a/gtk/gtk.widget.lisp b/gtk/gtk.widget.lisp index d94695e..15336ff 100644 --- a/gtk/gtk.widget.lisp +++ b/gtk/gtk.widget.lisp @@ -2,12 +2,501 @@ ; TODO: GtkWidget +(defun widget-flags (widget) + (convert-from-foreign (gtk-object-flags-as-integer widget) 'widget-flags)) + +(defun (setf widget-flags) (new-value widget) + (setf (gtk-object-flags-as-integer widget) + (convert-to-foreign new-value 'widget-flags)) + new-value) + +(export 'widget-flags) + +(defcstruct %gtk-requisition + (width :int) + (height :int)) + +(defcstruct %gtk-allocation + (x :int) + (y :int) + (width :int) + (height :int)) + +(defcstruct %gtk-widget + (object %gtk-object) + (private-flags :uint16) + (state state-type) + (saved-state state-type) + (name (:pointer :char)) + (style :pointer) + (requisition %gtk-requisition) + (allocation %gtk-allocation) + (window :pointer) + (parent :pointer)) + +(defun widget-state (widget) + (foreign-slot-value (pointer widget) '%gtk-widget 'state)) + +(export 'widget-state) +(defun widget-saved-state (widget) + (foreign-slot-value (pointer widget) '%gtk-widget 'saved-state)) + +(export 'widget-saved-state) + +(defmacro widget-p-fn (type) + (let ((name (intern (format nil "WIDGET-~A-P" (symbol-name type)) (find-package :gtk)))) + `(progn (defun ,name (widget) + (member ,type (widget-flags widget))) + (export ',name)))) + +(widget-p-fn :toplevel) +(widget-p-fn :no-window) +(widget-p-fn :realized) +(widget-p-fn :mapped) +(widget-p-fn :visible) +(widget-p-fn :sensitive) +(widget-p-fn :parent-sensitive) +(widget-p-fn :can-focus) +(widget-p-fn :has-focus) +(widget-p-fn :can-default) +(widget-p-fn :has-default) +(widget-p-fn :has-grab) +(widget-p-fn :rc-style) +(widget-p-fn :composite-child) +(widget-p-fn :no-reparent) +(widget-p-fn :app-paintable) +(widget-p-fn :receives-default) +(widget-p-fn :double-buffered) +(widget-p-fn :no-show-all) + +(defcfun (widget-unparent "gtk_widget_unparent") :void + (widget g-object)) + +(export 'widget-unparent) + +(defcfun gtk-widget-show :void + (widget g-object)) + (defcfun gtk-widget-show-all :void + (widget g-object)) + +(defun widget-show (widget &key (all t)) + (if all + (gtk-widget-show-all widget) + (gtk-widget-show widget))) + +(export 'widget-show) + +(defcfun (widget-show-now "gtk_widget_show_now") :void + (widget g-object)) + +(export 'widget-show-now) + +(defcfun gtk-widget-hide :void + (widget g-object)) + +(defcfun gtk-widget-hide-all :void + (widget g-object)) + +(defun widget-hide (widget &key (all t)) + (if all + (gtk-widget-hide-all widget) + (gtk-widget-hide widget))) + +(defcfun (widget-map "gtk_widget_map") :void + (widget g-object)) + +(export 'widget-map) + +(defcfun (widget-unmap "gtk_widget_unmap") :void + (widget g-object)) + +(export 'widget-unmap) + +(defcfun (widget-realize "gtk_widget_realize") :void + (width g-object)) + +(export 'widget-realize) + +(defcfun (widget-unrealize "gtk_widget_unrealize") :void + (width g-object)) + +(export 'widget-unrealize) + +(defcfun (widget-queue-draw "gtk_widget_queue_draw") :void + (widget (g-object widget))) + +(export 'widget-queue-draw) + +(defcfun (widget-queue-resize "gtk_widget_queue_resize") :void (widget (g-object widget))) -(defcfun gtk-widget-queue-draw :void +(export 'widget-queue-resize) + +(defcfun (widget-queue-resize-no-redraw "gtk_widget_queue_resize_no_redraw") :void (widget (g-object widget))) -(defcfun gtk-widget-create-pango-layout (g-object gdk::pango-layout) +(export 'widget-queue-resize-no-redraw) + +; TODO: gtk_widget_get_child_requisition + +; TODO: gtk_widget_size_allocate + +(defcfun (widget-add-accelerator "gtk_widget_add_accelerator") :void + (widget g-object) + (accel-signal :string) + (accel-group g-object) + (accel-key :uint) + (accel-mods gdk-modifier-type) + (accel-flags accel-flags)) + +(export 'widget-add-accelerator) + +(defcfun (widget-remove-accelerator "gtk_widget_remove_accelerator") :void + (widget g-object) + (accel-group g-object) + (accel-key :uint) + (accel-mods gdk-modifier-type)) + +(export 'widget-remove-accelerator) + +(defcfun (widget-set-accel-path "gtk_widget_set_accel_path") :void + (widget g-object) + (accel-path :string) + (accel-group g-object)) + +(export 'widget-set-accel-path) + +; TODO: gtk_widget_list_accel_closures + +(defcfun gtk-widget-can-activate-accel :boolean + (widget g-object) + (signal-id :uint)) + +(defun widget-can-activate-accel (widget signal) + (when (stringp signal) (setf signal (g-signal-lookup signal (g-type-from-object widget)))) + (gtk-widget-can-activate-accel widget signal)) + +(export 'widget-can-activate-accel) + +; TODO: gtk_widget_event + +(defcfun (widget-activate "gtk_widget_activate") :boolean + (widget g-object)) + +(export 'widget-activate) + +(defcfun (widget-reparent "gtk_widget_reparent") :void + (widget g-object) + (new-parent g-object)) + +(export 'widget-reparent) + +(defcfun gtk-widget-intersect :boolean + (widget g-object) + (area (g-boxed-ptr rectangle)) + (intersection (g-boxed-ptr rectangle :in-out))) + +(defun widget-intersect (widget rectangle) + (let ((result (make-rectangle :x 0 :y 0 :width 0 :height 0))) + (when (gtk-widget-intersect widget rectangle result) + result))) + +(export 'widget-intersect) + +(defcfun (widget-focus-p "gtk_widget_is_focus") :boolean + (widget g-object)) + +(export 'widget-focus-p) + +(defcfun (widget-grab-focus "gtk_widget_grab_focus") :void + (widget g-object)) + +(export 'widget-grab-focus) + +(defcfun (widget-grab-default "gtk_widget_grab_default") :void + (widget g-object)) + +(export 'widget-grab-default) + +; TODO: gtk_widget_set_state + +; TODO: gtk_widget_set_parent_window + +; TODO: gtk_widget_get_parent_window + +; TODO: gtk_widget_set_extension_events + +; TODO: gtk_widget_get_extension_events + + +; fix ownership issues: +; TODO: gtk_widget_get_toplevel + +; TODO: gtk_widget_get_ancestor + +; TODO: gtk_widget_get_colormap + +; TODO: gtk_widget_get_visual + +(defcfun gtk-widget-get-pointer :void + (widget g-object) + (x (:pointer :int)) + (y (:pointer :int))) + +(defun widget-pointer (widget) + (with-foreign-objects ((x :int) (y :int)) + (gtk-widget-get-pointer widget x y) + (values (mem-ref x :int) (mem-ref y :int)))) + +(export 'widget-pointer) + +(defcfun (widget-contained-p "gtk_widget_is_ancestor") :boolean + (widget g-object) + (container g-object)) + +(export 'widget-contained-p) + +(defcfun gtk-widget-translate-coordinates :boolean + (src-widget g-object) + (dst-widget g-object) + (src-x :int) + (src-y :int) + (dst-x (:pointer :int)) + (dst-y (:pointer :int))) + +(defun widget-translate-coordinates (src-widget dst-widget src-x src-y) + (with-foreign-objects ((dst-x :int) (dst-y :int)) + (gtk-widget-translate-coordinates src-widget dst-widget src-x src-y dst-x dst-y) + (values (mem-ref dst-x :int) + (mem-ref dst-y :int)))) + +(export 'widget-translate-coordinates) + +(defcfun (widget-ensure-style "gtk_widget_ensure_style") :void + (widget g-object)) + +(export 'widget-ensure-style) + +(defcfun (widget-reset-rc-styles "gtk_widget_reset_rc_styles") :void + (widget g-object)) + +(export 'widget-reset-rc-styles) + +; TODO: gtk_widget_push_colormap + +; TODO: gtk_widget_pop_colormap + +; TODO: gtk_widget_set_default_colormap + +; TODO: gtk_widget_get_default_colormap + +; TODO: gtk_widget_get_default_style (ownership) + +; TODO: gtk_widget_get_default_visual + +(defcfun (widget-default-direction "gtk_widget_get_default_direction") text-direction) + +(defcfun gtk-widget-set-default-direction :void + (direction text-direction)) + +(defun (setf widget-default-direction) (new-value) + (gtk-widget-set-default-direction new-value)) + +(export 'widget-default-direction) + +; TODO: gtk_widget_shape_combine_mask + +; TODO: gtk_widget_input_shape_combine_mask + +(defcfun gtk-widget-path :void + (widget g-object) + (path-length (:pointer :uint)) + (path (:pointer (:pointer :char))) + (path-reversed (:pointer (:pointer :char)))) + +(defcfun gtk-widget-class-path :void + (widget g-object) + (path-length (:pointer :uint)) + (path (:pointer (:pointer :char))) + (path-reversed (:pointer (:pointer :char)))) + +(defun widget-path (widget &key (path-type :name)) + (assert (typep path-type '(member :name :class))) + (with-foreign-object (path :pointer) + (ecase path-type + (:name (gtk-widget-path widget (null-pointer) path (null-pointer))) + (:class (gtk-widget-class-path widget (null-pointer) path (null-pointer)))) + (mem-ref path '(g-string :free-from-foreign t)))) + +(export 'widget-path) + +; TODO: gtk_widget_modify_style + +; TODO: gtk_widget_get_modifier_style + +; TODO: gtk_widget_modify_fg + +; TODO: gtk_widget_modify_bg + +; TODO: gtk_widget_modify_text + +; TODO: gtk_widget_modify_base + +; TODO: gtk_widget_modify_font + +; TODO: gtk_widget_modify_cursor + +(defcfun (widget-create-pango-context "gtk_widget_create_pango_context") g-object + (widget g-object)) + +(export 'widget-create-pango-context) + +(defcfun (widget-get-pango-context "gtk_widget_get_pango_context") g-object + (widget g-object)) + +(export 'widget-get-pango-context) + +(defcfun (widget-create-pango-layout "gtk_widget_create_pango_layout") (g-object gdk::pango-layout) (widget (g-object widget)) (text :string)) + +(export 'widget-create-pango-layout) + +(defcfun (widget-render-icon "gtk_widget_render_icon") g-object + (widget g-object) + (stock-id :string) + (size icon-size) + (detail :string)) + +(export 'widget-render-icon) + +(defcfun (widget-push-composite-child "gtk_widget_push_composite_child") :void + (widget g-object)) + +(export 'widget-push-composite-child) + +(defcfun (widget-pop-composite-child "gtk_widget_pop_composite_child") :void + (widget g-object)) + +(export 'widget-pop-composite-child) + +(defcfun (widget-queue-draw-area "gtk_widget_queue_draw_area") :void + (widget g-object) + (x :int) + (y :int) + (width :int) + (height :int) + +(export 'widget-queue-draw-area)) + +(defcfun (widget-reset-shapes "gtk_widget_reset_shapes") :void + (widget g-object)) + +(export 'widget-reset-shapes) + +(defcfun (widget-set-scroll-adjustments "gtk_widget_set_scroll_adjustments") :boolean + (widget g-object) + (hadjustment g-object) + (vadjustment g-object)) + +(export 'widget-set-scroll-adjustments) + +; TODO: gtk_widget_class_install_style_property + +; TOOD: gtk_widget_class_install_style_property_parser + +; TODO: gtk_widget_class_find_style_property + +; TODO: gtk_widget_class_list_style_properties + +; TODO: gtk_widget_region_intersect + +; TODO: gtk_widget_send_expose + +; TODO: gtk_widget_style_get_property + +(defcfun (widget-child-focus "gtk_widget_child_focus") :boolean + (widget g-object) + (direction direction-type)) + +(export 'widget-child-focus) + +(defcfun (widget-freeze-child-notify "gtk_widget_freeze_child_notify") :void + (widget g-object)) + +(export 'widget-freeze-child-notify) + +(defcfun (widget-settings "gtk_widget_get_settings") g-object + (widget g-object)) + +(export 'widget-settings) + +; TODO: gtk_widget_get_clipboard + +(defcfun (widget-display "gtk_widget_get_display") g-object + (widget g-object)) + +(export 'widget-display) + +(defcfun (widget-root-window "gtk_widget_get_root_window") g-object + (widget g-object)) + +(export 'widget-root-window) + +(defcfun (widget-screen "gtk_widget_get_screen") g-object + (widget g-object)) + +(export 'widget-screen) + +(defcfun (widget-has-screen "gtk_widget_has_screen") :boolean + (widget g-object)) + +(export 'widget-has-screen) + +; TODO: gtk_widget_set_child_visible + +(defcfun (widget-thaw-child-notify "gtk_widget_thaw_child_notify") :void + (widget g-object)) + +(export 'widget-thaw-child-notify) + +; TODO: gtk_widget_list_mnemonic_labels + +(defcfun (widget-add-mnemonic-label "gtk_widget_add_mnemonic_label") :void + (widget g-object) + (label g-object)) + +(export 'widget-add-mnemonic-label) + +(defcfun (widget-remove-mnemonic-label "gtk_widget_remove_mnemonic_label") :void + (widget g-object) + (label g-object)) + +(export 'widget-remove-mnemonic-label) + +(defcfun (widget-action "gtk_widget_get_action") g-object + (widget g-object)) + +(export 'widget-action) + +(defcfun (widget-composited-p "gtk_widget_is_composited") :boolean + (widget g-object)) + +(export 'widget-composited-p) + +(defcfun (widget-error-bell "gtk_widget_error_bell") :void + (widget g-object)) + +(export 'widget-error-bell) + +(defcfun (widget-trigger-tooltip-query "gtk_tooltip_trigger_tooltip_query") :void + (widget g-object)) + +(export 'widget-trigger-tooltip-query) + +(defcfun (widget-snapshot "gtk_widget_get_snapshot") g-object + (widget g-object) + (clip-rectangle (g-boxed-ptr rectangle))) + +(export 'widget-snapshot) \ No newline at end of file -- 1.7.10.4