Qt 4.8
Classes | Macros | Functions | Variables
qwindowsystem_qws.cpp File Reference
#include "qplatformdefs.h"
#include "qwindowsystem_qws.h"
#include "qwsevent_qws.h"
#include "qwscommand_qws_p.h"
#include "qtransportauth_qws_p.h"
#include "qwsutils_qws.h"
#include "qwscursor_qws.h"
#include "qwsdisplay_qws.h"
#include "qmouse_qws.h"
#include "qcopchannel_qws.h"
#include "qwssocket_qws.h"
#include "qapplication.h"
#include "private/qapplication_p.h"
#include "qsocketnotifier.h"
#include "qpolygon.h"
#include "qimage.h"
#include "qcursor.h"
#include <private/qpaintengine_raster_p.h>
#include "qscreen_qws.h"
#include "qwindowdefs.h"
#include "private/qlock_p.h"
#include "qwslock_p.h"
#include "qfile.h"
#include "qtimer.h"
#include "qpen.h"
#include "qdesktopwidget.h"
#include "qevent.h"
#include "qinputcontext.h"
#include "qpainter.h"
#include <qdebug.h>
#include "qkbddriverfactory_qws.h"
#include "qmousedriverfactory_qws.h"
#include <qbuffer.h>
#include <qdir.h>
#include <private/qwindowsurface_qws_p.h>
#include <private/qfontengine_qpf_p.h>
#include "qwindowsystem_p.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/param.h>
#include <sys/mount.h>
#include "moc_qwindowsystem_qws.cpp"

Go to the source code of this file.

Classes

class  QWSClientPrivate
 
struct  QWSCommandStruct
 
class  QWSWindowPrivate
 

Macros

#define KEY   1
 
#define MOUSE   0
 

Functions

static void cleanupFontsDir ()
 
static int get_object_id (int count=1)
 
static void ignoreSignal (int)
 
static int keyUnicode (int keycode)
 
 Q_GLOBAL_STATIC_WITH_ARGS (QString, defaultMouse,(QLatin1String("Auto"))) Q_GLOBAL_STATIC_WITH_ARGS(QString
 
 QLatin1String ("TTY"))) static const int FontCleanupInterval
 
void qt_client_enqueue (const QWSEvent *)
 
QList< QWSCommand * > * qt_get_server_queue ()
 
void qt_init_display ()
 
QString qws_qtePipeFilename ()
 

Variables

static QWSInputMethodcurrent_IM = 0
 
static QWSWindowcurrent_IM_composing_win = 0
 
static int current_IM_winId = -1
 
 defaultKeyboard
 
static bool force_reject_strokeIM = false
 
static int global_focus_time_counter =100
 
static QWSWindowkeyboardGrabber
 
static bool keyboardGrabbing
 
static QList< QWSServer::KeyboardFilter * > * keyFilters = 0
 
static bool prevWin
 
bool qt_disable_lowpriority_timers
 
int * qt_last_x
 
int * qt_last_y
 
int qt_servershmid
 
QByteArray qws_display_spec
 
static int qws_keyModifiers = 0
 
QWSServer Q_GUI_EXPORTqwsServer =0
 
static QWSServerPrivateqwsServerPrivate =0
 

Macro Definition Documentation

◆ KEY

#define KEY   1

Definition at line 116 of file qwindowsystem_qws.cpp.

Referenced by QWSServer::processKeyEvent().

◆ MOUSE

#define MOUSE   0

Definition at line 115 of file qwindowsystem_qws.cpp.

Referenced by QWSServer::sendMouseEvent().

Function Documentation

◆ cleanupFontsDir()

static void cleanupFontsDir ( )
static

Definition at line 1833 of file qwindowsystem_qws.cpp.

Referenced by QWSServerPrivate::initServer().

1834 {
1835  static bool dontDelete = !qgetenv("QWS_KEEP_FONTS").isEmpty();
1836  if (dontDelete)
1837  return;
1838 
1839  extern QString qws_fontCacheDir();
1840  QDir dir(qws_fontCacheDir(), QLatin1String("*.qsf"));
1841  for (uint i = 0; i < dir.count(); ++i) {
1842 #if defined(QWS_DEBUG_FONTCLEANUP)
1843  qDebug() << "removing stale font file" << dir[i];
1844 #endif
1845  dir.remove(dir[i]);
1846  }
1847 }
The QDir class provides access to directory structures and their contents.
Definition: qdir.h:58
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
QString qws_fontCacheDir()
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_CORE_EXPORT void qDebug(const char *,...)
QLatin1String("TTY"))) static const int FontCleanupInterval
unsigned int uint
Definition: qglobal.h:996
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421

◆ get_object_id()

static int get_object_id ( int  count = 1)
static

Definition at line 139 of file qwindowsystem_qws.cpp.

Referenced by QWSServerPrivate::_q_newConnection(), and QWSServerPrivate::invokeCreate().

140 {
141  static int next=1000;
142  int n = next;
143  next += count;
144  return n;
145 }

◆ ignoreSignal()

static void ignoreSignal ( int  )
static

Definition at line 1428 of file qwindowsystem_qws.cpp.

Referenced by QWSServerPrivate::initServer().

1428 {} // Used to eat SIGPIPE signals below

◆ keyUnicode()

static int keyUnicode ( int  keycode)
inlinestatic

Definition at line 2618 of file qwindowsystem_qws.cpp.

Referenced by QWSServerPrivate::sendKeyEventUnfiltered().

2619 {
2620  int code = 0xffff;
2621 
2622  if (keycode >= Qt::Key_A && keycode <= Qt::Key_Z)
2623  code = keycode - Qt::Key_A + 'a';
2624  else if (keycode >= Qt::Key_0 && keycode <= Qt::Key_9)
2625  code = keycode - Qt::Key_0 + '0';
2626 
2627  return code;
2628 }
int keycode

◆ Q_GLOBAL_STATIC_WITH_ARGS()

Q_GLOBAL_STATIC_WITH_ARGS ( QString  ,
defaultMouse  ,
(QLatin1String("Auto"))   
)

◆ QLatin1String()

QLatin1String ( "TTY"  ) const

◆ qt_client_enqueue()

void qt_client_enqueue ( const QWSEvent )

Definition at line 474 of file qapplication_qws.cpp.

Referenced by QWSClient::sendEvent(), and QWSScreenSaver::~QWSScreenSaver().

475 {
476  QWSEvent *copy = QWSEvent::factory(event->type);
477  copy->copyFrom(event);
478  incoming.append(copy);
479 }
EventRef event
void copyFrom(const QWSProtocolItem *item)
The QWSEvent class encapsulates an event in Qt for Embedded Linux.
Definition: qwsevent_qws.h:59
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
static QList< QWSEvent * > incoming
static QWSEvent * factory(int type)

◆ qt_get_server_queue()

QList<QWSCommand*>* qt_get_server_queue ( )

Definition at line 481 of file qapplication_qws.cpp.

Referenced by QEventDispatcherQWS::processEvents(), QWSClient::readMoreCommand(), and QWSScreenSaver::~QWSScreenSaver().

482 {
483  return &outgoing;
484 }
static QList< QWSCommand * > outgoing

◆ qt_init_display()

void qt_init_display ( )

Definition at line 2157 of file qapplication_qws.cpp.

Referenced by QWSServerPrivate::openDisplay(), and QWSScreenSaver::~QWSScreenSaver().

2158 {
2159  qt_is_gui_used = true;
2160  qws_single_process = true;
2161  init_display();
2162 }
static bool qws_single_process
static void init_display()
bool qt_is_gui_used

◆ qws_qtePipeFilename()

QString qws_qtePipeFilename ( )

Definition at line 220 of file qapplication_qws.cpp.

Referenced by QWSServer::closedown(), QWSServerPrivate::initServer(), QWSServer::startup(), and QWSScreenSaver::~QWSScreenSaver().

221 {
222  qws_dataDir();
223  return QTE_PIPE(qws_display_id);
224 }
#define QTE_PIPE(DISPLAY)
Definition: qvfbhdr.h:84
Q_GUI_EXPORT int qws_display_id
QString qws_dataDir()

Variable Documentation

◆ current_IM

QWSInputMethod* current_IM = 0
static

Definition at line 147 of file qwindowsystem_qws.cpp.

◆ current_IM_composing_win

QWSWindow* current_IM_composing_win = 0
static

Definition at line 149 of file qwindowsystem_qws.cpp.

Referenced by QWSServer::sendIMEvent(), and QWSServer::sendIMQuery().

◆ current_IM_winId

int current_IM_winId = -1
static

◆ defaultKeyboard

defaultKeyboard

◆ force_reject_strokeIM

bool force_reject_strokeIM = false
static

Definition at line 151 of file qwindowsystem_qws.cpp.

Referenced by QWSServer::sendMouseEvent().

◆ global_focus_time_counter

int global_focus_time_counter =100
static

Definition at line 594 of file qwindowsystem_qws.cpp.

Referenced by QWSWindow::focus().

◆ keyboardGrabber

QWSWindow* keyboardGrabber
static

◆ keyboardGrabbing

bool keyboardGrabbing
static

◆ keyFilters

QList<QWSServer::KeyboardFilter*>* keyFilters = 0
static

Definition at line 4228 of file qwindowsystem_qws.cpp.

◆ prevWin

bool prevWin
static

Definition at line 2315 of file qwindowsystem_qws.cpp.

Referenced by QWSServerPrivate::sendMouseEventUnfiltered().

◆ qt_disable_lowpriority_timers

bool qt_disable_lowpriority_timers

◆ qt_last_x

int* qt_last_x

◆ qt_last_y

int * qt_last_y

◆ qt_servershmid

int qt_servershmid

◆ qws_display_spec

QByteArray qws_display_spec

◆ qws_keyModifiers

int qws_keyModifiers = 0
static

◆ qwsServer

QWSServer Q_GUI_EXPORT* qwsServer =0

◆ qwsServerPrivate

QWSServerPrivate* qwsServerPrivate =0
static

Definition at line 113 of file qwindowsystem_qws.cpp.