Пример #1
0
TarryTown::TarryTown(QObject *parent) :
    QObject(parent)
{
    p_engine = new QScriptEngine(this);
    p_originalGlobalObject = p_engine->globalObject();
    RemoteDpy = remoteDisplay(NULL);
    rideOut();
}
Пример #2
0
//========================================
// XOpen...
//----------------------------------------
Display* XOpen(str name) {
	Display *dpy;
	char display[256] = "";
 
	if (strcmp(name,"null") == 0) {
	if (getenv("DISPLAY") != NULL) {
		strcpy(display,getenv("DISPLAY"));
	}
	} else {
		strcpy(display,name);
	}
	if (remoteDisplay (display)) {
		exit (0);
	}
	if (!(dpy = XOpenDisplay(display))) {
		/*fprintf(stderr, "unable to open display: %s\n",getenv("DISPLAY"));*/
		return(NULL);
	}
	return(dpy);
}