// Copyright (c) 2021- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "Common/CommonWindows.h"2021// Must match the order in ppsspp.rc.22enum class ContextMenuID {23MEMVIEW = 0,24DISASM = 1,25REGLIST = 2,26BREAKPOINTLIST = 3,27THREADLIST = 4,28NEWBREAKPOINT = 5,29DISPLAYLISTVIEW = 6,30GEDBG_STATE = 7,31GEDBG_PREVIEW = 8,32GEDBG_MATRIX = 9,33GEDBG_TABS = 10,34CPUWATCHLIST = 11,35CPUADDWATCH = 12,36};3738struct ContextPoint {39static ContextPoint FromCursor();40static ContextPoint FromClient(const POINT &clientPoint);41static ContextPoint FromEvent(LPARAM lParam);4243POINT pos_{};44bool isClient_ = false;45};4647void ContextMenuInit(HINSTANCE inst);4849HMENU GetContextMenu(ContextMenuID);50int TriggerContextMenu(ContextMenuID which, HWND wnd, const ContextPoint &pt);515253