summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.h
Commit message (Collapse)AuthorAgeFilesLines
* Introduced QWindow::isExposed().Gunnar Sletta2012-02-181-0/+2
| | | | | | | | | | | The visible property along with show/hideEvent tracks the windows visibility from the application perspective and is really a request. The exposeEvent() along with the isExposed() accessor is used to notify the application of the actual state of the window in the windowing system. Change-Id: I7f5b7ed74a168e34aaa21ce0ae9042ddfb0bf6d8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed API in QWindow: visible() -> isVisible().Samuel Rødal2012-02-171-2/+4
| | | | | | Change-Id: I14706abb8441c153f738563cb1a46205fdb2dae6 QWindow::visible() did not follow the API guidelines. Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Improve QSurface / QWindow API a bit and use that to avoid errorsGunnar Sletta2012-02-021-1/+0
| | | | | Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-301-0/+1
| | | | | | | Use prototypically for qwizard_win.cpp. Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QGuiApplication::focusObject() to replace QInputPanel::inputItem()Pekka Vuorela2012-01-271-0/+2
| | | | | | | | | | | * Deprecated QInputPanel::inputWindow() which is already just returning QGuiApplication::activeWindow() * Deprecated QInputPanel::inputItem() and introduced QGuiApplication::focusObject(). Input methods can check input method support by Qt::ImEnabled query. Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Made QWindow::currentOrientation() a property.Samuel Rødal2012-01-261-0/+2
| | | | | | | | | | | | | | To match the previous QWindow::orientation() property which can be useful to access from QML. Also, removed the automatic translation of Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow level, as it leads to a lot of complexity regarding the QWindow::contentOrientationChanged() signal, and makes it hard to distinguish between the case where the window's orientation follows that of the screen, and the case where the orientation just happens to be set to that of the screen. Change-Id: I6950d1337b7f929815eff1328181855090d8066b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-241-7/+5
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make show() default to sane sizing behaviour based on the platform.Samuel Rødal2012-01-121-2/+2
| | | | | | | | | | | | | | | | Traditionally it's been hard to write a Qt app that behaves sanely across embedded and desktop platforms, i.e. defaults to fullscreen on embedded and non-fullscreen on desktop. For Qt 5 we can fix this by making the behaviour of the default QWindow::show() be customizable by the platform plugin. If the application developer wants to override this behaviour he can still use the explicit showFullScreen(), showNormal() etc functions. Change-Id: I26a907b404058e345d841c818daefbb57a26d3fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add touchEvent() virtual to QWindow.Laszlo Agocs2011-12-121-0/+2
| | | | | | | | | | | Unlike keyPressEvent(), mousePressEvent(), etc. the touch events had no equivalent so one had to fall back to reimplementing event() or using an event filter. This is now corrected by introducing touchEvent(). Touch events are finally becoming a first-class citizen in Qt 5. Change-Id: Ia2044030154fd5b1b5384f08a3cb1749b798435f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added screenChanged() signal and handle screen destruction in QWindow.Samuel Rødal2011-11-291-0/+4
| | | | | | | | It can be useful to get a signal when the QScreen changes, for example when having bindings to QScreen properties in QML. Change-Id: I919dd12c656485b28b393aec5eedac4c01593afc Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add some properties to QWindowAlan Alpert2011-11-221-1/+44
| | | | | | | | x,y,width,height,visible and orientation Includes slot setters and notify signals for maximal QML compatibility. Change-Id: I124399093c00f8ad1485d4fbae816dfbe3027eff Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Get rid of unused inputMethodEvent functionJoona Petrell2011-11-211-2/+0
| | | | | | | | | In Qt5 input method events are meant to be sent directly to QInputPanel::inputItem() instead of the focused QWindow. Change-Id: Idc8fe458973f066b578f6374ca33ce6f950bf9cf Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add virtual QWindow::focusObject() methodLars Knoll2011-10-221-0/+1
| | | | | | | | | | The method allows to retrieve the object that currently has the input focus inside the Window. This is e.g. required to correctly determine the context for keyboard shortcuts. Change-Id: I9e05ef62717973bac275ce34cc70fb86aa2d1e5b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix some compiler warnings on MacSergio Ahumada2011-10-211-0/+2
| | | | | Change-Id: I52b5c1822f9530f75eeebfcafbade6f89062e369 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added Orientation API to QScreen and QWindow.Samuel Rødal2011-10-071-0/+5
| | | | | | | | | | | | QScreen now has a primary and current orientation, and a QWindow can set its orientation as well. The current screen orientation is just a hint to the application. Change-Id: I4635982cfac2d16634d4edd5c6ab78e9d0ac55a4 Reviewed-on: http://codereview.qt-project.org/5988 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Added QWindow::isActive() and focus in / out events.Samuel Rødal2011-10-051-0/+12
| | | | | | | | | | | Renamed QGuiApplication::activeWindow() to QGuiApplication::focusWindow(), implemented QWindow::isActive() as a style hint, and added focus in / out events. Change-Id: I71866e76c5a817def3e17bcc20a4fc32081a0e7a Reviewed-on: http://codereview.qt-project.org/5811 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Added QWindow::requestedFormat()Gunnar Sletta2011-10-031-0/+1
| | | | | | | Change-Id: I9e69ddd8ceefeda87216fb3d2507c40bc7220cf5 Reviewed-on: http://codereview.qt-project.org/5846 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implemented QWidget's move() vs setGeometry() distinction in QWindow.Samuel Rødal2011-09-231-5/+12
| | | | | | | | | | | | | | QWidget's move() sets the position of the window including the window frame, unlike setGeometry(). There was no equivalent for this in QWindow, so several QWidget auto-tests were failing. Now we add setFramePos() to achieve the same purpose in QWindow. This fixes tst_QWidget::windowState(), which uses move(). Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148 Reviewed-on: http://codereview.qt-project.org/5405 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed geometry issues.Samuel Rødal2011-09-231-0/+2
| | | | | | | | | | | We need to compare against the window's currently known geometry to know when to send resize and move events. Also make sure at least one resize event is sent, instead of sending one before each expose. Change-Id: Id7ebe4c1c0e723af9198c668a0c736d64efdbf3e Reviewed-on: http://codereview.qt-project.org/5364 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Say hello to QWindow::accessibleRoot()Jan-Arve Saether2011-09-191-0/+3
| | | | | | | Change-Id: I1efa71f01f8af46c9addf2aae21e4b6fc086ad2e Reviewed-on: http://codereview.qt-project.org/5087 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* compile when shadowing is an errorGunnar Sletta2011-09-151-3/+3
| | | | | | | Change-Id: If12cd19821d07303e808e19be1ee3984c90110b1 Reviewed-on: http://codereview.qt-project.org/4946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* move QSurface into its own file.Jørgen Lind2011-09-071-22/+1
| | | | | | | | | also move QPlatformSurface to its own file Change-Id: I29fb6c70ede18a0ac5e0f6bfb97a33293633e668 Reviewed-on: http://codereview.qt.nokia.com/4309 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix try #2 at QSurface missing a virtual destructorJani Uusi-Rantala2011-09-061-0/+2
| | | | | | | | | | All virtual base classes with accessible destructor should declare the destructor as virtual too. Change-Id: I2b07c7e824612af072d7802095d958dca8cc34c8 Reviewed-on: http://codereview.qt.nokia.com/4274 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QWindow::mapToGlobal/mapFromGlobal and move()Gunnar Sletta2011-08-291-0/+7
| | | | | | | Change-Id: If1909b9ce468a8708cb25d5a2fbe8ebd90bd958a Reviewed-on: http://codereview.qt.nokia.com/3702 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* resize convenince functionGunnar Sletta2011-08-241-0/+1
| | | | | | | Change-Id: I81b39912fbc76bb8532ff1d80ff25bce5e84f727 Reviewed-on: http://codereview.qt.nokia.com/3452 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Added some convenience to QWindowGunnar Sletta2011-08-051-0/+13
| | | | | | | Change-Id: I367f5e3f586661322184cfa5f7653814569cb6e3 Reviewed-on: http://codereview.qt.nokia.com/2611 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added workable QScreen API on top of QPlatformScreen.Samuel Rødal2011-07-251-1/+6
| | | | | | | | | | | | | | | | | | | | | QPlatformIntegration::screens() no longer has to be implemented, implementations should call QPlatformIntegration::screenAdded() for each screen instead. This is for being able to support adding screens at run-time later on, by connecting it to a signal in QGuiApplication. The QGuiGLContext API has changed a bit, by not sending in all the parameters in the constructor but instead having a create() function. The createPlatformGLContext() factory in QPlatformIntegration takes a QGuiGLContext * instead of a QSurfaceFormat and a share context, similar to how the window and backing store factory functions work. The XCB plugin has experimental support for connecting to multiple X displays simultaneously, creating one or more QScreen for each. Change-Id: I248a22a4fd3481280710110272c04a30a8021e8f Reviewed-on: http://codereview.qt.nokia.com/2103 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Reintroduce QWindow::SurfaceTypeMorten Sorvig2011-06-221-0/+5
| | | | | | | On Cocoa it makes sense to distinguish between the two window types. Reviewed-by: Samuel
* Made QExposeEvent public and added exposeEvent() in QWindow.Samuel Rødal2011-06-221-0/+2
| | | | This is needed for applications that use QBackingStore directly.
* OpenGL API refactor.Samuel Rødal2011-06-211-15/+27
| | | | | | Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of having QPlatformGLSurface accessor in QWindow.
* Rename QWindowSurface -> QBackingStore and split into platform / public.Samuel Rødal2011-06-211-3/+1
| | | | Also get rid of GL window surface and related classes.
* Added frameMargins() API and support in XCB plugin.Samuel Rødal2011-06-101-0/+3
|
* QWindowContext / QWindowFormat refactor.Samuel Rødal2011-06-101-7/+8
| | | | | | | | | | | | | To enable having a single GL context used for multiple drawables we need to de-couple the context class a bit more from the window class in the plugin API. Now contexts are created stand-alone based on a GL format and a share context, and when calling makeCurrent() a desired surface is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all support this use case. QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed to QGuiGLFormat. We have the ability to introduce a pbuffer or similar other offscreen GL drawable abstraction in the future.
* Add support for mouse and keyboard grab.Laszlo Agocs2011-06-031-0/+3
| | | | Reviewed-by: Samuel Rødal
* Added QWindow::setTransientParent().Samuel Rødal2011-05-231-0/+3
| | | | | Make the transient parent relationship explicit instead of having it encoded through the window flags.
* Remove superfluous setter / getter for QWindowFormat in QWindow.Samuel Rødal2011-05-231-3/+0
|
* Add QWindow::setWindowModality().Samuel Rødal2011-05-181-1/+3
| | | | Also set corresponding window manager hints in xcb plugin.
* Re-implement transient window support in XCB backend.Samuel Rødal2011-05-161-0/+1
| | | | | | If a QWindow has a parent but is top-level the corresponding QPlatformWindow should not be re-parented but instead be made transient for the parent window if possible.
* Implement QWindow minimum/maximum/base size hints and size increments.Samuel Rødal2011-05-161-2/+9
|
* Initial QPlatformWindow window state setting API and xcb implementation.Samuel Rødal2011-05-131-2/+2
|
* move files in src/gui into their final locationsLars Knoll2011-05-111-0/+186
| | | | | Rename the guikernel subdir to kernel and guiutil to util.
* split kernel/ up according to the future library splitLars Knoll2011-05-041-186/+0
| | | | | | | Create a guikernel/ directory that contains the files that'll go into libQtGui. What remains in kernel/ will go into QtWidgets. In addition to that image/, painting/ and text will end up int QtGui.
* rename qwindow_qpa to qwindowLars Knoll2011-05-031-0/+186