src/gui/egl/qeglproperties_p.h
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
    54 //
    54 //
    55 
    55 
    56 #include <QtCore/qvarlengtharray.h>
    56 #include <QtCore/qvarlengtharray.h>
    57 #include <QtGui/qimage.h>
    57 #include <QtGui/qimage.h>
    58 
    58 
    59 QT_BEGIN_INCLUDE_NAMESPACE
    59 #include <QtGui/private/qegl_p.h>
    60 
       
    61 #if defined(QT_OPENGL_ES_2)
       
    62 #   include <GLES2/gl2.h>
       
    63 #endif
       
    64 
       
    65 #if defined(QT_GLES_EGL)
       
    66 #   include <GLES/egl.h>
       
    67 #else
       
    68 #   include <EGL/egl.h>
       
    69 #endif
       
    70 
       
    71 
       
    72 #if defined(Q_WS_X11)
       
    73 // If <EGL/egl.h> included <X11/Xlib.h>, then the global namespace
       
    74 // may have been polluted with X #define's.  The following makes sure
       
    75 // the X11 headers were included properly and then cleans things up.
       
    76 #include <X11/Xlib.h>
       
    77 #include <X11/Xutil.h>
       
    78 #undef Bool
       
    79 #undef Status
       
    80 #undef None
       
    81 #undef KeyPress
       
    82 #undef KeyRelease
       
    83 #undef FocusIn
       
    84 #undef FocusOut
       
    85 #undef Type
       
    86 #undef FontChange
       
    87 #undef CursorShape
       
    88 #endif
       
    89 
       
    90 QT_END_INCLUDE_NAMESPACE
       
    91 
    60 
    92 QT_BEGIN_NAMESPACE
    61 QT_BEGIN_NAMESPACE
    93 
       
    94 namespace QEgl {
       
    95     enum API
       
    96     {
       
    97         OpenGL,
       
    98         OpenVG
       
    99     };
       
   100 
       
   101     enum PixelFormatMatch
       
   102     {
       
   103         ExactPixelFormat,
       
   104         BestPixelFormat
       
   105     };
       
   106 };
       
   107 
    62 
   108 class QX11Info;
    63 class QX11Info;
   109 class QPaintDevice;
    64 class QPaintDevice;
   110 
    65 
   111 class Q_GUI_EXPORT QEglProperties
    66 class Q_GUI_EXPORT QEglProperties
   125 
    80 
   126     void setPixelFormat(QImage::Format pixelFormat);
    81     void setPixelFormat(QImage::Format pixelFormat);
   127 #ifdef Q_WS_X11
    82 #ifdef Q_WS_X11
   128     void setVisualFormat(const QX11Info *xinfo);
    83     void setVisualFormat(const QX11Info *xinfo);
   129 #endif
    84 #endif
       
    85     void setDeviceType(int devType);
       
    86     void setPaintDeviceFormat(QPaintDevice *dev);
   130     void setRenderableType(QEgl::API api);
    87     void setRenderableType(QEgl::API api);
   131 
       
   132     void setPaintDeviceFormat(QPaintDevice *dev);
       
   133 
    88 
   134     bool reduceConfiguration();
    89     bool reduceConfiguration();
   135 
    90 
   136     QString toString() const;
    91     QString toString() const;
   137 
       
   138     static void dumpAllConfigs();
       
   139 
    92 
   140 private:
    93 private:
   141     QVarLengthArray<int> props;
    94     QVarLengthArray<int> props;
   142 };
    95 };
   143 
    96