62 #if defined(Q_OS_BLACKBERRY) 67 #include <QtCore/QAbstractEventDispatcher> 68 #include <QtGui/QApplication> 69 #include <QtGui/private/qpixmap_raster_p.h> 70 #include <QtGui/QPlatformWindow> 71 #include <QtGui/QWindowSystemInterface> 72 #include <QtOpenGL/private/qpixmapdata_gl_p.h> 77 #if defined(Q_OS_BLACKBERRY) 78 #include <bps/navigator.h> 86 mScreenEventThread(0),
91 mPaintUsingOpenGL(getenv(
"QBB_USE_OPENGL") != NULL),
96 qRegisterMetaType<screen_window_t>();
110 int result = screen_create_context(&
mContext, SCREEN_APPLICATION_CONTEXT);
112 qFatal(
"QBB: failed to connect to composition manager, errno=%d",
errno);
117 #if !defined(Q_OS_BLACKBERRY) 129 #if defined(QBB_SCREENEVENTTHREAD) 134 #ifdef QBBLOCALETHREAD_ENABLED 140 #if defined(Q_OS_BLACKBERRY) 181 #if defined(QBBINTEGRATION_DEBUG) 182 qDebug() <<
"QBB: platform plugin shutdown begin";
189 #ifdef QBBLOCALETHREAD_ENABLED 194 #if defined(QBB_SCREENEVENTTHREAD) 197 #elif defined(Q_OS_BLACKBERRY) 204 #if defined(Q_OS_BLACKBERRY) 226 #if defined(Q_OS_BLACKBERRY) 230 #if defined(QBBINTEGRATION_DEBUG) 231 qDebug() <<
"QBB: platform plugin shutdown end";
239 #if defined(QT_OPENGL_ES) 277 #if defined(QBBINTEGRATION_DEBUG) 278 qDebug() <<
"QBBIntegration::moveToScreen - w=" << window <<
", s=" << screen;
289 if (platformWindow && platformScreen)
290 platformWindow->
setScreen(platformScreen);
298 #ifndef QT_NO_CLIPBOARD 313 if (screen_get_window_property_pv(window, SCREEN_PROPERTY_DISPLAY, (
void**)&display) != 0) {
314 qWarning(
"QBBIntegration: Failed to get screen for window, errno=%d",
errno);
342 int result = screen_get_context_property_iv(
mContext, SCREEN_PROPERTY_DISPLAY_COUNT, &displayCount);
344 qFatal(
"QBBIntegration: failed to query display count, errno=%d",
errno);
348 screen_display_t *displays = (screen_display_t *)alloca(
sizeof(screen_display_t) * displayCount);
349 result = screen_get_context_property_pv(
mContext, SCREEN_PROPERTY_DISPLAYS, (
void **)displays);
351 qFatal(
"QBBIntegration: failed to query displays, errno=%d",
errno);
353 for (
int i=0; i<displayCount; i++) {
355 result = screen_get_display_property_iv(displays[i], SCREEN_PROPERTY_ATTACHED, &isAttached);
357 qWarning(
"QBBIntegration: failed to query display attachment, errno=%d",
errno);
375 screen,
SLOT(newWindowCreated(screen_window_t)));
377 screen,
SLOT(windowClosed(screen_window_t)));
QBBLocaleThread * mLocaleThread
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
void unregisterForScreenEvents(QBBScreen *screen)
QBBNativeInterface * mNativeInterface
void setScreen(QBBScreen *platformScreen)
void createDisplay(screen_display_t display, int screenIndex)
static QAbstractEventDispatcher * instance(QThread *thread=0)
Returns a pointer to the event dispatcher object for the specified thread.
virtual QList< QPlatformScreen * > screens() const
Accessor function to a list of all the screens on the current system.
The QByteArray class provides an array of bytes.
Q_DECLARE_METATYPE(screen_window_t)
virtual void moveToScreen(QWidget *window, int screen)
This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a...
QBBAbstractVirtualKeyboard * mVirtualKeyboard
QBBButtonEventNotifier * mButtonsNotifier
virtual bool hasCapability(QPlatformIntegration::Capability cap) const
virtual ~QBBIntegration()
QList< QPlatformScreen * > mScreens
Q_CORE_EXPORT void qDebug(const char *,...)
virtual QPixmapData * createPixmapData(QPixmapData::PixelType type) const
Factory function for QPixmapData.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_GUI_EXPORT EGLDisplay display()
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void injectPointerMoveEvent(int x, int y)
const T & at(int i) const
Returns the item at index position i in the list.
QBBScreenEventThread * mScreenEventThread
Q_CORE_EXPORT void qWarning(const char *,...)
void clear()
Removes all items from the list.
QBBScreen * screenForNative(screen_display_t screen) const
The QWindowSurface class provides the drawing area for top-level windows.
virtual QPlatformNativeInterface * nativeInterface() const
T & first()
Returns a reference to the first item in the list.
screen_display_t nativeDisplay() const
QBBScreen * primaryDisplay() const
virtual QWindowSurface * createWindowSurface(QWidget *widget, WId winId) const
Factory function for QWindowSurface.
Q_CORE_EXPORT void qFatal(const char *,...)
virtual void setCursorPos(int x, int y)
void start(Priority=InheritPriority)
Begins execution of the thread by calling run().
QBBBpsEventFilter * mBpsEventFilter
QBBScreenEventHandler * mScreenEventHandler
void installOnEventDispatcher(QAbstractEventDispatcher *dispatcher)
void removeDisplay(QBBScreen *screen)
void registerForScreenEvents(QBBScreen *screen)
QBBScreen * screenForWindow(screen_window_t window) const
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
QBBNavigatorEventHandler * mNavigatorEventHandler
QBBNavigatorEventNotifier * mNavigatorEventNotifier
screen_context_t mContext
virtual QPlatformClipboard * clipboard() const
Accessor for the platform integrations clipboard.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
void deleteLater()
Schedules this object for deletion.
bool paintUsingOpenGL() const
virtual QPlatformWindow * createPlatformWindow(QWidget *widget, WId winId) const
Factory function for QPlatformWindow.
The QList class is a template class that provides lists.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.