From 39e88f3f6f83d78458cc755f717826d89f965750 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 1 Sep 2004 19:03:14 +0000 Subject: update --- src/tests/testKeys.cc | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/src/tests/testKeys.cc b/src/tests/testKeys.cc index 27873e0..5094e80 100644 --- a/src/tests/testKeys.cc +++ b/src/tests/testKeys.cc @@ -1,5 +1,5 @@ // testKeys.cc -// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org) +// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen@linuxmail.org) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -19,44 +19,25 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -#include "../Keys.hh" #include -#include - - -#ifdef UDS -#include -#include -// configure UDS -uds::uds_flags_t uds::flags = uds::leak_check|uds::log_allocs; -#endif +#include "../FbTk/App.hh" +#include "../FbTk/KeyUtil.hh" using namespace std; void testKeys(int argc, char **argv) { - Display *display = XOpenDisplay(0); - - if (display==0) { + FbTk::App app(0); + if (app.display() == 0) { cerr<<"Cant open display."<1) { - cerr<<"Loading file: "<load(const_cast(argv[1])); - } else { - cerr<<"Using default file: "<load(const_cast(default_keyfile)); - } - - keys->load(const_cast(default_keyfile)); - - delete keys; - - XCloseDisplay(display); + std::string theline; + cout<<"Type key: "; + getline(cin, theline); + unsigned int key = FbTk::KeyUtil::getKey(theline.c_str()); + cerr<<"key = "<