diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-11 17:08:39 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-06-15 23:12:52 (GMT) |
commit | e963304b5c274c0ea5973f505e2a6f3f7f151054 (patch) | |
tree | bc30a2f7ae583d3d74c28432bbe147ef59e3bcc4 /src/main.cc | |
parent | c8c612eccf722cff6427ac4e3e5ed118b7deb69e (diff) | |
download | fluxbox_pavel-e963304b5c274c0ea5973f505e2a6f3f7f151054.zip fluxbox_pavel-e963304b5c274c0ea5973f505e2a6f3f7f151054.tar.bz2 |
Add support for array lua resources
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc index f340ada..a18ae56 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -413,16 +413,17 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) { | |||
413 | } | 413 | } |
414 | } | 414 | } |
415 | 415 | ||
416 | 416 | #include "WinButton.hh" | |
417 | int main(int argc, char **argv) { | 417 | int main(int argc, char **argv) { |
418 | 418 | ||
419 | lua::state l; | 419 | lua::state l; |
420 | FbTk::LResourceManager::initState(l); | 420 | FbTk::LResourceManager::initState(l); |
421 | FbTk::LResourceManager man(l, "session"); | 421 | FbTk::LResourceManager man(l, "session"); |
422 | l.loadstring("session.asdf = 321; session.q=456;"); | 422 | l.loadstring("session.asdf = {'close', 'close'}; session.q={{1,2,{3,4}},{{z={{5}}}}};"); |
423 | l.call(0,0); | 423 | l.call(0,0); |
424 | FbTk::Resource<int> asdf(man, 123, "asdf", "ASDF"); | 424 | man.save("/dev/stdout", NULL); |
425 | cout << "asdf: " << asdf << endl; | 425 | FbTk::Resource<std::vector<WinButton::Type>, FbTk::VectorTraits<FbTk::EnumTraits<WinButton::Type> > > asdf(man, std::vector<WinButton::Type>(), "asdf", "ASDF"); |
426 | cout << "asdf: " << asdf.getString() << endl; | ||
426 | man.save("/dev/stdout", NULL); | 427 | man.save("/dev/stdout", NULL); |
427 | return 0; | 428 | return 0; |
428 | 429 | ||