* src/gnome-utils/gw-gnome-utils-spec.scm: fix for new g-wrap.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6584 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Rob Browning
2002-01-09 21:53:10 +00:00
parent d3785be0da
commit 268fe1558d

View File

@@ -1,45 +1,31 @@
(define-module (g-wrapped gw-gnome-utils-spec))
(use-modules (g-wrap))
(use-modules (g-wrapped gw-glib-spec))
(use-modules (g-wrapped gw-engine-spec))
(use-modules (g-wrapped gw-app-utils-spec))
(debug-set! maxdepth 100000)
(debug-set! stack 2000000)
(let ((mod (gw:new-module "gw-gnome-utils")))
(define (standard-c-call-gen result func-call-code)
(list (gw:result-get-c-name result) " = " func-call-code ";\n"))
(define (add-standard-result-handlers! type c->scm-converter)
(define (standard-pre-handler result)
(let* ((ret-type-name (gw:result-get-proper-c-type-name result))
(ret-var-name (gw:result-get-c-name result)))
(list "{\n"
" " ret-type-name " " ret-var-name ";\n")))
(gw:type-set-pre-call-result-ccodegen! type standard-pre-handler)
(gw:type-set-post-call-result-ccodegen!
type
(lambda (result)
(let* ((scm-name (gw:result-get-scm-name result))
(c-name (gw:result-get-c-name result)))
(list
(c->scm-converter scm-name c-name)
" }\n")))))
(define-module (g-wrapped gw-gnome-utils-spec))
(gw:module-depends-on mod "gw-runtime")
(gw:module-depends-on mod "gw-engine")
(gw:module-depends-on mod "gw-glib")
(gw:module-depends-on mod "gw-app-utils")
(use-modules (g-wrap))
(gw:module-set-guile-module! mod '(g-wrapped gw-gnome-utils))
(use-modules (g-wrap gw-standard-spec))
(use-modules (g-wrap gw-wct-spec))
(use-modules (g-wrap gw-glib-spec))
(gw:module-set-declarations-ccodegen!
mod
(lambda (client-only?)
(use-modules (g-wrapped gw-engine-spec))
(use-modules (g-wrapped gw-app-utils-spec))
(let ((ws (gw:new-wrapset "gw-gnome-utils")))
(gw:wrapset-depends-on ws "gw-standard")
(gw:wrapset-depends-on ws "gw-wct")
(gw:wrapset-depends-on ws "gw-glib")
(gw:wrapset-depends-on ws "gw-engine")
(gw:wrapset-depends-on ws "gw-app-utils")
(gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnome-utils))
(gw:wrapset-add-cs-declarations!
ws
(lambda (wrapset client-wrapset)
(list
"#include <dialog-utils.h>\n"
"#include <druid-utils.h>\n"
@@ -56,38 +42,29 @@
(gw:wrap-function
mod
ws
'gnc:gnome-init
'<gw:scm>
"gnc_gnome_init"
'(((<gw:m-chars-caller-owned> gw:const) arg0)
((<gw:m-chars-caller-owned> gw:const) progname)
((<gw:m-chars-caller-owned> gw:const) version)
'(((<gw:mchars> caller-owned const) arg0)
((<gw:mchars> caller-owned const) progname)
((<gw:mchars> caller-owned const) version)
(<gw:scm> command-line))
"Initialize the GnuCash gnome system.")
(gw:wrap-function
mod
ws
'gnc:gnome-shutdown
'<gw:void>
"gnc_gnome_shutdown"
'()
"Shutdown the GnuCash gnome system.")
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:UIWidget>
"gncUIWidget" "const gncUIWidget")))
#t)
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:mdi-info*>
"GNCMDIInfo*" "const GNCMDIInfo*")))
#t)
(gw:wrap-as-wct ws '<gnc:UIWidget> "gncUIWidget" "const gncUIWidget")
(gw:wrap-as-wct ws '<gnc:mdi-info*> "GNCMDIInfo*" "const GNCMDIInfo*")
(gw:wrap-function
mod
ws
'gnc:mdi-has-apps?
'<gw:bool>
"gnc_mdi_has_apps"
@@ -95,7 +72,7 @@
"Return true if there are gnc mdi app windows open.")
(gw:wrap-function
mod
ws
'gnc:mdi-get-current
'<gnc:mdi-info*>
"gnc_mdi_get_current"
@@ -103,42 +80,28 @@
"Return the main window data structure for the application.")
(gw:wrap-function
mod
ws
'gnc:mdi-save
'<gw:void>
"gnc_mdi_save" '((<gnc:mdi-info*> mi)
((<gw:m-chars-caller-owned>) bookname))
((<gw:mchars> caller-owned) bookname))
"Save the MDI window configuration for the specified book")
(gw:wrap-function
mod
ws
'gnc:mdi-restore
'<gw:void>
"gnc_mdi_restore" '((<gnc:mdi-info*> mi)
((<gw:m-chars-caller-owned> gw:const) bookname))
((<gw:mchars> caller-owned const) bookname))
"Restore MDI window configuration for the specified book")
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:PrintSession*>
"PrintSession*" "const PrintSession*")))
#t)
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:PrintDialog*>
"PrintDialog*" "const PrintDialog*")))
#t)
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:PaperDialog*>
"PaperDialog*" "const PaperDialog*")))
#t)
(gw:wrap-as-wct ws '<gnc:PrintSession*> "PrintSession*" "const PrintSession*")
(gw:wrap-as-wct ws '<gnc:PrintDialog*> "PrintDialog*" "const PrintDialog*")
(gw:wrap-as-wct ws '<gnc:PaperDialog*> "PaperDialog*" "const PaperDialog*")
(gw:wrap-function
mod
ws
'gnc:print-session-create
'<gnc:PrintSession*>
"gnc_print_session_create"
@@ -146,7 +109,7 @@
"Start a new print session.")
(gw:wrap-function
mod
ws
'gnc:print-session-destroy
'<gw:void>
"gnc_print_session_destroy"
@@ -154,7 +117,7 @@
"Free a print session's resources")
(gw:wrap-function
mod
ws
'gnc:print-session-moveto
'<gw:void>
"gnc_print_session_moveto"
@@ -162,15 +125,15 @@
"Move the current point")
(gw:wrap-function
mod
ws
'gnc:print-session-text
'<gw:void>
"gnc_print_session_text"
'((<gnc:PrintSession*> p) ((<gw:m-chars-caller-owned> gw:const) text))
'((<gnc:PrintSession*> p) ((<gw:mchars> caller-owned const) text))
"Show some text in Courier 16")
(gw:wrap-function
mod
ws
'gnc:print-session-done
'<gw:void>
"gnc_print_session_done"
@@ -178,7 +141,7 @@
"Let the print context know you're finished with it.")
(gw:wrap-function
mod
ws
'gnc:print-session-print
'<gw:void>
"gnc_print_session_print"
@@ -186,40 +149,40 @@
"Show the GNOME print dialog to start printing.")
(gw:wrap-function
mod
ws
'gnc:error-dialog
'<gw:void>
"gnc_error_dialog"
'(((<gw:m-chars-caller-owned> gw:const) message))
'(((<gw:mchars> caller-owned const) message))
"Show ok dialog box with given error message.")
(gw:wrap-function
mod
ws
'gnc:verify-dialog
'<gw:bool>
"gnc_verify_dialog"
'(((<gw:m-chars-caller-owned> gw:const) message)
'(((<gw:mchars> caller-owned const) message)
(<gw:bool> yes_is_default))
"Show yes/no dialog box with given message.")
(gw:wrap-function
mod
ws
'gnc:info-dialog
'<gw:void>
"gnc_info_dialog"
'(((<gw:m-chars-caller-owned> gw:const) message))
'(((<gw:mchars> caller-owned const) message))
"Show ok dialog box with given message.")
(gw:wrap-function
mod
ws
'gnc:warning-dialog
'<gw:void>
"gnc_warning_dialog"
'(((<gw:m-chars-caller-owned> gw:const) message))
'(((<gw:mchars> caller-owned const) message))
"Show warning dialog box with given message.")
(gw:wrap-function
mod
ws
'gnc:add-extension
'<gw:void>
"gnc_add_extension"
@@ -227,34 +190,31 @@
"Add a menu extension.")
(gw:wrap-function
mod
ws
'gnc:html-encode-string
'<glib:g-chars-caller-owned>
"gnc_html_encode_string" '(((<gw:m-chars-caller-owned> gw:const) bookname)))
'(<gw:gchars> caller-owned)
"gnc_html_encode_string" '(((<gw:mchars> caller-owned const) bookname)))
(gw:wrap-function
mod
ws
'gnc:choose-radio-option-dialog-parented
'<gw:int>
"gnc_choose_radio_option_dialog_parented"
'((<gnc:UIWidget> parent)
((<gw:m-chars-caller-owned> gw:const) title)
((<gw:m-chars-caller-owned> gw:const) msg)
((<gw:mchars> caller-owned const) title)
((<gw:mchars> caller-owned const) msg)
(<gw:int> default-choice)
(<gnc:list-of-string> choices))
((gw:glist-of (<gw:mchars> callee-owned) callee-owned) choices))
"Show a dialog offering different mutually exclusive choices
in a radio list.")
;; gnc-amount-edit.h
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:GNCAmountEdit>
"GNCAmountEdit*" "const GNCAmountEdit*")))
#t)
(gw:wrap-as-wct ws
'<gnc:GNCAmountEdit>
"GNCAmountEdit*" "const GNCAmountEdit*")
(gw:wrap-function
mod
ws
'gnc:amount-edit-new
'<gnc:UIWidget>
"gnc_amount_edit_new"
@@ -262,7 +222,7 @@ in a radio list.")
"Return a new amount edit widget.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-gtk-entry
'<gnc:UIWidget>
"gnc_amount_edit_gtk_entry"
@@ -270,7 +230,7 @@ in a radio list.")
"Return the gtk entry for a gnc amount edit widget.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-set-amount
'<gw:void>
"gnc_amount_edit_set_amount"
@@ -279,7 +239,7 @@ in a radio list.")
"Set the amount of an amount edit widget.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-get-amount
'<gnc:numeric>
"gnc_amount_edit_get_amount"
@@ -287,7 +247,7 @@ in a radio list.")
"Return the amount in an amount edit widget.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-evaluate
'<gw:bool>
"gnc_amount_edit_evaluate"
@@ -296,7 +256,7 @@ in a radio list.")
#t if it is a valid entry.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-set-print-info
'<gw:void>
"gnc_amount_edit_set_print_info"
@@ -305,7 +265,7 @@ in a radio list.")
"Set the print info used by the amount edit.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-set-fraction
'<gw:void>
"gnc_amount_edit_set_fraction"
@@ -314,7 +274,7 @@ in a radio list.")
"Set the fraction used by the amount edit widget.")
(gw:wrap-function
mod
ws
'gnc:amount-edit-set-evaluate-on-enter
'<gw:void>
"gnc_amount_edit_set_evaluate_on_enter"
@@ -324,24 +284,18 @@ in a radio list.")
;; gnc-date-edit.h
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:GNCDateEdit>
"GNCDateEdit*" "const GNCDateEdit*")))
#t)
(gw:wrap-as-wct ws '<gnc:GNCDateEdit> "GNCDateEdit*" "const GNCDateEdit*")
(gw:wrap-function
mod
ws
'gnc:date-edit-new
'<gnc:UIWidget>
"gnc_date_edit_new_ts"
'((<gnc:time-pair> date)
(<gw:bool> show-time)
(<gw:bool> use-24-hour-format))
'((<gnc:time-pair> date) (<gw:bool> show-time) (<gw:bool> use-24-hour-format))
"Return a new date edit widget.")
(gw:wrap-function
mod
ws
'gnc:date-edit-set-time
'<gw:void>
"gnc_date_edit_set_time_ts"
@@ -350,7 +304,7 @@ in a radio list.")
"Set the time used by the date edit widget.")
(gw:wrap-function
mod
ws
'gnc:date-edit-get-date
'<gnc:time-pair>
"gnc_date_edit_get_date_ts"
@@ -358,7 +312,7 @@ in a radio list.")
"Return the date of the date-edit widget.")
(gw:wrap-function
mod
ws
'gnc:date-edit-get-date-end
'<gnc:time-pair>
"gnc_date_edit_get_date_end_ts"
@@ -367,41 +321,37 @@ in a radio list.")
;; druid-utils.h
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:GnomeDruid>
"GnomeDruid*" "const GnomeDruid*")))
#t)
(gw:wrap-as-wct ws '<gnc:GnomeDruid> "GnomeDruid*" "const GnomeDruid*")
(gw:wrap-function
mod
ws
'gnc:druid-set-title-image
'<gw:void>
"gnc_druid_set_title_image"
'((<gnc:GnomeDruid> druid)
((<gw:m-chars-caller-owned>) image-path))
((<gw:mchars> caller-owned) image-path))
"Set the title image of a druid.")
(gw:wrap-function
mod
ws
'gnc:druid-set-logo-image
'<gw:void>
"gnc_druid_set_logo_image"
'((<gnc:GnomeDruid> druid)
((<gw:m-chars-caller-owned>) logo-path))
((<gw:mchars> caller-owned) logo-path))
"Set the logo image of a druid.")
(gw:wrap-function
mod
ws
'gnc:druid-set-watermark-image
'<gw:void>
"gnc_druid_set_watermark_image"
'((<gnc:GnomeDruid> druid)
((<gw:m-chars-caller-owned>) watermark-path))
((<gw:mchars> caller-owned) watermark-path))
"Set the watermark image of a druid.")
(gw:wrap-function
mod
ws
'gnc:druid-set-colors
'<gw:void>
"gnc_druid_set_colors"
@@ -410,14 +360,10 @@ in a radio list.")
;; dialog-utils.h
(let ((nnt (gw:wrap-non-native-type
mod
'<gnc:GtkCList>
"GtkCList*" "const GtkCList*")))
#t)
(gw:wrap-as-wct ws '<gnc:GtkCList> "GtkCList*" "const GtkCList*")
(gw:wrap-function
mod
ws
'gnc:clist-set-check
'<gw:void>
"gnc_clist_set_check"
@@ -428,7 +374,7 @@ in a radio list.")
"Set the check status of a clist cell.")
(gw:wrap-function
mod
ws
'gnc:clist-columns-autosize
'<gw:void>
"gnc_clist_columns_autosize"