From c498c0a73b72be8d1dc3a492e88ce52246ec8d67 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 4 May 2010 13:37:29 +0800 Subject: [PATCH] begin to integrate lua ext. --- src/ExtEditor.h | 15 +++++++++++++++ src/Makefile.am | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/src/ExtEditor.h b/src/ExtEditor.h index cd04787..78d1d66 100644 --- a/src/ExtEditor.h +++ b/src/ExtEditor.h @@ -3,6 +3,13 @@ #define __PY_EXT_EDITOR__ #include +extern "C" { +#include +#include +#include +#include "lua-plugin.h" +} +#include #include "Editor.h" namespace PY { @@ -20,7 +27,15 @@ public: virtual void reset (void); virtual void candidateClicked (guint index, guint button, guint state); + int load_lua_script(std::string filename); + void reset_lua_state(); + private: + Pointer m_lua_plugin; + lua_command_t * m_current_command; + std::string m_input; + + LookupTable m_lookup_table; }; }; diff --git a/src/Makefile.am b/src/Makefile.am index 29a1d01..d15d5aa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -118,10 +118,14 @@ ibus_engine_pinyin_CXXFLAGS = \ -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ + -I../lua/ \ $(NULL) + ibus_engine_pinyin_LDADD = \ @IBUS_LIBS@ \ @SQLITE_LIBS@ \ + -L../lua/ \ + -lpylua \ $(NULL) if HAVE_LIBUUID -- 2.7.4