[rep-gtk: 9/12] Add support for GtkUIManager, GtkActionGroup and GtkAction



commit bcb1a9f23cfbec767f1c8ea7c502220116e6ae13
Author: Juergen Hoetzel <juergen archlinux org>
Date:   Sun Aug 30 17:53:47 2009 +0200

    Add support for GtkUIManager, GtkActionGroup and GtkAction

 Makefile.in       |    2 +-
 gtk.defs          |   35 ++++++++++++++++-
 gtkuimanager.defs |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.in b/Makefile.in
index 6f8f13e..7195933 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -105,5 +105,5 @@ gtk-2 :
 	mkdir gtk-2
 
 # hand-needed dependences
-gtk-glue.c : gtk.defs gtktext.defs gtktree.defs gtkbuilder.defs build-gtk.jlc
+gtk-glue.c : gtk.defs gtktext.defs gtktree.defs gtkbuilder.defs gtkuimanager.defs build-gtk.jlc
 
diff --git a/gtk.defs b/gtk.defs
index 50d33ef..dff323b 100644
--- a/gtk.defs
+++ b/gtk.defs
@@ -4,7 +4,7 @@
 
 ;; GtkButton, GtkToggleButton, GtkCheckButton, GtkRadioButton, GtkFontButton
 ;; GtkLinkButton, GtkColorButton, GtkVolumeButton, GtkStatusIcon
-;; GtkBuilder
+;; GtkBuilder GtkUIManager GtkActionGroup GtkAction
 
 ;; updated for gtk+ 1.3:
 
@@ -5172,11 +5172,44 @@
   bool
   ((GtkAccelLabel label)))
 
+
+;; GtkAccelLabel
+
+;; GtkAction
+
+(define-object GtkAction (GtkObject))
+
+(define-func gtk_action_new
+  GtkAction 
+  ((string name)
+   (string label (= 0))
+   (string tooltip (=  0)) 
+   (string stock_id (= 0))))
+
+(define-object GtkActionGroup (GtkObject))
+
+(define-func gtk_action_group_new
+  GtkActionGroup
+  ((string label)))
+
+(define-func gtk_action_group_add_action
+  none
+  ((GtkActionGroup group)
+   (GtkAction action)))
+
+(define-func gtk_action_group_add_action_with_accel
+  none
+  ((GtkActionGroup group)
+   (GtkAction action)
+   (string accelerator)))
+
+
 ;; More defs files
 
 (include "gtktext.defs")
 (include "gtktree.defs")
 (include "gtkbuilder.defs")
+(include "gtkuimanager.defs")
 
 ;; Options
 
diff --git a/gtkuimanager.defs b/gtkuimanager.defs
new file mode 100644
index 0000000..cad8e05
--- /dev/null
+++ b/gtkuimanager.defs
@@ -0,0 +1,111 @@
+;; -*- lisp -*-
+
+(define-flags GtkUIManagerItemType
+  (auto  GTK_UI_MANAGER_AUTO)
+  (menubar  GTK_UI_MANAGER_MENUBAR)
+  (menu  GTK_UI_MANAGER_MENU)
+  (toolbar  GTK_UI_MANAGER_TOOLBAR)
+  (placeholder  GTK_UI_MANAGER_PLACEHOLDER)
+  (popup  GTK_UI_MANAGER_POPUP)
+  (menuitem  GTK_UI_MANAGER_MENUITEM)
+  (toolitem  GTK_UI_MANAGER_TOOLITEM)
+  (separator  GTK_UI_MANAGER_SEPARATOR)
+  (accelerator  GTK_UI_MANAGER_ACCELERATOR)
+  (popup  GTK_UI_MANAGER_POPUP))
+
+(define-object GtkUIManager (GObject))
+
+(define-func gtk_ui_manager_new
+  GtkUIManager
+  ())
+
+(define-func gtk_ui_manager_get_add_tearoffs 
+  (bool)
+  ((GtkUIManager self)))
+
+(define-func gtk_ui_manager_set_add_tearoffs 
+  none
+  ((GtkUIManager self)
+   (bool add_tearoffs)))
+
+(define-func gtk_ui_manager_insert_action_group 
+  none
+  ((GtkUIManager   self)
+   (GtkActionGroup action_group)
+   (int pos)))
+
+(define-func gtk_ui_manager_remove_action_group 
+  none
+  ((GtkUIManager   self)
+   (GtkActionGroup action_group)))
+
+
+;; (define-func gtk_ui_manager_get_action_groups 
+;;   ;; Fixme We need to wrap slist
+;;   list 
+;;   ((GtkUIManager self)))
+
+(define-func gtk_ui_manager_get_accel_group 
+  (GtkAccelGroup)
+  ((GtkUIManager self)))
+
+(define-func gtk_ui_manager_get_widget 
+  (GtkWidget)
+  ((GtkUIManager self)
+   (string path)))
+
+
+;; (define-func gtk_ui_manager_get_toplevels
+;;   FIXME: We need to wrap slist
+;;   slist 
+;;   ((GtkUIManager self)
+;;    (GtkUIManagerItemType  types)))
+
+(define-func gtk_ui_manager_get_action
+  (GtkAction)
+  ((GtkUIManager self)
+   (string path)))
+  
+(define-func gtk_ui_manager_new_merge_id 
+  (int)
+  ((GtkUIManager self)))
+
+
+;; (define-func gtk_ui_manager_add_ui_from_string 
+;;   (int)
+;;   ((GtkUIManager self)
+;;    FIXME: We need to wrap size-limited strings
+;;    const gchar  *buffer, 
+;;    gssize        length)
+;;   (gerror-arg t))
+
+(define-func gtk_ui_manager_add_ui_from_file
+  (int)
+  ((GtkUIManager self)
+   (string filename))
+  (gerror-arg t))   
+
+(define-func gtk_ui_manager_add_ui 
+  none
+  ((GtkUIManager self)
+   (int merge_id)
+   (string path)
+   (string name)
+   (string action)
+   (GtkUIManagerItemType type)
+   (bool             top)))
+
+(define-func gtk_ui_manager_remove_ui
+  none
+  ((GtkUIManager self)
+   (int merge_id)))
+
+(define-func gtk_ui_manager_get_ui 
+  (string)
+  ((GtkUIManager self)))
+
+(define-func gtk_ui_manager_ensure_update 
+  none
+  ((GtkUIManager self)))
+  
+  
\ No newline at end of file



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]