compiles with the new render subsystem...

This commit is contained in:
Dana Jansens 2003-01-23 00:14:44 +00:00
parent 17d6318499
commit dd6f906848
13 changed files with 139 additions and 139 deletions

View file

@ -13,21 +13,21 @@
#include "application.hh" #include "application.hh"
#include "assassin.hh" #include "assassin.hh"
#include "button.hh" #include "button.hh"
#include "color.hh" #include "rendercolor.hh"
#include "configuration.hh" #include "configuration.hh"
#include "display.hh" #include "display.hh"
#include "font.hh" #include "font.hh"
#include "gccache.hh" //#include "gccache.hh"
#include "image.hh" #include "rendercontrol.hh"
#include "label.hh" #include "label.hh"
#include "point.hh" #include "point.hh"
#include "property.hh" #include "property.hh"
#include "rect.hh" #include "rect.hh"
#include "screeninfo.hh" #include "screeninfo.hh"
#include "strut.hh" #include "strut.hh"
#include "style.hh" #include "renderstyle.hh"
#include "surface.hh" #include "surface.hh"
#include "texture.hh" #include "rendertexture.hh"
#include "timer.hh" #include "timer.hh"
#include "util.hh" #include "util.hh"
#include "ustring.hh" #include "ustring.hh"

View file

@ -26,21 +26,21 @@ void BackgroundWidget::setTextures()
switch (type()) { switch (type()) {
case Type_Titlebar: case Type_Titlebar:
if (_focused) if (_focused)
setTexture(_style->getTitleFocus()); setTexture(_style->titlebarFocusBackground());
else else
setTexture(_style->getTitleUnfocus()); setTexture(_style->titlebarUnfocusBackground());
break; break;
case Type_Handle: case Type_Handle:
if (_focused) if (_focused)
setTexture(_style->getHandleFocus()); setTexture(_style->handleFocusBackground());
else else
setTexture(_style->getHandleUnfocus()); setTexture(_style->handleUnfocusBackground());
break; break;
case Type_Plate: case Type_Plate:
if (_focused) if (_focused)
setBorderColor(&_style->getFrameFocus()->color()); setBorderColor(_style->clientBorderFocusColor());
else else
setBorderColor(&_style->getFrameUnfocus()->color()); setBorderColor(_style->clientBorderUnfocusColor());
break; break;
default: default:
assert(false); // there's no other background widgets! assert(false); // there's no other background widgets!
@ -48,14 +48,14 @@ void BackgroundWidget::setTextures()
} }
void BackgroundWidget::setStyle(otk::Style *style) void BackgroundWidget::setStyle(otk::RenderStyle *style)
{ {
Widget::setStyle(style); Widget::setStyle(style);
setTextures(); setTextures();
switch (type()) { switch (type()) {
case Type_Titlebar: case Type_Titlebar:
case Type_Handle: case Type_Handle:
setBorderColor(_style->getBorderColor()); setBorderColor(_style->frameBorderColor());
break; break;
case Type_Plate: case Type_Plate:
break; break;

View file

@ -16,7 +16,7 @@ public:
BackgroundWidget(otk::Widget *parent, WidgetBase::WidgetType type); BackgroundWidget(otk::Widget *parent, WidgetBase::WidgetType type);
virtual ~BackgroundWidget(); virtual ~BackgroundWidget();
virtual void setStyle(otk::Style *style); virtual void setStyle(otk::RenderStyle *style);
virtual void adjust(); virtual void adjust();

View file

@ -30,9 +30,9 @@ void ButtonWidget::setTextures()
case Type_LeftGrip: case Type_LeftGrip:
case Type_RightGrip: case Type_RightGrip:
if (_focused) if (_focused)
setTexture(_style->getGripFocus()); setTexture(_style->gripFocusBackground());
else else
setTexture(_style->getGripUnfocus()); setTexture(_style->gripUnfocusBackground());
break; break;
case Type_StickyButton: case Type_StickyButton:
case Type_CloseButton: case Type_CloseButton:
@ -40,14 +40,14 @@ void ButtonWidget::setTextures()
case Type_IconifyButton: case Type_IconifyButton:
if (_pressed) { if (_pressed) {
if (_focused) if (_focused)
setTexture(_style->getButtonPressedFocus()); setTexture(_style->buttonPressFocusBackground());
else else
setTexture(_style->getButtonPressedUnfocus()); setTexture(_style->buttonPressUnfocusBackground());
} else { } else {
if (_focused) if (_focused)
setTexture(_style->getButtonFocus()); setTexture(_style->buttonUnpressFocusBackground());
else else
setTexture(_style->getButtonUnfocus()); setTexture(_style->buttonUnpressUnfocusBackground());
} }
break; break;
default: default:
@ -56,7 +56,7 @@ void ButtonWidget::setTextures()
} }
void ButtonWidget::setStyle(otk::Style *style) void ButtonWidget::setStyle(otk::RenderStyle *style)
{ {
otk::Widget::setStyle(style); otk::Widget::setStyle(style);
setTextures(); setTextures();
@ -64,7 +64,7 @@ void ButtonWidget::setStyle(otk::Style *style)
switch (type()) { switch (type()) {
case Type_LeftGrip: case Type_LeftGrip:
case Type_RightGrip: case Type_RightGrip:
setBorderColor(_style->getBorderColor()); setBorderColor(_style->frameBorderColor());
break; break;
case Type_StickyButton: case Type_StickyButton:
case Type_CloseButton: case Type_CloseButton:
@ -78,26 +78,31 @@ void ButtonWidget::setStyle(otk::Style *style)
void ButtonWidget::update() void ButtonWidget::update()
{
printf("ButtonWidget::update()\n");
}
void ButtonWidget::renderForeground()
{ {
otk::PixmapMask *pm; otk::PixmapMask *pm;
int width; int width;
bool draw = _dirty; bool draw = _dirty;
otk::Widget::update(); otk::Widget::renderForeground();
if (draw) { if (draw) {
switch (type()) { switch (type()) {
case Type_StickyButton: case Type_StickyButton:
pm = _style->getStickyButtonMask(); pm = _style->stickyMask();
break; break;
case Type_CloseButton: case Type_CloseButton:
pm = _style->getCloseButtonMask(); pm = _style->closeMask();
break; break;
case Type_MaximizeButton: case Type_MaximizeButton:
pm = _style->getMaximizeButtonMask(); pm = _style->maximizeMask();
break; break;
case Type_IconifyButton: case Type_IconifyButton:
pm = _style->getIconifyButtonMask(); pm = _style->iconifyMask();
break; break;
case Type_LeftGrip: case Type_LeftGrip:
case Type_RightGrip: case Type_RightGrip:
@ -109,23 +114,23 @@ void ButtonWidget::update()
if (pm->mask == None) return; // no mask for the button, leave it empty if (pm->mask == None) return; // no mask for the button, leave it empty
width = _rect.width(); width = _rect.width();
otk::Pen pen(_focused ? *_style->getButtonPicFocus() : otk::RenderColor *color = (_focused ? _style->buttonFocusColor() :
*_style->getButtonPicUnfocus()); _style->buttonUnfocusColor());
// set the clip region // set the clip region
XSetClipMask(**otk::display, pen.gc(), pm->mask); XSetClipMask(**otk::display, color->gc(), pm->mask);
XSetClipOrigin(**otk::display, pen.gc(), XSetClipOrigin(**otk::display, color->gc(),
(width - pm->w)/2, (width - pm->h)/2); (width - pm->w)/2, (width - pm->h)/2);
// fill in the clipped region // fill in the clipped region
XFillRectangle(**otk::display, _window, pen.gc(), XFillRectangle(**otk::display, _window, color->gc(),
(width - pm->w)/2, (width - pm->h)/2, (width - pm->w)/2, (width - pm->h)/2,
(width + pm->w)/2, (width + pm->h)/2); (width + pm->w)/2, (width + pm->h)/2);
// unset the clip region // unset the clip region
XSetClipMask(**otk::display, pen.gc(), None); XSetClipMask(**otk::display, color->gc(), None);
XSetClipOrigin(**otk::display, pen.gc(), 0, 0); XSetClipOrigin(**otk::display, color->gc(), 0, 0);
} }
} }

View file

@ -18,11 +18,12 @@ public:
ButtonWidget(otk::Widget *parent, WidgetBase::WidgetType type); ButtonWidget(otk::Widget *parent, WidgetBase::WidgetType type);
virtual ~ButtonWidget(); virtual ~ButtonWidget();
virtual void setStyle(otk::Style *style); virtual void setStyle(otk::RenderStyle *style);
virtual void adjust(); virtual void adjust();
virtual void update(); virtual void update();
virtual void renderForeground();
virtual void focus(); virtual void focus();
virtual void unfocus(); virtual void unfocus();

View file

@ -23,7 +23,7 @@ namespace ob {
const long Frame::event_mask; const long Frame::event_mask;
Frame::Frame(Client *client, otk::Style *style) Frame::Frame(Client *client, otk::RenderStyle *style)
: otk::Widget(openbox, style, Horizontal, 0, 1, true), : otk::Widget(openbox, style, Horizontal, 0, 1, true),
WidgetBase(WidgetBase::Type_Frame), WidgetBase(WidgetBase::Type_Frame),
_client(client), _client(client),
@ -71,7 +71,7 @@ void Frame::setTitle(const otk::ustring &text)
} }
void Frame::setStyle(otk::Style *style) void Frame::setStyle(otk::RenderStyle *style)
{ {
assert(style); assert(style);
@ -87,7 +87,7 @@ void Frame::setStyle(otk::Style *style)
_style = style; _style = style;
setBorderColor(_style->getBorderColor()); setBorderColor(_style->frameBorderColor());
// if !replace, then adjust() will get called after the client is grabbed! // if !replace, then adjust() will get called after the client is grabbed!
if (replace) { if (replace) {
@ -129,11 +129,11 @@ void Frame::adjustSize()
int bwidth; // width to make borders int bwidth; // width to make borders
int cbwidth; // width of the inner client border int cbwidth; // width of the inner client border
int butsize=0; // width and height of the titlebar buttons int butsize=0; // width and height of the titlebar buttons
const int bevel = _style->getBevelWidth(); const int bevel = _style->bevelWidth();
if (_decorations & Client::Decor_Border) { if (_decorations & Client::Decor_Border) {
bwidth = _style->getBorderWidth(); bwidth = _style->frameBorderWidth();
cbwidth = _style->getFrameWidth(); cbwidth = _style->clientBorderWidth();
} else } else
bwidth = cbwidth = 0; bwidth = cbwidth = 0;
_innersize.left = _innersize.top = _innersize.bottom = _innersize.right = _innersize.left = _innersize.top = _innersize.bottom = _innersize.right =
@ -153,11 +153,11 @@ void Frame::adjustSize()
_titlebar.setGeometry(-bwidth, _titlebar.setGeometry(-bwidth,
-bwidth, -bwidth,
width, width,
_style->getFont()->height() + bevel * 2); _style->labelFont()->height() + bevel * 2);
_innersize.top += _titlebar.height() + bwidth; _innersize.top += _titlebar.height() + bwidth;
// set the label size // set the label size
_label.setGeometry(0, bevel, width, _style->getFont()->height()); _label.setGeometry(0, bevel, width, _style->labelFont()->height());
// set the buttons sizes // set the buttons sizes
butsize = _label.height() - 2; butsize = _label.height() - 2;
if (_decorations & Client::Decor_Iconify) if (_decorations & Client::Decor_Iconify)
@ -275,7 +275,7 @@ void Frame::adjustSize()
if (_decorations & Client::Decor_Handle) { if (_decorations & Client::Decor_Handle) {
_handle.setGeometry(-bwidth, _handle.setGeometry(-bwidth,
_innersize.top + _client->area().height() + cbwidth, _innersize.top + _client->area().height() + cbwidth,
width, _style->getHandleWidth()); width, _style->handleWidth());
_grip_left.setGeometry(-bwidth, _grip_left.setGeometry(-bwidth,
-bwidth, -bwidth,
// XXX: get a Point class in otk and use that for // XXX: get a Point class in otk and use that for
@ -357,7 +357,7 @@ void Frame::adjustShape()
{ {
#ifdef SHAPE #ifdef SHAPE
int bwidth = (_decorations & Client::Decor_Border) ? int bwidth = (_decorations & Client::Decor_Border) ?
_style->getBorderWidth() : 0; _style->frameBorderWidth() : 0;
if (!_client->shaped()) { if (!_client->shaped()) {
// clear the shape on the frame window // clear the shape on the frame window

View file

@ -16,7 +16,7 @@ extern "C" {
#include "otk/strut.hh" #include "otk/strut.hh"
#include "otk/rect.hh" #include "otk/rect.hh"
#include "otk/screeninfo.hh" #include "otk/screeninfo.hh"
#include "otk/style.hh" #include "otk/renderstyle.hh"
#include "otk/widget.hh" #include "otk/widget.hh"
#include "otk/ustring.hh" #include "otk/ustring.hh"
@ -71,7 +71,7 @@ public:
@param client The client window which will be decorated by the new Frame @param client The client window which will be decorated by the new Frame
@param style The style to use to decorate the frame @param style The style to use to decorate the frame
*/ */
Frame(Client *client, otk::Style *style); Frame(Client *client, otk::RenderStyle *style);
//! Destroys the Frame object //! Destroys the Frame object
virtual ~Frame(); virtual ~Frame();
@ -79,7 +79,7 @@ public:
const otk::Strut& size() const { return _size; } const otk::Strut& size() const { return _size; }
//! Set the style to decorate the frame with //! Set the style to decorate the frame with
virtual void setStyle(otk::Style *style); virtual void setStyle(otk::RenderStyle *style);
//! Empty overridden method to prevent automatic alignment of children //! Empty overridden method to prevent automatic alignment of children
virtual void adjust(); virtual void adjust();

View file

@ -14,15 +14,11 @@ LabelWidget::LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type)
: otk::Widget(parent), : otk::Widget(parent),
WidgetBase(type) WidgetBase(type)
{ {
const otk::ScreenInfo *info = otk::display->screenInfo(_screen);
_xftdraw = XftDrawCreate(**otk::display, _window, info->visual(),
info->colormap());
} }
LabelWidget::~LabelWidget() LabelWidget::~LabelWidget()
{ {
XftDrawDestroy(_xftdraw);
} }
@ -36,23 +32,24 @@ void LabelWidget::setText(const otk::ustring &text)
void LabelWidget::setTextures() void LabelWidget::setTextures()
{ {
if (_focused) { if (_focused) {
setTexture(_style->getLabelFocus()); setTexture(_style->labelFocusBackground());
_text_color = _style->getTextFocus(); _text_color = _style->textFocusColor();
} else { } else {
setTexture(_style->getLabelUnfocus()); setTexture(_style->labelUnfocusBackground());
_text_color = _style->getTextUnfocus(); _text_color = _style->textUnfocusColor();
} }
} }
void LabelWidget::setStyle(otk::Style *style) void LabelWidget::setStyle(otk::RenderStyle *style)
{ {
otk::Widget::setStyle(style); otk::Widget::setStyle(style);
setTextures(); setTextures();
_font = style->getFont(); _font = style->labelFont();
_sidemargin = style->bevelWidth() * 2;
_justify = style->labelTextJustify();
assert(_font); assert(_font);
_sidemargin = style->getBevelWidth() * 2;
_justify = style->textJustify();
} }
@ -71,10 +68,16 @@ void LabelWidget::unfocus()
void LabelWidget::update() void LabelWidget::update()
{
printf("LabelWidget::update()\n");
}
void LabelWidget::renderForeground()
{ {
bool draw = _dirty; bool draw = _dirty;
otk::Widget::update(); otk::Widget::renderForeground();
if (draw) { if (draw) {
otk::ustring t = _text; otk::ustring t = _text;
@ -95,18 +98,19 @@ void LabelWidget::update()
// justify the text // justify the text
switch (_justify) { switch (_justify) {
case otk::Style::RightJustify: case otk::RenderStyle::RightJustify:
x += max_length - length; x += max_length - length;
break; break;
case otk::Style::CenterJustify: case otk::RenderStyle::CenterJustify:
x += (max_length - length) / 2; x += (max_length - length) / 2;
break; break;
case otk::Style::LeftJustify: case otk::RenderStyle::LeftJustify:
break; break;
} }
} }
_font->drawString(_xftdraw, x, 0, *_text_color, t); otk::display->renderControl(_screen)->drawString
(*_surface, *_font, x, 0, *_text_color, t);
} }
} }

View file

@ -5,7 +5,7 @@
#include "widgetbase.hh" #include "widgetbase.hh"
#include "otk/widget.hh" #include "otk/widget.hh"
#include "otk/font.hh" #include "otk/font.hh"
#include "otk/style.hh" #include "otk/renderstyle.hh"
#include "otk/ustring.hh" #include "otk/ustring.hh"
namespace ob { namespace ob {
@ -15,18 +15,16 @@ class LabelWidget : public otk::Widget, public WidgetBase
private: private:
void setTextures(); void setTextures();
const otk::Font *_font; const otk::Font *_font;
otk::Color *_text_color; otk::RenderColor *_text_color;
int _sidemargin; int _sidemargin;
otk::Style::TextJustify _justify; otk::RenderStyle::TextJustify _justify;
otk::ustring _text; otk::ustring _text;
//! Object used by Xft to render to the drawable
XftDraw *_xftdraw;
public: public:
LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type); LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type);
virtual ~LabelWidget(); virtual ~LabelWidget();
virtual void setStyle(otk::Style *style); virtual void setStyle(otk::RenderStyle *style);
virtual void adjust(); virtual void adjust();
@ -35,6 +33,8 @@ public:
virtual void update(); virtual void update();
virtual void renderForeground();
inline const otk::ustring &text() const { return _text; } inline const otk::ustring &text() const { return _text; }
void setText(const otk::ustring &text); void setText(const otk::ustring &text);
}; };

View file

@ -48,6 +48,7 @@ class Display(_object):
def gcCache(*args): return apply(_openbox.Display_gcCache,args) def gcCache(*args): return apply(_openbox.Display_gcCache,args)
def screenInfo(*args): return apply(_openbox.Display_screenInfo,args) def screenInfo(*args): return apply(_openbox.Display_screenInfo,args)
def findScreen(*args): return apply(_openbox.Display_findScreen,args) def findScreen(*args): return apply(_openbox.Display_findScreen,args)
def renderControl(*args): return apply(_openbox.Display_renderControl,args)
def xkb(*args): return apply(_openbox.Display_xkb,args) def xkb(*args): return apply(_openbox.Display_xkb,args)
def xkbEventBase(*args): return apply(_openbox.Display_xkbEventBase,args) def xkbEventBase(*args): return apply(_openbox.Display_xkbEventBase,args)
def shape(*args): return apply(_openbox.Display_shape,args) def shape(*args): return apply(_openbox.Display_shape,args)
@ -664,7 +665,6 @@ class Screen(EventHandler,):
event_mask = _openbox.Screen_event_mask event_mask = _openbox.Screen_event_mask
def number(*args): return apply(_openbox.Screen_number,args) def number(*args): return apply(_openbox.Screen_number,args)
def managed(*args): return apply(_openbox.Screen_managed,args) def managed(*args): return apply(_openbox.Screen_managed,args)
def imageControl(*args): return apply(_openbox.Screen_imageControl,args)
def area(*args): return apply(_openbox.Screen_area,args) def area(*args): return apply(_openbox.Screen_area,args)
def style(*args): return apply(_openbox.Screen_style,args) def style(*args): return apply(_openbox.Screen_style,args)
def focuswindow(*args): return apply(_openbox.Screen_focuswindow,args) def focuswindow(*args): return apply(_openbox.Screen_focuswindow,args)

View file

@ -668,7 +668,7 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
#define SWIGTYPE_p_XPropertyEvent swig_types[20] #define SWIGTYPE_p_XPropertyEvent swig_types[20]
#define SWIGTYPE_p_XSelectionRequestEvent swig_types[21] #define SWIGTYPE_p_XSelectionRequestEvent swig_types[21]
#define SWIGTYPE_p_ob__Cursors swig_types[22] #define SWIGTYPE_p_ob__Cursors swig_types[22]
#define SWIGTYPE_p_otk__ImageControl swig_types[23] #define SWIGTYPE_p_otk__RenderControl swig_types[23]
#define SWIGTYPE_p_ob__MwmHints swig_types[24] #define SWIGTYPE_p_ob__MwmHints swig_types[24]
#define SWIGTYPE_p_ob__Screen swig_types[25] #define SWIGTYPE_p_ob__Screen swig_types[25]
#define SWIGTYPE_p_ob__Frame swig_types[26] #define SWIGTYPE_p_ob__Frame swig_types[26]
@ -682,19 +682,19 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
#define SWIGTYPE_p_otk__Display swig_types[34] #define SWIGTYPE_p_otk__Display swig_types[34]
#define SWIGTYPE_p_Display swig_types[35] #define SWIGTYPE_p_Display swig_types[35]
#define SWIGTYPE_p_XMappingEvent swig_types[36] #define SWIGTYPE_p_XMappingEvent swig_types[36]
#define SWIGTYPE_p_otk__Style swig_types[37] #define SWIGTYPE_p_otk__EventHandler swig_types[37]
#define SWIGTYPE_p_otk__EventHandler swig_types[38] #define SWIGTYPE_p_XReparentEvent swig_types[38]
#define SWIGTYPE_p_XReparentEvent swig_types[39] #define SWIGTYPE_p_otk__EventDispatcher swig_types[39]
#define SWIGTYPE_p_otk__EventDispatcher swig_types[40] #define SWIGTYPE_p_otk__GCCache swig_types[40]
#define SWIGTYPE_p_otk__GCCache swig_types[41] #define SWIGTYPE_p_ob__Bindings swig_types[41]
#define SWIGTYPE_p_ob__Bindings swig_types[42] #define SWIGTYPE_p_ob__Openbox swig_types[42]
#define SWIGTYPE_p_ob__Openbox swig_types[43] #define SWIGTYPE_p_ob__Actions swig_types[43]
#define SWIGTYPE_p_ob__Actions swig_types[44] #define SWIGTYPE_p_otk__Widget swig_types[44]
#define SWIGTYPE_p_otk__Widget swig_types[45] #define SWIGTYPE_p_XEvent swig_types[45]
#define SWIGTYPE_p_XEvent swig_types[46] #define SWIGTYPE_p_otk__Property swig_types[46]
#define SWIGTYPE_p_otk__Property swig_types[47] #define SWIGTYPE_p_PyObject swig_types[47]
#define SWIGTYPE_p_PyObject swig_types[48] #define SWIGTYPE_p_otk__ScreenInfo swig_types[48]
#define SWIGTYPE_p_otk__ScreenInfo swig_types[49] #define SWIGTYPE_p_otk__RenderStyle swig_types[49]
#define SWIGTYPE_p_ob__EventData swig_types[50] #define SWIGTYPE_p_ob__EventData swig_types[50]
#define SWIGTYPE_p_XCreateWindowEvent swig_types[51] #define SWIGTYPE_p_XCreateWindowEvent swig_types[51]
#define SWIGTYPE_p_XDestroyWindowEvent swig_types[52] #define SWIGTYPE_p_XDestroyWindowEvent swig_types[52]
@ -704,8 +704,8 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
#define SWIGTYPE_p_XKeyEvent swig_types[56] #define SWIGTYPE_p_XKeyEvent swig_types[56]
#define SWIGTYPE_p_int swig_types[57] #define SWIGTYPE_p_int swig_types[57]
#define SWIGTYPE_p_otk__Strut swig_types[58] #define SWIGTYPE_p_otk__Strut swig_types[58]
#define SWIGTYPE_p_unsigned_long swig_types[59] #define SWIGTYPE_p_p_unsigned_long swig_types[59]
#define SWIGTYPE_p_p_unsigned_long swig_types[60] #define SWIGTYPE_p_unsigned_long swig_types[60]
#define SWIGTYPE_p_XMotionEvent swig_types[61] #define SWIGTYPE_p_XMotionEvent swig_types[61]
#define SWIGTYPE_p_XButtonEvent swig_types[62] #define SWIGTYPE_p_XButtonEvent swig_types[62]
#define SWIGTYPE_p_XSelectionEvent swig_types[63] #define SWIGTYPE_p_XSelectionEvent swig_types[63]
@ -1038,6 +1038,24 @@ static PyObject *_wrap_Display_findScreen(PyObject *self, PyObject *args) {
} }
static PyObject *_wrap_Display_renderControl(PyObject *self, PyObject *args) {
PyObject *resultobj;
otk::Display *arg1 = (otk::Display *) 0 ;
int arg2 ;
otk::RenderControl *result;
PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"Oi:Display_renderControl",&obj0,&arg2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
result = (otk::RenderControl *)(arg1)->renderControl(arg2);
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__RenderControl, 0);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) { static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) {
PyObject *resultobj; PyObject *resultobj;
otk::Display *arg1 = (otk::Display *) 0 ; otk::Display *arg1 = (otk::Display *) 0 ;
@ -8271,23 +8289,6 @@ static PyObject *_wrap_Screen_managed(PyObject *self, PyObject *args) {
} }
static PyObject *_wrap_Screen_imageControl(PyObject *self, PyObject *args) {
PyObject *resultobj;
ob::Screen *arg1 = (ob::Screen *) 0 ;
otk::ImageControl *result;
PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O:Screen_imageControl",&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Screen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
result = (otk::ImageControl *)(arg1)->imageControl();
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ImageControl, 0);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Screen_area(PyObject *self, PyObject *args) { static PyObject *_wrap_Screen_area(PyObject *self, PyObject *args) {
PyObject *resultobj; PyObject *resultobj;
ob::Screen *arg1 = (ob::Screen *) 0 ; ob::Screen *arg1 = (ob::Screen *) 0 ;
@ -8311,14 +8312,14 @@ static PyObject *_wrap_Screen_area(PyObject *self, PyObject *args) {
static PyObject *_wrap_Screen_style(PyObject *self, PyObject *args) { static PyObject *_wrap_Screen_style(PyObject *self, PyObject *args) {
PyObject *resultobj; PyObject *resultobj;
ob::Screen *arg1 = (ob::Screen *) 0 ; ob::Screen *arg1 = (ob::Screen *) 0 ;
otk::Style *result; otk::RenderStyle *result;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O:Screen_style",&obj0)) goto fail; if(!PyArg_ParseTuple(args,(char *)"O:Screen_style",&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Screen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Screen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
result = (otk::Style *)((ob::Screen const *)arg1)->style(); result = (otk::RenderStyle *)((ob::Screen const *)arg1)->style();
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__Style, 0); resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__RenderStyle, 0);
return resultobj; return resultobj;
fail: fail:
return NULL; return NULL;
@ -9573,14 +9574,14 @@ static PyObject * Client_swigregister(PyObject *self, PyObject *args) {
static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) {
PyObject *resultobj; PyObject *resultobj;
ob::Client *arg1 = (ob::Client *) 0 ; ob::Client *arg1 = (ob::Client *) 0 ;
otk::Style *arg2 = (otk::Style *) 0 ; otk::RenderStyle *arg2 = (otk::RenderStyle *) 0 ;
ob::Frame *result; ob::Frame *result;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"OO:new_Frame",&obj0,&obj1)) goto fail; if(!PyArg_ParseTuple(args,(char *)"OO:new_Frame",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Client,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Client,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_otk__Style,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_otk__RenderStyle,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
result = (ob::Frame *)new ob::Frame(arg1,arg2); result = (ob::Frame *)new ob::Frame(arg1,arg2);
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_ob__Frame, 1); resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_ob__Frame, 1);
@ -9629,13 +9630,13 @@ static PyObject *_wrap_Frame_size(PyObject *self, PyObject *args) {
static PyObject *_wrap_Frame_setStyle(PyObject *self, PyObject *args) { static PyObject *_wrap_Frame_setStyle(PyObject *self, PyObject *args) {
PyObject *resultobj; PyObject *resultobj;
ob::Frame *arg1 = (ob::Frame *) 0 ; ob::Frame *arg1 = (ob::Frame *) 0 ;
otk::Style *arg2 = (otk::Style *) 0 ; otk::RenderStyle *arg2 = (otk::RenderStyle *) 0 ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"OO:Frame_setStyle",&obj0,&obj1)) goto fail; if(!PyArg_ParseTuple(args,(char *)"OO:Frame_setStyle",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Frame,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Frame,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_otk__Style,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_otk__RenderStyle,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
(arg1)->setStyle(arg2); (arg1)->setStyle(arg2);
Py_INCREF(Py_None); resultobj = Py_None; Py_INCREF(Py_None); resultobj = Py_None;
@ -11297,6 +11298,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS }, { (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS },
{ (char *)"Display_screenInfo", _wrap_Display_screenInfo, METH_VARARGS }, { (char *)"Display_screenInfo", _wrap_Display_screenInfo, METH_VARARGS },
{ (char *)"Display_findScreen", _wrap_Display_findScreen, METH_VARARGS }, { (char *)"Display_findScreen", _wrap_Display_findScreen, METH_VARARGS },
{ (char *)"Display_renderControl", _wrap_Display_renderControl, METH_VARARGS },
{ (char *)"Display_xkb", _wrap_Display_xkb, METH_VARARGS }, { (char *)"Display_xkb", _wrap_Display_xkb, METH_VARARGS },
{ (char *)"Display_xkbEventBase", _wrap_Display_xkbEventBase, METH_VARARGS }, { (char *)"Display_xkbEventBase", _wrap_Display_xkbEventBase, METH_VARARGS },
{ (char *)"Display_shape", _wrap_Display_shape, METH_VARARGS }, { (char *)"Display_shape", _wrap_Display_shape, METH_VARARGS },
@ -11614,7 +11616,6 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Screen_clientCount", _wrap_Screen_clientCount, METH_VARARGS }, { (char *)"Screen_clientCount", _wrap_Screen_clientCount, METH_VARARGS },
{ (char *)"Screen_number", _wrap_Screen_number, METH_VARARGS }, { (char *)"Screen_number", _wrap_Screen_number, METH_VARARGS },
{ (char *)"Screen_managed", _wrap_Screen_managed, METH_VARARGS }, { (char *)"Screen_managed", _wrap_Screen_managed, METH_VARARGS },
{ (char *)"Screen_imageControl", _wrap_Screen_imageControl, METH_VARARGS },
{ (char *)"Screen_area", _wrap_Screen_area, METH_VARARGS }, { (char *)"Screen_area", _wrap_Screen_area, METH_VARARGS },
{ (char *)"Screen_style", _wrap_Screen_style, METH_VARARGS }, { (char *)"Screen_style", _wrap_Screen_style, METH_VARARGS },
{ (char *)"Screen_focuswindow", _wrap_Screen_focuswindow, METH_VARARGS }, { (char *)"Screen_focuswindow", _wrap_Screen_focuswindow, METH_VARARGS },
@ -11832,7 +11833,7 @@ static swig_type_info _swigt__p_XVisibilityEvent[] = {{"_p_XVisibilityEvent", 0,
static swig_type_info _swigt__p_XPropertyEvent[] = {{"_p_XPropertyEvent", 0, "XPropertyEvent *", 0},{"_p_XPropertyEvent"},{0}}; static swig_type_info _swigt__p_XPropertyEvent[] = {{"_p_XPropertyEvent", 0, "XPropertyEvent *", 0},{"_p_XPropertyEvent"},{0}};
static swig_type_info _swigt__p_XSelectionRequestEvent[] = {{"_p_XSelectionRequestEvent", 0, "XSelectionRequestEvent *", 0},{"_p_XSelectionRequestEvent"},{0}}; static swig_type_info _swigt__p_XSelectionRequestEvent[] = {{"_p_XSelectionRequestEvent", 0, "XSelectionRequestEvent *", 0},{"_p_XSelectionRequestEvent"},{0}};
static swig_type_info _swigt__p_ob__Cursors[] = {{"_p_ob__Cursors", 0, "ob::Cursors *", 0},{"_p_ob__Cursors"},{0}}; static swig_type_info _swigt__p_ob__Cursors[] = {{"_p_ob__Cursors", 0, "ob::Cursors *", 0},{"_p_ob__Cursors"},{0}};
static swig_type_info _swigt__p_otk__ImageControl[] = {{"_p_otk__ImageControl", 0, "otk::ImageControl *", 0},{"_p_otk__ImageControl"},{0}}; static swig_type_info _swigt__p_otk__RenderControl[] = {{"_p_otk__RenderControl", 0, "otk::RenderControl *", 0},{"_p_otk__RenderControl"},{0}};
static swig_type_info _swigt__p_ob__MwmHints[] = {{"_p_ob__MwmHints", 0, "ob::MwmHints *", 0},{"_p_ob__MwmHints"},{0}}; static swig_type_info _swigt__p_ob__MwmHints[] = {{"_p_ob__MwmHints", 0, "ob::MwmHints *", 0},{"_p_ob__MwmHints"},{0}};
static swig_type_info _swigt__p_ob__Screen[] = {{"_p_ob__Screen", 0, "ob::Screen *", 0},{"_p_ob__Screen"},{0}}; static swig_type_info _swigt__p_ob__Screen[] = {{"_p_ob__Screen", 0, "ob::Screen *", 0},{"_p_ob__Screen"},{0}};
static swig_type_info _swigt__p_ob__Frame[] = {{"_p_ob__Frame", 0, "ob::Frame *", 0},{"_p_ob__Frame"},{0}}; static swig_type_info _swigt__p_ob__Frame[] = {{"_p_ob__Frame", 0, "ob::Frame *", 0},{"_p_ob__Frame"},{0}};
@ -11846,7 +11847,6 @@ static swig_type_info _swigt__p_XCrossingEvent[] = {{"_p_XCrossingEvent", 0, "XC
static swig_type_info _swigt__p_otk__Display[] = {{"_p_otk__Display", 0, "otk::Display *", 0},{"_p_otk__Display"},{0}}; static swig_type_info _swigt__p_otk__Display[] = {{"_p_otk__Display", 0, "otk::Display *", 0},{"_p_otk__Display"},{0}};
static swig_type_info _swigt__p_Display[] = {{"_p_Display", 0, "Display *", 0},{"_p_Display"},{0}}; static swig_type_info _swigt__p_Display[] = {{"_p_Display", 0, "Display *", 0},{"_p_Display"},{0}};
static swig_type_info _swigt__p_XMappingEvent[] = {{"_p_XMappingEvent", 0, "XMappingEvent *", 0},{"_p_XMappingEvent"},{0}}; static swig_type_info _swigt__p_XMappingEvent[] = {{"_p_XMappingEvent", 0, "XMappingEvent *", 0},{"_p_XMappingEvent"},{0}};
static swig_type_info _swigt__p_otk__Style[] = {{"_p_otk__Style", 0, "otk::Style *", 0},{"_p_otk__Style"},{0}};
static swig_type_info _swigt__p_otk__EventHandler[] = {{"_p_otk__EventHandler", 0, "otk::EventHandler *", 0},{"_p_ob__Client", _p_ob__ClientTo_p_otk__EventHandler},{"_p_ob__Actions", _p_ob__ActionsTo_p_otk__EventHandler},{"_p_otk__EventHandler"},{"_p_ob__Frame", _p_ob__FrameTo_p_otk__EventHandler},{"_p_ob__Openbox", _p_ob__OpenboxTo_p_otk__EventHandler},{"_p_otk__Widget", _p_otk__WidgetTo_p_otk__EventHandler},{"_p_ob__Screen", _p_ob__ScreenTo_p_otk__EventHandler},{0}}; static swig_type_info _swigt__p_otk__EventHandler[] = {{"_p_otk__EventHandler", 0, "otk::EventHandler *", 0},{"_p_ob__Client", _p_ob__ClientTo_p_otk__EventHandler},{"_p_ob__Actions", _p_ob__ActionsTo_p_otk__EventHandler},{"_p_otk__EventHandler"},{"_p_ob__Frame", _p_ob__FrameTo_p_otk__EventHandler},{"_p_ob__Openbox", _p_ob__OpenboxTo_p_otk__EventHandler},{"_p_otk__Widget", _p_otk__WidgetTo_p_otk__EventHandler},{"_p_ob__Screen", _p_ob__ScreenTo_p_otk__EventHandler},{0}};
static swig_type_info _swigt__p_XReparentEvent[] = {{"_p_XReparentEvent", 0, "XReparentEvent *", 0},{"_p_XReparentEvent"},{0}}; static swig_type_info _swigt__p_XReparentEvent[] = {{"_p_XReparentEvent", 0, "XReparentEvent *", 0},{"_p_XReparentEvent"},{0}};
static swig_type_info _swigt__p_otk__EventDispatcher[] = {{"_p_otk__EventDispatcher", 0, "otk::EventDispatcher *", 0},{"_p_otk__EventDispatcher"},{"_p_ob__Openbox", _p_ob__OpenboxTo_p_otk__EventDispatcher},{0}}; static swig_type_info _swigt__p_otk__EventDispatcher[] = {{"_p_otk__EventDispatcher", 0, "otk::EventDispatcher *", 0},{"_p_otk__EventDispatcher"},{"_p_ob__Openbox", _p_ob__OpenboxTo_p_otk__EventDispatcher},{0}};
@ -11859,6 +11859,7 @@ static swig_type_info _swigt__p_XEvent[] = {{"_p_XEvent", 0, "XEvent *", 0},{"_p
static swig_type_info _swigt__p_otk__Property[] = {{"_p_otk__Property", 0, "otk::Property *", 0},{"_p_otk__Property"},{0}}; static swig_type_info _swigt__p_otk__Property[] = {{"_p_otk__Property", 0, "otk::Property *", 0},{"_p_otk__Property"},{0}};
static swig_type_info _swigt__p_PyObject[] = {{"_p_PyObject", 0, "PyObject *", 0},{"_p_PyObject"},{0}}; static swig_type_info _swigt__p_PyObject[] = {{"_p_PyObject", 0, "PyObject *", 0},{"_p_PyObject"},{0}};
static swig_type_info _swigt__p_otk__ScreenInfo[] = {{"_p_otk__ScreenInfo", 0, "otk::ScreenInfo *", 0},{"_p_otk__ScreenInfo"},{0}}; static swig_type_info _swigt__p_otk__ScreenInfo[] = {{"_p_otk__ScreenInfo", 0, "otk::ScreenInfo *", 0},{"_p_otk__ScreenInfo"},{0}};
static swig_type_info _swigt__p_otk__RenderStyle[] = {{"_p_otk__RenderStyle", 0, "otk::RenderStyle *", 0},{"_p_otk__RenderStyle"},{0}};
static swig_type_info _swigt__p_ob__EventData[] = {{"_p_ob__EventData", 0, "ob::EventData *", 0},{"_p_ob__EventData"},{0}}; static swig_type_info _swigt__p_ob__EventData[] = {{"_p_ob__EventData", 0, "ob::EventData *", 0},{"_p_ob__EventData"},{0}};
static swig_type_info _swigt__p_XCreateWindowEvent[] = {{"_p_XCreateWindowEvent", 0, "XCreateWindowEvent *", 0},{"_p_XCreateWindowEvent"},{0}}; static swig_type_info _swigt__p_XCreateWindowEvent[] = {{"_p_XCreateWindowEvent", 0, "XCreateWindowEvent *", 0},{"_p_XCreateWindowEvent"},{0}};
static swig_type_info _swigt__p_XDestroyWindowEvent[] = {{"_p_XDestroyWindowEvent", 0, "XDestroyWindowEvent *", 0},{"_p_XDestroyWindowEvent"},{0}}; static swig_type_info _swigt__p_XDestroyWindowEvent[] = {{"_p_XDestroyWindowEvent", 0, "XDestroyWindowEvent *", 0},{"_p_XDestroyWindowEvent"},{0}};
@ -11868,8 +11869,8 @@ static swig_type_info _swigt__p_otk__Atoms[] = {{"_p_otk__Atoms", 0, "otk::Atoms
static swig_type_info _swigt__p_XKeyEvent[] = {{"_p_XKeyEvent", 0, "XKeyEvent *", 0},{"_p_XKeyEvent"},{0}}; static swig_type_info _swigt__p_XKeyEvent[] = {{"_p_XKeyEvent", 0, "XKeyEvent *", 0},{"_p_XKeyEvent"},{0}};
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}}; static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}};
static swig_type_info _swigt__p_otk__Strut[] = {{"_p_otk__Strut", 0, "otk::Strut *", 0},{"_p_otk__Strut"},{0}}; static swig_type_info _swigt__p_otk__Strut[] = {{"_p_otk__Strut", 0, "otk::Strut *", 0},{"_p_otk__Strut"},{0}};
static swig_type_info _swigt__p_unsigned_long[] = {{"_p_unsigned_long", 0, "unsigned long *", 0},{"_p_unsigned_long"},{0}};
static swig_type_info _swigt__p_p_unsigned_long[] = {{"_p_p_unsigned_long", 0, "unsigned long **", 0},{"_p_p_unsigned_long"},{0}}; static swig_type_info _swigt__p_p_unsigned_long[] = {{"_p_p_unsigned_long", 0, "unsigned long **", 0},{"_p_p_unsigned_long"},{0}};
static swig_type_info _swigt__p_unsigned_long[] = {{"_p_unsigned_long", 0, "unsigned long *", 0},{"_p_unsigned_long"},{0}};
static swig_type_info _swigt__p_XMotionEvent[] = {{"_p_XMotionEvent", 0, "XMotionEvent *", 0},{"_p_XMotionEvent"},{0}}; static swig_type_info _swigt__p_XMotionEvent[] = {{"_p_XMotionEvent", 0, "XMotionEvent *", 0},{"_p_XMotionEvent"},{0}};
static swig_type_info _swigt__p_XButtonEvent[] = {{"_p_XButtonEvent", 0, "XButtonEvent *", 0},{"_p_XButtonEvent"},{0}}; static swig_type_info _swigt__p_XButtonEvent[] = {{"_p_XButtonEvent", 0, "XButtonEvent *", 0},{"_p_XButtonEvent"},{0}};
static swig_type_info _swigt__p_XSelectionEvent[] = {{"_p_XSelectionEvent", 0, "XSelectionEvent *", 0},{"_p_XSelectionEvent"},{0}}; static swig_type_info _swigt__p_XSelectionEvent[] = {{"_p_XSelectionEvent", 0, "XSelectionEvent *", 0},{"_p_XSelectionEvent"},{0}};
@ -11898,7 +11899,7 @@ _swigt__p_XVisibilityEvent,
_swigt__p_XPropertyEvent, _swigt__p_XPropertyEvent,
_swigt__p_XSelectionRequestEvent, _swigt__p_XSelectionRequestEvent,
_swigt__p_ob__Cursors, _swigt__p_ob__Cursors,
_swigt__p_otk__ImageControl, _swigt__p_otk__RenderControl,
_swigt__p_ob__MwmHints, _swigt__p_ob__MwmHints,
_swigt__p_ob__Screen, _swigt__p_ob__Screen,
_swigt__p_ob__Frame, _swigt__p_ob__Frame,
@ -11912,7 +11913,6 @@ _swigt__p_XCrossingEvent,
_swigt__p_otk__Display, _swigt__p_otk__Display,
_swigt__p_Display, _swigt__p_Display,
_swigt__p_XMappingEvent, _swigt__p_XMappingEvent,
_swigt__p_otk__Style,
_swigt__p_otk__EventHandler, _swigt__p_otk__EventHandler,
_swigt__p_XReparentEvent, _swigt__p_XReparentEvent,
_swigt__p_otk__EventDispatcher, _swigt__p_otk__EventDispatcher,
@ -11925,6 +11925,7 @@ _swigt__p_XEvent,
_swigt__p_otk__Property, _swigt__p_otk__Property,
_swigt__p_PyObject, _swigt__p_PyObject,
_swigt__p_otk__ScreenInfo, _swigt__p_otk__ScreenInfo,
_swigt__p_otk__RenderStyle,
_swigt__p_ob__EventData, _swigt__p_ob__EventData,
_swigt__p_XCreateWindowEvent, _swigt__p_XCreateWindowEvent,
_swigt__p_XDestroyWindowEvent, _swigt__p_XDestroyWindowEvent,
@ -11934,8 +11935,8 @@ _swigt__p_otk__Atoms,
_swigt__p_XKeyEvent, _swigt__p_XKeyEvent,
_swigt__p_int, _swigt__p_int,
_swigt__p_otk__Strut, _swigt__p_otk__Strut,
_swigt__p_unsigned_long,
_swigt__p_p_unsigned_long, _swigt__p_p_unsigned_long,
_swigt__p_unsigned_long,
_swigt__p_XMotionEvent, _swigt__p_XMotionEvent,
_swigt__p_XButtonEvent, _swigt__p_XButtonEvent,
_swigt__p_XSelectionEvent, _swigt__p_XSelectionEvent,

View file

@ -48,7 +48,8 @@ namespace ob {
Screen::Screen(int screen) Screen::Screen(int screen)
: WidgetBase(WidgetBase::Type_Root), : WidgetBase(WidgetBase::Type_Root),
_number(screen) _number(screen),
_style(screen, "")
{ {
assert(screen >= 0); assert(screen < ScreenCount(**otk::display)); assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
_info = otk::display->screenInfo(screen); _info = otk::display->screenInfo(screen);
@ -73,13 +74,8 @@ Screen::Screen(int screen)
XDefineCursor(**otk::display, _info->rootWindow(), XDefineCursor(**otk::display, _info->rootWindow(),
openbox->cursors().session); openbox->cursors().session);
// initialize the shit that is used for all drawing on the screen // XXX: initialize the screen's style
_image_control = new otk::ImageControl(_info, true); /*
_image_control->installRootColormap();
_root_cmap_installed = True;
// initialize the screen's style
_style.setImageControl(_image_control);
otk::ustring stylepath; otk::ustring stylepath;
python_get_string("theme", &stylepath); python_get_string("theme", &stylepath);
otk::Configuration sconfig(false); otk::Configuration sconfig(false);
@ -92,6 +88,7 @@ Screen::Screen(int screen)
} }
} }
_style.load(sconfig); _style.load(sconfig);
*/
// set up notification of netwm support // set up notification of netwm support
changeSupportedAtoms(); changeSupportedAtoms();
@ -157,8 +154,6 @@ Screen::~Screen()
XDestroyWindow(**otk::display, _focuswindow); XDestroyWindow(**otk::display, _focuswindow);
XDestroyWindow(**otk::display, _supportwindow); XDestroyWindow(**otk::display, _supportwindow);
delete _image_control;
} }

View file

@ -12,10 +12,9 @@ extern "C" {
#include "client.hh" #include "client.hh"
#include "widgetbase.hh" #include "widgetbase.hh"
#include "otk/image.hh" #include "otk/renderstyle.hh"
#include "otk/strut.hh" #include "otk/strut.hh"
#include "otk/rect.hh" #include "otk/rect.hh"
#include "otk/style.hh"
#include "otk/screeninfo.hh" #include "otk/screeninfo.hh"
#include "otk/eventhandler.hh" #include "otk/eventhandler.hh"
#include "otk/property.hh" #include "otk/property.hh"
@ -59,11 +58,8 @@ private:
//! Information about this screen //! Information about this screen
const otk::ScreenInfo *_info; const otk::ScreenInfo *_info;
//! The Image Control used for rendering on the screen
otk::ImageControl *_image_control;
//! The style with which to render on the screen //! The style with which to render on the screen
otk::Style _style; otk::RenderStyle _style;
//! Is the root colormap currently installed? //! Is the root colormap currently installed?
bool _root_cmap_installed; bool _root_cmap_installed;
@ -148,12 +144,10 @@ public:
used. used.
*/ */
inline bool managed() const { return _managed; } inline bool managed() const { return _managed; }
//! Returns the Image Control used for rendering on the screen
inline otk::ImageControl *imageControl() { return _image_control; }
//! Returns the area of the screen not reserved by applications' Struts //! Returns the area of the screen not reserved by applications' Struts
inline const otk::Rect &area() const { return _area; } inline const otk::Rect &area() const { return _area; }
//! Returns the style in use on the screen //! Returns the style in use on the screen
inline const otk::Style *style() const { return &_style; } inline const otk::RenderStyle *style() const { return &_style; }
//! An offscreen window which gets focus when nothing else has it //! An offscreen window which gets focus when nothing else has it
inline Window focuswindow() const { return _focuswindow; } inline Window focuswindow() const { return _focuswindow; }
//! Returns the desktop being displayed //! Returns the desktop being displayed