medit/moo/moopython/pygtk/old/mooeditor.defs
2010-12-08 01:25:34 -08:00

295 lines
7.3 KiB
Scheme

;; -*- scheme -*-
(define-function editor_instance
(c-name "moo_editor_instance")
(return-type "MooEditor*")
(docstring "editor_instance() -> Editor - returns existing instance of moo.edit.Editor.\n"
"\n"
"It does not create a new instance if it doesn't exist yet. For this see\n"
"create_editor_instance().")
)
(define-function create_editor_instance
(c-name "moo_editor_create")
(return-type "MooEditor*")
(caller-owns-return #t)
(parameters
'("gboolean" "embedded" (default "TRUE"))
)
(docstring "create_editor_instance() -> Editor - returns instance of moo.edit.Editor.\n"
"\n"
"Creates new instance if it doesn't exist yet.")
)
(define-method new_window
(of-object "MooEditor")
(c-name "moo_editor_new_window")
(return-type "MooEditWindow*")
(docstring "new_window() -> EditWindow - creates new editor window.\n")
)
(define-method new_doc
(of-object "MooEditor")
(c-name "moo_editor_new_doc")
(return-type "MooEdit*")
(parameters
'("MooEditWindow*" "window" (null-ok) (default "NULL"))
)
(docstring "new_doc(window=None) -> Edit - creates new document.\n"
"\n"
"Create new document in window. If window is None, \n"
"creates new window.")
)
(define-method create_doc
(of-object "MooEditor")
(c-name "moo_editor_create_doc")
(return-type "MooEdit*")
(parameters
'("const-char*" "filename" (null-ok) (default "NULL"))
'("const-char*" "encoding" (null-ok) (default "NULL"))
'("GError**" "error")
)
(docstring "create_doc([filename, encoding]) -> moo.Edit. \n"
"\n"
"Opens or creates a new document. Raises gobject.GError if open fails.")
)
; (define-method open
; (of-object "MooEditor")
; (c-name "moo_editor_open")
; (return-type "gboolean")
; (parameters
; '("MooEditWindow*" "window" (null-ok) (default "NULL"))
; '("GtkWidget*" "parent" (null-ok) (default "NULL"))
; '("GSList*" "files")
; )
; )
(define-method open_file
(of-object "MooEditor")
(c-name "moo_editor_open_file")
(return-type "MooEdit*")
(parameters
'("MooEditWindow*" "window" (null-ok) (default "NULL"))
'("GtkWidget*" "parent" (null-ok) (default "NULL"))
'("const-char*" "filename" (null-ok) (default "NULL"))
'("const-char*" "encoding" (null-ok) (default "NULL"))
)
(docstring "open_file(window=None, parent=None, filename=None, encoding=None) -> Edit.\n"
"\n"
"Opens a file.\n"
"If filename is None, it asks user for filename first, and returns False if\n"
"user pressed Cancel in the file chooser dialog.")
)
(define-method open_file_line
(of-object "MooEditor")
(c-name "moo_editor_open_file_line")
(return-type "MooEdit*")
(parameters
'("const-char*" "filename")
'("int" "line")
'("MooEditWindow*" "window" (null-ok) (default "NULL"))
)
(docstring "open_file_line(filename, line, window=None) -> Edit.\n"
"\n"
"Opens a file and places cursor on the given line.")
)
(define-method get_doc
(of-object "MooEditor")
(c-name "moo_editor_get_doc")
(return-type "MooEdit*")
(parameters
'("const-char*" "filename")
)
(docstring "get_doc(filename) -> Edit or None.\n"
"\n"
"Finds document instance by filename. Returns None if not found")
)
(define-method get_active_doc
(of-object "MooEditor")
(c-name "moo_editor_get_active_doc")
(return-type "MooEdit*")
(docstring "get_active_doc() -> Edit or None.\n"
"\n"
"Returns active document, i.e. the active document in the top window.")
)
(define-method get_active_window
(of-object "MooEditor")
(c-name "moo_editor_get_active_window")
(return-type "MooEditWindow*")
(docstring "get_active_window() -> EditWindow or None.\n"
"\n"
"Returns active window, i.e. the top one.")
)
(define-method set_active_window
(of-object "MooEditor")
(c-name "moo_editor_set_active_window")
(return-type "none")
(parameters
'("MooEditWindow*" "window")
)
(docstring "set_active_window(window) -> None.\n"
"\n"
"Makes window active, i.e. brings it to front and makes it grab focus.")
)
(define-method set_active_doc
(of-object "MooEditor")
(c-name "moo_editor_set_active_doc")
(return-type "none")
(parameters
'("MooEdit*" "doc")
)
(docstring "set_active_doc(doc) -> None.\n"
"\n"
"Makes the document active, i.e. brings its window to front, and switches\n"
"notebook to its page.")
)
(define-method present
(of-object "MooEditor")
(c-name "moo_editor_present")
(return-type "none")
(parameters
'("guint32" "stamp" (default "0"))
)
(docstring "present() -> None.\n"
"\n"
"Brings top editor window to the front.")
)
(define-method list_windows
(of-object "MooEditor")
(c-name "moo_editor_list_windows")
(return-type "GSList*")
)
(define-method list_docs
(of-object "MooEditor")
(c-name "moo_editor_list_docs")
(return-type "GSList*")
)
(define-method close_window
(of-object "MooEditor")
(c-name "moo_editor_close_window")
(return-type "gboolean")
(parameters
'("MooEditWindow*" "window")
'("gboolean" "ask_confirm")
)
)
(define-method close_doc
(of-object "MooEditor")
(c-name "moo_editor_close_doc")
(return-type "gboolean")
(parameters
'("MooEdit*" "doc")
'("gboolean" "ask_confirm")
)
)
; (define-method close_docs
; (of-object "MooEditor")
; (c-name "moo_editor_close_docs")
; (return-type "gboolean")
; (parameters
; '("GSList*" "list")
; '("gboolean" "ask_confirm")
; )
; )
(define-method close_all
(of-object "MooEditor")
(c-name "moo_editor_close_all")
(return-type "gboolean")
(parameters
'("gboolean" "ask_confirm")
'("gboolean" "leave_one" (default "FALSE"))
)
)
(define-method set_app_name
(of-object "MooEditor")
(c-name "moo_editor_set_app_name")
(return-type "none")
(parameters
'("const-char*" "name" (null-ok))
)
)
(define-method get_ui_xml
(of-object "MooEditor")
(c-name "moo_editor_get_ui_xml")
(return-type "MooUiXml*")
)
(define-method set_ui_xml
(of-object "MooEditor")
(c-name "moo_editor_set_ui_xml")
(return-type "none")
(parameters
'("MooUiXml*" "xml" (null-ok))
)
)
(define-method get_doc_ui_xml
(of-object "MooEditor")
(c-name "moo_editor_get_doc_ui_xml")
(return-type "MooUiXml*")
)
(define-method get_editor
(of-object "MooEditWindow")
(c-name "moo_edit_window_get_editor")
(return-type "MooEditor*")
)
(define-method set_window_type
(of-object "MooEditor")
(c-name "moo_editor_set_window_type")
(return-type "none")
(parameters
'("GType" "type")
)
)
(define-method set_edit_type
(of-object "MooEditor")
(c-name "moo_editor_set_edit_type")
(return-type "none")
(parameters
'("GType" "type")
)
)
(define-method save_copy
(of-object "MooEditor")
(c-name "moo_editor_save_copy")
(return-type "gboolean")
(parameters
'("MooEdit*" "doc")
'("const-char*" "filename")
'("const-char*" "encoding" (null-ok) (default "NULL"))
'("GError**" "error")
)
)
(define-method prefs_page
(of-object "MooEditor")
(c-name "moo_edit_prefs_page_new")
(return-type "GtkWidget*")
)
(define-method apply_prefs
(of-object "MooEditor")
(c-name "moo_editor_apply_prefs")
)