Bind moo_text_view_set_lang_by_id
parent
5b14fd39fd
commit
cb5c12de98
|
@ -5,17 +5,25 @@ docparser_files = \
|
||||||
mdp/docparser.py \
|
mdp/docparser.py \
|
||||||
mdp/xmlwriter.py
|
mdp/xmlwriter.py
|
||||||
|
|
||||||
mpi_files = \
|
gendefs_files = \
|
||||||
gendefs.py \
|
gendefs.py \
|
||||||
mpi/__init__.py \
|
mpi/__init__.py \
|
||||||
mpi/module.py \
|
mpi/module.py \
|
||||||
mpi/defswriter.py
|
mpi/defswriter.py
|
||||||
|
|
||||||
|
genlua_files = \
|
||||||
|
genlua.py \
|
||||||
|
mpi/__init__.py \
|
||||||
|
mpi/module.py \
|
||||||
|
mpi/luawriter.py
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
$(docparser_files) \
|
$(docparser_files) \
|
||||||
$(xmlparser_files) \
|
$(gendefs_files) \
|
||||||
|
$(genlua_files) \
|
||||||
sourcefiles.mak \
|
sourcefiles.mak \
|
||||||
moo.defs \
|
moo.defs \
|
||||||
|
moo-lua.cpp \
|
||||||
moo.xml
|
moo.xml
|
||||||
|
|
||||||
BUILT_SOURCES =
|
BUILT_SOURCES =
|
||||||
|
@ -25,7 +33,7 @@ if MOO_DEV_MODE
|
||||||
include sourcefiles.mak
|
include sourcefiles.mak
|
||||||
|
|
||||||
BUILT_SOURCES += moo.xml.stamp
|
BUILT_SOURCES += moo.xml.stamp
|
||||||
moo.xml.stamp: $(docparser_files) $(source_files) Makefile
|
moo.xml.stamp: $(docparser_files) $(source_files)
|
||||||
$(PYTHON) $(srcdir)/parsedocs.py \
|
$(PYTHON) $(srcdir)/parsedocs.py \
|
||||||
--source-dir $(top_srcdir)/moo/mooapp \
|
--source-dir $(top_srcdir)/moo/mooapp \
|
||||||
--source-dir $(top_srcdir)/moo/mooedit \
|
--source-dir $(top_srcdir)/moo/mooedit \
|
||||||
|
@ -40,10 +48,17 @@ moo.xml.stamp: $(docparser_files) $(source_files) Makefile
|
||||||
echo stamp > moo.xml.stamp
|
echo stamp > moo.xml.stamp
|
||||||
|
|
||||||
BUILT_SOURCES += moo.defs.stamp
|
BUILT_SOURCES += moo.defs.stamp
|
||||||
moo.defs.stamp: $(mpi_files) moo.xml Makefile
|
moo.defs.stamp: $(gendefs_files) moo.xml Makefile
|
||||||
$(PYTHON) $(srcdir)/gendefs.py $(srcdir)/moo.xml > moo.defs.tmp && \
|
$(PYTHON) $(srcdir)/gendefs.py $(srcdir)/moo.xml > moo.defs.tmp && \
|
||||||
(cmp -s moo.defs.tmp $(srcdir)/moo.defs || mv moo.defs.tmp $(srcdir)/moo.defs)
|
(cmp -s moo.defs.tmp $(srcdir)/moo.defs || mv moo.defs.tmp $(srcdir)/moo.defs)
|
||||||
rm -f moo.defs.tmp
|
rm -f moo.defs.tmp
|
||||||
echo stamp > moo.defs.stamp
|
echo stamp > moo.defs.stamp
|
||||||
|
|
||||||
|
BUILT_SOURCES += moo-lua.cpp.stamp
|
||||||
|
moo-lua.cpp.stamp: $(genlua_files) moo.xml Makefile
|
||||||
|
$(PYTHON) $(srcdir)/genlua.py $(srcdir)/moo.xml > moo-lua.cpp.tmp && \
|
||||||
|
(cmp -s moo-lua.cpp.tmp $(srcdir)/moo-lua.cpp || mv moo-lua.cpp.tmp $(srcdir)/moo-lua.cpp)
|
||||||
|
rm -f moo-lua.cpp.tmp
|
||||||
|
echo stamp > moo-lua.cpp.stamp
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from mpi.module import Module
|
||||||
|
from mpi.luawriter import Writer
|
||||||
|
|
||||||
|
assert len(sys.argv) == 2
|
||||||
|
mod = Module.from_xml(sys.argv[1])
|
||||||
|
Writer(sys.stdout).write(mod)
|
|
@ -1181,6 +1181,15 @@
|
||||||
(is-constructor-of MooTextView)
|
(is-constructor-of MooTextView)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(define-method set_lang_by_id
|
||||||
|
(of-object "MooTextView")
|
||||||
|
(c-name "moo_text_view_set_lang_by_id")
|
||||||
|
(return-type "none")
|
||||||
|
(parameters
|
||||||
|
'("const-char*" "id")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
; methods of MooUiXml
|
; methods of MooUiXml
|
||||||
|
|
||||||
(define-function MooUiXml__new
|
(define-function MooUiXml__new
|
||||||
|
|
|
@ -332,7 +332,11 @@
|
||||||
<virtual name="init" />
|
<virtual name="init" />
|
||||||
</class>
|
</class>
|
||||||
<class gtype_id="MOO_TYPE_TEXT_BUFFER" name="MooTextBuffer" parent="GtkTextBuffer" short_name="TextBuffer" />
|
<class gtype_id="MOO_TYPE_TEXT_BUFFER" name="MooTextBuffer" parent="GtkTextBuffer" short_name="TextBuffer" />
|
||||||
<class constructable="1" gtype_id="MOO_TYPE_TEXT_VIEW" name="MooTextView" parent="GtkTextView" short_name="TextView" />
|
<class constructable="1" gtype_id="MOO_TYPE_TEXT_VIEW" name="MooTextView" parent="GtkTextView" short_name="TextView">
|
||||||
|
<method c_name="moo_text_view_set_lang_by_id" name="set_lang_by_id">
|
||||||
|
<param name="id" type="const-char*" />
|
||||||
|
</method>
|
||||||
|
</class>
|
||||||
<class constructable="1" gtype_id="MOO_TYPE_UI_XML" name="MooUiXml" parent="GObject" short_name="UiXml">
|
<class constructable="1" gtype_id="MOO_TYPE_UI_XML" name="MooUiXml" parent="GObject" short_name="UiXml">
|
||||||
<method c_name="moo_ui_xml_add_item" name="add_item">
|
<method c_name="moo_ui_xml_add_item" name="add_item">
|
||||||
<param name="merge_id" type="guint" />
|
<param name="merge_id" type="guint" />
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
class Writer(object):
|
||||||
|
def __init__(self, out):
|
||||||
|
super(Writer, self).__init__()
|
||||||
|
self.out = out
|
||||||
|
|
||||||
|
def write(self, module):
|
||||||
|
self.module = module
|
||||||
|
del self.module
|
|
@ -2607,6 +2607,9 @@ moo_text_view_set_lang (MooTextView *view,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* moo_text_view_set_lang_by_id:
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
moo_text_view_set_lang_by_id (MooTextView *view,
|
moo_text_view_set_lang_by_id (MooTextView *view,
|
||||||
const char *lang_id)
|
const char *lang_id)
|
||||||
|
|
Loading…
Reference in New Issue