Changeset 8 for trunk/include


Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

Location:
trunk/include
Files:
2 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/qapplication.h

    r7 r8  
    4242#include "qdesktopwidget.h"
    4343#include "qasciidict.h"
    44 #include "qpalette.h"
    45 #include "qtranslator.h"
     44//@@TODO (dmik): later
     45//#include "qpalette.h"
     46//#include "qtranslator.h"
    4647#include "qstrlist.h"
    4748#include "qstringlist.h"
     
    234235    virtual bool     winEventFilter( MSG * );
    235236#endif
     237#if defined(Q_WS_PM)
     238    virtual bool     pmEventFilter( QMSG * );
     239#endif
    236240#if defined(Q_WS_X11)
    237241    virtual bool     x11EventFilter( XEvent * );
     
    254258    static MacintoshVersion macVersion();
    255259#endif
     260//@@TODO (dmik): os2Version??
    256261#if defined(Q_WS_WIN)
    257262    void             winFocus( QWidget *, bool );
    258263    static void      winMouseButtonUp();
     264#elif defined(Q_WS_PM)
     265    void             pmFocus( QWidget *, bool );
    259266#endif
    260267
     
    401408    friend class QEventLoop;
    402409    friend Q_EXPORT void qt_ucm_initialize( QApplication * );
    403 #if defined(Q_WS_WIN)
     410#if defined(Q_WS_WIN) || defined(Q_WS_PM)
    404411    friend bool qt_sendSpontaneousEvent( QObject*, QEvent* );
    405412#endif
  • trunk/include/qcolor.h

    r7 r8  
    134134    static HPALETTE hPal()  { return hpal; }
    135135    static uint realizePal( QWidget * );
     136#endif
     137#if defined(Q_WS_PM)
     138    static const QRgb* palette( int* numEntries = 0 );
     139    static int setPaletteEntries( const QRgb* entries, int numEntries,
     140                                  int base = -1 );
     141    static HPAL hPal()  { return hpal; }
     142//@@TODO (dmik): this seems not to be used anywhere
     143//    static uint       realizePal( QWidget * );
    136144#endif
    137145
     
    153161#if defined(Q_WS_WIN)
    154162    static HPALETTE hpal;
     163#endif
     164#if defined(Q_WS_PM)
     165    static HPAL hpal;
    155166#endif
    156167    static enum ColorModel { d8, d32 } colormodel;
  • trunk/include/qcursor.h

    r7 r8  
    8989    HCURSOR       handle()  const;
    9090    QCursor( HCURSOR );
     91#elif defined(Q_WS_PM)
     92    HPOINTER  handle()  const;
     93    QCursor( HPOINTER );
    9194#elif defined(Q_WS_X11)
    9295    HANDLE        handle()  const;
  • trunk/include/qdragobject.h

    r7 r8  
    219219
    220220#ifndef QT_NO_DRAGANDDROP
    221 
    222 // QDragManager is not part of the public API.  It is defined in a
    223 // header file simply so different .cpp files can implement different
    224 // member functions.
    225 //
    226 
    227 class Q_EXPORT QDragManager: public QObject {
    228     Q_OBJECT
    229 
    230 private:
    231     QDragManager();
    232     ~QDragManager();
    233     // only friend classes can use QDragManager.
    234     friend class QDragObject;
    235     friend class QDragMoveEvent;
    236     friend class QDropEvent;
    237     friend class QApplication;
    238 
    239     bool eventFilter( QObject *, QEvent * );
    240     void timerEvent( QTimerEvent* );
    241 
    242     bool drag( QDragObject *, QDragObject::DragMode );
    243 
    244     void cancel( bool deleteSource = TRUE );
    245     void move( const QPoint & );
    246     void drop();
    247     void updatePixmap();
    248 
    249 private:
    250     QDragObject * object;
    251     void updateMode( ButtonState newstate );
    252     void updateCursor();
    253 
    254     QWidget * dragSource;
    255     QWidget * dropWidget;
    256     bool beingCancelled;
    257     bool restoreCursor;
    258     bool willDrop;
    259 
    260     QPixmap *pm_cursor;
    261     int n_cursor;
    262 #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
    263     QDragManager( const QDragManager & );
    264     QDragManager &operator=( const QDragManager & );
    265 #endif
    266 };
    267 
     221//@@TODO (dmik): no QDragManager yet (MOC ignores preprocessor macros)
     222//
     223//// QDragManager is not part of the public API.  It is defined in a
     224//// header file simply so different .cpp files can implement different
     225//// member functions.
     226////
     227//
     228//class Q_EXPORT QDragManager: public QObject {
     229//    Q_OBJECT
     230//
     231//private:
     232//    QDragManager();
     233//    ~QDragManager();
     234//    // only friend classes can use QDragManager.
     235//    friend class QDragObject;
     236//    friend class QDragMoveEvent;
     237//    friend class QDropEvent;
     238//    friend class QApplication;
     239//
     240//    bool eventFilter( QObject *, QEvent * );
     241//    void timerEvent( QTimerEvent* );
     242//
     243//    bool drag( QDragObject *, QDragObject::DragMode );
     244//
     245//    void cancel( bool deleteSource = TRUE );
     246//    void move( const QPoint & );
     247//    void drop();
     248//    void updatePixmap();
     249//
     250//private:
     251//    QDragObject * object;
     252//    void updateMode( ButtonState newstate );
     253//    void updateCursor();
     254//
     255//    QWidget * dragSource;
     256//    QWidget * dropWidget;
     257//    bool beingCancelled;
     258//    bool restoreCursor;
     259//    bool willDrop;
     260//
     261//    QPixmap *pm_cursor;
     262//    int n_cursor;
     263//#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
     264//    QDragManager( const QDragManager & );
     265//    QDragManager &operator=( const QDragManager & );
     266//#endif
     267//};
     268//
    268269#endif
    269270
  • trunk/include/qfeatures.h

    r7 r8  
    639639
    640640// Properties
    641 #if !defined(QT_NO_PROPERTIES) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET))
     641#if !defined(QT_NO_PROPERTIES) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET) || defined(QT_NO_CURSOR))
    642642#define QT_NO_PROPERTIES
    643643#endif
  • trunk/include/qfont.h

    r7 r8  
    163163
    164164
    165 #ifdef Q_WS_WIN
     165#if defined (Q_WS_WIN)
    166166    HFONT handle() const;
    167 #else // !Q_WS_WIN
     167#elif defined (Q_WS_PM)
     168//@@TODO (dmik): do we actually need any handle?
     169//    PFATTRS handle() const;
     170    void selectTo( HPS hps ) const;
     171#else // !Q_WS_WIN && !Q_WS_PM
    168172    Qt::HANDLE handle() const;
    169173#endif // Q_WS_WIN
  • trunk/include/qfontdatabase.h

    r7 r8  
    116116
    117117private:
    118 #if defined(Q_WS_X11) || defined(Q_WS_WIN)
     118#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_PM)
    119119    static QFontEngine *findFont( QFont::Script script, const QFontPrivate *fp,
    120120                                  const QFontDef &request, int force_encoding_id = -1 );
    121 #endif // Q_WS_X11
    122 
     121#endif // Q_WS_X11 || Q_WS_WIN || Q_WS_PM
     122
     123#ifdef Q_WS_PM
     124    // a dummy method for compatibility with platform independent
     125    // parts of QFontDatabase
     126    static void load( const QString &/*family*/ = QString::null,  int = -1 ) { }
     127#else   
    123128    static void createDatabase();
     129#endif
    124130
    125131    static void parseFontName(const QString &name, QString &foundry, QString &family);
  • trunk/include/qglobal.h

    r7 r8  
    9393#  define Q_OS_MSDOS
    9494#elif defined(__OS2__)
    95 #  if defined(__EMX__)
     95#  if defined(__EMX__) && !defined(__INNOTEK_LIBC__)
    9696#    define Q_OS_OS2EMX
    9797#  else
     
    532532     WIN32      - Windows
    533533     X11        - X Window System
    534      PM         - unsupported
     534     PM         - OS/2 Presentation Manager
    535535     WIN16      - unsupported
    536536*/
     
    550550#elif defined(Q_OS_OS2)
    551551#  define Q_WS_PM
    552 #  error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
    553552#elif defined(Q_OS_UNIX)
    554553#  if defined(QWS)
  • trunk/include/qlistview.h

    r7 r8  
    185185    bool activatedPos( QPoint & );
    186186#ifndef QT_NO_DRAGANDDROP
    187     virtual void dropped( QDropEvent *e );
     187//@@TODO (dmik): no QDropEvent yet (MOC ignores preprocessor macros)
     188//    virtual void dropped( QDropEvent *e );
    188189#endif
    189190    virtual void dragEntered();
     
    391392    void collapsed( QListViewItem *item );
    392393#ifndef QT_NO_DRAGANDDROP
    393     void dropped( QDropEvent *e );
     394//@@TODO (dmik): no QDropEvent yet (MOC ignores preprocessor macros)
     395//    void dropped( QDropEvent *e );
    394396#endif
    395397    void itemRenamed( QListViewItem *item, int col, const QString & );
     
    403405    void contentsContextMenuEvent( QContextMenuEvent * e );
    404406#ifndef QT_NO_DRAGANDDROP
    405     void contentsDragEnterEvent( QDragEnterEvent *e );
    406     void contentsDragMoveEvent( QDragMoveEvent *e );
    407     void contentsDragLeaveEvent( QDragLeaveEvent *e );
    408     void contentsDropEvent( QDropEvent *e );
    409     virtual QDragObject *dragObject();
    410     virtual void startDrag();
     407//@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros)
     408//    void contentsDragEnterEvent( QDragEnterEvent *e );
     409//    void contentsDragMoveEvent( QDragMoveEvent *e );
     410//    void contentsDragLeaveEvent( QDragLeaveEvent *e );
     411//    void contentsDropEvent( QDropEvent *e );
     412//    virtual QDragObject *dragObject();
     413//    virtual void startDrag();
    411414#endif
    412415
  • trunk/include/qmime.h

    r7 r8  
    155155};
    156156
    157 #endif
     157#endif // Q_WS_WIN
     158
     159#if defined(Q_WS_PM)
     160
     161#ifndef QT_H
     162#include "qptrlist.h" // down here for GCC 2.7.* compatibility
     163#endif // QT_H
     164
     165/*
     166  Encapsulation of conversion between MIME and OS/2 PM clipboard formats.
     167  Not need on X11, as the underlying protocol uses the MIME standard
     168  directly.
     169*/
     170
     171class Q_EXPORT QPMMime {
     172public:
     173    enum { CFI_Storage = CFI_POINTER & CFI_HANDLE };
     174   
     175    QPMMime();
     176    virtual ~QPMMime();
     177
     178    static void initialize();
     179
     180    static QPtrList<QPMMime> all();
     181    static QPMMime* convertor( const char* mime, ulong cf );
     182    static const char* cfToMime( ulong cf );
     183
     184    static ulong registerMimeType( const char *mime );
     185
     186    virtual const char* convertorName() = 0;
     187    virtual int countCf() = 0;
     188    virtual ulong cf( int index ) = 0;
     189    virtual ulong flFor( ulong cf ) = 0;
     190    virtual ulong cfFor( const char* ) = 0;
     191    virtual const char* mimeFor( ulong cf ) = 0;
     192    virtual bool canConvert( const char* mime, ulong cf ) = 0;
     193    virtual QByteArray convertToMime( QByteArray data, const char *mime, ulong cf ) = 0;
     194    virtual QByteArray convertFromMime( QByteArray data, const char *mime, ulong cf ) = 0;
     195};
     196
     197#endif // Q_WS_PM
     198
    158199#if defined(Q_WS_MAC)
    159200
  • trunk/include/qnamespace.h

    r7 r8  
    888888#elif defined(Q_WS_WIN)
    889889    typedef void *HANDLE;
     890#elif defined(Q_WS_PM)
     891    typedef unsigned long HANDLE;
    890892#elif defined(Q_WS_X11)
    891893    typedef unsigned long HANDLE;
  • trunk/include/qpaintdevice.h

    r7 r8  
    9595#if defined(Q_WS_WIN)
    9696    virtual HDC         handle() const;
     97#elif defined(Q_WS_PM)
     98    virtual HPS         handle() const;
    9799#elif defined(Q_WS_X11)
    98100    virtual Qt::HANDLE  handle() const;
     
    213215#if defined(Q_WS_WIN)
    214216    HDC         hdc;                            // device context
     217#elif defined(Q_WS_PM)
     218    HPS         hps;                            // presentation space handle
    215219#elif defined(Q_WS_X11)
    216220    Qt::HANDLE  hd;                             // handle to drawable
  • trunk/include/qpainter.h

    r7 r8  
    279279#if defined(Q_WS_WIN)
    280280    HDC         handle() const;
     281#elif defined(Q_WS_PM)
     282    HPS         handle() const;
    281283#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
    282284    HANDLE      handle() const;
     
    301303    void        mapInv( int, int, int *, int * ) const;
    302304    void        mapInv( int, int, int, int, int *, int *, int *, int * ) const;
     305#if defined(Q_WS_PM)
     306    void        drawPolyInternal( const QPointArray &, bool close=TRUE,
     307                                  bool winding=FALSE, int index=0, int npoints=-1,
     308                                  bool disjoint=FALSE );
     309    enum        ArcClose { CloseNone, CloseChord, ClosePie };                                     
     310    void        drawArcInternal( int x, int y, int w, int h, int a = 0,
     311                                 int alen = 360*16, ArcClose close = CloseChord );
     312    void        drawWinFocusRectInternal( int x, int y, int w, int h,
     313                                          const QColor &bgCol, bool xormode );
     314    void        drawRectInternal( int x, int y, int w, int h, int wRnd, int hRnd );
     315#else   
    303316    void        drawPolyInternal( const QPointArray &, bool close=TRUE );
     317#endif   
    304318    void        drawWinFocusRect( int x, int y, int w, int h, bool xorPaint,
    305319                                  const QColor &penColor );
     
    368382#endif
    369383
     384#if !defined(Q_WS_PM)
    370385    void       *penRef;                         // pen cache ref
    371386    void       *brushRef;                       // brush cache ref
     387#endif   
    372388    void       *ps_stack;
    373389    void       *wm_stack;
     
    383399    friend class QFontEngineBox;
    384400    QT_WIN_PAINTER_MEMBERS
     401#elif defined(Q_WS_PM)
     402    bool setNativeXForm( bool assumeYNegation );
     403    void clearNativeXForm();
     404    friend class QFontEnginePM;
     405    HPS         hps;
     406    HPAL        holdpal;
     407    HRGN        holdrgn;
     408    HBITMAP     hbrushbm;
     409    uint        nocolBrush  : 1;
     410    uint        pixmapBrush : 1;
     411    int         devh;
     412    QRegion     repaintRgn;
    385413#elif defined(Q_WS_X11)
    386414    friend class QFontEngineXLFD;
     
    545573    return hdc;
    546574}
     575#elif defined(Q_WS_PM)
     576inline HPS QPainter::handle() const
     577{
     578    return hps;
     579}
    547580#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
    548581inline Qt::HANDLE QPainter::handle() const
  • trunk/include/qpixmap.h

    r7 r8  
    139139#if defined(Q_WS_WIN)
    140140    HBITMAP     hbm()           const;
     141#elif defined(Q_WS_PM)
     142    HBITMAP     hbm()           const;
    141143#endif
    142144
     
    209211        uchar* ppvBits; // Pointer to DIBSection bits
    210212#endif
     213#elif defined(Q_WS_PM)
     214        HBITMAP hbm;
     215        HBITMAP maskedHbm;  // pixmap precomposed for masking
     216//@@TODO (dmik): need this?       
     217        uchar *realAlphaBits;
    211218#elif defined(Q_WS_X11)
    212219        void   *ximage;
     
    243250                                   const QPixmap *src, int sx, int sy,
    244251                                   int sw, int sh, bool useDstAlpha );
     252#elif defined(Q_WS_PM)
     253    void prepareForMasking( bool prepare );
     254    void attachHandle( HBITMAP hbm );
     255    HBITMAP detachHandle();
     256    friend class QPMMimeImage;
    245257#endif
    246258    static Optimization defOptim;
     
    298310    return data->mcp ? 0 : data->hbm_or_mcpi.hbm;
    299311}
     312#elif defined(Q_WS_PM)
     313inline HBITMAP QPixmap::hbm() const
     314{
     315    return data->hbm;
     316}
    300317#endif
    301318
  • trunk/include/qregion.h

    r7 r8  
    9494                        { return !(operator==(r)); }
    9595
    96 #if defined(Q_WS_WIN)
    97     HRGN    handle() const { return data->rgn; }
     96#if defined(Q_WS_WIN) || defined(Q_WS_PM)
     97    HRGN    handle() const { if (! data->rgn ) update(); return data->rgn; }
    9898#elif defined(Q_WS_X11)
    9999    Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; }
     
    115115#if defined(Q_WS_WIN)
    116116    QRegion winCombine( const QRegion &, int ) const;
    117 #endif
    118 #if defined(Q_WS_X11)
     117#elif defined(Q_WS_PM)
     118    QRegion pmCombine( const QRegion &, int ) const;
     119    void update() const;
     120#elif defined(Q_WS_X11)
    119121    void updateX11Region() const;
    120122    void *clipRectangles( int &num ) const;
     
    123125    void    exec( const QByteArray &, int ver = 0 );
    124126    struct QRegionData : public QShared {
    125 #if defined(Q_WS_WIN)
     127#if defined(Q_WS_WIN) || defined(Q_WS_PM)
    126128        HRGN   rgn;
    127129#elif defined(Q_WS_X11)
     
    145147#elif defined(Q_WS_WIN)
    146148    friend class QETWidget;
     149#elif defined(Q_WS_PM)
     150    friend class QETWidget;
     151    friend class QPainter;
     152    friend void qt_set_paintevent_clipping( QPaintDevice*, const QRegion& );
    147153#endif
    148154
  • trunk/include/qscrollview.h

    r7 r8  
    6161    Q_PROPERTY( int contentsY READ contentsY )
    6262#ifndef QT_NO_DRAGANDDROP
    63     Q_PROPERTY( bool dragAutoScroll READ dragAutoScroll WRITE setDragAutoScroll )
     63//@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros)
     64//    Q_PROPERTY( bool dragAutoScroll READ dragAutoScroll WRITE setDragAutoScroll )
    6465#endif
    6566
     
    175176    virtual void contentsMouseMoveEvent( QMouseEvent* );
    176177#ifndef QT_NO_DRAGANDDROP
    177     virtual void contentsDragEnterEvent( QDragEnterEvent * );
    178     virtual void contentsDragMoveEvent( QDragMoveEvent * );
    179     virtual void contentsDragLeaveEvent( QDragLeaveEvent * );
    180     virtual void contentsDropEvent( QDropEvent * );
     178//@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros)
     179//    virtual void contentsDragEnterEvent( QDragEnterEvent * );
     180//    virtual void contentsDragMoveEvent( QDragMoveEvent * );
     181//    virtual void contentsDragLeaveEvent( QDragLeaveEvent * );
     182//    virtual void contentsDropEvent( QDropEvent * );
    181183#endif
    182184#ifndef QT_NO_WHEELEVENT
     
    193195    virtual void viewportMouseMoveEvent( QMouseEvent* );
    194196#ifndef QT_NO_DRAGANDDROP
    195     virtual void viewportDragEnterEvent( QDragEnterEvent * );
    196     virtual void viewportDragMoveEvent( QDragMoveEvent * );
    197     virtual void viewportDragLeaveEvent( QDragLeaveEvent * );
    198     virtual void viewportDropEvent( QDropEvent * );
     197//@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros)
     198//    virtual void viewportDragEnterEvent( QDragEnterEvent * );
     199//    virtual void viewportDragMoveEvent( QDragMoveEvent * );
     200//    virtual void viewportDragLeaveEvent( QDragLeaveEvent * );
     201//    virtual void viewportDropEvent( QDropEvent * );
    199202#endif
    200203#ifndef QT_NO_WHEELEVENT
     
    245248    void vbarIsReleased();
    246249#ifndef QT_NO_DRAGANDDROP
    247     void doDragAutoScroll();
    248     void startDragAutoScroll();
    249     void stopDragAutoScroll();
     250//@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros)
     251//    void doDragAutoScroll();
     252//    void startDragAutoScroll();
     253//    void stopDragAutoScroll();
    250254#endif
    251255
  • trunk/include/qstring.h

    r7 r8  
    10931093#endif
    10941094
    1095 
    10961095#if defined(Q_OS_WIN32)
    10971096extern Q_EXPORT QString qt_winQString(void*);
     
    11021101#endif
    11031102
     1103#if defined(Q_OS_OS2)
     1104typedef void *LocaleObject;
     1105typedef void *UconvObject;
     1106extern Q_EXPORT const LocaleObject qt_os2DefLocaleObj();
     1107extern Q_EXPORT const UconvObject qt_os2DefUconvObj();
     1108extern Q_EXPORT QCString qt_os2QString2MB( const QString& s, int len=-1 );
     1109extern Q_EXPORT QString qt_os2MB2QString( const char* mb, int len=-1 );
     1110#endif
     1111
    11041112#define Q_DEFINED_QSTRING
    11051113#include "qwinexport.h"
  • trunk/include/qwidget.h

    r7 r8  
    465465#endif
    466466#endif
     467#if defined(Q_WS_PM)
     468    WId winFId();
     469#endif
    467470
    468471    void setWindowOpacity(double level);
     
    510513#if defined(Q_WS_WIN)
    511514    virtual bool winEvent( MSG * );
     515#endif
     516#if defined(Q_WS_PM)
     517    virtual bool pmEvent( QMSG * );
    512518#endif
    513519#if defined(Q_WS_X11)
     
    940946    uint     opacity : 8;                      // Stores opacity level on Windows/Mac OS X.
    941947#endif
     948//@@TODO (dmik): savedFlags seems not to be used by OS/2 version. enclose it with ifndef?
    942949    uint     savedFlags;                        // Save widgetflags while showing fullscreen
    943950    short    basew, baseh;                      // base sizes
     
    963970#if defined(Q_WS_WIN)
    964971    HICON    winIcon;                           // internal Windows icon
     972#endif
     973#if defined(Q_WS_PM)
     974    WId      fId;                               // frame window handle
     975    HSWITCH  swEntry;                           // window list entry handle
    965976#endif
    966977    QRect    normalGeometry;                    // used by showMin/maximized/FullScreen
  • trunk/include/qwindowdefs.h

    r7 r8  
    132132#endif // Q_WS_WIN
    133133
     134#if defined(Q_WS_PM)
     135#include "qwindowdefs_pm.h"
     136#endif // Q_WS_PM
    134137
    135138#if defined(Q_OS_TEMP)
Note: See TracChangeset for help on using the changeset viewer.