1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef _BLACKBOX_UTIL_HH
3 #define _BLACKBOX_UTIL_HH
9 #ifdef TIME_WITH_SYS_TIME
10 # include <sys/time.h>
12 #else // !TIME_WITH_SYS_TIME
13 # ifdef HAVE_SYS_TIME_H
14 # include <sys/time.h>
15 # else // !HAVE_SYS_TIME_H
17 # endif // HAVE_SYS_TIME_H
18 #endif // TIME_WITH_SYS_TIME
28 unsigned int top, bottom, left, right;
30 Strut(void): top(0), bottom(0), left(0), right(0) {}
33 /* XXX: this needs autoconf help */
34 const unsigned int BSENTINEL = 65535;
36 std::string expandTilde(const std::string& s);
38 void bexec(const std::string& command, const std::string& displaystring);
40 std::string textPropertyToString(Display *display, XTextProperty& text_prop);
42 std::string itostring(unsigned long i);
43 std::string itostring(long i);
44 inline std::string itostring(unsigned int i)
45 { return itostring((unsigned long) i); }
46 inline std::string itostring(int i)
47 { return itostring((long) i); }
52 std::string basename(const std::string& path);