summaryrefslogtreecommitdiff
path: root/plugin-loaders/python/bindings
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-06 14:42:18 +0300
committermonsta <[email protected]>2016-11-06 14:42:18 +0300
commit65371f53dbb06180b750dad7c19e7bcf0f8651d6 (patch)
tree0b387d0a17207e13ce662da55970c97b50bc55db /plugin-loaders/python/bindings
parent7dd02941b3647477dfe0cf8177c2eeff8bfe7b84 (diff)
downloadpluma-65371f53dbb06180b750dad7c19e7bcf0f8651d6.tar.bz2
pluma-65371f53dbb06180b750dad7c19e7bcf0f8651d6.tar.xz
drop Python plugins support and --enable-python build option
it requires PyGTK so won't even build with GTK+3 but keep plugins themselves for future porting to libpeas
Diffstat (limited to 'plugin-loaders/python/bindings')
-rw-r--r--plugin-loaders/python/bindings/Makefile.am115
-rw-r--r--plugin-loaders/python/bindings/pluma.defs1461
-rw-r--r--plugin-loaders/python/bindings/pluma.override461
-rw-r--r--plugin-loaders/python/bindings/plumacommands.defs45
-rw-r--r--plugin-loaders/python/bindings/plumacommands.override122
-rw-r--r--plugin-loaders/python/bindings/plumamessage.override556
-rw-r--r--plugin-loaders/python/bindings/plumaplugin.override193
-rw-r--r--plugin-loaders/python/bindings/plumautils.defs67
-rw-r--r--plugin-loaders/python/bindings/plumautils.override85
9 files changed, 0 insertions, 3105 deletions
diff --git a/plugin-loaders/python/bindings/Makefile.am b/plugin-loaders/python/bindings/Makefile.am
deleted file mode 100644
index f9493e2d..00000000
--- a/plugin-loaders/python/bindings/Makefile.am
+++ /dev/null
@@ -1,115 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-noinst_LTLIBRARIES = \
- pluma.la
-
-nodist_pluma_la_SOURCES = \
- pluma.c \
- plumautils.c \
- plumacommands.c
-
-pluma_la_LDFLAGS = \
- -module -avoid-version
-
-pluma_la_LIBADD = \
- $(PYTHON_LIB_LOC) \
- $(PYTHON_LIBS) \
- $(PYTHON_EXTRA_LIBS) \
- $(PYGTK_LIBS)
-
-pluma_la_CFLAGS = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -I$(top_srcdir)/pluma \
- -I$(top_builddir)/pluma \
- -I$(top_srcdir)/plugin-loaders/python \
- -I$(top_builddir)/plugin-loaders/python \
- $(PLUMA_CFLAGS) \
- $(NO_STRICT_ALIASING_CFLAGS) \
- $(PYGTK_CFLAGS) \
- $(PYTHON_CFLAGS) \
- $(AM_CFLAGS)
-
-$(top_builddir)/pluma/pluma-enum-types.h:
- cd $(top_builddir)/pluma && $(MAKE) pluma-enum-types.h
-
-pluma.c: pluma.defs pluma.override plumaplugin.override plumamessage.override $(top_builddir)/pluma/pluma-enum-types.h
- ( cd $(srcdir) && $(PYGTK_CODEGEN) \
- --register $(PYGTK_DEFSDIR)/pango-types.defs \
- --register $(PYGTK_DEFSDIR)/gdk-types.defs \
- --register $(PYGTK_DEFSDIR)/gtk-types.defs \
- --register $(PYGTK_DEFSDIR)/gtksourceview2.defs \
- --register $(PYGOBJECT_DEFSDIR)/gio-types.defs \
- --override $*.override \
- --prefix py$* $(<F) ) > $@
-
-plumautils.c: plumautils.defs plumautils.override
- ( cd $(srcdir) && $(PYGTK_CODEGEN) \
- --override $*.override \
- --prefix py$* $(<F) ) > $@
-
-plumacommands.c: plumacommands.defs plumacommands.override pluma.defs
- ( cd $(srcdir) && $(PYGTK_CODEGEN) \
- --register pluma.defs \
- --register $(PYGTK_DEFSDIR)/gtk-types.defs \
- --override $*.override \
- --prefix py$* $(<F) ) > $@
-
-BINDING_PLUMA_HEADERS_SRCDIR_IN = \
- pluma/pluma-app.h \
- pluma/pluma-document.h \
- pluma/pluma-encodings.h \
- pluma/pluma-plugin.h \
- plugin-loaders/python/pluma-plugin-python.h \
- pluma/pluma-view.h \
- pluma/pluma-statusbar.h \
- pluma/pluma-tab.h \
- pluma/pluma-panel.h \
- pluma/pluma-window.h \
- pluma/pluma-help.h \
- pluma/pluma-debug.h \
- pluma/pluma-message-type.h \
- pluma/pluma-message.h \
- pluma/pluma-message-bus.h \
- pluma/pluma-language-manager.h
-
-BINDING_UTILS_HEADERS_SRCDIR_IN = \
- pluma/pluma-utils.h
-
-BINDING_COMMANDS_HEADERS_SRCDIR_IN = \
- pluma/pluma-commands.h
-
-BINDING_HEADERS_BUILDDIR_IN =
-
-BINDING_PLUMA_HEADERS_SRCDIR := $(addprefix $(top_srcdir)/,$(BINDING_PLUMA_HEADERS_SRCDIR_IN))
-BINDING_UTILS_HEADERS_SRCDIR := $(addprefix $(top_srcdir)/,$(BINDING_UTILS_HEADERS_SRCDIR_IN))
-BINDING_COMMANDS_HEADERS_SRCDIR := $(addprefix $(top_srcdir)/,$(BINDING_COMMANDS_HEADERS_SRCDIR_IN))
-
-BINDING_HEADERS_BUILDDIR := $(addprefix $(top_builddir)/,$(BINDING_HEADERS_BUILDDIR_IN))
-
-regenerate-python-binding:
- $(PYGTK_H2DEF) $(sort $(BINDING_PLUMA_HEADERS_SRCDIR) $(BINDING_HEADERS_BUILDDIR)) > pluma.defs.new
- $(PYGTK_H2DEF) $(sort $(BINDING_UTILS_HEADERS_SRCDIR) $(BINDING_HEADERS_BUILDDIR)) > plumautils.defs.new
- $(PYGTK_H2DEF) $(sort $(BINDING_COMMANDS_HEADERS_SRCDIR) $(BINDING_HEADERS_BUILDDIR)) > plumacommands.defs.new
-
-BUILT_SOURCES = \
- pluma.c \
- plumautils.c \
- plumacommands.c
-
-EXTRA_DIST = \
- pluma.override \
- pluma.defs \
- plumautils.override \
- plumautils.defs \
- plumacommands.override \
- plumacommands.defs \
- plumamessage.override \
- plumaplugin.override
-
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
--include $(top_srcdir)/git.mk
diff --git a/plugin-loaders/python/bindings/pluma.defs b/plugin-loaders/python/bindings/pluma.defs
deleted file mode 100644
index f4e799f1..00000000
--- a/plugin-loaders/python/bindings/pluma.defs
+++ /dev/null
@@ -1,1461 +0,0 @@
-;; -*- scheme -*-
-; object definitions ...
-(define-object App
- (in-module "Pluma")
- (parent "GObject")
- (c-name "PlumaApp")
- (gtype-id "PLUMA_TYPE_APP")
-)
-
-(define-object Document
- (in-module "Pluma")
- (parent "GtkSourceBuffer")
- (c-name "PlumaDocument")
- (gtype-id "PLUMA_TYPE_DOCUMENT")
-)
-
-(define-object Message
- (in-module "Pluma")
- (parent "GObject")
- (c-name "PlumaMessage")
- (gtype-id "PLUMA_TYPE_MESSAGE")
-)
-
-(define-object MessageBus
- (in-module "Pluma")
- (parent "GObject")
- (c-name "PlumaMessageBus")
- (gtype-id "PLUMA_TYPE_MESSAGE_BUS")
-)
-
-(define-object Panel
- (in-module "Pluma")
- (parent "GtkVBox")
- (c-name "PlumaPanel")
- (gtype-id "PLUMA_TYPE_PANEL")
-)
-
-(define-object __Plugin
- (in-module "Pluma")
- (parent "GObject")
- (c-name "PlumaPlugin")
- (gtype-id "PLUMA_TYPE_PLUGIN")
-)
-
-(define-object Plugin
- (in-module "Pluma")
- (parent "PlumaPlugin")
- (c-name "PlumaPluginPython")
- (gtype-id "PLUMA_TYPE_PLUGIN_PYTHON")
-)
-
-(define-object Statusbar
- (in-module "Pluma")
- (parent "GtkStatusbar")
- (c-name "PlumaStatusbar")
- (gtype-id "PLUMA_TYPE_STATUSBAR")
-)
-
-(define-object Tab
- (in-module "Pluma")
- (parent "GtkVBox")
- (c-name "PlumaTab")
- (gtype-id "PLUMA_TYPE_TAB")
-)
-
-(define-object View
- (in-module "Pluma")
- (parent "GtkSourceView")
- (c-name "PlumaView")
- (gtype-id "PLUMA_TYPE_VIEW")
-)
-
-(define-object Window
- (in-module "Pluma")
- (parent "GtkWindow")
- (c-name "PlumaWindow")
- (gtype-id "PLUMA_TYPE_WINDOW")
-)
-
-;; Enumerations and flags ...
-
-(define-flags LockdownMask
- (in-module "Pluma")
- (c-name "PlumaLockdownMask")
- (gtype-id "PLUMA_TYPE_LOCKDOWN_MASK")
- (values
- '("command-line" "PLUMA_LOCKDOWN_COMMAND_LINE")
- '("printing" "PLUMA_LOCKDOWN_PRINTING")
- '("print-setup" "PLUMA_LOCKDOWN_PRINT_SETUP")
- '("save-to-disk" "PLUMA_LOCKDOWN_SAVE_TO_DISK")
- '("all" "PLUMA_LOCKDOWN_ALL")
- )
-)
-
-(define-flags SearchFlags
- (in-module "Pluma")
- (c-name "PlumaSearchFlags")
- (gtype-id "PLUMA_TYPE_SEARCH_FLAGS")
- (values
- '("dont-set-flags" "PLUMA_SEARCH_DONT_SET_FLAGS")
- '("entire-word" "PLUMA_SEARCH_ENTIRE_WORD")
- '("case-sensitive" "PLUMA_SEARCH_CASE_SENSITIVE")
- )
-)
-
-(define-flags DocumentSaveFlags
- (in-module "Pluma")
- (c-name "PlumaDocumentSaveFlags")
- (gtype-id "PLUMA_TYPE_DOCUMENT_SAVE_FLAGS")
- (values
- '("ignore-mtime" "PLUMA_DOCUMENT_SAVE_IGNORE_MTIME")
- '("ignore-backup" "PLUMA_DOCUMENT_SAVE_IGNORE_BACKUP")
- '("preserve-backup" "PLUMA_DOCUMENT_SAVE_PRESERVE_BACKUP")
- )
-)
-
-(define-enum TabState
- (in-module "Pluma")
- (c-name "PlumaTabState")
- (gtype-id "PLUMA_TYPE_TAB_STATE")
- (values
- '("normal" "PLUMA_TAB_STATE_NORMAL")
- '("loading" "PLUMA_TAB_STATE_LOADING")
- '("reverting" "PLUMA_TAB_STATE_REVERTING")
- '("saving" "PLUMA_TAB_STATE_SAVING")
- '("printing" "PLUMA_TAB_STATE_PRINTING")
- '("print-previewing" "PLUMA_TAB_STATE_PRINT_PREVIEWING")
- '("showing-print-preview" "PLUMA_TAB_STATE_SHOWING_PRINT_PREVIEW")
- '("generic-not-editable" "PLUMA_TAB_STATE_GENERIC_NOT_EDITABLE")
- '("loading-error" "PLUMA_TAB_STATE_LOADING_ERROR")
- '("reverting-error" "PLUMA_TAB_STATE_REVERTING_ERROR")
- '("saving-error" "PLUMA_TAB_STATE_SAVING_ERROR")
- '("generic-error" "PLUMA_TAB_STATE_GENERIC_ERROR")
- '("closing" "PLUMA_TAB_STATE_CLOSING")
- )
-)
-
-(define-flags WindowState
- (in-module "Pluma")
- (c-name "PlumaWindowState")
- (gtype-id "PLUMA_TYPE_WINDOW_STATE")
- (values
- '("normal" "PLUMA_WINDOW_STATE_NORMAL")
- '("saving" "PLUMA_WINDOW_STATE_SAVING")
- '("printing" "PLUMA_WINDOW_STATE_PRINTING")
- '("loading" "PLUMA_WINDOW_STATE_LOADING")
- '("error" "PLUMA_WINDOW_STATE_ERROR")
- '("saving-session" "PLUMA_WINDOW_STATE_SAVING_SESSION")
- )
-)
-
-;; Boxed types
-(define-boxed Encoding
- (in-module "Pluma")
- (c-name "PlumaEncoding")
- (gtype-id "PLUMA_TYPE_ENCODING")
- (copy-func "pluma_encoding_copy")
- (release-func "pluma_encoding_free")
-;; (fields
-;; '("gint" "index")
-;; '("gchar*" "charset")
-;; '("gchar*" "name")
-;; )
-)
-
-(define-boxed MessageType
- (in-module "Pluma")
- (c-name "PlumaMessageType")
- (gtype-id "PLUMA_TYPE_MESSAGE_TYPE")
- (copy-func "pluma_message_type_ref")
- (release-func "pluma_message_type_unref")
-)
-
-
-;; From ../../pluma/pluma-app.h
-
-(define-function pluma_app_get_type
- (c-name "pluma_app_get_type")
- (return-type "GType")
-)
-
-(define-function app_get_default
- (c-name "pluma_app_get_default")
- (return-type "PlumaApp*")
-)
-
-; deprecated version !
-(define-function pluma_app_get_default
- (c-name "pluma_app_get_default_deprecated")
- (return-type "PlumaApp*")
-)
-
-(define-method create_window
- (of-object "PlumaApp")
- (c-name "pluma_app_create_window")
- (return-type "PlumaWindow*")
- (parameters
- '("GdkScreen*" "screen")
- )
-)
-
-(define-method get_windows
- (of-object "PlumaApp")
- (c-name "pluma_app_get_windows")
- (return-type "const-GList*")
-)
-
-(define-method get_active_window
- (of-object "PlumaApp")
- (c-name "pluma_app_get_active_window")
- (return-type "PlumaWindow*")
-)
-
-(define-method get_documents
- (of-object "PlumaApp")
- (c-name "pluma_app_get_documents")
- (return-type "GList*")
-)
-
-(define-method get_views
- (of-object "PlumaApp")
- (c-name "pluma_app_get_views")
- (return-type "GList*")
-)
-
-(define-method get_lockdown
- (of-object "PlumaApp")
- (c-name "pluma_app_get_lockdown")
- (return-type "PlumaLockdownMask")
-)
-
-
-;; From ../../pluma/pluma-document.h
-
-(define-function document_error_quark
- (c-name "pluma_document_error_quark")
- (return-type "GQuark")
-)
-
-(define-function pluma_document_get_type
- (c-name "pluma_document_get_type")
- (return-type "GType")
-)
-
-(define-function pluma_document_new
- (c-name "pluma_document_new")
- (is-constructor-of "PlumaDocument")
- (return-type "PlumaDocument*")
-)
-
-(define-method get_location
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_location")
- (return-type "GFile*")
-)
-
-(define-method get_uri
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_uri")
- (return-type "gchar*")
-)
-
-(define-method set_uri
- (of-object "PlumaDocument")
- (c-name "pluma_document_set_uri")
- (return-type "none")
- (parameters
- '("const-gchar*" "uri")
- )
-)
-
-(define-method get_uri_for_display
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_uri_for_display")
- (return-type "gchar*")
-)
-
-(define-method get_short_name_for_display
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_short_name_for_display")
- (return-type "gchar*")
-)
-
-(define-method get_content_type
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_content_type")
- (return-type "gchar*")
-)
-
-(define-method get_mime_type
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_mime_type")
- (return-type "gchar*")
-)
-
-(define-method get_readonly
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_readonly")
- (return-type "gboolean")
-)
-
-(define-method load
- (of-object "PlumaDocument")
- (c-name "pluma_document_load")
- (return-type "none")
- (parameters
- '("const-gchar*" "uri")
- '("const-PlumaEncoding*" "encoding")
- '("gint" "line_pos")
- '("gboolean" "create")
- )
-)
-
-(define-method insert_file
- (of-object "PlumaDocument")
- (c-name "pluma_document_insert_file")
- (return-type "gboolean")
- (parameters
- '("GtkTextIter*" "iter")
- '("const-gchar*" "uri")
- '("const-PlumaEncoding*" "encoding")
- )
-)
-
-(define-method load_cancel
- (of-object "PlumaDocument")
- (c-name "pluma_document_load_cancel")
- (return-type "gboolean")
-)
-
-(define-method save
- (of-object "PlumaDocument")
- (c-name "pluma_document_save")
- (parameters
- '("PlumaDocumentSaveFlags" "flags")
- )
- (return-type "none")
-)
-
-(define-method save_as
- (of-object "PlumaDocument")
- (c-name "pluma_document_save_as")
- (return-type "none")
- (parameters
- '("const-gchar*" "uri")
- '("const-PlumaEncoding*" "encoding")
- '("PlumaDocumentSaveFlags" "flags")
- )
-)
-
-(define-method is_untouched
- (of-object "PlumaDocument")
- (c-name "pluma_document_is_untouched")
- (return-type "gboolean")
-)
-
-(define-method is_untitled
- (of-object "PlumaDocument")
- (c-name "pluma_document_is_untitled")
- (return-type "gboolean")
-)
-
-(define-method is_local
- (of-object "PlumaDocument")
- (c-name "pluma_document_is_local")
- (return-type "gboolean")
-)
-
-(define-method get_deleted
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_deleted")
- (return-type "gboolean")
-)
-
-(define-method goto_line
- (of-object "PlumaDocument")
- (c-name "pluma_document_goto_line")
- (return-type "gboolean")
- (parameters
- '("gint" "line")
- )
-)
-
-(define-method set_search_text
- (of-object "PlumaDocument")
- (c-name "pluma_document_set_search_text")
- (return-type "none")
- (parameters
- '("const-gchar*" "text")
- '("guint" "flags")
- )
-)
-
-(define-method get_search_text
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_search_text")
- (return-type "gchar*")
- (parameters
- '("guint*" "flags")
- )
-)
-
-(define-method get_can_search_again
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_can_search_again")
- (return-type "gboolean")
-)
-
-(define-method search_forward
- (of-object "PlumaDocument")
- (c-name "pluma_document_search_forward")
- (return-type "gboolean")
- (parameters
- '("const-GtkTextIter*" "start")
- '("const-GtkTextIter*" "end")
- '("GtkTextIter*" "match_start")
- '("GtkTextIter*" "match_end")
- )
-)
-
-(define-method replace_all
- (of-object "PlumaDocument")
- (c-name "pluma_document_replace_all")
- (return-type "gint")
- (parameters
- '("const-gchar*" "find")
- '("const-gchar*" "replace")
- '("guint" "flags")
- )
-)
-
-(define-method search_backward
- (of-object "PlumaDocument")
- (c-name "pluma_document_search_backward")
- (return-type "gboolean")
- (parameters
- '("const-GtkTextIter*" "start")
- '("const-GtkTextIter*" "end")
- '("GtkTextIter*" "match_start")
- '("GtkTextIter*" "match_end")
- )
-)
-
-(define-method set_language
- (of-object "PlumaDocument")
- (c-name "pluma_document_set_language")
- (return-type "none")
- (parameters
- '("GtkSourceLanguage*" "lang" (null-ok))
- )
-)
-
-(define-method get_language
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_language")
- (return-type "GtkSourceLanguage*")
-)
-
-(define-method get_encoding
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_encoding")
- (return-type "const-PlumaEncoding*")
-)
-
-(define-method set_enable_search_highlighting
- (of-object "PlumaDocument")
- (c-name "pluma_document_set_enable_search_highlighting")
- (return-type "none")
- (parameters
- '("gboolean" "enable")
- )
-)
-
-(define-method get_enable_search_highlighting
- (of-object "PlumaDocument")
- (c-name "pluma_document_get_enable_search_highlighting")
- (return-type "gboolean")
-)
-
-;; From ../../pluma/pluma-encodings.h
-
-(define-function pluma_encoding_get_type
- (c-name "pluma_encoding_get_type")
- (return-type "GType")
-)
-
-(define-method copy
- (of-object "PlumaEncoding")
- (c-name "pluma_encoding_copy")
- (return-type "PlumaEncoding*")
-)
-
-(define-method free
- (of-object "PlumaEncoding")
- (c-name "pluma_encoding_free")
- (return-type "none")
-)
-
-(define-function encoding_get_from_charset
- (c-name "pluma_encoding_get_from_charset")
- (return-type "const-PlumaEncoding*")
- (parameters
- '("const-gchar*" "charset")
- )
-)
-
-; Deprecated version !
-(define-function pluma_encoding_get_from_charset
- (c-name "pluma_encoding_get_from_charset_deprecated")
- (return-type "const-PlumaEncoding*")
- (parameters
- '("const-gchar*" "charset")
- )
-)
-
-(define-function encoding_get_from_index
- (c-name "pluma_encoding_get_from_index")
- (return-type "const-PlumaEncoding*")
- (parameters
- '("gint" "index")
- )
-)
-
-; Deprecated version !
-(define-function pluma_encoding_get_from_index
- (c-name "pluma_encoding_get_from_index_deprecated")
- (return-type "const-PlumaEncoding*")
- (parameters
- '("gint" "index")
- )
-)
-
-(define-method to_string
- (of-object "PlumaEncoding")
- (c-name "pluma_encoding_to_string")
- (return-type "gchar*")
-)
-
-(define-method get_name
- (of-object "PlumaEncoding")
- (c-name "pluma_encoding_get_name")
- (return-type "const-gchar*")
-)
-
-(define-method get_charset
- (of-object "PlumaEncoding")
- (c-name "pluma_encoding_get_charset")
- (return-type "const-gchar*")
-)
-
-(define-function encoding_get_utf8
- (c-name "pluma_encoding_get_utf8")
- (return-type "const-PlumaEncoding*")
-)
-
-; Deprecated version !
-(define-function pluma_encoding_get_utf8
- (c-name "pluma_encoding_get_utf8_deprecated")
- (return-type "const-PlumaEncoding*")
-)
-
-(define-function encoding_get_current
- (c-name "pluma_encoding_get_current")
- (return-type "const-PlumaEncoding*")
-)
-
-; Deprecated version !
-(define-function pluma_encoding_get_current
- (c-name "pluma_encoding_get_current_deprecated")
- (return-type "const-PlumaEncoding*")
-)
-
-;; From ../../pluma/pluma-help.h
-
-(define-function help_display
- (c-name "pluma_help_display")
- (return-type "gboolean")
- (parameters
- '("GtkWindow*" "parent")
- '("const-gchar*" "name")
- '("const-gchar*" "link_id")
- )
-)
-
-
-
-;; From ../../pluma/pluma-panel.h
-
-(define-function pluma_panel_get_type
- (c-name "pluma_panel_get_type")
- (return-type "GType")
-)
-
-(define-function pluma_panel_new
- (c-name "pluma_panel_new")
- (is-constructor-of "PlumaPanel")
- (return-type "GtkWidget*")
-)
-
-(define-method add_item
- (of-object "PlumaPanel")
- (c-name "pluma_panel_add_item")
- (return-type "none")
- (parameters
- '("GtkWidget*" "item")
- '("const-gchar*" "name")
- '("GtkWidget*" "image")
- )
-)
-
-(define-method add_item_with_stock_icon
- (of-object "PlumaPanel")
- (c-name "pluma_panel_add_item_with_stock_icon")
- (return-type "none")
- (parameters
- '("GtkWidget*" "item")
- '("const-gchar*" "name")
- '("const-gchar*" "stock_id")
- )
-)
-
-(define-method remove_item
- (of-object "PlumaPanel")
- (c-name "pluma_panel_remove_item")
- (return-type "gboolean")
- (parameters
- '("GtkWidget*" "item")
- )
-)
-
-(define-method activate_item
- (of-object "PlumaPanel")
- (c-name "pluma_panel_activate_item")
- (return-type "gboolean")
- (parameters
- '("GtkWidget*" "item")
- )
-)
-
-(define-method item_is_active
- (of-object "PlumaPanel")
- (c-name "pluma_panel_item_is_active")
- (return-type "gboolean")
- (parameters
- '("GtkWidget*" "item")
- )
-)
-
-(define-method get_orientation
- (of-object "PlumaPanel")
- (c-name "pluma_panel_get_orientation")
- (return-type "GtkOrientation")
-)
-
-(define-method get_n_items
- (of-object "PlumaPanel")
- (c-name "pluma_panel_get_n_items")
- (return-type "gint")
-)
-
-
-;; From ../../pluma/pluma-plugin.h
-
-(define-function pluma_plugin_get_type
- (c-name "pluma_plugin_get_type")
- (return-type "GType")
-)
-
-(define-method get_install_dir
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_get_install_dir")
- (return-type "gchar*")
-)
-
-(define-method get_data_dir
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_get_data_dir")
- (return-type "gchar*")
-)
-
-(define-method activate
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_activate")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- )
-)
-
-(define-method deactivate
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_deactivate")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- )
-)
-
-(define-method update_ui
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_update_ui")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- )
-)
-
-(define-method is_configurable
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_is_configurable")
- (return-type "gboolean")
-)
-
-(define-method create_configure_dialog
- (of-object "PlumaPlugin")
- (c-name "pluma_plugin_create_configure_dialog")
- (return-type "GtkWidget*")
-)
-
-;; From ../pluma/pluma-plugin-python.h
-
-(define-function pluma_plugin_python_get_type
- (c-name "pluma_plugin_python_get_type")
- (return-type "GType")
-)
-
-(define-function pluma_plugin_python_new
- (c-name "pluma_plugin_python_new")
- (is-constructor-of "PlumaPluginPython")
- (return-type "PlumaPluginPython*")
-)
-
-;; From ../../pluma/pluma-status-bar.h
-
-(define-method flash_message
- (of-object "PlumaStatusbar")
- (c-name "pluma_statusbar_flash_message")
- (return-type "none")
- (parameters
- '("int" "context_id")
- '("const-gchar*" "message")
- )
- )
-
-;; From ../../pluma/pluma-tab.h
-
-(define-function pluma_tab_get_type
- (c-name "pluma_tab_get_type")
- (return-type "GType")
-)
-
-(define-method get_view
- (of-object "PlumaTab")
- (c-name "pluma_tab_get_view")
- (return-type "PlumaView*")
-)
-
-(define-method get_document
- (of-object "PlumaTab")
- (c-name "pluma_tab_get_document")
- (return-type "PlumaDocument*")
-)
-
-(define-function tab_get_from_document
- (c-name "pluma_tab_get_from_document")
- (return-type "PlumaTab*")
- (parameters
- '("PlumaDocument*" "doc")
- )
-)
-
-; Deprecated version !
-(define-function pluma_tab_get_from_document
- (c-name "pluma_tab_get_from_document_deprecated")
- (return-type "PlumaTab*")
- (parameters
- '("PlumaDocument*" "doc")
- )
-)
-
-(define-method get_state
- (of-object "PlumaTab")
- (c-name "pluma_tab_get_state")
- (return-type "PlumaTabState")
-)
-
-(define-method set_auto_save_enabled
- (of-object "PlumaTab")
- (c-name "pluma_tab_set_auto_save_enabled")
- (return-type "none")
- (parameters
- '("gboolean" "enable")
- )
-)
-
-(define-method get_auto_save_enabled
- (of-object "PlumaTab")
- (c-name "pluma_tab_get_auto_save_enabled")
- (return-type "gboolean")
-)
-
-(define-method set_auto_save_interval
- (of-object "PlumaTab")
- (c-name "pluma_tab_set_auto_save_interval")
- (return-type "none")
- (parameters
- '("gint" "interval")
- )
-)
-
-(define-method get_auto_save_interval
- (of-object "PlumaTab")
- (c-name "pluma_tab_get_auto_save_interval")
- (return-type "gint")
-)
-
-;; From ../../pluma/pluma-view.h
-
-(define-function pluma_view_get_type
- (c-name "pluma_view_get_type")
- (return-type "GtkType")
-)
-
-(define-function pluma_view_new
- (c-name "pluma_view_new")
- (is-constructor-of "PlumaView")
- (return-type "GtkWidget*")
- (parameters
- '("PlumaDocument*" "doc")
- )
-)
-
-(define-method cut_clipboard
- (of-object "PlumaView")
- (c-name "pluma_view_cut_clipboard")
- (return-type "none")
-)
-
-(define-method copy_clipboard
- (of-object "PlumaView")
- (c-name "pluma_view_copy_clipboard")
- (return-type "none")
-)
-
-(define-method paste_clipboard
- (of-object "PlumaView")
- (c-name "pluma_view_paste_clipboard")
- (return-type "none")
-)
-
-(define-method delete_selection
- (of-object "PlumaView")
- (c-name "pluma_view_delete_selection")
- (return-type "none")
-)
-
-(define-method select_all
- (of-object "PlumaView")
- (c-name "pluma_view_select_all")
- (return-type "none")
-)
-
-(define-method scroll_to_cursor
- (of-object "PlumaView")
- (c-name "pluma_view_scroll_to_cursor")
- (return-type "none")
-)
-
-(define-method set_font
- (of-object "PlumaView")
- (c-name "pluma_view_set_font")
- (return-type "none")
- (parameters
- '("gboolean" "def")
- '("const-gchar*" "font_name")
- )
-)
-
-
-
-;; From ../../pluma/pluma-window.h
-
-(define-function pluma_window_get_type
- (c-name "pluma_window_get_type")
- (return-type "GType")
-)
-
-(define-method create_tab
- (of-object "PlumaWindow")
- (c-name "pluma_window_create_tab")
- (return-type "PlumaTab*")
- (parameters
- '("gboolean" "jump_to")
- )
-)
-
-(define-method create_tab_from_uri
- (of-object "PlumaWindow")
- (c-name "pluma_window_create_tab_from_uri")
- (return-type "PlumaTab*")
- (parameters
- '("const-gchar*" "uri")
- '("const-PlumaEncoding*" "encoding" (null-ok))
- '("gint" "line_pos")
- '("gboolean" "create")
- '("gboolean" "jump_to")
- )
-)
-
-(define-method close_tab
- (of-object "PlumaWindow")
- (c-name "pluma_window_close_tab")
- (return-type "none")
- (parameters
- '("PlumaTab*" "tab")
- )
-)
-
-(define-method close_tabs
- (of-object "PlumaWindow")
- (c-name "pluma_window_close_tabs")
- (return-type "none")
- (parameters
- '("const-GList*" "tabs")
- )
-)
-
-(define-method close_all_tabs
- (of-object "PlumaWindow")
- (c-name "pluma_window_close_all_tabs")
- (return-type "none")
-)
-
-(define-method get_active_tab
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_active_tab")
- (return-type "PlumaTab*")
-)
-
-(define-method set_active_tab
- (of-object "PlumaWindow")
- (c-name "pluma_window_set_active_tab")
- (return-type "none")
- (parameters
- '("PlumaTab*" "tab")
- )
-)
-
-(define-method get_active_view
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_active_view")
- (return-type "PlumaView*")
-)
-
-(define-method get_active_document
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_active_document")
- (return-type "PlumaDocument*")
-)
-
-(define-method get_documents
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_documents")
- (return-type "GList*")
-)
-
-(define-method get_unsaved_documents
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_unsaved_documents")
- (return-type "GList*")
-)
-
-(define-method get_views
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_views")
- (return-type "GList*")
-)
-
-(define-method get_group
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_group")
- (return-type "GtkWindowGroup*")
-)
-
-(define-method get_side_panel
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_side_panel")
- (return-type "PlumaPanel*")
-)
-
-(define-method get_bottom_panel
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_bottom_panel")
- (return-type "PlumaPanel*")
-)
-
-(define-method get_statusbar
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_statusbar")
- (return-type "GtkWidget*")
-)
-
-(define-method get_ui_manager
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_ui_manager")
- (return-type "GtkUIManager*")
-)
-
-(define-method get_state
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_state")
- (return-type "PlumaWindowState")
-)
-
-(define-method get_message_bus
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_message_bus")
- (return-type "PlumaMessageBus*")
-)
-
-(define-method get_tab_from_uri
- (of-object "PlumaWindow")
- (c-name "pluma_window_get_tab_from_uri")
- (return-type "PlumaTab*")
- (parameters
- '("const-gchar*" "uri")
- )
-)
-
-;; From pluma-language-manager.h
-
-(define-function get_language_manager
- (c-name "pluma_get_language_manager")
- (return-type "GtkSourceLanguageManager*")
-)
-
-(define-function language_manager_list_languages_sorted
- (c-name "pluma_language_manager_list_languages_sorted")
- (return-type "GSList*")
- (parameters
- '("GtkSourceLanguageManager*" "lm")
- '("gboolean" "include_hidden")
- )
-)
-
-
-;; From pluma-message-bus.h
-
-(define-function pluma_message_bus_get_type
- (c-name "pluma_message_bus_get_type")
- (return-type "GType")
-)
-
-(define-function message_bus_get_default
- (c-name "pluma_message_bus_get_default")
- (return-type "PlumaMessageBus*")
-)
-
-(define-function pluma_message_bus_new
- (c-name "pluma_message_bus_new")
- (is-constructor-of "PlumaMessageBus")
- (return-type "PlumaMessageBus*")
-)
-
-(define-method lookup
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_lookup")
- (return-type "PlumaMessageType*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- )
-)
-
-(define-method register
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_register")
- (return-type "PlumaMessageType*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("guint" "num_optional")
- )
- (varargs #t)
-)
-
-(define-method unregister
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_unregister")
- (return-type "none")
- (parameters
- '("PlumaMessageType*" "message_type")
- )
-)
-
-(define-method unregister_all
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_unregister_all")
- (return-type "none")
- (parameters
- '("const-gchar*" "object_path")
- )
-)
-
-(define-method is_registered
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_is_registered")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- )
-)
-
-(define-method connect
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_connect")
- (return-type "guint")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("PlumaMessageCallback" "callback")
- '("gpointer" "userdata")
- '("GDestroyNotify" "destroy_data")
- )
-)
-
-(define-method disconnect
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_disconnect")
- (return-type "none")
- (parameters
- '("guint" "id")
- )
-)
-
-(define-method disconnect_by_func
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_disconnect_by_func")
- (return-type "none")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("PlumaMessageCallback" "callback")
- '("gpointer" "userdata")
- )
-)
-
-(define-method block
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_block")
- (return-type "none")
- (parameters
- '("guint" "id")
- )
-)
-
-(define-method block_by_func
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_block_by_func")
- (return-type "none")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("PlumaMessageCallback" "callback")
- '("gpointer" "userdata")
- )
-)
-
-(define-method unblock
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_unblock")
- (return-type "none")
- (parameters
- '("guint" "id")
- )
-)
-
-(define-method unblock_by_func
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_unblock_by_func")
- (return-type "none")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("PlumaMessageCallback" "callback")
- '("gpointer" "userdata")
- )
-)
-
-(define-method send_message
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_send_message")
- (return-type "none")
- (parameters
- '("PlumaMessage*" "message")
- )
-)
-
-(define-method send_message_sync
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_send_message_sync")
- (return-type "none")
- (parameters
- '("PlumaMessage*" "message")
- )
-)
-
-(define-method send
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_send")
- (return-type "none")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- )
- (varargs #t)
-)
-
-(define-method send_sync
- (of-object "PlumaMessageBus")
- (c-name "pluma_message_bus_send_sync")
- (return-type "PlumaMessage*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- )
- (varargs #t)
-)
-
-
-;; From pluma-message-type.h
-
-(define-function pluma_message_type_get_type
- (c-name "pluma_message_type_get_type")
- (return-type "GType")
-)
-
-(define-function pluma_message_type_is_supported
- (c-name "pluma_message_type_is_supported")
- (return-type "gboolean")
- (parameters
- '("GType" "type")
- )
-)
-
-(define-function pluma_message_type_identifier
- (c-name "pluma_message_type_identifier")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- )
-)
-
-(define-function pluma_message_type_new
- (c-name "pluma_message_type_new")
- (is-constructor-of "PlumaMessageType")
- (return-type "PlumaMessageType*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("guint" "num_optional")
- )
- (varargs #t)
-)
-
-(define-function pluma_message_type_new_valist
- (c-name "pluma_message_type_new_valist")
- (return-type "PlumaMessageType*")
- (parameters
- '("const-gchar*" "object_path")
- '("const-gchar*" "method")
- '("guint" "num_optional")
- '("va_list" "va_args")
- )
-)
-
-(define-method ref
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_ref")
- (return-type "PlumaMessageType*")
-)
-
-(define-method unref
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_unref")
- (return-type "none")
-)
-
-(define-method instantiate_valist
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_instantiate_valist")
- (return-type "PlumaMessage*")
- (parameters
- '("va_list" "va_args")
- )
-)
-
-(define-method instantiate
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_instantiate")
- (return-type "PlumaMessage*")
- (parameters
- )
- (varargs #t)
-)
-
-(define-method get_object_path
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_get_object_path")
- (return-type "const-gchar*")
-)
-
-(define-method get_method
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_get_method")
- (return-type "const-gchar*")
-)
-
-(define-method lookup
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_lookup")
- (return-type "GType")
- (parameters
- '("const-gchar*" "key")
- )
-)
-
-(define-method foreach
- (of-object "PlumaMessageType")
- (c-name "pluma_message_type_foreach")
- (return-type "none")
- (parameters
- '("PlumaMessageTypeForeach" "func")
- '("gpointer" "user_data")
- )
-)
-
-
-;; From pluma-message.h
-
-(define-function pluma_message_get_type
- (c-name "pluma_message_get_type")
- (return-type "GType")
-)
-
-(define-method get
- (of-object "PlumaMessage")
- (c-name "pluma_message_get")
- (return-type "none")
- (parameters
- )
- (varargs #t)
-)
-
-(define-method get_valist
- (of-object "PlumaMessage")
- (c-name "pluma_message_get_valist")
- (return-type "none")
- (parameters
- '("va_list" "var_args")
- )
-)
-
-(define-method get_value
- (of-object "PlumaMessage")
- (c-name "pluma_message_get_value")
- (return-type "none")
- (parameters
- '("const-gchar*" "key")
- '("GValue*" "value")
- )
-)
-
-(define-method set
- (of-object "PlumaMessage")
- (c-name "pluma_message_set")
- (return-type "none")
- (parameters
- )
- (varargs #t)
-)
-
-(define-method set_valist
- (of-object "PlumaMessage")
- (c-name "pluma_message_set_valist")
- (return-type "none")
- (parameters
- '("va_list" "var_args")
- )
-)
-
-(define-method set_value
- (of-object "PlumaMessage")
- (c-name "pluma_message_set_value")
- (return-type "none")
- (parameters
- '("const-gchar*" "key")
- '("GValue*" "value")
- )
-)
-
-(define-method set_valuesv
- (of-object "PlumaMessage")
- (c-name "pluma_message_set_valuesv")
- (return-type "none")
- (parameters
- '("const-gchar**" "keys")
- '("GValue*" "values")
- '("gint" "n_values")
- )
-)
-
-(define-method get_object_path
- (of-object "PlumaMessage")
- (c-name "pluma_message_get_object_path")
- (return-type "const-gchar*")
-)
-
-(define-method get_method
- (of-object "PlumaMessage")
- (c-name "pluma_message_get_method")
- (return-type "const-gchar*")
-)
-
-(define-method has_key
- (of-object "PlumaMessage")
- (c-name "pluma_message_has_key")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "key")
- )
-)
-
-(define-method get_key_type
- (of-object "PlumaMessage")
- (c-name "pluma_message_get_key_type")
- (return-type "GType")
- (parameters
- '("const-gchar*" "key")
- )
-)
-
-(define-method validate
- (of-object "PlumaMessage")
- (c-name "pluma_message_validate")
- (return-type "gboolean")
-)
-
-
-;; From ../../pluma/pluma-debug.h
-
-(define-function debug
- (c-name "pluma_debug")
- (parameters
- '("const-gchar*" "message")
- )
- (return-type "none")
-)
-
diff --git a/plugin-loaders/python/bindings/pluma.override b/plugin-loaders/python/bindings/pluma.override
deleted file mode 100644
index 3de7c069..00000000
--- a/plugin-loaders/python/bindings/pluma.override
+++ /dev/null
@@ -1,461 +0,0 @@
-%%
-headers
-#include <pygobject.h>
-#include <pygtk/pygtk.h>
-
-#include <pluma/pluma-language-manager.h>
-#include <pluma/pluma-plugin.h>
-#include <pluma/pluma-app.h>
-#include <pluma/pluma-encodings.h>
-#include <pluma/pluma-enum-types.h>
-#include <pluma/pluma-statusbar.h>
-#include <pluma/pluma-debug.h>
-#include <pluma/pluma-help.h>
-
-#include "pluma-plugin-python.h"
-
-void pypluma_register_classes (PyObject *d);
-void pypluma_add_constants (PyObject *module, const gchar *strip_prefix);
-
-static PyObject *
-_helper_wrap_gobject_glist (const GList *list)
-{
- PyObject *py_list;
- const GList *tmp;
-
- if ((py_list = PyList_New(0)) == NULL) {
- return NULL;
- }
- for (tmp = list; tmp != NULL; tmp = tmp->next) {
- PyObject *py_obj = pygobject_new(G_OBJECT(tmp->data));
-
- if (py_obj == NULL) {
- Py_DECREF(py_list);
- return NULL;
- }
- PyList_Append(py_list, py_obj);
- Py_DECREF(py_obj);
- }
- return py_list;
-}
-
-static PyObject *
-_helper_wrap_gobject_gslist (const GSList *list)
-{
- PyObject *py_list;
- const GSList *tmp;
-
- if ((py_list = PyList_New(0)) == NULL) {
- return NULL;
- }
- for (tmp = list; tmp != NULL; tmp = tmp->next) {
- PyObject *py_obj = pygobject_new(G_OBJECT(tmp->data));
-
- if (py_obj == NULL) {
- Py_DECREF(py_list);
- return NULL;
- }
- PyList_Append(py_list, py_obj);
- Py_DECREF(py_obj);
- }
- return py_list;
-}
-%%
-include
- plumaplugin.override
- plumamessage.override
-%%
-modulename pluma
-%%
-import gtk.Widget as PyGtkWidget_Type
-import gobject.GObject as PyGObject_Type
-import gtk.gdk.Screen as PyGdkScreen_Type
-import gtk.VBox as PyGtkVBox_Type
-import gtk.Window as PyGtkWindow_Type
-import gtk.Image as PyGtkImage_Type
-import gtk.Statusbar as PyGtkStatusbar_Type
-import gtksourceview2.Buffer as PyGtkSourceBuffer_Type
-import gtksourceview2.View as PyGtkSourceView_Type
-import gtksourceview2.Language as PyGtkSourceLanguage_Type
-import gtksourceview2.LanguageManager as PyGtkSourceLanguageManager_Type
-%%
-ignore-glob
- *_get_type
- pluma_document_error_quark
- pluma_panel_add_item_with_stock_icon
-%%
-override pluma_app_create_window kwargs
-static PyObject *
-_wrap_pluma_app_create_window(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "screen", NULL};
- PyGObject *screen = NULL;
- PlumaWindow *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O!", kwlist,
- &PyGdkScreen_Type, &screen))
- return NULL;
-
- ret = pluma_app_create_window(PLUMA_APP(self->obj),
- screen ? GDK_SCREEN(screen->obj) : NULL);
-
- /* pygobject_new handles NULL checking */
- return pygobject_new((GObject *)ret);
-}
-%%
-override pluma_app_get_windows
-static PyObject *
-_wrap_pluma_app_get_windows(PyGObject *self)
-{
- const GList *list;
- PyObject *py_list;
-
- list = pluma_app_get_windows (PLUMA_APP (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- return py_list;
-}
-%%
-override pluma_app_get_views
-static PyObject *
-_wrap_pluma_app_get_views(PyGObject *self)
-{
- GList *list;
- PyObject *py_list;
-
- list = pluma_app_get_views (PLUMA_APP (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- g_list_free (list);
-
- return py_list;
-}
-%%
-override pluma_app_get_documents
-static PyObject *
-_wrap_pluma_app_get_documents(PyGObject *self)
-{
- GList *list;
- PyObject *py_list;
-
- list = pluma_app_get_documents (PLUMA_APP (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- g_list_free (list);
-
- return py_list;
-}
-%%
-override pluma_window_get_documents
-static PyObject *
-_wrap_pluma_window_get_documents(PyGObject *self)
-{
- GList *list;
- PyObject *py_list;
-
- list = pluma_window_get_documents (PLUMA_WINDOW (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- g_list_free(list);
-
- return py_list;
-}
-%%
-override pluma_window_get_unsaved_documents
-static PyObject *
-_wrap_pluma_window_get_unsaved_documents(PyGObject *self)
-{
- GList *list;
- PyObject *py_list;
-
- list = pluma_window_get_unsaved_documents (PLUMA_WINDOW (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- g_list_free(list);
-
- return py_list;
-}
-%%
-override pluma_window_get_views
-static PyObject *
-_wrap_pluma_window_get_views(PyGObject *self)
-{
- GList *list;
- PyObject *py_list;
-
- list = pluma_window_get_views (PLUMA_WINDOW (self->obj));
-
- py_list = _helper_wrap_gobject_glist (list);
-
- g_list_free(list);
-
- return py_list;
-}
-%%
-override pluma_window_close_tabs kwargs
-static PyObject *
-_wrap_pluma_window_close_tabs (PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "tabs", NULL };
- PyObject *list, *item;
- GList *glist = NULL;
- int len, i;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
- "O:PlumaWindow.close_tabs", kwlist,
- &list))
- return NULL;
-
- if (!PySequence_Check (list))
- {
- PyErr_SetString (PyExc_TypeError,
- "first argument must be a sequence");
- return NULL;
- }
-
- len = PySequence_Length (list);
-
- for (i = 0; i < len; i++)
- {
- item = PySequence_GetItem (list, i);
- Py_DECREF(item);
-
- if (!pygobject_check (item, &PyPlumaTab_Type))
- {
- PyErr_SetString (PyExc_TypeError,
- "sequence item not a Gtkwidget object");
- g_list_free (glist);
- return NULL;
- }
-
- glist = g_list_append (glist, pygobject_get (item));
- }
-
- pluma_window_close_tabs (PLUMA_WINDOW (self->obj), glist);
-
- g_list_free (glist);
- Py_INCREF (Py_None);
- return Py_None;
-}
-%%
-override pluma_document_get_search_text
-static PyObject *
-_wrap_pluma_document_get_search_text(PyGObject *self)
-{
- PyObject *tuple, *string;
- guint flags;
- gchar *ret;
-
- ret = pluma_document_get_search_text (PLUMA_DOCUMENT (self->obj), &flags);
-
- tuple = PyTuple_New(2);
- if (ret) {
- string = PyString_FromString(ret);
- PyTuple_SetItem(tuple, 0, string);
- } else {
- Py_INCREF(Py_None);
- PyTuple_SetItem(tuple, 0, Py_None);
- }
- PyTuple_SetItem(tuple, 1, PyInt_FromLong(flags));
-
- g_free(ret);
-
- return tuple;
-}
-%%
-override pluma_panel_add_item kwargs
-static PyObject *
-_wrap_pluma_panel_add_item(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist1[] = { "item", "name", "image", NULL };
- static char *kwlist2[] = { "item", "name", "stock_id", NULL };
- PyGObject *item, *image;
- char *name = NULL;
- char *stock_id = NULL;
-
- if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!sO!:PlumaPanel.add_item", kwlist1, &PyGtkWidget_Type, &item, &name, &PyGtkImage_Type, &image)) {
- pluma_panel_add_item(PLUMA_PANEL(self->obj), GTK_WIDGET(item->obj), name, GTK_WIDGET(image->obj));
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- PyErr_Clear();
-
- if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!ss:PlumaPanel.add_item", kwlist2, &PyGtkWidget_Type, &item, &name, &stock_id)) {
- pluma_panel_add_item_with_stock_icon(PLUMA_PANEL(self->obj), GTK_WIDGET(item->obj), name, stock_id);
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- PyErr_Clear();
- PyErr_SetString(PyExc_TypeError, "the last arg should be either a gtk.Image or a stock_id string");
- return NULL;
-}
-%%
-override pluma_app_get_default_deprecated
-/* deprecated wrappers */
-static PyObject *
-_wrap_pluma_app_get_default_deprecated(PyObject *self)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.app_get_default instead") < 0)
- return NULL;
- return _wrap_pluma_app_get_default(self);
-}
-%%
-override pluma_encoding_get_from_charset_deprecated kwargs
-static PyObject *
-_wrap_pluma_encoding_get_from_charset_deprecated(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.encoding_get_from_charset instead") < 0)
- return NULL;
- return _wrap_pluma_encoding_get_from_charset(self, args, kwargs);
-}
-%%
-override pluma_encoding_get_from_index_deprecated kwargs
-static PyObject *
-_wrap_pluma_encoding_get_from_index_deprecated(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.encoding_get_from_index instead") < 0)
- return NULL;
- return _wrap_pluma_encoding_get_from_index(self, args, kwargs);
-}
-%%
-override pluma_encoding_get_utf8_deprecated
-static PyObject *
-_wrap_pluma_encoding_get_utf8_deprecated(PyObject *self)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.encoding_get_utf8 instead") < 0)
- return NULL;
- return _wrap_pluma_encoding_get_utf8(self);
-}
-%%
-override pluma_encoding_get_current_deprecated
-static PyObject *
-_wrap_pluma_encoding_get_current_deprecated(PyObject *self)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.encoding_get_current instead") < 0)
- return NULL;
- return _wrap_pluma_encoding_get_current(self);
-}
-%%
-override pluma_tab_get_from_document_deprecated kwargs
-static PyObject *
-_wrap_pluma_tab_get_from_document_deprecated(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- if (PyErr_Warn(PyExc_DeprecationWarning, "use pluma.tab_get_from_document instead") < 0)
- return NULL;
- return _wrap_pluma_tab_get_from_document(self, args, kwargs);
-}
-%%
-override pluma_language_manager_list_languages_sorted kwargs
-static PyObject *
-_wrap_pluma_language_manager_list_languages_sorted(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "lm", "include_hidden", NULL };
- PyGObject *lm;
- int include_hidden;
- PyObject *py_list;
- GSList *list;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
- "O!i:language_manager_list_languages_sorted",
- kwlist, &PyGtkSourceLanguageManager_Type, &lm,
- &include_hidden))
- return NULL;
-
- list = pluma_language_manager_list_languages_sorted (GTK_SOURCE_LANGUAGE_MANAGER (lm->obj),
- include_hidden);
-
- py_list = _helper_wrap_gobject_gslist (list);
-
- g_slist_free (list);
-
- return py_list;
-}
-%%
-override pluma_debug kwargs
-static PyObject *
-_wrap_pluma_debug(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "message", NULL };
- PyObject *traceback_module, *mdict, *func, *traceback, *tuple;
- PyObject *filename, *lineno, *funcname;
- char *message = NULL;
-
- if (g_getenv ("PLUMA_DEBUG_PLUGINS") == NULL)
- {
- Py_INCREF (Py_None);
- return Py_None;
- }
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "|s", kwlist, &message))
- return NULL;
-
- traceback_module = PyImport_ImportModule ("traceback");
- if (traceback_module == NULL)
- {
- g_warning ("traceback module cannot be imported");
- Py_INCREF (Py_None);
- return Py_None;
- }
-
- mdict = PyModule_GetDict (traceback_module);
- func = PyDict_GetItemString (mdict, "extract_stack");
- traceback = PyObject_CallFunction (func, "zi", NULL, 1);
- tuple = PyList_GetItem (traceback, 0);
-
- if (tuple == NULL || !PyTuple_Check (tuple))
- {
- g_warning ("traceback tuple is null!");
- }
- else
- {
- filename = PyTuple_GetItem (tuple, 0);
- lineno = PyTuple_GetItem (tuple, 1);
- funcname = PyTuple_GetItem (tuple, 2);
-
- if (message == NULL)
- pluma_debug (PLUMA_DEBUG_PLUGINS,
- PyString_AsString (filename),
- PyInt_AsLong (lineno),
- PyString_AsString (funcname));
- else
- pluma_debug_message (PLUMA_DEBUG_PLUGINS,
- PyString_AsString (filename),
- PyInt_AsLong (lineno),
- PyString_AsString (funcname),
- "%s",
- message);
- }
- Py_DECREF (traceback);
- Py_DECREF (traceback_module);
-
- Py_INCREF (Py_None);
- return Py_None;
-}
-%%
-override pluma_statusbar_flash_message kwargs
-static PyObject *
-_wrap_pluma_statusbar_flash_message(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "context_id", "message", NULL };
- int context_id;
- char *message;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"is:PlumaStatusbar.flash_message", kwlist, &context_id, &message))
- return NULL;
-
- pluma_statusbar_flash_message(PLUMA_STATUSBAR(self->obj), context_id, "%s", message);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
diff --git a/plugin-loaders/python/bindings/plumacommands.defs b/plugin-loaders/python/bindings/plumacommands.defs
deleted file mode 100644
index 241b52d6..00000000
--- a/plugin-loaders/python/bindings/plumacommands.defs
+++ /dev/null
@@ -1,45 +0,0 @@
-;; -*- scheme -*-
-; object definitions ...
-;; Enumerations and flags ...
-
-
-;; From ../../pluma/pluma-commands.h
-
-(define-function load_uri
- (c-name "pluma_commands_load_uri")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- '("const-gchar*" "uri")
- '("const-PlumaEncoding*" "encoding")
- '("gint" "line_pos")
- )
-)
-
-(define-function load_uris
- (c-name "pluma_commands_load_uris")
- (return-type "gint")
- (parameters
- '("PlumaWindow*" "window")
- '("const-GSList*" "uris")
- '("const-PlumaEncoding*" "encoding")
- '("gint" "line_pos")
- )
-)
-
-(define-function save_document
- (c-name "pluma_commands_save_document")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- '("PlumaDocument*" "document")
- )
-)
-
-(define-function save_all_documents
- (c-name "pluma_commands_save_all_documents")
- (return-type "none")
- (parameters
- '("PlumaWindow*" "window")
- )
-)
diff --git a/plugin-loaders/python/bindings/plumacommands.override b/plugin-loaders/python/bindings/plumacommands.override
deleted file mode 100644
index 9713b5e0..00000000
--- a/plugin-loaders/python/bindings/plumacommands.override
+++ /dev/null
@@ -1,122 +0,0 @@
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#define NO_IMPORT_PYGTK
-#include <pygobject.h>
-#include <pygtk/pygtk.h>
-
-#include "pluma-commands.h"
-#include "pluma-window.h"
-
-void pyplumacommands_register_classes (PyObject *d);
-void pyplumacommands_add_constants (PyObject *module, const gchar *strip_prefix);
-
-%%
-modulename pluma.commands
-%%
-import pluma.Window as PyPlumaWindow_Type
-import pluma.Document as PyPlumaDocument_Type
-%%
-ignore-glob
- _*
-%%
-override pluma_commands_load_uri kwargs
-static PyObject *
-_wrap_pluma_commands_load_uri (PyObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "window", "uri", "encoding", "line_pos", NULL };
- PyGObject *window;
- char *uri;
- int line_pos = 0;
- PyObject *py_encoding = NULL;
- PlumaEncoding *encoding = NULL;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!s|Oi:load_uri",
- kwlist, &PyPlumaWindow_Type,
- &window, &uri, &py_encoding,
- &line_pos))
- return NULL;
-
- if (py_encoding != NULL && py_encoding != Py_None)
- {
- if (pyg_boxed_check (py_encoding, PLUMA_TYPE_ENCODING))
- encoding = pyg_boxed_get (py_encoding, PlumaEncoding);
- else
- {
- PyErr_SetString (PyExc_TypeError,
- "encoding should be a PlumaEncoding");
- return NULL;
- }
- }
-
- pluma_commands_load_uri (PLUMA_WINDOW (window->obj), uri, encoding,
- line_pos);
- Py_INCREF (Py_None);
- return Py_None;
-}
-%%
-override pluma_commands_load_uris kwargs
-static PyObject *
-_wrap_pluma_commands_load_uris (PyObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "window", "uris", "encoding", "line_pos", NULL };
- PyGObject *window;
- GSList *uris = NULL;
- int line_pos = 0;
- PyObject *py_encoding = NULL;
- PyObject *list;
- PyObject *item;
- PlumaEncoding *encoding = NULL;
- int len;
- int i;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!O|Oi:load_uri",
- kwlist, &PyPlumaWindow_Type,
- &window, &list, &py_encoding,
- &line_pos))
- return NULL;
-
- if (py_encoding != NULL && py_encoding != Py_None)
- {
- if (pyg_boxed_check (py_encoding, PLUMA_TYPE_ENCODING))
- encoding = pyg_boxed_get (py_encoding, PlumaEncoding);
- else {
- PyErr_SetString (PyExc_TypeError,
- "encoding should be a PlumaEncoding");
- return NULL;
- }
- }
-
- if (!PySequence_Check (list))
- {
- PyErr_SetString (PyExc_TypeError,
- "second argument must be a sequence");
- return NULL;
- }
-
- len = PySequence_Length (list);
-
- for (i = 0; i < len; i++)
- {
- item = PySequence_GetItem (list, i);
- Py_DECREF (item);
-
- if (!PyString_Check (item))
- {
- PyErr_SetString (PyExc_TypeError,
- "sequence item not a string");
- g_slist_free (uris);
- return NULL;
- }
-
- uris = g_slist_prepend (uris, PyString_AsString (item));
- }
-
- uris = g_slist_reverse (uris);
- pluma_commands_load_uris (PLUMA_WINDOW (window->obj), uris,
- encoding, line_pos);
- g_slist_free (uris);
-
- Py_INCREF (Py_None);
- return Py_None;
-}
diff --git a/plugin-loaders/python/bindings/plumamessage.override b/plugin-loaders/python/bindings/plumamessage.override
deleted file mode 100644
index be1090a0..00000000
--- a/plugin-loaders/python/bindings/plumamessage.override
+++ /dev/null
@@ -1,556 +0,0 @@
-%%
-headers
-
-#include <pluma/pluma-message-bus.h>
-#include <pluma/pluma-message.h>
-
-static GType
-_helper_wrap_get_gtype_from_pytype (PyObject *pytype)
-{
- PyTypeObject *type = (PyTypeObject *)pytype;
-
- if (type == &PyList_Type || type == &PyTuple_Type)
- return G_TYPE_STRV;
-
- return pyg_type_from_object (pytype);
-}
-
-static gchar *
-_helper_wrap_get_string (PyObject *obj)
-{
- PyObject *str;
- gchar *result;
-
- str = PyObject_Str (obj);
-
- if (!str)
- return NULL;
-
- result = g_strdup (PyString_AsString (str));
- Py_DECREF (str);
-
- return result;
-}
-
-static int
-_helper_wrap_list_to_gvalue (GValue *gvalue, PyObject *pyvalue)
-{
- int num;
- gchar **lst;
- gint i;
-
- num = PySequence_Size (pyvalue);
- lst = g_new0 (gchar *, num + 1);
-
- for (i = 0; i < num; i++)
- {
- lst[i] = _helper_wrap_get_string (PySequence_GetItem (pyvalue, i));
-
- if (lst[i] == NULL)
- {
- g_strfreev (lst);
- return 1;
- }
- }
-
- g_value_set_boxed (gvalue, lst);
- g_strfreev (lst);
-
- return 0;
-}
-
-static int
-_helper_wrap_get_gvalue_from_pyobject (GValue *gvalue, PyObject *pyvalue)
-{
- if (pyvalue->ob_type == &PyList_Type || pyvalue->ob_type == &PyTuple_Type)
- return _helper_wrap_list_to_gvalue (gvalue, pyvalue);
-
- return pyg_value_from_pyobject(gvalue, pyvalue);
-}
-
-static int
-_helper_wrap_message_set_value(PlumaMessage *message, PyObject *pykey, PyObject *pyvalue)
-{
- gchar *key;
- GType gtype;
- GValue value = {0,};
-
- key = _helper_wrap_get_string(pykey);
-
- if (key == NULL)
- return 0;
-
- gtype = pluma_message_get_key_type(message, key);
-
- if (gtype == 0) {
- PyErr_SetString(PyExc_TypeError, "invalid key");
- g_free (key);
- return 0;
- }
-
- g_value_init(&value, gtype);
-
- if (_helper_wrap_get_gvalue_from_pyobject (&value, pyvalue)) {
- PyErr_SetString(PyExc_TypeError,
- "value is of the wrong type for this key");
- g_free (key);
- return 0;
- }
-
- pluma_message_set_value(message, key, &value);
- g_value_unset(&value);
- g_free (key);
-
- return 1;
-}
-
-typedef void (*ParsePairFunc)(PyObject *key, PyObject *value, gpointer user_data);
-
-static void
-_helper_parse_pairs_dict (PyObject *dict, ParsePairFunc func, gpointer user_data)
-{
- if (!dict)
- return;
-
- PyObject *key, *value;
- Py_ssize_t i = 0;
-
- while (PyDict_Next(dict, &i, &key, &value))
- {
- func(key, value, user_data);
- }
-}
-
-static void
-_helper_parse_pairs(PyObject *args, PyObject *kwargs, ParsePairFunc func, gpointer user_data)
-{
- guint len;
- guint i;
-
- len = PyTuple_Size(args);
-
- for (i = 0; i < len; ++i)
- {
- PyObject *d = PyTuple_GetItem(args, i);
-
- if (PyDict_Check(d))
- _helper_parse_pairs_dict(d, func, user_data);
- }
-
- _helper_parse_pairs_dict(kwargs, func, user_data);
-}
-
-static void
-_helper_message_set(PyObject *key, PyObject *value, PlumaMessage *message)
-{
- _helper_wrap_message_set_value(message, key, value);
-}
-
-static void
-_helper_message_set_values(PlumaMessage *message, PyObject *args, PyObject *kwargs)
-{
- _helper_parse_pairs(args, kwargs, (ParsePairFunc)_helper_message_set, message);
-}
-
-static PlumaMessage *
-_helper_wrap_create_message(PlumaMessageBus *bus, PyObject *args, PyObject *kwargs)
-{
- PyObject *pypath, *pymethod, *pydict;
-
- if (!PyArg_ParseTuple(args, "OO|O:PlumaMessage.create", &pypath, &pymethod, &pydict))
- return NULL;
-
- gchar *object_path = _helper_wrap_get_string(pypath);
- gchar *method = _helper_wrap_get_string(pymethod);
-
- PlumaMessageType *message_type = pluma_message_bus_lookup (bus, object_path, method);
- PlumaMessage *message;
-
- if (message_type)
- {
- message = pluma_message_type_instantiate(message_type, NULL);
- _helper_message_set_values(message, args, kwargs);
- }
- else
- {
- PyErr_SetString(PyExc_StandardError, "Message type does not exist");
- message = NULL;
- }
-
- g_free(object_path);
- g_free(method);
-
- return message;
-}
-
-typedef struct {
- PyObject *func;
- PyObject *data;
-} PyPlumaCustomNotify;
-
-static void
-pypluma_custom_destroy_notify(gpointer user_data)
-{
- PyPlumaCustomNotify *cunote = user_data;
- PyGILState_STATE state;
-
- g_return_if_fail(user_data);
- state = pyg_gil_state_ensure();
- Py_XDECREF(cunote->func);
- Py_XDECREF(cunote->data);
- pyg_gil_state_release(state);
-
- g_free(cunote);
-}
-%%
-ignore-glob
- *_get_type
- pluma_message_type_foreach
- pluma_message_type_instantiate_valist
- pluma_message_type_new_valist
- pluma_message_get_valist
- pluma_message_set_valist
- pluma_message_set_valuesv
- pluma_message_bus_disconnect_by_func
- pluma_message_bus_block_by_func
- pluma_message_bus_unblock_by_func
-%%
-override pluma_message_type_new kwargs
-
-typedef struct
-{
- PlumaMessageType *message_type;
- PyObject *optional;
-} MessageTypeSetInfo;
-
-static void
-_message_type_set(PyObject *key, PyObject *value, MessageTypeSetInfo *info)
-{
- GType gtype;
-
- gchar *k = _helper_wrap_get_string(key);
-
- if (!k)
- return;
-
- gtype = _helper_wrap_get_gtype_from_pytype(value);
-
- gboolean optional = info->optional && PySequence_Contains(info->optional, key);
-
- pluma_message_type_set(info->message_type, optional, k, gtype, NULL);
- g_free(k);
-}
-
-static int
-_wrap_pluma_message_type_new(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- PyObject *pypath, *pymethod, *optional = NULL, *pydict;
-
- if (!PyArg_ParseTuple(args, "OO|OO:PlumaMessageType.new", &pypath, &pymethod, &optional, &pydict))
- return -1;
-
- PlumaMessageType *message_type = PLUMA_MESSAGE_TYPE(g_object_new(pyg_type_from_object((PyObject *) self), NULL));
-
- MessageTypeSetInfo info = {message_type, optional && PySequence_Check(optional) ? optional : NULL};
- _helper_parse_pairs (args, kwargs, (ParsePairFunc)_message_type_set, &info);
-
- self->obj = (GObject *)message_type;
- pygobject_register_wrapper((PyObject *) self);
-
- return 0;
-}
-%%
-override pluma_message_type_instantiate kwargs
-static PyObject *
-_wrap_pluma_message_type_instantiate(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- PlumaMessageType *message_type = PLUMA_MESSAGE_TYPE (self->obj);
- PlumaMessage *message = pluma_message_type_instantiate(message_type, NULL);
-
- _helper_message_set_values(message, args, kwargs);
-
- return pygobject_new((GObject *)message);
-}
-%%
-override pluma_message_get args
-static PyObject *
-_wrap_pluma_message_get(PyGObject *self, PyObject *args)
-{
- guint len, i;
- PyObject *ret;
-
- len = PyTuple_Size(args);
-
- ret = PyTuple_New(len);
-
- for (i = 0; i < len; i++) {
- GValue value = { 0, };
- PyObject *py_key = PyTuple_GetItem(args, i);
- gchar *key = _helper_wrap_get_string(py_key);
-
- if (!key) {
- PyErr_SetString(PyExc_TypeError, "keys must be strings");
- Py_DECREF(ret);
- return NULL;
- }
-
- pluma_message_get_value (PLUMA_MESSAGE (self->obj), key, &value);
- g_free (key);
-
- PyTuple_SetItem(ret, i, pyg_value_as_pyobject(&value, TRUE));
- g_value_unset(&value);
- }
-
- return ret;
-}
-%%
-override pluma_message_get_value kwargs
-static PyObject *
-_wrap_pluma_message_get_value(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "key", NULL };
- const gchar *key;
- PyObject *ret;
- GValue value = { 0, };
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:PlumaMessage.get_value", kwlist, &key))
- return NULL;
-
- pluma_message_get_value(PLUMA_MESSAGE(self->obj), key, &value);
- ret = pyg_value_as_pyobject(&value, TRUE);
- g_value_unset(&value);
-
- return ret;
-}
-%%
-override pluma_message_set_value kwargs
-static PyObject *
-_wrap_pluma_message_set_value(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "key", "value", NULL };
- PyObject *pykey, *pyvalue;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:PlumaMessage.set_value", kwlist, &pykey, &pyvalue))
- return NULL;
-
- if (!_helper_wrap_message_set_value(PLUMA_MESSAGE(self->obj), pykey, pyvalue))
- return NULL;
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override pluma_message_set kwargs
-static PyObject *
-_wrap_pluma_message_set (PyGObject *self, PyObject *args, PyObject *kwargs) {
- _helper_message_set_values(PLUMA_MESSAGE(self->obj), args, kwargs);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override pluma_message_bus_new
-static int
-_wrap_pluma_message_bus_new(PyGObject *self)
-{
- pygobject_construct (self, NULL);
-
- if (!self->obj) {
- PyErr_SetString (PyExc_RuntimeError, "could not create pluma.MessageBus object");
- return -1;
- }
-
- return 0;
-}
-%%
-new-constructor PLUMA_TYPE_MESSAGE_BUS
-%%
-override pluma_message_bus_register kwargs
-static PyObject *
-_wrap_pluma_message_bus_register(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- PyObject *pypath, *pymethod, *optional = NULL, *pydict;
- PlumaMessageBus *bus = PLUMA_MESSAGE_BUS(self->obj);
-
- if (!PyArg_ParseTuple(args, "OO|OO:PlumaMessageBus.register", &pypath, &pymethod, &optional, &pydict))
- return NULL;
-
- gchar *object_path = _helper_wrap_get_string(pypath);
- gchar *method = _helper_wrap_get_string(pymethod);
-
- PlumaMessageType *message_type = pluma_message_bus_register(bus, object_path, method, 0, NULL);
-
- g_free(object_path);
- g_free(method);
-
- if (!message_type)
- {
- PyErr_SetString(PyExc_StandardError, "Message type already exists");
- return NULL;
- }
-
- MessageTypeSetInfo info = {message_type, optional && PySequence_Check(optional) ? optional : NULL};
- _helper_parse_pairs (args, kwargs, (ParsePairFunc)_message_type_set, &info);
-
- return pyg_boxed_new(PLUMA_TYPE_MESSAGE_TYPE, message_type, TRUE, TRUE);
-}
-%%
-override pluma_message_bus_connect kwargs
-static void
-pypluma_message_bus_connect_cb(PlumaMessageBus *bus, PlumaMessage *message, gpointer data)
-{
- PyGILState_STATE state;
- PyPlumaCustomNotify *cunote = data;
- PyObject *pybus, *pymessage, *retobj;
-
- g_assert(cunote->func);
-
- state = pyg_gil_state_ensure();
-
- pybus = pygobject_new((GObject *)bus);
- pymessage = pygobject_new((GObject *)message);
-
- if (cunote->data) {
- retobj = PyEval_CallFunction(cunote->func, "(NNO)", pybus, pymessage, cunote->data);
- } else {
- retobj = PyEval_CallFunction(cunote->func, "(NN)", pybus, pymessage);
- }
-
- if (PyErr_Occurred()) {
- PyErr_Print();
- }
-
- Py_XDECREF(retobj);
-
- pyg_gil_state_release(state);
-}
-
-static PyObject *
-_wrap_pluma_message_bus_connect(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "domain", "name", "func", "data", NULL };
- PyObject *pyfunc, *pyarg = NULL;
- const gchar *domain;
- const gchar *name;
- PyPlumaCustomNotify *cunote;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "ssO|O:PlumaMessageBus.connect",
- kwlist, &domain, &name, &pyfunc, &pyarg))
- return NULL;
-
- if (!PyCallable_Check(pyfunc)) {
- PyErr_SetString(PyExc_TypeError, "func must be a callable object");
- return NULL;
- }
- cunote = g_new(PyPlumaCustomNotify, 1);
- Py_INCREF(pyfunc);
- cunote->func = pyfunc;
- Py_XINCREF(pyarg);
- cunote->data = pyarg;
-
- guint id = pluma_message_bus_connect(PLUMA_MESSAGE_BUS(self->obj),
- domain,
- name,
- pypluma_message_bus_connect_cb,
- (gpointer)cunote,
- pypluma_custom_destroy_notify);
- return PyLong_FromUnsignedLong(id);
-}
-%%
-override pluma_message_bus_send kwargs
-static PyObject *
-_wrap_pluma_message_bus_send(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- /* create a new message object */
- PlumaMessage *message;
- PlumaMessageBus *bus = PLUMA_MESSAGE_BUS(self->obj);
- message = _helper_wrap_create_message(bus, args, kwargs);
-
- if (!message)
- return NULL;
-
- pluma_message_bus_send_message(bus, message);
- g_object_unref (message);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override pluma_message_bus_send_sync kwargs
-static PyObject *
-_wrap_pluma_message_bus_send_sync(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- /* create a new message object */
- PlumaMessage *message;
- PlumaMessageBus *bus = PLUMA_MESSAGE_BUS(self->obj);
-
- message = _helper_wrap_create_message(bus, args, kwargs);
-
- if (!message)
- return NULL;
-
- pluma_message_bus_send_message_sync(bus, message);
- return pygobject_new((GObject *)message);
-}
-%%
-override-slot PlumaMessage.tp_getattro
-static PyObject *
-_wrap_pluma_message_tp_getattro(PyObject *self, PyObject *attrname)
-{
- PlumaMessage *message = PLUMA_MESSAGE(((PyGObject *)self)->obj);
- PlumaMessageType *type;
-
- gchar *name = _helper_wrap_get_string (attrname);
- gboolean exists;
- gboolean intype;
- PyObject *ret;
-
- if (name == NULL)
- {
- PyErr_SetString(PyExc_TypeError, "attr name somehow not a string");
- return NULL;
- }
-
- g_object_get (message, "type", &type, NULL);
- intype = pluma_message_type_lookup (type, name) != G_TYPE_INVALID;
- pluma_message_type_unref (type);
-
- exists = pluma_message_has_key (message, name);
-
- if (!intype)
- {
- ret = PyObject_GenericGetAttr(self, attrname);
- }
- else if (exists)
- {
- GValue value = { 0, };
- pluma_message_get_value (message, name, &value);
- ret = pyg_value_as_pyobject(&value, TRUE);
- g_value_unset (&value);
- }
- else
- {
- Py_INCREF(Py_None);
- ret = Py_None;
- }
-
- g_free (name);
- return ret;
-}
-%%
-override-slot PlumaMessage.tp_setattro
-static int
-_wrap_pluma_message_tp_setattro(PyObject *self, PyObject *attrname, PyObject *value)
-{
- PlumaMessage *message = PLUMA_MESSAGE(((PyGObject *)self)->obj);
-
- if (!_helper_wrap_message_set_value(message, attrname, value))
- {
- return PyObject_GenericSetAttr(self, attrname, value);
- }
- else
- {
- return 1;
- }
-}
diff --git a/plugin-loaders/python/bindings/plumaplugin.override b/plugin-loaders/python/bindings/plumaplugin.override
deleted file mode 100644
index a2aad78f..00000000
--- a/plugin-loaders/python/bindings/plumaplugin.override
+++ /dev/null
@@ -1,193 +0,0 @@
-%%
-headers
-#include <pluma/pluma-plugin.h>
-#include <pluma/pluma-window.h>
-%%
-override pluma_plugin_activate kwargs
-static PyObject *
-_wrap_pluma_plugin_activate(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- gpointer klass, klass2;
- static char *kwlist[] = { "window", NULL };
- PyGObject *window;
- PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
-
- if (!PyArg_ParseTupleAndKeywords (args,
- kwargs,
- "O!:PlumaPlugin.activate",
- kwlist,
- &PyPlumaWindow_Type,
- &window))
- return NULL;
-
- klass = g_type_class_ref (pyg_type_from_object (cls));
-
- if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
- {
- klass2 = g_type_class_peek_parent (klass);
- g_type_class_unref (klass);
- klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
- }
-
- if (PLUMA_PLUGIN_CLASS (klass)->activate)
- PLUMA_PLUGIN_CLASS (klass)->activate (PLUMA_PLUGIN (self->obj),
- PLUMA_WINDOW (window->obj));
- else {
- PyErr_SetString (PyExc_NotImplementedError,
- "virtual method PlumaPlugin.activate not implemented");
- g_type_class_unref (klass);
- return NULL;
- }
-
- g_type_class_unref (klass);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-%%
-override pluma_plugin_deactivate kwargs
-static PyObject *
-_wrap_pluma_plugin_deactivate(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- gpointer klass, klass2;
- static char *kwlist[] = {"window", NULL};
- PyGObject *window;
- PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
-
- if (!PyArg_ParseTupleAndKeywords (args,
- kwargs,
- "O!:PlumaPlugin.deactivate",
- kwlist,
- &PyPlumaWindow_Type,
- &window))
- return NULL;
-
- klass = g_type_class_ref (pyg_type_from_object (cls));
-
- if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
- {
- klass2 = g_type_class_peek_parent (klass);
- g_type_class_unref (klass);
- klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
- }
-
- if (PLUMA_PLUGIN_CLASS (klass)->deactivate)
- PLUMA_PLUGIN_CLASS (klass)->deactivate (PLUMA_PLUGIN (self->obj),
- PLUMA_WINDOW (window->obj));
- else {
- PyErr_SetString (PyExc_NotImplementedError,
- "virtual method PlumaPlugin.deactivate not implemented");
- g_type_class_unref (klass);
- return NULL;
- }
-
- g_type_class_unref (klass);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-%%
-override pluma_plugin_update_ui kwargs
-static PyObject *
-_wrap_pluma_plugin_update_ui (PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- gpointer klass, klass2;
- static char *kwlist[] = {"window", NULL};
- PyGObject *window;
- PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
-
- if (!PyArg_ParseTupleAndKeywords (args,
- kwargs,
- "O!:PlumaPlugin.update_ui",
- kwlist,
- &PyPlumaWindow_Type,
- &window))
- return NULL;
-
- klass = g_type_class_ref (pyg_type_from_object (cls));
-
- if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
- {
- klass2 = g_type_class_peek_parent (klass);
- g_type_class_unref (klass);
- klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
- }
-
- if (PLUMA_PLUGIN_CLASS (klass)->update_ui)
- PLUMA_PLUGIN_CLASS (klass)->update_ui (PLUMA_PLUGIN (self->obj),
- PLUMA_WINDOW (window->obj));
- else {
- PyErr_SetString (PyExc_NotImplementedError,
- "virtual method PlumaPlugin.update_ui not implemented");
- g_type_class_unref (klass);
- return NULL;
- }
-
- g_type_class_unref (klass);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-%%
-override pluma_plugin_is_configurable
-static PyObject *
-_wrap_pluma_plugin_is_configurable (PyGObject *self)
-{
- int ret;
- gpointer klass, klass2;
- PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
-
- klass = g_type_class_ref (pyg_type_from_object (cls));
-
- if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
- {
- klass2 = g_type_class_peek_parent (klass);
- g_type_class_unref (klass);
- klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
- }
-
- if (PLUMA_PLUGIN_CLASS (klass)->is_configurable)
- ret = PLUMA_PLUGIN_CLASS (klass)->is_configurable (PLUMA_PLUGIN (self->obj));
- else {
- PyErr_SetString (PyExc_NotImplementedError,
- "virtual method PlumaPlugin.is_configurable not implemented");
- g_type_class_unref (klass);
- return NULL;
- }
-
- g_type_class_unref (klass);
- return PyBool_FromLong (ret);
-}
-
-%%
-override pluma_plugin_configure_dialog
-static PyObject *
-_wrap_pluma_plugin_create_configure_dialog (PyGObject *self)
-{
- GtkWidget *ret;
- gpointer klass, klass2;
- PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
-
- klass = g_type_class_ref(pyg_type_from_object (cls));
-
- if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
- {
- klass2 = g_type_class_peek_parent (klass);
- g_type_class_unref (klass);
- klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
- }
-
- if (PLUMA_PLUGIN_CLASS (klass)->create_configure_dialog)
- ret = PLUMA_PLUGIN_CLASS (klass)->create_configure_dialog (PLUMA_PLUGIN (self->obj));
- else {
- PyErr_SetString (PyExc_NotImplementedError,
- "virtual method PlumaPlugin.create_configure_dialog not implemented");
- g_type_class_unref (klass);
- return NULL;
- }
-
- g_type_class_unref (klass);
-
- /* pygobject_new handles NULL checking */
- return pygobject_new ((GObject *)ret);
-}
diff --git a/plugin-loaders/python/bindings/plumautils.defs b/plugin-loaders/python/bindings/plumautils.defs
deleted file mode 100644
index a9a4738d..00000000
--- a/plugin-loaders/python/bindings/plumautils.defs
+++ /dev/null
@@ -1,67 +0,0 @@
-;; -*- scheme -*-
-
-;; From ../../pluma/pluma-utils.h
-
-(define-function uri_has_writable_scheme
- (c-name "pluma_utils_uri_has_writable_scheme")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "uri")
- )
-)
-
-(define-function uri_has_file_scheme
- (c-name "pluma_utils_uri_has_file_scheme")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "uri")
- )
-)
-
-(define-function uri_exists
- (c-name "pluma_utils_uri_exists")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "text_uri")
- )
-)
-
-(define-function uri_is_valid
- (c-name "pluma_utils_is_valid_uri")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "uri")
- )
-)
-
-(define-function uri_get_dirname
- (c-name "pluma_utils_uri_get_dirname")
- (return-type "gchar*")
- (parameters
- '("const-char*" "uri")
- )
-)
-
-(define-function menu_position_under_widget
- (c-name "pluma_utils_menu_position_under_widget")
- (return-type "none")
- (parameters
- '("GtkMenu*" "menu")
- '("gint*" "x")
- '("gint*" "y")
- '("gboolean*" "push_in")
- '("gpointer" "user_data")
- )
-)
-
-(define-function menu_position_under_tree_view
- (c-name "pluma_utils_menu_position_under_tree_view")
- (return-type "none")
- (parameters
- '("GtkMenu*" "menu")
- '("gint*" "x")
- '("gint*" "y")
- '("gboolean*" "push_in")
- '("gpointer" "user_data")
- )
-)
diff --git a/plugin-loaders/python/bindings/plumautils.override b/plugin-loaders/python/bindings/plumautils.override
deleted file mode 100644
index 3b2116e9..00000000
--- a/plugin-loaders/python/bindings/plumautils.override
+++ /dev/null
@@ -1,85 +0,0 @@
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#define NO_IMPORT_PYGTK
-#include <pygobject.h>
-#include <pygtk/pygtk.h>
-
-#include "pluma-utils.h"
-
-void pyplumautils_register_classes (PyObject *d);
-void pyplumautils_add_constants (PyObject *module, const gchar *strip_prefix);
-
-%%
-modulename pluma.utils
-%%
-import gtk.Widget as PyGtkWidget_Type
-import gtk.TreeView as PyGtkTreeView_Type
-import gtk.Menu as PyGtkMenu_Type
-%%
-ignore-glob
- _*
-%%
-override pluma_utils_menu_position_under_widget kwargs
-static PyObject *
-_wrap_pluma_utils_menu_position_under_widget (PyObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "menu", "widget", NULL };
- PyObject *py_menu, *py_widget;
- GtkMenu *menu;
- GtkWidget *widget;
- gint x, y;
- gboolean push_in;
- PyObject *tuple;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
- "O!O!", kwlist,
- &PyGtkMenu_Type, &py_menu,
- &PyGtkWidget_Type, &py_widget))
- return NULL;
-
- menu = GTK_MENU (pygobject_get (py_menu));
- widget = GTK_WIDGET (pygobject_get (py_widget));
-
- pluma_utils_menu_position_under_widget (menu, &x, &y, &push_in, widget);
-
- tuple = PyTuple_New (3);
- PyTuple_SetItem (tuple, 0, PyInt_FromLong (x));
- PyTuple_SetItem (tuple, 1, PyInt_FromLong (y));
- PyTuple_SetItem (tuple, 2, PyBool_FromLong (push_in));
- return tuple;
-}
-%%
-override pluma_utils_menu_position_under_tree_view kwargs
-static PyObject *
-_wrap_pluma_utils_menu_position_under_tree_view (PyObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "menu", "tree_view", NULL };
- PyObject *py_menu, *py_view;
- GtkMenu *menu;
- GtkTreeView *view;
- gint x, y;
- gboolean push_in;
- PyObject *tuple;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
- "O!O!", kwlist,
- &PyGtkMenu_Type, &py_menu,
- &PyGtkTreeView_Type, &py_view))
- return NULL;
-
- menu = GTK_MENU (pygobject_get (py_menu));
- view = GTK_TREE_VIEW (pygobject_get (py_view));
-
- pluma_utils_menu_position_under_widget (menu, &x, &y, &push_in, view);
-
- tuple = PyTuple_New (3);
- PyTuple_SetItem (tuple, 0, PyInt_FromLong (x));
- PyTuple_SetItem (tuple, 1, PyInt_FromLong (y));
- PyTuple_SetItem (tuple, 2, PyBool_FromLong (push_in));
- return tuple;
-}