Esempio n. 1
0
void
AppCompositor::onWindowConfig(DFBWindowID windowID, const SaWManWindowReconfig *reconfig)
{
    ILOG_TRACE_W(ILX_APPCOMPOSITOR);
    for (WidgetList::iterator it = _children.begin(); it != _children.end(); ++it)
    {
        SurfaceView* view = dynamic_cast<SurfaceView*>(*it);
        if (view && view->dfbWindowID() == windowID)
        {
            ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> windowID[%u] Flags[0x%02x]\n", view->dfbWindowID(), reconfig->flags);
            if (reconfig->flags & SWMCF_STACKING)
            {
                if (reconfig->request.association)
                {
                    ILOG_ERROR(ILX_APPCOMPOSITOR, "Not yet implemented!\n");
                } else
                {
                    if (reconfig->request.opacity == 1)
                    {
                        ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> LowerToBottom\n");
                        lowerChild(view);
                        view->update();
                    } else
                    {
                        ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> RaiseToTop\n");
                        raiseChild(view);
                        view->update();
                    }
                    sigRestacked();
                }
            } else
            {
                if (reconfig->flags & SWMCF_OPACITY)
                {
                    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> opacity(%d)\n", reconfig->request.opacity);
                    view->setOpacity(reconfig->request.opacity);
                    view->update();
                }

                if (reconfig->flags & SWMCF_POSITION)
                {
                    ILOG_DEBUG( ILX_APPCOMPOSITOR, " -> moveTo(%d, %d)\n", reconfig->request.bounds.x, reconfig->request.bounds.y);
                    view->moveTo(reconfig->request.bounds.x * _hScale, reconfig->request.bounds.y * _vScale);
                    view->update();
                }

                if (reconfig->flags & SWMCF_SIZE)
                {
                    ILOG_DEBUG( ILX_APPCOMPOSITOR, " -> setSize(%d, %d)\n", reconfig->request.bounds.w, reconfig->request.bounds.h);
                    view->setSize(reconfig->request.bounds.w * _hScale, reconfig->request.bounds.h * _vScale);
                    view->update();
                }
            }
            return;
        }
    }
}
Esempio n. 2
0
void
GestureRecognizer::addMove(int dx, int dy)
{
    ILOG_TRACE_F(ILX_GESTURE);
    int dir = round(atan2f(dy, dx) * RAD_2_DIRECTION);
    if (dir < 0)
        dir += 8;

    if (_lastMove != dir)
    {
        ILOG_DEBUG(ILX_GESTURE, " -> movement direction: %d\n", dir);
        _moves.push_back(dir);
        sigMovement();
    }
}
Esempio n. 3
0
void
Surface::setStereoEye(PaintEvent::PaintEventEye eye)
{
    ILOG_DEBUG(ILX_SURFACE, "[%p] %s(%s)\n", this, __FUNCTION__, eye & PaintEvent::LeftEye ? "Left" : "Right");
    _eye = eye;
    if (_flags & RootSurface)
    {
#ifdef ILIXI_STEREO_OUTPUT
        if (_eye == PaintEvent::RightEye)
            _rightSurface->SetStereoEye(_rightSurface, DSSE_RIGHT);
        else
#endif
            _dfbSurface->SetStereoEye(_dfbSurface, DSSE_LEFT);
    }
}
Esempio n. 4
0
UBusThread::~UBusThread()
{
    ILOG_TRACE(UBUS_THREAD);

    ubus_free(_ubus);
    uloop_done();

    MGuiRil::Destroy();
    MGuiCharger::Destroy();
    MGuiWifi::Destroy();
    MGuiStats::Destroy();
    MGuiHawk::Destroy();

    ILOG_DEBUG(UBUS_THREAD, "%s exit\n", __func__);
}
Esempio n. 5
0
int RilRegistration::Request()
{
	int ret;

	ILOG_TRACE(MGUI_REGISTRATION);

	ILOG_DEBUG(MGUI_REGISTRATION, "Request voice registration\n");
	ret = RilRequest::Request(RIL_REQUEST_VOICE_REGISTRATION_STATE);
	if (ret) {
		ILOG_ERROR(MGUI_RILREQ, "request voice registration failed (ret=%d)\n", ret);
		return ret;
	}

	ILOG_DEBUG(MGUI_REGISTRATION, "Request data registration\n");
	ret = RilRequest::Request(RIL_REQUEST_DATA_REGISTRATION_STATE);
	if (ret) {
		ILOG_ERROR(MGUI_REGISTRATION, "request voice registration failed (ret=%d)\n", ret);
		return ret;
	}

	ILOG_DEBUG(MGUI_REGISTRATION, "%s:%d: Exit\n", __FUNCTION__, __LINE__);

	return 0;
}
Esempio n. 6
0
void
AppCompositor::addWindow(IDirectFBWindow* window, bool eventHandling, bool blocking)
{
    ILOG_TRACE_W(ILX_APPCOMPOSITOR);
    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> window: %p\n", window);
    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> eventHandling: %d\n", eventHandling);
    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> blocking: %d\n", blocking);

    SurfaceView* view = new SurfaceView();
    if (!eventHandling)
        view->setInputMethod(NoInput);
    view->setBlocking(blocking);
    if (_instance->appInfo()->appFlags() & APP_NEEDS_BLENDING)
        view->setBlendingEnabled(true);

    if (_instance->windowCount() > 1)
        view->setBlendingEnabled(true);
    view->setSourceFromWindow(window);
    view->sigSourceReady.connect(sigc::mem_fun(this, &AppCompositor::madeAvailable));
    addChild(view);
    sigGeometryUpdated();
    setWindowFocus();
    update();
}
Esempio n. 7
0
void
HorizontalScroller::scrollTo(Widget* widget)
{
    if (widget && widget != _selectedWidget)
    {
        ILOG_TRACE_W(ILX_HSCROLLER);
        ILOG_DEBUG(ILX_HSCROLLER, " -> _selectedWidget: %p\n", _selectedWidget);
        if (_selectedWidget)
        {
            _anim.stop();
            _tween->setInitialValue(-_selectedWidget->x());
            _tween->setEndValue(-widget->x());
            _anim.start();
        }
        _selectedWidget = widget;
    }
}
Esempio n. 8
0
void
NotificationManager::tweenSlot()
{
    ILOG_TRACE_F(ILX_NOTIFICATIONMAN);

    int deltaY = _tween->value() * _deltaY;
    ILOG_DEBUG(ILX_NOTIFICATIONMAN, "DeltaY: %d\n", deltaY);
    for (NotificationList::iterator it = _active.begin(); it != _active.end(); ++it)
    {
        if (*it == _active.back())
            continue;
        ((Notification*) *it)->translate(0, deltaY);
        ((Notification*) *it)->update();
    }

    _deltaY -= deltaY;
}
Esempio n. 9
0
int RilRequest::Request(uint32_t id, const void *data, int len)
{
	int ret = 0;

	ILOG_TRACE(MGUI_RILREQ);
	ret = rilutil_makeRequestBlob(&_b, id, data, len);
	if (ret) {
		ILOG_ERROR(MGUI_RILREQ, "rilutil_makeRequestBlob failed (ret=%d)\n", ret);
		return ret;
	}
	ret = InvokeAsync(RIL_UBUS_REQ, _b.head);
	if (ret) {
		ILOG_ERROR(MGUI_RILREQ, "Invoke() failed (ret=%d)\n", ret);
		return ret;
	}
	ILOG_DEBUG(MGUI_RILREQ, "%s exit\n", __FUNCTION__);

	return ret;
}
Esempio n. 10
0
void
GestureRecognizer::addGesture(const std::string& gestureName, const std::string& moves)
{
    ILOG_TRACE_F(ILX_GESTURE);
    if (gestureName.empty())
    {
        ILOG_WARNING(ILX_GESTURE, "Gesture name is empty!\n");
        return;
    }

    std::vector<int> g;
    for (unsigned int i = 0; i < moves.size(); i++)
        g.push_back(moves[i] - '0');

    std::pair<GestureMap::iterator, bool> res = _gestures.insert(std::make_pair(gestureName, g));
    if (!res.second)
        ILOG_WARNING(ILX_GESTURE, "Gesture \"%s\" already exists!\n", gestureName.c_str());
    else
        ILOG_DEBUG(ILX_GESTURE, " -> Added \"%s\".\n", gestureName.c_str());
}
Esempio n. 11
0
void
Surface::blit(IDirectFBSurface* source, int x, int y)
{
    if (source && _dfbSurface)
    {
        DFBResult ret;
#ifdef ILIXI_STEREO_OUTPUT
        if (_eye == PaintEvent::LeftEye)
#endif
            ret = _dfbSurface->Blit(_dfbSurface, source, NULL, x, y);
#ifdef ILIXI_STEREO_OUTPUT
        else
            ret = _rightSurface->Blit(_rightSurface, source, NULL, x, y);
#endif
        if (ret)
            ILOG_ERROR(ILX_SURFACE, "Blit error: %s\n", DirectFBErrorString(ret));
        else
            ILOG_DEBUG(ILX_SURFACE, "[%p] %s P(%d, %d)\n", this, __FUNCTION__, x, y);
    }
}
Esempio n. 12
0
void
NotificationManager::updateNotifications()
{
    ILOG_TRACE_F(ILX_NOTIFICATIONMAN);

    // remove hidden notifications, make space.
    pthread_mutex_lock(&_activeMutex);
    NotificationList::iterator it = _active.begin();
    while (it != _active.end())
    {
        if (((Notification*) *it)->state() == Notification::Hidden)
        {
            ILOG_DEBUG(ILX_NOTIFICATIONMAN, "Notification %p is removed.\n", ((Notification*) *it));
            _compositor->removeWidget(*it);
            it = _active.erase(it);
        } else
            ++it;
    }
    pthread_mutex_unlock(&_activeMutex);

    // if there is space add pending notifications.
    if (_active.size() < _maxNotifications)
    {
        bool arrange = false;
        pthread_mutex_lock(&_pendingMutex);
        unsigned int i;
        for (i = 0; i < _maxNotifications - _active.size(); ++i)
        {
            if (_pending.empty())
                break;
            _active.push_back(_pending.front());
            _pending.pop_front();
            _active.back()->show();
            arrange = true;
        }
        pthread_mutex_unlock(&_pendingMutex);

        if (arrange && _active.size() > 1)
            arrangeNotifications(i * _active.front()->preferredSize().height());
    }
}
Esempio n. 13
0
void
Surface::blit(IDirectFBSurface* source, const Rectangle& crop, int x, int y)
{
    if (source && _dfbSurface)
    {
        DFBRectangle r = crop.dfbRect();
        DFBResult ret;
#ifdef ILIXI_STEREO_OUTPUT
        if (_eye == PaintEvent::LeftEye)
#endif
            ret = _dfbSurface->Blit(_dfbSurface, source, &r, x, y);
#ifdef ILIXI_STEREO_OUTPUT
        else
            ret = _rightSurface->Blit(_rightSurface, source, &r, x, y);
#endif
        if (ret)
            ILOG_ERROR(ILX_SURFACE, " -> Blit error: %s - Rect(%d, %d, %d, %d)\n", DirectFBErrorString(ret), crop.x(), crop.y(), crop.width(), crop.height());
        else
            ILOG_DEBUG(ILX_SURFACE, "[%p] %s Rect(%d, %d, %d, %d) P(%d, %d)\n", this, __FUNCTION__, crop.x(), crop.y(), crop.width(), crop.height(), x, y);
    }
}
Esempio n. 14
0
int
UBusSubscriber::Subscribe(std::vector<std::string> events)
{
    std::vector<std::string>::iterator it;
    int ret;

    ILOG_TRACE(UBUS_SUBSCRIBER);
    for (it = events.begin(); it != events.end(); ++it) {
        ret = Subscribe(*it);
        if (ret)
            goto unsubscribe;
    }

    ILOG_DEBUG(UBUS_SUBSCRIBER, "subscribe events success\n");

    return 0;

unsubscribe:
    for (; it != events.begin(); --it)
        UnSubscribe(*it);
    ILOG_ERROR(UBUS_SUBSCRIBER, "subscribe events fail\n");
    return -1;
}
Esempio n. 15
0
int
UBusSubscriber::UnSubscribe(std::string &event)
{
    uint32_t id;
    int ret;

    ILOG_TRACE(UBUS_SUBSCRIBER);
    if (ubus_lookup_id(_ubus, event.c_str(), &id)) {
        ILOG_ERROR(UBUS_SUBSCRIBER, "ubus lookup id %s failed\n", event.c_str());
        return -1;
    }

    ret = ubus_unsubscribe(_ubus, &_subscriber, id);
    if (ret) {
        ILOG_ERROR(UBUS_SUBSCRIBER,"event %s unsubscribe failed (err: %s)\n",
                   event.c_str(), ubus_strerror(ret));
        return ret;
    }

    ILOG_DEBUG(UBUS_SUBSCRIBER, "unsubscribe event %s success\n", event.c_str());

    return 0;
}
Esempio n. 16
0
Size
ToolButton::preferredSize() const
{
    ILOG_TRACE_W(ILX_TOOLBUTTON);
    if (text().empty() && !icon())
        return stylist()->defaultSize(StyleHint::PushButton);

    int w = (_tbOptions & DrawFrame) ? stylist()->defaultParameter(StyleHint::ToolButtonLR) : 0;
    int h = (_tbOptions & DrawFrame) ? stylist()->defaultParameter(StyleHint::ToolButtonTB) : 0;

    if (checkable())
    {
        if ((_toolButtonStyle == IconBelowText) || (_toolButtonStyle == IconAboveText))
            h += stylist()->defaultParameter(StyleHint::ToolButtonIndicator) + stylist()->defaultParameter(StyleHint::ButtonOffset);
        else
            w += stylist()->defaultParameter(StyleHint::ToolButtonIndicator) + stylist()->defaultParameter(StyleHint::ButtonOffset);
    }

    if (_toolButtonStyle == TextOnly)
    {
        Size s = textExtents();
        if (s.isValid())
            return Size(w + s.width(), h + s.height());
        return stylist()->defaultSize(StyleHint::PushButton);
    }

    // calculate image size
    int imgW = 0;
    int imgH = 0;
    if (_icon)
    {
        Size s;
        if (_icon->size().isValid())
            s = _icon->size();
        else
            s = _icon->preferredSize();
        imgW = s.width();
        imgH = s.height() + 2; // 1px for button down movement
    }

    if (_toolButtonStyle == IconOnly)
    {
        ILOG_DEBUG(ILX_TOOLBUTTON, " -> icon only: %d, %d\n", w + imgW, h + imgH);
        if (imgW)
            return Size(w + imgW, h + imgH);
        return stylist()->defaultSize(StyleHint::PushButton);
    } else
    {
        Size s = textExtents();
        if (s.isValid() && imgW)
        {
            if (_toolButtonStyle == IconBeforeText)
            {
                w += imgW + stylist()->defaultParameter(StyleHint::ButtonOffset) + s.width();
                h += std::max(s.height(), imgH);
                return Size(w, h);
            } else
            {
                // IconBelowText or IconAboveText
                w += std::max(imgW, s.width());
                h += imgH + s.height() + stylist()->defaultParameter(StyleHint::ButtonOffset);
                return Size(w, h);
            }
        } else if (imgW)
            return Size(w + imgW, h + imgH);
        else
            return Size(w + s.width(), h + s.height());
    }
}
Esempio n. 17
0
void
AppCompositor::updateAppCompositorGeometry()
{
    ILOG_TRACE_W(ILX_APPCOMPOSITOR);
    float w = _zoomFactor * width();
    float h = _zoomFactor * height();

    if (w == 0 || h == 0)
        return;

    AppInfo* info = _instance->appInfo();
    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> name: %s\n", info->name().c_str());
    ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> w: %f h: %f\n", w, h);
    if (info)
    {
        if (info->appFlags() & APP_NO_MAINWINDOW)
        {
            int i = 0;
            ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> APP_NO_MAINWINDOW - ZoomFactor: %f\n", _zoomFactor);
            // calc bounding box.
            Rectangle bounds;
            for (WidgetList::iterator it = _children.begin(); it != _children.end(); ++it)
            {
                SurfaceView* view = dynamic_cast<SurfaceView*>(*it);
                if (view)
                {
                    int x, y;
                    view->dfbWindow()->GetPosition(view->dfbWindow(), &x, &y);
                    Size s = view->preferredSize();
                    bounds.unite(Rectangle(x, y, s.width(), s.height()));
                }
            }

            // resize
            _hScale = width() < _compositor->getAppGeometry().width() ? w / _compositor->getAppGeometry().width() : 1;
            _vScale =
                    height() < _compositor->getAppGeometry().height() ? h / _compositor->getAppGeometry().height() : 1;
            for (WidgetList::iterator it = _children.begin(); it != _children.end(); ++it)
            {
                SurfaceView* view = dynamic_cast<SurfaceView*>(*it);
                if (view)
                {
                    int x, y;
                    view->dfbWindow()->GetPosition(view->dfbWindow(), &x, &y);
                    Size s = view->preferredSize();
                    view->setGeometry(x * _hScale, y * _vScale, s.width() * _hScale, s.height() * _vScale);
                    ILOG_DEBUG(ILX_APPCOMPOSITOR, "  -> window[%d]: %d, %d - %d x %d\n", i, view->x(), view->y(), view->width(), view->height());
                    ++i;
                }
            }
        } else
        {
            int i = 0;
            ILOG_DEBUG(ILX_APPCOMPOSITOR, " -> APP_WITH_MAINWINDOW - ZoomFactor: %f\n", _zoomFactor);
            for (WidgetList::iterator it = _children.begin(); it != _children.end(); ++it)
            {
                SurfaceView* view = dynamic_cast<SurfaceView*>(*it);
                if (view)
                {
                    if (i == 0)
                    {
                        view->setGeometry((width() - w) / 2, (height() - h) / 2, w, h);
                        ILOG_DEBUG(ILX_APPCOMPOSITOR, "  -> window[%d]: %d, %d - %d x %d\n", i, view->x(), view->y(), view->width(), view->height());
                        // Calculate scaling factors using mainwindow as base
                        Size s = view->preferredSize();
                        _hScale = w / s.width();
                        _vScale = h / s.height();
                        ILOG_DEBUG(ILX_APPCOMPOSITOR, "  -> hScale: %f vScale: %f\n", _hScale, _vScale);
                    } else
                    {
                        int x, y;
                        view->dfbWindow()->GetPosition(view->dfbWindow(), &x, &y);
                        Size s = view->preferredSize();
                        view->setGeometry(x * _hScale, y * _vScale, s.width() * _hScale, s.height() * _vScale);
                        ILOG_DEBUG(ILX_APPCOMPOSITOR, "  -> window[%d]: %d, %d - %d x %d\n", i, view->x(), view->y(), view->width(), view->height());
                    }
                    ++i;
                }
            }
        }
    }
}
Esempio n. 18
0
void
Surface::flip(const Rectangle& rect)
{
    ILOG_TRACE(ILX_SURFACE);
    DFBResult ret;
    DFBRegion r = rect.dfbRegion();
    switch (PlatformManager::instance().getLayerFlipMode(_owner->_rootWindow->layerName()))
    {
    case FlipNone:
        ret = _dfbSurface->Flip(_dfbSurface, &r, DSFLIP_NONE);
        break;
    case FlipOnSync:
        ret = _dfbSurface->Flip(_dfbSurface, &r, DSFLIP_ONSYNC);
        break;
    case FlipWaitForSync:
        ret = _dfbSurface->Flip(_dfbSurface, &r, DSFLIP_WAITFORSYNC);
        break;
#if ILIXI_DFB_VERSION >= VERSION_CODE(1,7,0)
    case FlipNew:
        {
            int w, h;
            _dfbSurface->GetSize(_dfbSurface, &w, &h);
            _dfbSurface->SetClip(_dfbSurface, NULL);
            _dfbSurface->SetBlittingFlags(_dfbSurface, DSBLIT_NOFX);

            if (r.y1)
            {
                DFBRectangle rect;
                rect.x = 0;
                rect.y = 0;
                rect.w = w;
                rect.h = r.y1;
                _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
            }

            if (r.y2 < h - 1)
            {
                DFBRectangle rect;
                rect.x = 0;
                rect.y = r.y2 + 1;
                rect.w = w;
                rect.h = h - r.y2 - 1;
                _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
            }

            if (r.x1)
            {
                DFBRectangle rect;
                rect.x = 0;
                rect.y = r.y1;
                rect.w = r.x1;
                rect.h = r.y2 - r.y1 + 1;
                _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
            }

            if (r.x2 < w - 1)
            {
                DFBRectangle rect;
                rect.x = r.x2 + 1;
                rect.y = r.y1;
                rect.w = w - r.x2 - 1;
                rect.h = r.y2 - r.y1 + 1;
                _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
            }

            ret = _dfbSurface->Flip(_dfbSurface, &r, (DFBSurfaceFlipFlags) (DSFLIP_SWAP | DSFLIP_ONSYNC));
        }
        break;
#endif

    default:
        ret = _dfbSurface->Flip(_dfbSurface, &r, DSFLIP_NONE);
        break;
    }

    if (ret)
        ILOG_ERROR(ILX_SURFACE, " -> Flip error: %s - Rect(%d, %d, %d, %d)\n", DirectFBErrorString(ret), rect.x(), rect.y(), rect.width(), rect.height());
    else
        ILOG_DEBUG(ILX_SURFACE, " -> Rect(%d, %d, %d, %d)\n", rect.x(), rect.y(), rect.width(), rect.height());
}
Esempio n. 19
0
int RilSimcard::Request()
{
	ILOG_DEBUG(MGUI_SIMCARD, "Request simcard status\n");
	return RilRequest::Request(RIL_REQUEST_GET_SIM_STATUS);
}
Esempio n. 20
0
int RilOperator::Request()
{
	ILOG_DEBUG(MGUI_OPERATOR, "Request operator\n");
	return RilRequest::Request(RIL_REQUEST_OPERATOR);
}
Esempio n. 21
0
void
Surface::updateSurface(const PaintEvent& event)
{
    ILOG_TRACE_F(ILX_SURFACE);
    ILOG_DEBUG(ILX_SURFACE, " -> owner: %p\n", _owner);

    if (_flags & DoZSort)
    {
        _owner->_children.sort(compareZ);
        unsetSurfaceFlag(Surface::DoZSort);
    }

    if (_flags & Surface::ModifiedGeometry) {
        _owner->sigGeometryUpdated();
        if (_surfaceOwner)
        {
            _xOffset = _owner->absX() - _surfaceOwner->absX();
            _yOffset = _owner->absY() - _surfaceOwner->absY();
        }
    }

    // initialisation is done once for both surfaces in stereoscopic mode.
    if (_flags & InitialiseSurface)
    {
        ILOG_DEBUG(ILX_SURFACE, " -> InitialiseSurface\n");
        bool ret = false;

        release();

        if (_flags & HasOwnSurface)
        {
            // XXX This surface will be painted once by owner; but it will be blitted by parent using z() twice.
            ILOG_DEBUG(ILX_SURFACE, " -> HasOwnSurface: 0x%03x\n", _flags);
            ret = createDFBSurface(_owner->width(), _owner->height());
        } else if (_flags & RootSurface)
        {
#ifdef ILIXI_STEREO_OUTPUT
            ILOG_DEBUG(ILX_SURFACE, " -> RootSurface: 0x%03x (RIGHT)\n", _flags);
            _rightSurface = _owner->_rootWindow->windowSurface();
            _rightSurface->AddRef(_rightSurface);
            ILOG_DEBUG(ILX_SURFACE, " -> RootSurface: 0x%03x (LEFT)\n", _flags);
            _dfbSurface = _owner->_rootWindow->windowSurface();
            _dfbSurface->AddRef(_dfbSurface);
#else
            ILOG_DEBUG(ILX_SURFACE, " -> RootSurface %p flags 0x%03x\n", this, _flags);
            _surfaceOwner = _owner;
            _dfbSurface = _owner->_rootWindow->windowSurface();
            _dfbSurface->AddRef(_dfbSurface);
#endif
            ret = true;
        } else if (_flags & SubSurface)
        {
#ifdef ILIXI_STEREO_OUTPUT
            if (_eye == PaintEvent::RightEye)
            {
                ILOG_DEBUG(ILX_SURFACE, " -> SubSurface: 0x%03x (RIGHT)\n", _flags);
                _rightSurface = _owner->parent()->surface()->dfbSurface();
                _rightSurface->AddRef(_rightSurface);
            } else
            {
                ILOG_DEBUG(ILX_SURFACE, " -> SubSurface: 0x%03x (LEFT)\n", _flags);
                ret = createDFBSubSurface(_owner->surfaceGeometry(), _owner->_parent->surface()->dfbSurface());
            }
#else
            ILOG_DEBUG(ILX_SURFACE, " -> SubSurface: 0x%03x\n", _flags);

            _surfaceOwner = _owner->_parent;
            while (_surfaceOwner->surface()->flags() & SharedSurface)
            {
                if (_surfaceOwner->parent())
                    _surfaceOwner = _surfaceOwner->parent();
                else
                    break;
            }

            ret = createDFBSubSurface(_owner->frameGeometry(), _surfaceOwner->surface()->dfbSurface());
#endif
        } else if (_owner->_parent)
        {
#ifdef ILIXI_STEREO_OUTPUT
            ILOG_DEBUG(ILX_SURFACE, " -> SharedSurface: 0x%03x (RIGHT)\n", _flags);
            _rightSurface = _owner->parent()->surface()->_rightSurface;
            _rightSurface->AddRef(_rightSurface);
            ILOG_DEBUG(ILX_SURFACE, " -> SharedSurface: 0x%03x (LEFT)\n", _flags);
            _dfbSurface = _owner->parent()->surface()->_dfbSurface;
            _dfbSurface->AddRef(_dfbSurface);
#else
            ILOG_DEBUG(ILX_SURFACE, " -> SharedSurface: 0x%03x\n", _flags);
            _surfaceOwner = _owner->_parent;
            while (_surfaceOwner->surface()->flags() & SharedSurface)
            {
                if (_surfaceOwner->parent())
                    _surfaceOwner = _surfaceOwner->parent();
                else
                    break;
            }
            _xOffset = _owner->absX() - _surfaceOwner->absX();
            _yOffset = _owner->absY() - _surfaceOwner->absY();
            ILOG_DEBUG(ILX_SURFACE, " -> SharedSurface x: %d y: %d\n", _xOffset, _yOffset);
            _dfbSurface = _surfaceOwner->surface()->dfbSurface();
            _dfbSurface->AddRef(_dfbSurface);
#endif
            ret = true;
        }

        if (ret)
            unsetSurfaceFlag(Surface::InitialiseSurface);
    }
#ifdef ILIXI_STEREO_OUTPUT
    ILOG_DEBUG(ILX_SURFACE, " -> eye: %s\n", event.eye & PaintEvent::LeftEye ? "Left" : "Right");
    _eye = event.eye;
#endif

}
Esempio n. 22
0
UBusRequest::~UBusRequest()
{
	ILOG_TRACE(UBUS_REQ);
	ILOG_DEBUG(UBUS_REQ, "%s exit\n", __func__);
}
Esempio n. 23
0
int RilScreen::Request(int on_off)
{
	ILOG_DEBUG(MGUI_SCREEN, "Request screen %s\n",on_off ? "on" : "off");
	return RilRequest::Request(RIL_REQUEST_SCREEN_STATE, (const void *)&on_off, (int)1);
}