Windows7Multitouch::Windows7Multitouch() : waitingForMatchingMouseDown(false), waitingForMatchingMouseUp(false), alreadySimulatedMouseUp(false), _pIManipulationProcessor(NULL), _pManipulationEventSink(NULL), _gestureManager(), pRegisterTouchWindow(NULL), pUnregisterTouchWindow(NULL), pCloseTouchInputHandle(NULL), pGetTouchInputInfo(NULL), pTKGetGestureMetrics(NULL), _hMod(NULL), _supportsMultiTouch(false), _logFile(NULL), _logFileStream(NULL) { _hMod = LoadLibrary(_T("User32.dll")); if (_hMod) { pRegisterTouchWindow = (RegisterTouchWindowSignature) GetProcAddress(_hMod, "RegisterTouchWindow"); pUnregisterTouchWindow = (UnregisterTouchWindowSignature) GetProcAddress(_hMod, "UnregisterTouchWindow"); pCloseTouchInputHandle = (CloseTouchInputHandleSignature) GetProcAddress(_hMod, "CloseTouchInputHandle"); pGetTouchInputInfo = (GetTouchInputInfoSignature) GetProcAddress(_hMod, "GetTouchInputInfo"); pTKGetGestureMetrics = (TKGetGestureMetricsSignature) GetProcAddress(_hMod, "TKGetGestureMetrics"); if (pRegisterTouchWindow && pUnregisterTouchWindow && pCloseTouchInputHandle && pGetTouchInputInfo) { // We must call this to start receiving the WM_TOUCH* events if (!pRegisterTouchWindow(winOS->GetWindowsHandle(), TWF_WANTPALM)) { consoleWrite(QString("RegisterTouchWindow failed, GetLastError() = %1").arg(GetLastError())); } else { initializeLogFile(); // Do this now so we can record any errors _supportsMultiTouch = true; HRESULT hr = CoInitialize(0); hr = CoCreateInstance( CLSID_ManipulationProcessor, NULL, CLSCTX_ALL, IID_IManipulationProcessor, (void **)&_pIManipulationProcessor); if (hr == S_OK) _pManipulationEventSink = new ManipulationEventSink(_pIManipulationProcessor); else logError(QString("\nFailed to initialize Manipulation Processor, HRESULT = %1").arg(hr)); } } } }
void test_application_initialize(void) { #if DebugMode #if SD_CONENCTED clearDigitalOutput(devices.sdCard.SPI.chipSelect.out); #endif #if LogicAnalyzerDelay printf("time to start logic analyzer... "); fflush(stdout); UL32 wait; UL32 dummy = 0; for (wait = 0; wait < 60000; wait++) { dummy++; if (dummy > 1000) { printf("."); dummy = 0; fflush(stdout); } } printf("done! starting test program\r\n"); fflush(stdout); #endif // start printing to file #if CDH_PROCESSOR_COMPILE logLine("running test on CDH processor"); logLine("please check UMSATS_CDH_log.txt"); #else logLine("running test on COM processor"); logLine("please check UMSATS_COM_log.txt"); #endif initializeLogFile(); #endif }
FilePrintStream& dataFile() { initializeLogFile(); return *file; }
FILE* dataFile() { initializeLogFile(); return file; }