property and changeProperty
This commit is contained in:
parent
52a71aa781
commit
3027bf1341
2 changed files with 49 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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 "FbWindow.hh"
|
||||||
#include "EventManager.hh"
|
#include "EventManager.hh"
|
||||||
|
@ -188,6 +188,37 @@ void FbWindow::unsetCursor() {
|
||||||
XUndefineCursor(s_display, window());
|
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 {
|
int FbWindow::screenNumber() const {
|
||||||
return m_screen_num;
|
return m_screen_num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
#ifndef FBTK_FBWINDOW_HH
|
||||||
#define FBTK_FBWINDOW_HH
|
#define FBTK_FBWINDOW_HH
|
||||||
|
@ -90,6 +90,22 @@ public:
|
||||||
/// uses the parents cursor instead
|
/// uses the parents cursor instead
|
||||||
void unsetCursor();
|
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
|
/// @return parent FbWindow
|
||||||
const FbWindow *parent() const { return m_parent; }
|
const FbWindow *parent() const { return m_parent; }
|
||||||
/// @return real X window
|
/// @return real X window
|
||||||
|
|
Loading…
Reference in a new issue