Commit 2e4082ff authored by Dmitry Kazakov's avatar Dmitry Kazakov

Remove stub functions which were used while forking Qt's tablet code

parent b3e9f88b
......@@ -47,6 +47,7 @@ KisXi2EventFilter::~KisXi2EventFilter()
bool KisXi2EventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
{
Q_UNUSED(eventType);
Q_UNUSED(result);
xcb_generic_event_t *event = static_cast<xcb_generic_event_t*>(message);
......
......@@ -68,7 +68,6 @@ QXcbConnection::QXcbConnection(bool canGrabServer, const char *displayName)
#if defined(XCB_USE_XINPUT2)
initializeXInput2();
#endif
m_keyboard = new QXcbKeyboard(this);
}
QXcbConnection::~QXcbConnection()
......@@ -76,8 +75,6 @@ QXcbConnection::~QXcbConnection()
#if defined(XCB_USE_XINPUT2)
finalizeXInput2();
#endif
delete m_keyboard;
}
QXcbAtom::Atom QXcbConnection::qatom(xcb_atom_t xatom) const
......@@ -422,70 +419,6 @@ bool QXcbConnection::xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *ev, int opCo
return false;
}
QPointF QXcbScreen::mapFromNative(const QPointF &pos) const
{
return pos;
}
QRect QXcbScreen::geometry() const
{
return QRect(0,0,1000,1000);
}
QSizeF QXcbScreen::physicalSize() const
{
return QSizeF(500,300);
}
QWindow* QXcbWindow::window() const
{
return 0;
}
QXcbScreen *QXcbWindow::xcbScreen() const
{
return 0;
}
qreal QXcbWindow::devicePixelRatio() const
{
return 1.0;
}
Qt::KeyboardModifiers QXcbKeyboard::translateModifiers(int s) const
{
Q_UNUSED(s);
Qt::KeyboardModifiers ret = 0;
// TODO: find modifiers somewhere!
/* if (s & XCB_MOD_MASK_SHIFT)
ret |= Qt::ShiftModifier;
if (s & XCB_MOD_MASK_CONTROL)
ret |= Qt::ControlModifier;
if (s & rmod_masks.alt)
ret |= Qt::AltModifier;
if (s & rmod_masks.meta)
ret |= Qt::MetaModifier;
if (s & rmod_masks.altgr)
ret |= Qt::GroupSwitchModifier;
*/
return ret;
}
class Q_GUI_EXPORT QWindowSystemInterfacePrivate {
public:
enum EventType {
......
......@@ -518,14 +518,6 @@ bool QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
}
#ifdef XCB_USE_XINPUT22
static qreal valuatorNormalized(double value, XIValuatorClassInfo *vci)
{
if (value > vci->max)
value = vci->max;
if (value < vci->min)
value = vci->min;
return (value - vci->min) / (vci->max - vci->min);
}
bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
{
......
......@@ -333,38 +333,6 @@ namespace QXcbAtom {
};
}
class QXcbWindow;
class QXcbScreen;
class QXcbKeyboard;
class QXcbWindowEventListener
{
public:
virtual ~QXcbWindowEventListener() {}
virtual bool handleGenericEvent(xcb_generic_event_t *, long *) { return false; }
virtual void handleExposeEvent(const xcb_expose_event_t *) {}
virtual void handleClientMessageEvent(const xcb_client_message_event_t *) {}
virtual void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *) {}
virtual void handleMapNotifyEvent(const xcb_map_notify_event_t *) {}
virtual void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *) {}
virtual void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) {}
virtual void handleButtonPressEvent(const xcb_button_press_event_t *) {}
virtual void handleButtonReleaseEvent(const xcb_button_release_event_t *) {}
virtual void handleMotionNotifyEvent(const xcb_motion_notify_event_t *) {}
virtual void handleEnterNotifyEvent(const xcb_enter_notify_event_t *) {}
virtual void handleLeaveNotifyEvent(const xcb_leave_notify_event_t *) {}
virtual void handleFocusInEvent(const xcb_focus_in_event_t *) {}
virtual void handleFocusOutEvent(const xcb_focus_out_event_t *) {}
virtual void handlePropertyNotifyEvent(const xcb_property_notify_event_t *) {}
virtual void handleXIMouseEvent(xcb_ge_event_t *) {}
virtual QXcbWindow *toWindow() { return 0; }
};
typedef QHash<xcb_window_t, QXcbWindowEventListener *> WindowMapper;
class QXcbConnection
{
public:
......@@ -420,7 +388,6 @@ public:
XInput2TouchDeviceData *touchDeviceForId(int id);
bool xi2HandleEvent(xcb_ge_event_t *event);
void xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow);
bool xi2SetMouseGrabEnabled(xcb_window_t w, bool grab);
static bool xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event, int opCode); // FIXME: to be copied
......@@ -449,7 +416,6 @@ public:
bool canGrab() const { return m_canGrabServer; }
void *xlib_display() const;
QXcbKeyboard *keyboard() const { return m_keyboard; }
xcb_connection_t *xcb_connection() const { return m_connection; }
......@@ -470,7 +436,6 @@ private:
QVector<TabletData> m_tabletData;
QHash<xcb_window_t, QWindow*> m_windowMapper;
QXcbKeyboard *m_keyboard;
QHash<int, XInput2TouchDeviceData*> m_touchDevices;
bool m_xiGrab;
......@@ -479,33 +444,6 @@ private:
QHash<int, ScrollingDevice> m_scrollingDevices;
};
class QPlatformScreen;
class QWindow;
class QXcbScreen
{
public:
QPointF mapFromNative(const QPointF &pos) const;
QRect geometry() const;
QSizeF physicalSize() const;
};
class QXcbWindow
{
public:
QWindow* window() const;
QXcbScreen *xcbScreen() const;
qreal devicePixelRatio() const;
};
class QXcbKeyboard
{
public:
QXcbKeyboard(QXcbConnection *conn) { Q_UNUSED(conn); }
Qt::KeyboardModifiers translateModifiers(int s) const;
};
#ifdef Q_XCB_DEBUG
template <typename cookie_t>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment