亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tchstub.cpp

?? windows ce 下的觸控屏驅動程序源代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
    if ((0 != (Flags&TouchSamplePreviousDownFlag)) && 
        (0 == (Flags&TouchSampleDownFlag))            )    // for the first sample with the pen up
    {

        // check for errors, stop and report them if so.  Ignore short strokes as the measurement is likely to be inaccurate
        //@todo - should this be every stroke, or average out for 5 strokes, or maybe every 5th stroke?
        if (nTicksNow - nStrokeStartTick > SMALL_STROKE_THRESHOLD)
        {
            // calculate statistics
            if (nTicksNow != nStrokeStartTick)
                samplesPerSecond = (sampleCount*1000)/(nTicksNow - nStrokeStartTick);
            if (nLongIntervalCount)
                nLongIntervalAvg = nLongIntervalSum/nLongIntervalCount;
            else
                nLongIntervalAvg = 0;
            if (nPointSkips)
            {
                nPointSkipAvg = nPointSkipSum/nPointSkips;
            }
            else
                nPointSkipAvg = 0;

            if (nLongIntervalCount > 0 || nPointSkips > 0 || samplesPerSecond < POINT_RATE_THRESHOLD)
            {
                if( !_bNoDbgMsg )
                {
                    static HANDLE hThread = NULL;
                    DWORD dwExitCode = 0;

                    // Check the Exit code of the Error message thread to see if there is a thread already running.
                    // If the thread is still active, skip this message. (This will be always logged to the file.)
                    if( hThread )
                        GetExitCodeThread(hThread, &dwExitCode);

                    if( NULL == hThread || STILL_ACTIVE != dwExitCode)
                    {
                        EnterCriticalSection(&csErrMsg);
                        // Fill the global error message buffer.
                        wsprintf(_szErrorMsg, 
                            TEXT("TRANSCRIBER MAY NOT WORK WELL GIVEN THE CURRENT POINT RATE AND LATENCY! ")
                            TEXT("INKSAMP2 at osfiles\\PUBLIC\\COMMON\\OAK\\DEMOS can help debug this.\n")
                            TEXT("Samples per second: %d (100 min) \n Long intervals: %d (0 Max) \n Avg. long interval duration %d\n Total long interval duration %d\n Ink skips %d (0 max)\n Avg Ink Skip squared %d."), 
                            samplesPerSecond, nLongIntervalCount, nLongIntervalAvg, nLongIntervalSum, nPointSkips, nPointSkipAvg);
                        LeaveCriticalSection(&csErrMsg);

                        // Create a new thread to display the error message, to make sure that we are not blocking the
                        // touch driver thread so that touch driver will be active even with the message box.
                        hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TchMessageBoxThread, NULL, 0, NULL);
                        if( NULL == hThread )
                        {
                            MYERRORMSG(1, (__TEXT("Couldn't create touchstub window thread.\r\n")));
                        }
                        // Since we have shown this msg once, turn off the message box.
                        _bNoDbgMsg = TRUE;
                    }
                }

                // Log the error to a log file also.
                HANDLE hFile;

                // Open/Create the log file.
                hFile = CreateFile(TEXT("\\tchDbg.log"), GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
                if(hFile!=INVALID_HANDLE_VALUE)
                {
                    DWORD dw = 0;
                    int   len;
                    int   i;
                    TCHAR szBuffer[2*MAX_PATH];
                    unsigned char strLogMsg[2*MAX_PATH];

                    // Check if the log file already exist and we just opened it.
                    if( 0 == GetLastError() )
                    {
                        // This file did not exist before, so write the header information for the log.
                        SetFilePointer(hFile, 0, NULL, FILE_END);

                        wsprintf(szBuffer, L"TRANSCRIBER MAY NOT WORK WELL GIVEN THE CURRENT POINT RATE AND LATENCY! \n"
                            L"INKSAMP2 at osfiles\\PUBLIC\\COMMON\\OAK\\DEMOS can help debug this.\n"
                            L"Log contains the following values:\n"
                            L"Samples per second: (100 min), Long intervals: (0 Max), Avg. long interval duration, Total long interval duration, Ink skips (0 max), Avg Ink Skip squared.\n" ); 

                        len = _tcslen(szBuffer); 
                        for (i = 0; i < len; i ++) 
                            strLogMsg[i] = (unsigned char)szBuffer[i]; 
                        strLogMsg[len] = 0;

                        WriteFile(hFile, strLogMsg, len, &dw, NULL);
                    }

                    // Make sure we are at the end of the file.
                    SetFilePointer(hFile, 0, NULL, FILE_END);

                    // Fill the buffer
                    wsprintf(szBuffer, L"%d , %d , %d , %d , %d , %d \n", 
                        samplesPerSecond, nLongIntervalCount, nLongIntervalAvg, nLongIntervalSum, nPointSkips, nPointSkipAvg);

                    // Copy the Wide char string to uchar string.
                    len = _tcslen(szBuffer); 
                    for (i = 0; i < len; i ++) 
                        strLogMsg[i] = (unsigned char)szBuffer[i]; 
                    strLogMsg[len] = 0;

                    // Write the string to the log file.
                    WriteFile(hFile, strLogMsg, len, &dw, NULL);

                    CloseHandle(hFile);
                }
            }
        }
    }


#endif


   if (NULL == *_phStubWnd)
	IsStubWndExist();

   dwTick = GetTickCount();
   // Check if we need to send this point to system or transcriber.
   // If we are are in Out Of Memory state (Indicated by Tch thread in high priority), which prevents us from 
   // communicating with transcriber, we need to send the points to system instead of transcriber.
   if( _hClientWnd==NULL || 
	   _bTchThreadHighPriority || 
      *_phStubWnd==NULL ||
      (Flags&TouchSampleValidFlag)==0 ||
      (Flags&TouchSampleIgnore)!=0)
     {
#ifdef DEBUG1
	   	 wsprintf(str, TEXT(" *** CgrCallback -  sending point to  (%x) *** \n"), v_pfnCgrPointCallback);
		 OutputDebugString( str);
#endif
         (*v_pfnCgrPointCallback)(Flags, X, Y);
         return 0;           
     }
// PostMessage(*_phStubWnd, WM_STUB_TABLET, dwTick,((Flags<<26)|((X&0x01FFF)<<13)|(Y&0x01FFF)));
//   StubCallback2(dwTick, Flags, X, Y);
#ifdef DEBUG1
   wsprintf(str, TEXT(" *** CgrCallback - Transcriber is eating point (%d,%d) to hwnd %x*** \n"), X, Y, _hClientWnd);
		OutputDebugString( str);
#endif

     SendPtToSelf(Flags, X, Y);
	 return 0;
}


/* *********************************************************************************** */
// This takes points off the internal Touch Driver queue (Q2) and decides where to send them 
//  - either to Transcriber, or back to the system
void StubCallback2(
   DWORD dwTick0,
	TOUCH_PANEL_SAMPLE_FLAGS	Flags,
	INT	X,
	INT	Y
    )
{
 DWORD dwTick = dwTick0;
 TOUCH_PANEL_SAMPLE_FLAGS FlagsToDll = Flags, FlagsToWnd = Flags;

#if WRITE_STATISTICSINNER	// turn on to see points we place into the queue for the app
   {
    static int   _iStat1Writes = 0;
    static int   _iStat1Current = 0;
    static short _iStat1Buf[MAX_STATS][3] = {0};
    static int   count = 0;


      _iStat1Buf[_iStat1Current][0] = (short)Flags;
      _iStat1Buf[_iStat1Current][1] = (short)X;
      _iStat1Buf[_iStat1Current][2] = (short)Y;
      _iStat1Current++;
      
	  if(_iStat1Current==MAX_STATS)
         {
          HANDLE hFile = INVALID_HANDLE_VALUE;
          int i;

 
		  
		  _iStat1Current = 0;

             hFile = CreateFile(L"\\tchlogInner.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
             if(hFile!=INVALID_HANDLE_VALUE)
                {
                 DWORD dw = 0;
				 int   len;
				 int   j;
      
				 SetFilePointer(hFile, 0, NULL, FILE_END);

				   for (i = 0; i < MAX_STATS; i++)
				   {
				    TCHAR str[64];
					unsigned char str2[64];

                    wsprintf(str, L"%d %d %d %d %c%c", count++, (int)_iStat1Buf[i][1], (int)(3000 - _iStat1Buf[i][2]), (int)_iStat1Buf[i][0], (TCHAR)13, (TCHAR)10); 
  		            
					len = _tcslen(str); 
					if(len > 62) 
						len = 62;

					for (j = 0; j < len; j ++) 
						str2[j] = (unsigned char)str[j]; 
					str2[len] = 0;
					
					WriteFile(hFile, str2, len, &dw, NULL);

				   }

                   CloseHandle(hFile);
                }

         }
   }
#endif


   // if we don't have a callig client window or bad sample or we are ignoring it,
   // or we are in Out Of Memory state (Indicated by Tch thread in high priority), which prevents us from 
   // communicating with transcriber, pass back to the system (so the app "underneath" transcriber will get them)
   if(_hClientWnd==NULL ||
       _bTchThreadHighPriority ||
      (Flags&TouchSampleValidFlag)==0 ||
      (Flags&TouchSampleIgnore)!=0)
     {
         (*v_pfnCgrPointCallback)(Flags, X, Y);
#ifdef DEBUG2
         OutputDebugString(L"CgrTouch Point 1\n");
#endif
         return;
     }

//	Intercept points here
   //1. test window at stroke begining 
   // 0x07 means pen down, valid, callib, but pen wasn't down for the previous pt
   if(Flags==0x07)
      {
         if(!IsWindow(_hClientWnd))
            {
               _hClientWnd = NULL;
               (*v_pfnCgrPointCallback)(Flags, X, Y);
#ifdef DEBUG2
         OutputDebugString(L"CgrTouch Point 2\n");
#endif
               return;
            }

        // set flags 
        _iClientFlags = (int)GetWindowLong(_hClientWnd, 0);
        //just adjust

        if((_iClientFlags&TABLET_TEST_FIRST_POINT)!=0 &&
           !SendMessage(_hClientWnd, WM_PEGREC_FIRSTPOINT, 0, MAKELPARAM(X, Y)))
           {
              _iClientFlags = TABLET_ALL_TO_SYSTEM;
           }

        if((_iClientFlags&TABLET_SMART_TO_SYSTEM)!=0)
           _iClientFlags = _iClientFlags&(~TABLET_ALL_TO_SYSTEM);
           

        if((_iClientFlags&TABLET_SAVE_FOCUS_WND)!=0)
           {

                  //@todo - do we need FindForegroundFocusWindow( ) instead of GetForegroundWindow( )?
                  _hLastTouchFocusWnd = GetForegroundWindow();  
           }
        begTick = dwLastDelayTick = dwTick;
        _begX = iLastDelayX = X;
        _begY = iLastDelayY = Y;
        bClick = FALSE;
        bDelay = FALSE;
        bNear = TRUE;
      } // if(flgs==07)


   if((_iClientFlags&TABLET_SMART_TO_SYSTEM)!=0)
      {   
         //2. Is still near?
         if( bNear                          && 
             Flags==0x0f /*inter point*/   &&
            (Flags&TouchSampleDownFlag)!=0 &&
            (_begX-X>=iMaxClickDist || _begX-X<=-iMaxClickDist ||
             _begY-Y>=iMaxClickDist || _begY-Y<=-iMaxClickDist))
            {  // decision = no click and no initial delay => stop NEAR
               bNear = FALSE;
               if((_iClientFlags&TABLET_SEND_RELEASE_MSG)!=0)
                    SendPtToWnd((TouchSamplePreviousDownFlag|TouchSampleDownFlag|TouchSampleIgnore), X, Y);
                                   iLastDelayX = X;
                                   iLastDelayY = Y;
                                   dwLastDelayTick = dwTick;
					{
                       HANDLE  hThread=GetCurrentThread();
                       SetThreadPriority(hThread, THREAD_PRIORITY_HIGHEST);
					}
            }

         // IS CLICK?
         if( bNear                                     &&
             Flags==0x0d      /*LAST PT*/              &&
             (_iClientFlags&TABLET_CLICK_TO_SYSTEM)!=0 &&
             dwTick-begTick < dwMaxClickTime           &&
             begTick-_dwLastSendedTick > dwMinPauseBeforeClick) 
            {  //yes - it's click
              HWND hWndFgr = GetForegroundWindow();
              BOOL bPermition = TRUE;
               bClick = TRUE;
               _dwLastSendedTick = 0;
               if((_iClientFlags&(TABLET_SEND|TABLET_NEED_PERMITION))!=0)
                  bPermition = (BOOL)SendMessage(_hClientWnd, WM_PEGREC_MOUSECLICK, (WPARAM)hWndFgr, MAKELPARAM(_begX, _begY));
               else
                  PostMessage(_hClientWnd, WM_PEGREC_MOUSECLICK, (WPARAM)hWndFgr, MAKELPARAM(_begX, _begY));

			   // simulate a click to the app "below" Transcriber (since we already ate the points)
               if((_iClientFlags&TABLET_NEED_PERMITION)==0 || bPermition)
                  {
                     (*v_pfnCgrPointCallback)(0x07, _begX+1, _begY+1);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0D, _begX, _begY);
                  }
               else
			      {
#ifdef DEBUG2
         OutputDebugString(L"CgrTouch Point 3\n");
#endif
                  return;
				  }
            }

		 // we delay points to see if we should either treat this as a selection or see if 
		 //  we should send the point to the application "underneath" Transcriber,
		 //  or tap and hold.

         // IS INITIAL DELAY?
         if( bNear                                      &&
             Flags==0x0f   /*intermediate point*/       &&
             (_iClientFlags&TABLET_STARTDELAY_TO_SYSTEM)!=0  &&
             (dwTick-begTick>1200 ||
               (dwTick-begTick>dwMinStartDelayTime      &&

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱人伦偷精品视频不卡| 欧美不卡视频一区| 国产精品久久久久久久久快鸭 | 成人免费视频免费观看| 欧美bbbbb| 蜜臀av性久久久久av蜜臀妖精| 日韩一区二区电影在线| 欧美日韩视频一区二区| 色婷婷综合中文久久一本| 91在线丨porny丨国产| 波多野结衣91| 色婷婷久久99综合精品jk白丝| 视频一区二区不卡| 日韩精品一级二级| 日本不卡1234视频| 国产呦萝稀缺另类资源| 一区二区三区在线免费视频| 一区二区三区四区亚洲| 天堂精品中文字幕在线| 看电视剧不卡顿的网站| 国产一区二区三区四区在线观看| 一区二区三区蜜桃网| 亚洲午夜免费电影| 偷拍日韩校园综合在线| 国产精品美女久久久久aⅴ | 麻豆免费精品视频| 国产精品亚洲人在线观看| 亚洲自拍偷拍九九九| 日韩精品电影在线| 国产一区二区三区四区五区入口| 亚洲欧美另类久久久精品2019| 精品国产一区二区亚洲人成毛片| 色哦色哦哦色天天综合| 欧美日韩国产色站一区二区三区| 成人av午夜影院| 在线免费观看视频一区| 91精品国产色综合久久不卡蜜臀| 色婷婷久久久亚洲一区二区三区| 国产高清在线精品| 免费在线欧美视频| 99久久久无码国产精品| 国内精品国产成人| 日本高清不卡视频| 色综合久久中文字幕综合网| 欧美色视频在线| 中文字幕欧美国产| 免费成人在线视频观看| 97se亚洲国产综合自在线不卡| 国产1区2区3区精品美女| 在线观看av一区| 久久久久久久久久电影| 亚洲成人av电影在线| 不卡的av网站| 色狠狠色噜噜噜综合网| 欧美大肚乱孕交hd孕妇| 伊人开心综合网| 国产成a人无v码亚洲福利| 91精品一区二区三区久久久久久| 欧美一级高清片| 亚洲另类在线一区| 成人影视亚洲图片在线| 337p粉嫩大胆噜噜噜噜噜91av| 久久―日本道色综合久久| 2023国产精品| 国产精品入口麻豆九色| 亚洲九九爱视频| 亚洲一区二区三区中文字幕在线 | 成人欧美一区二区三区1314| 日韩高清不卡一区二区| 欧美日韩中文另类| 亚洲男人电影天堂| 成人一级片网址| 国产女人18水真多18精品一级做| 中文字幕一区二区三区在线不卡 | 色网综合在线观看| 久久久亚洲欧洲日产国码αv| 国产欧美日韩精品a在线观看| 18欧美乱大交hd1984| 福利一区福利二区| 国产亚洲精品精华液| 懂色av噜噜一区二区三区av| 欧美成人乱码一区二区三区| 奇米影视一区二区三区| 国产成人精品一区二区三区网站观看| 丁香婷婷深情五月亚洲| 久久久亚洲精品石原莉奈| 国精产品一区一区三区mba视频| av在线不卡观看免费观看| 国产偷v国产偷v亚洲高清| 国产一区二区成人久久免费影院| 91免费在线看| 一区二区三区在线观看欧美| 久久99精品久久久| 2023国产一二三区日本精品2022| 亚洲裸体xxx| 在线观看一区二区精品视频| 亚洲超丰满肉感bbw| 宅男在线国产精品| 久88久久88久久久| 久久久不卡网国产精品二区| 99精品在线观看视频| 亚洲一区二区三区在线看| 7777女厕盗摄久久久| 狠狠色丁香婷综合久久| 亚洲少妇30p| 国产九九视频一区二区三区| 久久久精品tv| 久久精品国产久精国产| 国产欧美精品日韩区二区麻豆天美| 亚洲第一成人在线| 日韩女优毛片在线| 亚洲r级在线视频| 精品国产髙清在线看国产毛片 | 欧美裸体一区二区三区| 麻豆国产欧美一区二区三区| 国产女主播一区| 麻豆freexxxx性91精品| 欧美国产在线观看| 欧美顶级少妇做爰| 99精品欧美一区二区蜜桃免费| 久久理论电影网| 91亚洲精品一区二区乱码| 天堂va蜜桃一区二区三区漫画版| 在线亚洲精品福利网址导航| 综合av第一页| 99精品一区二区| 狂野欧美性猛交blacked| 中文字幕在线不卡一区| 日韩三级.com| 欧美性猛交xxxx乱大交退制版| 亚洲三级理论片| 日韩美女视频在线| 91免费国产在线观看| 黄页网站大全一区二区| 一区二区三区91| 欧美日韩一区三区| av在线不卡观看免费观看| 国产在线不卡一卡二卡三卡四卡| 2020国产精品| 69久久99精品久久久久婷婷| 91在线视频免费观看| 国产成人精品三级麻豆| 激情文学综合网| 久久电影网电视剧免费观看| 国产调教视频一区| 日韩视频在线你懂得| 欧美精品 国产精品| 欧美日精品一区视频| 在线观看视频一区二区欧美日韩| 亚洲成人午夜电影| 亚洲免费伊人电影| 亚洲欧洲日韩综合一区二区| 国产片一区二区| 久久久国产综合精品女国产盗摄| 成人av中文字幕| 国产高清亚洲一区| 国产乱码一区二区三区| 国产精品99久| 成人av影院在线| 91香蕉视频污在线| 91视视频在线直接观看在线看网页在线看| 中文字幕亚洲欧美在线不卡| 国产清纯在线一区二区www| 久久精品一区二区三区av| 久久久久国产精品免费免费搜索| 91麻豆国产香蕉久久精品| 亚洲成人av电影在线| 肉肉av福利一精品导航| 久久成人麻豆午夜电影| 国产一区二区三区精品欧美日韩一区二区三区 | 国产在线视视频有精品| 经典三级在线一区| 国产麻豆日韩欧美久久| 国产精品小仙女| 91丝袜美腿高跟国产极品老师 | 国产欧美一区二区精品性色| 国产视频一区在线观看| 国产精品美女视频| 依依成人精品视频| 天天色天天操综合| 国产精品久久777777| 亚洲精品精品亚洲| 首页亚洲欧美制服丝腿| 日韩一区中文字幕| 日韩经典中文字幕一区| 国内外成人在线视频| 99久久婷婷国产综合精品电影| 黄网站免费久久| 午夜精品福利在线| 国模一区二区三区白浆| 91老师片黄在线观看| 欧美一区二区三区不卡| 91久久精品一区二区三| 不卡影院免费观看| 这里只有精品免费| 亚洲三级电影网站| 久久99精品国产麻豆婷婷洗澡| 视频在线在亚洲| av爱爱亚洲一区| 精品久久久久久久久久久久久久久|