Ejemplo n.º 1
0
static int
CommandQuit (int argc, char **argv, int x, int y)
{
  if (!PCB->Changed || gui->close_confirm_dialog () == HID_CLOSE_CONFIRM_OK)
    QuitApplication ();
  return 0;
}
Ejemplo n.º 2
0
ExcelControllerImpl08::~ExcelControllerImpl08()
{
	if(!UseExistingInstance)
	{
		QuitApplication();
	}
}
Ejemplo n.º 3
0
static int
CommandReallyQuit (int argc, char **argv, int x, int y)
{
  QuitApplication ();
  return 0;
}
Ejemplo n.º 4
0
static int
CommandReallyQuit (int argc, char **argv, Coord x, Coord y)
{
  QuitApplication ();
  return 0;
}
Ejemplo n.º 5
0
//-----------------------------------------------------------------------------------------------
LRESULT CALLBACK InputHandler::WindowsMessageHandlingProcedure( HWND windowHandle, UINT wmMessageCode, WPARAM wParam, LPARAM lParam )
{
	unsigned char asKey = (uchar) wParam;

	switch( wmMessageCode )
	{
	case WM_CLOSE:
	case WM_DESTROY:
	case WM_QUIT:
		isQuitting = true;
		return 0;
	case WM_SYSKEYDOWN:
		return 0;
	case WM_KEYDOWN:
		{
			if( asKey == VK_ESCAPE && s_state == INPUTHANDLER_GAME)
			{
				QuitApplication();
				return 0;
			}

			bool wasProcessed = ProcessKeyDownEvent(asKey);
			if(wasProcessed)
			{
				return 0;
			}
		}
		break;
	case WM_KEYUP:
		{
			bool wasProcessed = ProcessKeyUpEvent(asKey);
			if(wasProcessed)
			{
				return 0;
			}
		}
		break;
	case WM_RBUTTONDOWN:
		{
 			InputHandler::m_currentMouseState[MOUSE_RIGHT] = true;
			return 0;
		}
		break;
	case WM_RBUTTONUP:
		{
			InputHandler::m_currentMouseState[MOUSE_RIGHT] = false;
			return 0;
		}
		break;
	case WM_RBUTTONDBLCLK:
		{
			InputHandler::m_currentMouseState[MOUSE_R_DOUBLE_CLICK] = true;
			return 0;
		}
	case WM_LBUTTONDOWN:
		{
			InputHandler::m_currentMouseState[MOUSE_LEFT] = true;
			return 0;
		}
		break;
	case WM_LBUTTONUP:
		{
			InputHandler::m_currentMouseState[MOUSE_LEFT] = false;
			return 0;
		}
		break;
	case WM_LBUTTONDBLCLK:
		{
			InputHandler::m_currentMouseState[MOUSE_L_DOUBLE_CLICK] = true;
			return 0;
		}
	case WM_MBUTTONDOWN:
		{
			InputHandler::m_currentMouseState[MOUSE_MIDDLE] = true;
			return 0;
		}
		break;
	case WM_MBUTTONUP:
		{
			InputHandler::m_currentMouseState[MOUSE_MIDDLE] = false;
			return 0;
		}
		break;
	case WM_MBUTTONDBLCLK:
		{
			InputHandler::m_currentMouseState[MOUSE_M_DOUBLE_CLICK] = true;
			return 0;
		}
		break;
	case WM_CHAR:
		{
			if(!s_state == INPUTHANDLER_DEV_CONSOLE)
				return 0;

			switch(asKey)
			{
			case '`':
			case VK_ESCAPE:
			case VK_BACK:
			case VK_RETURN:
				return 0;
			break;
			}
			bool wasProcessed = ProcessCharDownEvent(asKey);
			if(wasProcessed)
				return 0;
			
		}
		break;
	}

	return DefWindowProc( windowHandle, wmMessageCode, wParam, lParam );
}