Qt 4.8
Classes | Macros | Enumerations | Functions
qxcbwindow.cpp File Reference
#include "qxcbwindow.h"
#include <QtDebug>
#include "qxcbconnection.h"
#include "qxcbscreen.h"
#include <xcb/xcb_icccm.h>
#include <private/qapplication_p.h>
#include <private/qwindowsurface_p.h>
#include <QtGui/QWindowSystemInterface>
#include <stdio.h>

Go to the source code of this file.

Classes

struct  QtMWMHints
 

Macros

#define class   class_name
 

Enumerations

enum  {
  MWM_HINTS_FUNCTIONS = (1L << 0), MWM_FUNC_ALL = (1L << 0), MWM_FUNC_RESIZE = (1L << 1), MWM_FUNC_MOVE = (1L << 2),
  MWM_FUNC_MINIMIZE = (1L << 3), MWM_FUNC_MAXIMIZE = (1L << 4), MWM_FUNC_CLOSE = (1L << 5), MWM_HINTS_DECORATIONS = (1L << 1),
  MWM_DECOR_ALL = (1L << 0), MWM_DECOR_BORDER = (1L << 1), MWM_DECOR_RESIZEH = (1L << 2), MWM_DECOR_TITLE = (1L << 3),
  MWM_DECOR_MENU = (1L << 4), MWM_DECOR_MINIMIZE = (1L << 5), MWM_DECOR_MAXIMIZE = (1L << 6), MWM_HINTS_INPUT_MODE = (1L << 2),
  MWM_INPUT_MODELESS = 0L, MWM_INPUT_PRIMARY_APPLICATION_MODAL = 1L, MWM_INPUT_FULL_APPLICATION_MODAL = 3L
}
 

Functions

static bool isTransient (const QWidget *w)
 
static Qt::MouseButton translateMouseButton (xcb_button_t s)
 
static Qt::MouseButtons translateMouseButtons (int s)
 

Macro Definition Documentation

◆ class

#define class   class_name

Definition at line 53 of file qxcbwindow.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MWM_HINTS_FUNCTIONS 
MWM_FUNC_ALL 
MWM_FUNC_RESIZE 
MWM_FUNC_MOVE 
MWM_FUNC_MINIMIZE 
MWM_FUNC_MAXIMIZE 
MWM_FUNC_CLOSE 
MWM_HINTS_DECORATIONS 
MWM_DECOR_ALL 
MWM_DECOR_BORDER 
MWM_DECOR_RESIZEH 
MWM_DECOR_TITLE 
MWM_DECOR_MENU 
MWM_DECOR_MINIMIZE 
MWM_DECOR_MAXIMIZE 
MWM_HINTS_INPUT_MODE 
MWM_INPUT_MODELESS 
MWM_INPUT_PRIMARY_APPLICATION_MODAL 
MWM_INPUT_FULL_APPLICATION_MODAL 

Definition at line 308 of file qxcbwindow.cpp.

308  {
309  MWM_HINTS_FUNCTIONS = (1L << 0),
310 
311  MWM_FUNC_ALL = (1L << 0),
312  MWM_FUNC_RESIZE = (1L << 1),
313  MWM_FUNC_MOVE = (1L << 2),
314  MWM_FUNC_MINIMIZE = (1L << 3),
315  MWM_FUNC_MAXIMIZE = (1L << 4),
316  MWM_FUNC_CLOSE = (1L << 5),
317 
318  MWM_HINTS_DECORATIONS = (1L << 1),
319 
320  MWM_DECOR_ALL = (1L << 0),
321  MWM_DECOR_BORDER = (1L << 1),
322  MWM_DECOR_RESIZEH = (1L << 2),
323  MWM_DECOR_TITLE = (1L << 3),
324  MWM_DECOR_MENU = (1L << 4),
325  MWM_DECOR_MINIMIZE = (1L << 5),
326  MWM_DECOR_MAXIMIZE = (1L << 6),
327 
328  MWM_HINTS_INPUT_MODE = (1L << 2),
329 
330  MWM_INPUT_MODELESS = 0L,
333 };

Function Documentation

◆ isTransient()

static bool isTransient ( const QWidget w)
inlinestatic

Definition at line 101 of file qxcbwindow.cpp.

Referenced by QXcbWindow::QXcbWindow().

102 {
103  return ((w->windowType() == Qt::Dialog
104  || w->windowType() == Qt::Sheet
105  || w->windowType() == Qt::Tool
106  || w->windowType() == Qt::SplashScreen
107  || w->windowType() == Qt::ToolTip
108  || w->windowType() == Qt::Drawer
109  || w->windowType() == Qt::Popup)
111 }
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
Qt::WindowType windowType() const
Returns the window type of this widget.
Definition: qwidget.h:937

◆ translateMouseButton()

static Qt::MouseButton translateMouseButton ( xcb_button_t  s)
static

Definition at line 623 of file qxcbwindow.cpp.

Referenced by QXcbWindow::handleMouseEvent().

624 {
625  switch (s) {
626  case 1:
627  return Qt::LeftButton;
628  case 2:
629  return Qt::MidButton;
630  case 3:
631  return Qt::RightButton;
632  default:
633  return Qt::NoButton;
634  }
635 }

◆ translateMouseButtons()

static Qt::MouseButtons translateMouseButtons ( int  s)
static

Definition at line 611 of file qxcbwindow.cpp.

Referenced by QXcbWindow::handleMouseEvent().

612 {
613  Qt::MouseButtons ret = 0;
614  if (s & XCB_BUTTON_MASK_1)
615  ret |= Qt::LeftButton;
616  if (s & XCB_BUTTON_MASK_2)
617  ret |= Qt::MidButton;
618  if (s & XCB_BUTTON_MASK_3)
619  ret |= Qt::RightButton;
620  return ret;
621 }