Ejemplo n.º 1
0
Xmouse::Xmouse(QObject *parent) 
  :QObject(parent), QRunnable()  {
  
  setAutoDelete(false);

  if ((display = XOpenDisplay(NULL)) == NULL )
    throw XException();
  
  if (0 >= ManyMouse_Init()) {
    ManyMouse_Quit();
    throw XException();
  }
  window = DefaultRootWindow(display);
}
Ejemplo n.º 2
0
void XWindow::connect(std::string display_name) {
	display = XOpenDisplay(display_name.c_str());

	if (display == NULL) {
		throw XException("Cannot open display!");
	}
}
Ejemplo n.º 3
0
/*DOC
CLASS    XVirtualScreen
FUNCTION XVirtualScreen
GROUP    x-games/constrcutors/destructors
REMARKS  Creates a virtual screen. The only color format that is being supported is FOURCC_LUT8.    
*/
XVirtualScreen::XVirtualScreen( USHORT usWidth, USHORT usHeight ) : XObject()
{
        this->usWidth        = usWidth;
        this->usHeight       = usHeight;

        // allocate memory
        if( NULL == (pbBuffer = (BYTE*)new BYTE[usWidth * usHeight]) )
                throw XException( "XVirtualScreen: out of memory",
                                  XGameException::XGERR_OUT_OF_MEMORY );
} // XVirtualScreen::XVirtualScreen