aboutsummaryrefslogtreecommitdiff
path: root/src/PropertyTools.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/PropertyTools.hh')
-rw-r--r--src/PropertyTools.hh38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/PropertyTools.hh b/src/PropertyTools.hh
new file mode 100644
index 0000000..9444531
--- /dev/null
+++ b/src/PropertyTools.hh
@@ -0,0 +1,38 @@
1#ifndef PROPERTY_TOOLS_H
2#define PROPERTY_TOOLS_H
3
4#include <X11/Xlib.h>
5#include <string>
6#include <exception>
7#include <vector>
8
9namespace PropertyTools {
10
11class PropertyException: public std::exception {
12public:
13 PropertyException(const std::string &property) throw():
14 m_property(property) {
15 }
16
17 ~PropertyException() throw () {
18 }
19
20 const char *what() const throw() {
21 return m_property.c_str();
22 }
23
24private:
25 std::string m_property;
26};
27
28/// @return Atom name.
29std::string getAtomName(Atom atom);
30
31
32/// @return Integer value for property \c atom
33unsigned int getIntProperty(Window win, Atom atom) throw (PropertyException);
34Window getWinProperty(Window win, Atom atom) throw (PropertyException);
35void getWinArrayProperty(Window win, Atom atom, std::vector<Window> &cont) throw (PropertyException);
36} // PropertyTools
37
38#endif // PROPERTY_TOOL_H