all repos — fluxbox @ 3027bf1341cf3ac82889846ceeb1e9cf7f955502

custom fork of the fluxbox windowmanager

property and changeProperty
fluxgen fluxgen
commit

3027bf1341cf3ac82889846ceeb1e9cf7f955502

parent

52a71aa781c861ee0d604a546630ce5a57ec1ad4

2 files changed, 49 insertions(+), 2 deletions(-)

jump to
M src/FbTk/FbWindow.ccsrc/FbTk/FbWindow.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.cc,v 1.19 2003/05/19 08:27:49 rathnor Exp $ +// $Id: FbWindow.cc,v 1.20 2003/05/19 22:38:55 fluxgen Exp $ #include "FbWindow.hh" #include "EventManager.hh"

@@ -186,6 +186,37 @@ }

void FbWindow::unsetCursor() { XUndefineCursor(s_display, window()); +} + + +bool FbWindow::property(Atom property, + long long_offset, long long_length, + bool do_delete, + Atom req_type, + Atom *actual_type_return, + int *actual_format_return, + unsigned long *nitems_return, + unsigned long *bytes_after_return, + unsigned char **prop_return) const { + if (XGetWindowProperty(s_display, window(), + property, long_offset, long_length, do_delete, + req_type, actual_type_return, + actual_format_return, nitems_return, + bytes_after_return, prop_return) == Success) + return true; + + return false; +} + +void FbWindow::changeProperty(Atom property, Atom type, + int format, + int mode, + unsigned char *data, + int nelements) { + + XChangeProperty(s_display, m_window, property, type, + format, mode, + data, nelements); } int FbWindow::screenNumber() const {
M src/FbTk/FbWindow.hhsrc/FbTk/FbWindow.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.hh,v 1.16 2003/05/17 10:42:34 fluxgen Exp $ +// $Id: FbWindow.hh,v 1.17 2003/05/19 22:38:54 fluxgen Exp $ #ifndef FBTK_FBWINDOW_HH #define FBTK_FBWINDOW_HH

@@ -89,6 +89,22 @@ /// defines a cursor for this window

void setCursor(Cursor cur); /// uses the parents cursor instead void unsetCursor(); + + bool property(Atom property, + long long_offset, long long_length, + bool do_delete, + Atom req_type, + Atom *actual_type_return, + int *actual_format_return, + unsigned long *nitems_return, + unsigned long *bytes_after_return, + unsigned char **prop_return) const; + + void changeProperty(Atom property, Atom type, + int format, + int mode, + unsigned char *data, + int nelements); /// @return parent FbWindow const FbWindow *parent() const { return m_parent; }