qscreen_qws.h File Reference

#include <QtCore/qnamespace.h>
#include <QtCore/qpoint.h>
#include <QtCore/qlist.h>
#include <QtGui/qrgb.h>
#include <QtCore/qrect.h>
#include <QtGui/qimage.h>
#include <QtGui/qregion.h>

Go to the source code of this file.

Classes

class   QScreenCursor
class   QPoolEntry
class   QScreen

Defines

#define  QT_QWS_DEPTH16_RGB   565

Typedefs

typedef void(*  ClearCacheFunc )(QScreen *obj, int)

Functions

ushort  qt_convRgbTo16 (const int r, const int g, const int b)
ushort  qt_convRgbTo16 (QRgb c)
QRgb  qt_conv16ToRgb (ushort c)
void  qt_conv16ToRgb (ushort c, int &r, int &g, int &b)
QScreen qt_get_screen (int display_id, const char *spec)
const unsigned char *  qt_probe_bus ()

Variables

static const int  qt_rbits = (QT_QWS_DEPTH16_RGB/100)
static const int  qt_gbits = (QT_QWS_DEPTH16_RGB/10%10)
static const int  qt_bbits = (QT_QWS_DEPTH16_RGB%10)
static const int  qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits)
static const int  qt_green_shift = qt_bbits-(8-qt_gbits)
static const int  qt_neg_blue_shift = 8-qt_bbits
static const int  qt_blue_mask = (1<<qt_bbits)-1
static const int  qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits)
static const int  qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits))
static const int  qt_red_rounding_shift = qt_red_shift + qt_rbits
static const int  qt_green_rounding_shift = qt_green_shift + qt_gbits
static const int  qt_blue_rounding_shift = qt_bbits - qt_neg_blue_shift
const int  SourceSolid = 0
const int  SourcePixmap = 1
QScreenCursor qt_screencursor
bool  qt_sw_cursor
Q_GUI_EXPORT QScreen qt_screen

Define Documentation

#define QT_QWS_DEPTH16_RGB   565

Definition at line 69 of file qscreen_qws.h.


Typedef Documentation

typedef void(* ClearCacheFunc)(QScreen *obj, int)

Definition at line 189 of file qscreen_qws.h.


Function Documentation

ushort qt_convRgbTo16 ( const int  r,
const int  g,
const int  b 
) [inline]

Definition at line 86 of file qscreen_qws.h.

{
    const int tr = r << qt_red_shift;
    const int tg = g << qt_green_shift;
    const int tb = b >> qt_neg_blue_shift;

    return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask);
}
ushort qt_convRgbTo16 ( QRgb  c ) [inline]

Definition at line 95 of file qscreen_qws.h.

{
    const int tr = qRed(c) << qt_red_shift;
    const int tg = qGreen(c) << qt_green_shift;
    const int tb = qBlue(c) >> qt_neg_blue_shift;

    return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask);
}
QRgb qt_conv16ToRgb ( ushort  c ) [inline]

Definition at line 104 of file qscreen_qws.h.

{
    const int r=(c & qt_red_mask);
    const int g=(c & qt_green_mask);
    const int b=(c & qt_blue_mask);
    const int tr = r >> qt_red_shift | r >> qt_red_rounding_shift;
    const int tg = g >> qt_green_shift | g >> qt_green_rounding_shift;
    const int tb = b << qt_neg_blue_shift | b >> qt_blue_rounding_shift;

    return qRgb(tr,tg,tb);
}
void qt_conv16ToRgb ( ushort  c,
int &  r,
int &  g,
int &  b 
) [inline]

Definition at line 116 of file qscreen_qws.h.

{
    const int tr=(c & qt_red_mask);
    const int tg=(c & qt_green_mask);
    const int tb=(c & qt_blue_mask);
    r = tr >> qt_red_shift | tr >> qt_red_rounding_shift;
    g = tg >> qt_green_shift | tg >> qt_green_rounding_shift;
    b = tb << qt_neg_blue_shift | tb >> qt_blue_rounding_shift;
}
QScreen* qt_get_screen ( int  display_id,
const char *  spec 
)
const unsigned char* qt_probe_bus ( )

Variable Documentation

const int qt_rbits = (QT_QWS_DEPTH16_RGB/100) [static]

Definition at line 71 of file qscreen_qws.h.

const int qt_gbits = (QT_QWS_DEPTH16_RGB/10%10) [static]

Definition at line 72 of file qscreen_qws.h.

const int qt_bbits = (QT_QWS_DEPTH16_RGB%10) [static]

Definition at line 73 of file qscreen_qws.h.

const int qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits) [static]

Definition at line 74 of file qscreen_qws.h.

const int qt_green_shift = qt_bbits-(8-qt_gbits) [static]

Definition at line 75 of file qscreen_qws.h.

const int qt_neg_blue_shift = 8-qt_bbits [static]

Definition at line 76 of file qscreen_qws.h.

const int qt_blue_mask = (1<<qt_bbits)-1 [static]

Definition at line 77 of file qscreen_qws.h.

const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits) [static]

Definition at line 78 of file qscreen_qws.h.

const int qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits)) [static]

Definition at line 79 of file qscreen_qws.h.

Definition at line 81 of file qscreen_qws.h.

Definition at line 82 of file qscreen_qws.h.

const int SourceSolid = 0

Definition at line 126 of file qscreen_qws.h.

const int SourcePixmap = 1

Definition at line 127 of file qscreen_qws.h.