property and changeProperty
fluxgen fluxgen
2 files changed,
49 insertions(+),
2 deletions(-)
M
src/FbTk/FbWindow.cc
→
src/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.hh
→
src/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; }