src/gui/kernel/qwidget_p.h
changeset 30 5dc02b23752f
parent 19 fcece45ef507
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   156     ulong syncRequestTimestamp;
   156     ulong syncRequestTimestamp;
   157     qint32 newCounterValueHi;
   157     qint32 newCounterValueHi;
   158     quint32 newCounterValueLo;
   158     quint32 newCounterValueLo;
   159 #endif
   159 #endif
   160 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
   160 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
       
   161     uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
   161     HICON winIconBig; // internal big Windows icon
   162     HICON winIconBig; // internal big Windows icon
   162     HICON winIconSmall; // internal small Windows icon
   163     HICON winIconSmall; // internal small Windows icon
   163 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
   164 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
   164     uint resizer : 4;
   165     uint resizer : 4;
   165     uint isSetGeometry : 1;
   166     uint isSetGeometry : 1;
   167     quint32 wattr;
   168     quint32 wattr;
   168     quint32 wclass;
   169     quint32 wclass;
   169     WindowGroupRef group;
   170     WindowGroupRef group;
   170     IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys.
   171     IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys.
   171     quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys()
   172     quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys()
       
   173 #ifdef QT_MAC_USE_COCOA
       
   174     // This value is just to make sure we maximize and restore to the right location, yet we allow apps to be maximized and
       
   175     // manually resized.
       
   176     // The name is misleading, since this is set when maximizing the window. It is a hint to saveGeometry(..) to record the
       
   177     // starting position as 0,0 instead of the normal starting position.
       
   178     bool wasMaximized;
       
   179 #endif // QT_MAC_USE_COCOA
       
   180 
   172 #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
   181 #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
   173 #ifndef QT_NO_QWS_MANAGER
   182 #ifndef QT_NO_QWS_MANAGER
   174     QWSManager *qwsManager;
   183     QWSManager *qwsManager;
   175 #endif
   184 #endif
   176 #elif defined(Q_OS_SYMBIAN)
   185 #elif defined(Q_OS_SYMBIAN)
   383     void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const;
   392     void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const;
   384     bool isAboutToShow() const;
   393     bool isAboutToShow() const;
   385     QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
   394     QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
   386     void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,
   395     void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,
   387                        QWidget::RenderFlags renderFlags);
   396                        QWidget::RenderFlags renderFlags);
       
   397     void render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion,
       
   398                 QWidget::RenderFlags renderFlags, bool readyToRender);
   388     void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags,
   399     void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags,
   389                     QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0);
   400                     QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0);
   390 
   401 
   391 
   402 
   392     void paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& children, int index,
   403     void paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& children, int index,
   675     QList<QAction*> actions;
   686     QList<QAction*> actions;
   676 #endif
   687 #endif
   677     QMap<Qt::GestureType, Qt::GestureFlags> gestureContext;
   688     QMap<Qt::GestureType, Qt::GestureFlags> gestureContext;
   678 
   689 
   679     // Bit fields.
   690     // Bit fields.
   680     uint high_attributes[3]; // the low ones are in QWidget::widget_attributes
   691     uint high_attributes[4]; // the low ones are in QWidget::widget_attributes
   681     QPalette::ColorRole fg_role : 8;
   692     QPalette::ColorRole fg_role : 8;
   682     QPalette::ColorRole bg_role : 8;
   693     QPalette::ColorRole bg_role : 8;
   683     uint dirtyOpaqueChildren : 1;
   694     uint dirtyOpaqueChildren : 1;
   684     uint isOpaque : 1;
   695     uint isOpaque : 1;
   685     uint inDirtyList : 1;
   696     uint inDirtyList : 1;
   698     void setWindowRole();
   709     void setWindowRole();
   699     void sendStartupMessage(const char *message) const;
   710     void sendStartupMessage(const char *message) const;
   700     void setNetWmWindowTypes();
   711     void setNetWmWindowTypes();
   701     void x11UpdateIsOpaque();
   712     void x11UpdateIsOpaque();
   702     bool isBackgroundInherited() const;
   713     bool isBackgroundInherited() const;
       
   714     void updateX11AcceptFocus();
   703 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
   715 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
   704     uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine()
   716     uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine()
   705     uint nativeGesturePanEnabled : 1;
   717     uint nativeGesturePanEnabled : 1;
   706 
   718 
   707     bool shouldShowMaximizeButton();
   719     bool shouldShowMaximizeButton();
   715     void registerTouchWindow();
   727     void registerTouchWindow();
   716     void winSetupGestures();
   728     void winSetupGestures();
   717 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
   729 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
   718     // This is new stuff
   730     // This is new stuff
   719     uint needWindowChange : 1;
   731     uint needWindowChange : 1;
       
   732     uint hasAlienChildren : 1;
   720 
   733 
   721     // Each wiget keeps a list of all its child and grandchild OpenGL widgets.
   734     // Each wiget keeps a list of all its child and grandchild OpenGL widgets.
   722     // This list is used to update the gl context whenever a parent and a granparent
   735     // This list is used to update the gl context whenever a parent and a granparent
   723     // moves, and also to check for intersections with gl widgets within the window
   736     // moves, and also to check for intersections with gl widgets within the window
   724     // when a widget moves.
   737     // when a widget moves.
   761     void recreateMacWindow();
   774     void recreateMacWindow();
   762 #ifndef QT_MAC_USE_COCOA
   775 #ifndef QT_MAC_USE_COCOA
   763     void initWindowPtr();
   776     void initWindowPtr();
   764     void finishCreateWindow_sys_Carbon(OSWindowRef windowRef);
   777     void finishCreateWindow_sys_Carbon(OSWindowRef windowRef);
   765 #else
   778 #else
       
   779     void setSubWindowStacking(bool set);
       
   780     void setWindowLevel();
   766     void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef);
   781     void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef);
   767     void syncCocoaMask();
   782     void syncCocoaMask();
   768     void finishCocoaMaskSetup();
   783     void finishCocoaMaskSetup();
       
   784     void syncUnifiedMode();
       
   785     // Did we add the drawRectOriginal method?
       
   786     bool drawRectOriginalAdded;
       
   787     // Is the original drawRect method available?
       
   788     bool originalDrawMethod;
       
   789     // Do we need to change the methods?
       
   790     bool changeMethods;
   769 #endif
   791 #endif
   770     void determineWindowClass();
   792     void determineWindowClass();
   771     void transferChildren();
   793     void transferChildren();
   772     bool qt_mac_dnd_event(uint, DragRef);
   794     bool qt_mac_dnd_event(uint, DragRef);
   773     void toggleDrawers(bool);
   795     void toggleDrawers(bool);