(:cffi gtk::search-position-func gtk::tree-view-search-position-func nil nil gtk::tree-view-set-search-position-func)
(:cffi gtk::row-separator-func gtk::tree-view-row-separator-func nil nil gtk::tree-view-set-row-separartor-func))
("GtkCellView"
- (:cffi gtk::displayed-row gtk::cell-view-displayed-row (g-boxed-ref gtk::tree-path) "gtk_cell_view_get_displayed_row" "gtk_cell_view_set_displayed_row"))))))
\ No newline at end of file
+ (:cffi gtk::displayed-row gtk::cell-view-displayed-row (g-boxed-ref gtk::tree-path) "gtk_cell_view_get_displayed_row" "gtk_cell_view_set_displayed_row"))
+ ("GtkComboBox"
+ (:cffi gtk::active-iter gtk::combo-box-active-iter (g-boxed-ref gtk::tree-iter) gtk::combo-box-get-active-iter "gtk_combo_box_set_active_iter")
+ (:cffi gtk::row-separator-func gtk::combo-box-separator-func nil nil gtk::combo-box-set-separator-func))
+ ("GtkMenu"
+ (:cffi gtk::screen gtk::menu-screen g-object nil "gtk_menu_set_screen"))
+ ("GtkToolItem"
+ (:cffi gtk::expand gtk::tool-item-expand :boolean "gtk_tool_item_get_expand" "gtk_tool_item_set_expand")
+ (:cffi gtk::use-drag-window gtk::tool-item-use-drag-window :boolean "gtk_tool_item_get_use_drag_window" "gtk_tool_item_set_use_drag_window")
+ (:cffi gtk::icon-size gtk::tool-item-icon-size gtk::icon-size "gtk_tool_item_get_icon_size" nil)
+ (:cffi gtk::orientation gtk::tool-item-orientation gtk::orientation "gtk_tool_item_get_orientation" nil)
+ (:cffi gtk::toolbar-style gtk::tool-item-toolbar-style gtk::toolbar-style "gtk_tool_item_get_toolbar_style" nil)
+ (:cffi gtk::relief-style gtk::tool-item-relief-style gtk::relief-style "gtk_tool_item_get_relief_style" nil))
+ ("GtkMenuToolButton"
+ (:cffi gtk::arrow-tooltip-text gtk::menu-tool-button-arrow-tooltip-text :string nil "gtk_menu_tool_button_set_arrow_tooltip_text")
+ (:cffi gtk::arrow-tooltip-markup gtk::menu-tool-button-arrow-tooltip-markup :string nil "gtk_menu_tool_button_set_arrow_tooltip_markup"))))))
\ No newline at end of file
(:file "gtk.icon-view")
(:file "gtk.cell-layout")
(:file "gtk.cell-renderer")
+ (:file "gtk.combo-box")
+ (:file "gtk.menu")
(:file "gtk.dialog.example")
--- /dev/null
+(in-package :gtk)
+
+(defcfun gtk-combobox-get-active-iter :boolean
+ (combo-box g-object)
+ (iter (g-boxed-ref tree-iter)))
+
+(defun combobox-get-active-iter (combo-box)
+ (let ((i (make-instance 'tree-iter)))
+ (if (gtk-combobox-get-active-iter combo-box i)
+ i
+ (release i))))
+
+(defcfun (combo-box-active-text "gtk_combo_box_get_active_text") (:string :free-from-foreign t)
+ (combo-box g-object))
+
+(export 'combo-box-active-text)
+
+(defcfun (combo-box-popup "gtk_combo_box_popup") :void
+ (combo-box g-object))
+
+(export 'combo-box-popup)
+
+(defcfun (combo-box-popdown "gtk_combo_box_popdown") :void
+ (combo-box g-object))
+
+(export 'combo-box-popdown)
+
+(defcfun (combo-box-get-popup-accessible "gtk_combo_box_get_popup_accessible") g-object
+ (combo-box g-object))
+
+(export 'combo-box-get-popup-accessible)
+
+(defcfun gtk-combo-box-set-row-separator-func :void
+ (combo-box g-object)
+ (func :pointer)
+ (data :pointer)
+ (destroy-notify :pointer))
+
+(defun combo-box-set-row-separator-func (combo-box func)
+ (gtk-combo-box-set-row-separator-func combo-box
+ (callback gtk-tree-view-row-separator-func-callback)
+ (allocate-stable-pointer func)
+ (callback stable-pointer-free-destroy-notify-callback)))
\ No newline at end of file
(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)
+ (preview-widget-active file-chooser-preview-widget-active
+ "preview-widget-active" "gboolean" t t)
(use-preview-label file-chooser-use-preview-label
"use-preview-label" "gboolean" t t)
- (extra-widget file-chooser-extra-widget "extra-widget"
- "GtkWidget" t t)
- (do-overwrite-confirmation
- file-chooser-do-overwrite-confirmation
- "do-overwrite-confirmation" "gboolean" t t)
(filter file-chooser-filter "filter" "GtkFileFilter" t t)
+ (show-hidden file-chooser-show-hidden "show-hidden"
+ "gboolean" t t)
(select-multiple file-chooser-select-multiple
"select-multiple" "gboolean" t t)
(action file-chooser-action "action" "GtkFileChooserAction"
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)
- (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)
- (local-only file-chooser-local-only "local-only" "gboolean"
- t t))
+ (file-system-backend file-chooser-file-system-backend
+ "file-system-backend" "gchararray" nil nil)
+ (extra-widget file-chooser-extra-widget "extra-widget"
+ "GtkWidget" t t)
+ (do-overwrite-confirmation
+ file-chooser-do-overwrite-confirmation
+ "do-overwrite-confirmation" "gboolean" t t))
(define-g-interface "GtkFileChooserEmbed" file-chooser-embed (:export t))
(define-g-interface "GtkRecentChooser" recent-chooser
(:export t :type-initializer "gtk_recent_chooser_get_type")
- (select-multiple recent-chooser-select-multiple
- "select-multiple" "gboolean" t t)
- (limit recent-chooser-limit "limit" "gint" t t)
- (show-tips recent-chooser-show-tips "show-tips" "gboolean"
- t t)
(recent-manager recent-chooser-recent-manager
"recent-manager" "GtkRecentManager" nil nil)
- (show-private recent-chooser-show-private "show-private"
- "gboolean" t t)
- (show-not-found recent-chooser-show-not-found
- "show-not-found" "gboolean" t t)
+ (show-tips recent-chooser-show-tips "show-tips" "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)
+ (limit recent-chooser-limit "limit" "gint" t t)
+ (show-not-found recent-chooser-show-not-found
+ "show-not-found" "gboolean" t t)
(filter recent-chooser-filter "filter" "GtkRecentFilter" t
t)
+ (show-private recent-chooser-show-private "show-private"
+ "gboolean" t t)
+ (show-icons recent-chooser-show-icons "show-icons"
+ "gboolean" t t)
(local-only recent-chooser-local-only "local-only"
- "gboolean" t t))
+ "gboolean" t t)
+ (select-multiple recent-chooser-select-multiple
+ "select-multiple" "gboolean" t t))
(define-g-interface "GtkToolShell" tool-shell
(:export t :type-initializer "gtk_tool_shell_get_type"))
:type-initializer "gtk_window_get_type")
((type gtk-window-type "type" "GtkWindowType" t nil)
(title gtk-window-title "title" "gchararray" t t)
- (role gtk-window-role "role" "gchararray" t t)
(startup-id gtk-window-startup-id "startup-id"
"gchararray" nil t)
+ (role gtk-window-role "role" "gchararray" t t)
(allow-shrink gtk-window-allow-shrink "allow-shrink"
"gboolean" t t)
(allow-grow gtk-window-allow-grow "allow-grow"
(popup-shown combo-box-popup-shown "popup-shown"
"gboolean" t nil)
(button-sensitivity combo-box-button-sensitivity
- "button-sensitivity" "GtkSensitivityType" t t)))
+ "button-sensitivity" "GtkSensitivityType" t t)
+ (:cffi active-iter combo-box-active-iter
+ (g-boxed-ref tree-iter) combo-box-get-active-iter
+ "gtk_combo_box_set_active_iter")
+ (:cffi row-separator-func combo-box-separator-func nil
+ nil combo-box-set-separator-func)))
(define-g-object-class "GtkComboBoxEntry" combo-box-entry
(:superclass combo-box :export t :interfaces
(visible-vertical tool-item-visible-vertical
"visible-vertical" "gboolean" t t)
(is-important tool-item-is-important "is-important"
- "gboolean" t t)))
+ "gboolean" t t)
+ (:cffi expand tool-item-expand :boolean
+ "gtk_tool_item_get_expand" "gtk_tool_item_set_expand")
+ (:cffi use-drag-window tool-item-use-drag-window
+ :boolean "gtk_tool_item_get_use_drag_window"
+ "gtk_tool_item_set_use_drag_window")
+ (:cffi icon-size tool-item-icon-size icon-size
+ "gtk_tool_item_get_icon_size" nil)
+ (:cffi orientation tool-item-orientation orientation
+ "gtk_tool_item_get_orientation" nil)
+ (:cffi toolbar-style tool-item-toolbar-style
+ toolbar-style "gtk_tool_item_get_toolbar_style" nil)
+ (:cffi relief-style tool-item-relief-style relief-style
+ "gtk_tool_item_get_relief_style" nil)))
(define-g-object-class "GtkToolButton" tool-button
(:superclass tool-item :export t :interfaces
(:superclass tool-button :export t :interfaces
("AtkImplementorIface" "GtkBuildable")
:type-initializer "gtk_menu_tool_button_get_type")
- ((menu menu-tool-button-menu "menu" "GtkMenu" t t)))
+ ((menu menu-tool-button-menu "menu" "GtkMenu" t t)
+ (:cffi arrow-tooltip-text
+ menu-tool-button-arrow-tooltip-text :string nil
+ "gtk_menu_tool_button_set_arrow_tooltip_text")
+ (:cffi arrow-tooltip-markup
+ menu-tool-button-arrow-tooltip-markup :string nil
+ "gtk_menu_tool_button_set_arrow_tooltip_markup")))
(define-g-object-class "GtkToggleToolButton" toggle-tool-button
(:superclass tool-button :export t :interfaces
"gboolean" t t)
(tearoff-title menu-tearoff-title "tearoff-title"
"gchararray" t t)
- (monitor menu-monitor "monitor" "gint" t t)))
+ (monitor menu-monitor "monitor" "gint" t t)
+ (:cffi screen menu-screen g-object nil
+ "gtk_menu_set_screen")))
(define-g-object-class "GtkRecentChooserMenu" recent-chooser-menu
(:superclass menu :export t :interfaces
--- /dev/null
+(in-package :gtk)
+
+(defcfun (menu-reorder-child "gtk_menu_reorder_child") :void
+ (menu g-object)
+ (child g-object)
+ (position :int))
+
+(export 'menu-reorder-child)
+
+(defcfun (menu-attach "gtk_menu_attach") :void
+ (menu g-object)
+ (child g-object)
+ (left-attach :uint)
+ (right-attach :uint)
+ (top-attach :uint)
+ (bottom-attach :uint))
+
+(export 'menu-attach)
+
+(defcfun gtk-menu-popup :void
+ (menu g-object)
+ (parent-menu-shell g-object)
+ (parent-menu-item g-object)
+ (menu-position-func :pointer)
+ (data :pointer)
+ (button :uint)
+ (activate-time :uint32))
+
+(defcallback gtk-menu-position-func-callback :void
+ ((menu g-object) (x :pointer) (y :pointer) (push-in :pointer) (data :pointer))
+ (restart-case
+ (multiple-value-bind (rx ry rpush-in) (funcall (get-stable-pointer-value data)
+ menu)
+ (setf (mem-ref x :int) rx
+ (mem-ref y :int) ry
+ (mem-ref push-in :boolean) rpush-in))
+ (return-zero () (setf (mem-ref x :int) 0
+ (mem-ref y :int) 0
+ (mem-ref push-in :boolean) nil))))
+
+(defun menu-popup (menu &key parent-menu-shell parent-menu-item position-func (button 0) (activate-time (gtk-get-current-event-time)))
+ (if position-func
+ (with-stable-pointer (ptr position-func)
+ (gtk-menu-popup menu parent-menu-shell parent-menu-item
+ (callback gtk-menu-position-func-callback)
+ ptr button activate-time))
+ (gtk-menu-popup menu parent-menu-shell parent-menu-item (callback gtk-menu-position-func-callback) (null-pointer) (null-pointer) activate-time)))
+
+(export 'menu-popup)
+
+(defcfun (menu-popdown "gtk_menu_popdown") :void
+ (menu g-object))
+
+(export 'menu-popdown)
+
+(defcfun (menu-reposition "gtk_menu_reposition") :void
+ (menu g-object))
+
+(export 'menu-reposition)
+
+; TODO: gtk_menu_attach_to_widget
+
+; TODO: gtk_menu_detach
+
+; TODO: gtk_menu_get_attach_widget
+
+; TODO: gtk_menu_get_for_attach_widget
+
+(defcfun (menu-shell-append "gtk_menu_shell_append") :void
+ (menu-shell g-object)
+ (child g-object))
+
+(export 'menu-shell-append)
+
+(defcfun (menu-shell-prepend "gtk_menu_shell_prepend") :void
+ (menu-shell g-object)
+ (child g-object))
+
+(export 'menu-shell-prepend)
+
+(defcfun (menu-shell-insert "gtk_menu_shell_insert") :void
+ (menu-shell g-object)
+ (child g-object)
+ (position :int))
+
+(export 'menu-shell-insert)
+
+(defcfun (menu-shell-deactivate "gtk_menu_shell_deactivate") :void
+ (menu-shell g-object))
+
+(export 'menu-shell-deactivate)
+
+(defcfun (menu-shell-select-item "gtk_menu_shell_select_item") :void
+ (menu-shell g-object)
+ (menu-item g-object))
+
+(export 'menu-shell-select-item)
+
+(defcfun gtk-menu-shell-select-first :void
+ (menu-shell g-object)
+ (search-sensitive :boolean))
+
+(defun menu-shell-select-first (menu-shell &optional (search-sensitive t))
+ (gtk-menu-shell-select-first menu-shell search-sensitive))
+
+(export 'menu-shell-select-first)
+
+(defcfun (menu-shell-deselect "gtk_menu_shell_deselect") :void
+ (menu-shell g-object))
+
+(export 'menu-shell-deselect)
+
+(defcfun gtk-menu-shell-activate-item :void
+ (menu-shell g-object)
+ (menu-item g-object)
+ (force-deactivate :boolean))
+
+(defun menu-shell-activate-item (menu-shell menu-item &optional force-deactivate)
+ (gtk-menu-shell-activate-item menu-shell menu-item force-deactivate))
+
+(export 'menu-shell-activate-item)
+
+(defcfun (menu-shell-cancel "gtk_menu_shell_cancel") :void
+ (menu-shell g-object))
+
+(export 'menu-shell-cancel)
+
+; TODO: GtkToolShell
+
+(defcfun (toolbar-insert "gtk_toolbar_insert") :void
+ (toolbar g-object)
+ (item g-object)
+ (pos :int))
+
+(export 'toolbar-insert)
+
+(defcfun (toolbar-item-index "gtk_toolbar_item_index") :int
+ (toolbar g-object)
+ (item g-object))
+
+(export 'toolbar-item-index)
+
+(defcfun (toolbar-items-count "gtk_toolbar_get_n_items") :int
+ (toolbar g-object))
+
+(export 'toolbar-items-count)
+
+(defcfun (toolbar-nth-item "gtk_toolbar_get_nth_item") g-object
+ (toolbar g-object)
+ (n :int))
+
+(export 'toolbar-nth-item)
+
+(defcfun (toolbar-get-drop-index "gtk_toolbar_get_drop_index") :int
+ (toolbar g-object)
+ (x :int)
+ (y :int))
+
+(export 'toolbar-get-drop-index)
+
+(defcfun (toolbar-set-drop-highlight-item "gtk_toolbar_set_drop_highlight_item") :void
+ (toolbar g-object)
+ (tool-item g-object)
+ (index :int))
+
+(export 'toolbar-set-drop-highlight-item)
+
+(defcfun (toolbar-unset-style "gtk_toolbar_unset_style") :void
+ (toolbar g-object))
+
+(export 'toolbar-unset-style)
+
+(defcfun (tool-item-retrieve-proxy-menu-item "gtk_tool_item_retrieve_proxy_menu_item") g-object
+ (tool-item g-object))
+
+(export 'tool-item-retrieve-proxy-menu-item)
+
+; TODO: gtk_tool_item_get_proxy_menu_item
+
+; TODO: gtk_tool_item_set_proxy_menu_item
+
+(defcfun (tool-item-rebuild-menu "gtk_tool_item_rebuild_menu") :void
+ (tool-item g-object))
+
+(export 'tool-item-rebuild-menu)
+
(in-package :gtk)
(defcallback stable-pointer-free-destroy-notify-callback :void ((data :pointer))
- (free-stable-pointer data))
\ No newline at end of file
+ (free-stable-pointer data))
+
+(defcfun gtk-get-current-event-time :uint32)
\ No newline at end of file