summaryrefslogtreecommitdiff
path: root/otk/util.hh
diff options
context:
space:
mode:
authorMarius Nita <marius@cs.pdx.edu>2002-11-06 13:51:23 +0000
committerMarius Nita <marius@cs.pdx.edu>2002-11-06 13:51:23 +0000
commit35fcb62ddd4861f857d93941407e3d87d444b2cc (patch)
tree8538b81a0e74689d12ec95fb71f9c4ae6fdf5eab /otk/util.hh
parent0cf6e32e1cd1659adc6f0a95649302758256207a (diff)
added style class, moved util and config to otk
Diffstat (limited to 'otk/util.hh')
-rw-r--r--otk/util.hh49
1 files changed, 49 insertions, 0 deletions
diff --git a/otk/util.hh b/otk/util.hh
new file mode 100644
index 00000000..aac92560
--- /dev/null
+++ b/otk/util.hh
@@ -0,0 +1,49 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+#ifndef _BLACKBOX_UTIL_HH
+#define _BLACKBOX_UTIL_HH
+
+extern "C" {
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else // !TIME_WITH_SYS_TIME
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else // !HAVE_SYS_TIME_H
+# include <time.h>
+# endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+}
+
+
+#include <string>
+#include <vector>
+
+namespace otk {
+
+/* XXX: this needs autoconf help */
+const unsigned int BSENTINEL = 65535;
+
+std::string expandTilde(const std::string& s);
+
+void bexec(const std::string& command, const std::string& displaystring);
+
+std::string textPropertyToString(Display *display, XTextProperty& text_prop);
+
+std::string itostring(unsigned long i);
+std::string itostring(long i);
+inline std::string itostring(unsigned int i)
+ { return itostring((unsigned long) i); }
+inline std::string itostring(int i)
+ { return itostring((long) i); }
+
+}
+
+#ifndef HAVE_BASENAME
+std::string basename(const std::string& path);
+#endif
+
+#endif