예제 #1
0
void LoggableFrontend::Run()
{
	debug("Entering LoggableFrontend-loop");

	while (!IsStopped())
	{
		Update();
		usleep(m_iUpdateInterval * 1000);
	}
	// Printing the last messages
	Update();

	BeforeExit();

	debug("Exiting LoggableFrontend-loop");
}
예제 #2
0
파일: test.c 프로젝트: paulur/vul-apache
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   int wmId, wmEvent;

   switch (message) {

      case WM_COMMAND:
         wmId    = LOWORD(wParam);
         wmEvent = HIWORD(wParam);

         switch (wmId) {

            case IDM_ABOUT:
               DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUT), hWnd, (DLGPROC)About);
               break;

	    case IDM_BEFOREEXIT:
		BeforeExit(hWnd, "C:\\", "C:\\", "C:\\Apache", NULL);
		break;

            case IDM_EXIT:
               DestroyWindow (hWnd);
               break;

            default:
               return (DefWindowProc(hWnd, message, wParam, lParam));
         }
         break;

      case WM_DESTROY:
         PostQuitMessage(0);
         break;

      default:
         return (DefWindowProc(hWnd, message, wParam, lParam));
   }
   return (0);
}
예제 #3
0
void keyboard ( unsigned char key, int x, int y )
{
	DebugShow01=key;
	//if(UpDataInputDF)
	//	return;


	testkey[10]=false;
	switch ( key ) 
	{
		case 'W':
			testkey[0]=true;
			
			break;
		case 'S':
			testkey[1]=true;
			break;
		case 'A':
			testkey[2]=true;
			break;
		case 'D':
			testkey[3]=true;
			break;
		case VK_LEFT:
			testkey[4]=true;
			break;
		case VK_RIGHT:
			testkey[5]=true;
			break;
		case VK_UP:
			testkey[6]=true;
			break;
		case VK_DOWN:
			testkey[7]=true;
			break;
		case VK_PRIOR:
			testkey[8]=true;
			testnum0=testnum0+0.1f;
			break;
		case VK_NEXT:
			testkey[9]=true;
			break;
		case VK_HOME:
			TestPos[0]=0.0f;
			TestPos[1]=0.0f;
			TestPos[2]=0.0f;
			TestRot[0]=0.0f;
			TestRot[1]=0.0f;
			TestRot[2]=0.0f;
			break;

		case VK_ESCAPE:
			BeforeExit();
			exit ( 0 );
			break;

		default:
			break;

	}

}