15 #include "otk/screeninfo.hh"
46 blackbox_change_attributes,
49 // blackbox-protocol atoms (wm -> client)
50 blackbox_structure_messages,
51 blackbox_notify_startup,
52 blackbox_notify_window_add,
53 blackbox_notify_window_del,
54 blackbox_notify_window_focus,
55 blackbox_notify_current_workspace,
56 blackbox_notify_workspace_count,
57 blackbox_notify_window_raise,
58 blackbox_notify_window_lower,
59 // blackbox-protocol atoms (client -> wm)
60 blackbox_change_workspace,
61 blackbox_change_window_focus,
62 blackbox_cycle_window_focus,
64 openbox_show_root_menu,
65 openbox_show_workspace_menu,
68 // root window properties
71 net_client_list_stacking,
72 net_number_of_desktops,
79 net_supporting_wm_check,
81 // root window messages
84 // application window properties
89 net_wm_visible_icon_name,
94 // net_wm_icon_geometry,
97 // net_wm_handled_icons,
98 net_wm_allowed_actions,
99 // application protocols
102 net_wm_window_type_desktop,
103 net_wm_window_type_dock,
104 net_wm_window_type_toolbar,
105 net_wm_window_type_menu,
106 net_wm_window_type_utility,
107 net_wm_window_type_splash,
108 net_wm_window_type_dialog,
109 net_wm_window_type_normal,
111 net_wm_moveresize_size_topleft,
112 net_wm_moveresize_size_topright,
113 net_wm_moveresize_size_bottomleft,
114 net_wm_moveresize_size_bottomright,
115 net_wm_moveresize_move,
118 net_wm_action_resize,
120 net_wm_action_maximize_horz,
121 net_wm_action_maximize_vert,
122 net_wm_action_change_desktop,
126 net_wm_state_maximized_vert,
127 net_wm_state_maximized_horz,
129 net_wm_state_skip_taskbar,
130 net_wm_state_skip_pager,
132 net_wm_state_fullscreen,
134 kde_net_system_tray_windows,
135 kde_net_wm_system_tray_window_for,
136 kde_net_wm_window_type_override,
138 // constant for how many atoms exist in the enumerator
149 typedef std::vector<Window> SupportWindows;
152 // windows used to specify support for NETWM
153 SupportWindows _support_windows;
154 Atom _atoms[NUM_ATOMS];
156 Atom create(const char *name) const;
158 void setValue(Window win, Atom atom, Atom type, unsigned char *data,
159 int size, int nelements, bool append) const;
160 bool getValue(Window win, Atom atom, Atom type,
161 unsigned long &nelements, unsigned char **value,
165 XAtom(const XAtom &);
166 XAtom& operator=(const XAtom&);
169 typedef std::vector<std::string> StringVect;
174 // setup support on a screen, each screen should call this once in its
176 void setSupported(const otk::ScreenInfo *screen);
178 void setValue(Window win, Atoms atom, Atoms type, unsigned long value) const;
179 void setValue(Window win, Atoms atom, Atoms type,
180 unsigned long value[], int elements) const;
181 void setValue(Window win, Atoms atom, StringType type,
182 const std::string &value) const;
183 void setValue(Window win, Atoms atom, StringType type,
184 const StringVect &strings) const;
186 // the 'value' is allocated inside the function and
187 // delete [] value needs to be called when you are done with it.
188 // the 'value' array returned is null terminated, and has 'nelements'
189 // elements in it plus the null.
190 // nelements must be set to the maximum number of elements to read from
192 bool getValue(Window win, Atoms atom, Atoms type,
193 unsigned long &nelements, unsigned long **value) const;
194 bool getValue(Window win, Atoms atom, Atoms type, unsigned long &value) const;
195 bool getValue(Window win, Atoms atom, StringType type,
196 std::string &value) const;
197 bool getValue(Window win, Atoms atom, StringType type,
198 unsigned long &nelements, StringVect &strings) const;
200 void eraseValue(Window win, Atoms atom) const;
202 // sends a client message a window
203 void sendClientMessage(Window target, Atoms type, Window about,
204 long data = 0, long data1 = 0, long data2 = 0,
205 long data3 = 0, long data4 = 0) const;
207 // temporary function!! remove when not used in blackbox.hh anymore!!
208 inline Atom getAtom(Atoms a)
209 { assert(a >= 0 && a < NUM_ATOMS); Atom ret = _atoms[a];
210 assert(ret != 0); return ret; }