示例#1
0
文件: main.cpp 项目: angathorion/main
int main(int argc, char *argv[]) {
#ifdef _WIN32
	return loadSingleApplication(argc, argv);
#else
	return loadApplication(argc, argv);
#endif
}
示例#2
0
void Instance::loadScriptFromString(std::unique_ptr<const JSBigString> string,
                                    std::string sourceURL,
                                    bool loadSynchronously) {
  SystraceSection s("Instance::loadScriptFromString", "sourceURL",
                    sourceURL);
  if (loadSynchronously) {
    loadApplicationSync(nullptr, std::move(string), std::move(sourceURL));
  } else {
    loadApplication(nullptr, std::move(string), std::move(sourceURL));
  }
}
示例#3
0
void Instance::loadRAMBundle(std::unique_ptr<RAMBundleRegistry> bundleRegistry,
                             std::unique_ptr<const JSBigString> startupScript,
                             std::string startupScriptSourceURL,
                             bool loadSynchronously) {
  if (loadSynchronously) {
    loadApplicationSync(std::move(bundleRegistry), std::move(startupScript),
                        std::move(startupScriptSourceURL));
  } else {
    loadApplication(std::move(bundleRegistry), std::move(startupScript),
                    std::move(startupScriptSourceURL));
  }
}
示例#4
0
文件: main.cpp 项目: angathorion/main
int loadSingleApplication(int argc, char *argv[]) {
	HANDLE hMutex;
	hMutex = CreateMutex(NULL, FALSE, TEXT("YouGUIUniqueApplicationInstance"));
	DWORD m_DwLastError = GetLastError();
	if (m_DwLastError == ERROR_ALREADY_EXISTS) {
		HWND hwnd = FindWindow(NULL, WINDOW_TITLE.c_str());
		SetForegroundWindow(hwnd);
		return 0;
	} else {
		return loadApplication(argc, argv);
	}
}
示例#5
0
//=====================================
// setupModules
//-------------------------------------
void SCCFrame::setupModules ( void ) {
	//=====================================
	// get translation pointer
	//-------------------------------------
	SCCWrapPointer< Q3Dict<QString> > mText (getTextPtr());

	//=====================================
	// insert modules for selection
	//-------------------------------------
	mModuleList -> insertItem (
		QPixmap(MONITORS_PIXMAP), mText["MonitorModule"]
	);
	mModuleList -> insertItem (
		QPixmap(POINTERS_PIXMAP), mText["MouseModule"]
	);
	mModuleList -> insertItem (
		QPixmap(KEYBOARD_PIXMAP), mText["KeyboardModule"]
	);
	mModuleList -> insertItem (
		QPixmap(XTABLETS_PIXMAP), mText["TabletModule"]
	);
	mModuleList -> insertItem (
		QPixmap(TOUCHERS_PIXMAP), mText["ToucherModule"]
	);
#if 0
	mModuleList -> insertItem (
		QPixmap(VNCSERVE_PIXMAP), mText["VNCModule"]
	);
#endif

	//=====================================
	// import all configuration data
	//-------------------------------------
	loadApplication ();

	//=====================================
	// create dialog widgets
	//-------------------------------------
	mMonitor  = new SCCMonitor     ( mDialogStack,getTextPtr(),mSection,this );
	mMouse    = new SCCMouse       ( mDialogStack,getTextPtr(),mSection,this );
	mKeyboard = new SCCKeyboard    ( mDialogStack,getTextPtr(),mSection,this );
	mTablet   = new SCCTablet      ( mDialogStack,getTextPtr(),mSection,this );
	mToucher  = new SCCTouchScreen ( mDialogStack,getTextPtr(),mSection,this );
	mVNC      = new SCCVNC         ( mDialogStack,getTextPtr(),mSection,this );

	//=====================================
	// start with monitor dialog
	//-------------------------------------
	mModuleList -> setSelected ( 0,true );
}