From c8c612eccf722cff6427ac4e3e5ed118b7deb69e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 5 Jun 2011 14:40:52 +0200 Subject: temporary commit for testing lua resource manager --- src/main.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main.cc b/src/main.cc index 057a863..f340ada 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,6 +34,8 @@ #include "FbTk/I18n.hh" #include "FbTk/CommandParser.hh" #include "FbTk/FileUtil.hh" +#include "FbTk/Luamm.hh" +#include "FbTk/LResource.hh" //use GNU extensions #ifndef _GNU_SOURCE @@ -414,6 +416,17 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) { int main(int argc, char **argv) { + lua::state l; + FbTk::LResourceManager::initState(l); + FbTk::LResourceManager man(l, "session"); + l.loadstring("session.asdf = 321; session.q=456;"); + l.call(0,0); + FbTk::Resource asdf(man, 123, "asdf", "ASDF"); + cout << "asdf: " << asdf << endl; + man.save("/dev/stdout", NULL); + return 0; + + FbTk::NLSInit("fluxbox.cat"); Options opts; -- cgit v0.11.2