#ifndef QWebPageClient_h
#define QWebPageClient_h
#ifndef QT_NO_CURSOR
#include <QCursor>
#endif
#include <QRect>
QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QStyle;
QT_END_NAMESPACE
class QWebPageClient {
public:
virtual ~QWebPageClient() { }
virtual bool isQWidgetClient() const { return false; }
virtual void scroll(int dx, int dy, const QRect&) = 0;
virtual void update(const QRect&) = 0;
virtual void setInputMethodEnabled(bool enable) = 0;
virtual bool inputMethodEnabled() const = 0;
#if USE(ACCELERATED_COMPOSITING)
virtual void setRootGraphicsLayer(QGraphicsItem* layer) {}
virtual void markForSync(bool scheduleSync = false) {}
virtual bool allowsAcceleratedCompositing() const { return false; }
#endif
#if QT_VERSION >= 0x040600
virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable) = 0;
#endif
#ifndef QT_NO_CURSOR
inline void resetCursor()
{
if (!cursor().bitmap() && cursor().shape() == m_lastCursor.shape())
return;
updateCursor(m_lastCursor);
}
inline void setCursor(const QCursor& cursor)
{
m_lastCursor = cursor;
if (!cursor.bitmap() && cursor.shape() == this->cursor().shape())
return;
updateCursor(cursor);
}
#endif
virtual QPalette palette() const = 0;
virtual int screenNumber() const = 0;
virtual QWidget* ownerWidget() const = 0;
virtual QRect geometryRelativeToOwnerWidget() const = 0;
virtual QObject* pluginParent() const = 0;
virtual QStyle* style() const = 0;
protected:
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const = 0;
virtual void updateCursor(const QCursor& cursor) = 0;
#endif
private:
#ifndef QT_NO_CURSOR
QCursor m_lastCursor;
#endif
};
#endif