Changeset 92 for trunk/src/gui/kernel


Ignore:
Timestamp:
Jul 28, 2009, 11:08:37 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Started OS/2 versions of QApplication and QWidget.

Location:
trunk/src/gui/kernel
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/kernel.pri

    r2 r92  
    9191}
    9292
     93os2 {
     94        # @todo override everything since most things are not ready...
     95        HEADERS = \
     96                kernel/qapplication.h \
     97                kernel/qapplication_p.h \
     98                kernel/qwidget.h \
     99                kernel/qwidget_p.h
     100        SOURCES = \
     101                kernel/qapplication.cpp \
     102                kernel/qwidget.cpp
     103
     104        SOURCES += \
     105                kernel/qapplication_pm.cpp \
     106                kernel/qwidget_pm.cpp
     107}
     108
    93109unix:x11 {
    94110        INCLUDEPATH += ../3rdparty/xorg
     
    190206                kernel/qeventdispatcher_mac_p.h
    191207
    192         MENU_NIB.files = mac/qt_menu.nib 
    193         MENU_NIB.path = Resources 
     208        MENU_NIB.files = mac/qt_menu.nib
     209        MENU_NIB.path = Resources
    194210        MENU_NIB.version = Versions
    195         QMAKE_BUNDLE_DATA += MENU_NIB 
     211        QMAKE_BUNDLE_DATA += MENU_NIB
    196212        RESOURCES += mac/maccursors.qrc
    197213
  • trunk/src/gui/kernel/qapplication.cpp

    r2 r92  
    25792579        w = leaveList.at(i);
    25802580        if (!qApp->activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) {
    2581 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     2581#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    25822582            if (leaveAfterRelease == w)
    25832583                leaveAfterRelease = 0;
     
    29522952}
    29532953
    2954 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     2954#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    29552955/*
    29562956    This function should only be called when the widget changes visibility, i.e.
     
    30083008#endif // QT_NO_CURSOR
    30093009}
    3010 #endif // Q_WS_WIN || Q_WS_X11
     3010#endif // Q_WS_WIN || Q_WS_PM || Q_WS_X11
    30113011
    30123012/*!
     
    34983498    event loop receives events from the window system and dispatches these to
    34993499    the application widgets.
    3500  
     3500
    35013501    Generally, no user interaction can take place before calling exec(). As a
    35023502    special case, modal widgets like QMessageBox can be used before calling
  • trunk/src/gui/kernel/qapplication_p.h

    r2 r92  
    421421    static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget,
    422422                               QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver);
    423 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     423#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    424424    void sendSyntheticEnterLeave(QWidget *widget);
    425425#endif
  • trunk/src/gui/kernel/qwidget.cpp

    r2 r92  
    13461346    if (isWindow() && isVisible() && internalWinId())
    13471347        hide();
    1348 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     1348#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    13491349    else if (!internalWinId() && isVisible())
    13501350        qApp->d_func()->sendSyntheticEnterLeave(this);
     
    68186818    // hidden.
    68196819    if (wasVisible) {
    6820 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     6820#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    68216821        qApp->d_func()->sendSyntheticEnterLeave(q);
    68226822#endif
     
    69476947            d->show_helper();
    69486948
    6949 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     6949#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    69506950            qApp->d_func()->sendSyntheticEnterLeave(this);
    69516951#endif
     
    70627062            }
    70637063        }
    7064 #if defined(Q_WS_WIN) || defined(Q_WS_X11)
     7064#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11)
    70657065        qApp->d_func()->sendSyntheticEnterLeave(widget);
    70667066#endif
     
    86458645*/
    86468646bool QWidget::winEvent(MSG *message, long *result)
     8647{
     8648    Q_UNUSED(message);
     8649    Q_UNUSED(result);
     8650    return false;
     8651}
     8652
     8653#endif
     8654#if defined(Q_WS_PM)
     8655
     8656/*!
     8657    This special event handler can be reimplemented in a subclass to
     8658    receive native OS/2 Presentation Manager events which are passed in
     8659    the \a message parameter.
     8660
     8661    In your reimplementation of this function, if you want to stop the
     8662    event being handled by Qt, return true and set \a result to the value
     8663    that the window procedure should return. If you return false, this
     8664    native event is passed back to Qt, which translates the event into
     8665    a Qt event and sends it to the widget.
     8666
     8667    \warning This function is not portable.
     8668
     8669    \sa QApplication::pmEventFilter()
     8670*/
     8671bool QWidget::pmEvent(QMSG *message, MRESULT *result)
    86478672{
    86488673    Q_UNUSED(message);
  • trunk/src/gui/kernel/qwidget.h

    r2 r92  
    658658#if defined(Q_WS_WIN)
    659659    virtual bool winEvent(MSG *message, long *result);
     660#endif
     661#if defined(Q_WS_PM)
     662    virtual bool pmEvent(QMSG *message, MRESULT *result);
    660663#endif
    661664#if defined(Q_WS_X11)
  • trunk/src/gui/kernel/qwidget_p.h

    r2 r92  
    594594#endif
    595595
    596 #if defined(Q_WS_X11) || defined (Q_WS_WIN) || defined(Q_WS_MAC)
     596#if defined(Q_WS_X11) || defined (Q_WS_WIN)  || defined (Q_WS_PM) || defined(Q_WS_MAC)
    597597#ifdef Q_WS_MAC
    598598    void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect());
  • trunk/src/gui/kernel/qwindowdefs_pm.h

    r89 r92  
    5858typedef unsigned long LHANDLE;
    5959typedef LHANDLE HWND;
     60typedef struct _QMSG QMSG;
     61typedef void *MRESULT;
    6062
    6163typedef HWND WId;
     64
     65// constants to address extra window data
     66#define QWL_QTCLIPRGN       (QWL_USER)
     67#define QWL_QTMODAL         (QWL_USER + sizeof(ULONG))
     68#define QT_EXTRAWINDATASIZE (sizeof(LONG) * 2)
    6269
    6370QT_BEGIN_NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.