Constants.cpp
1 #include "pch.h" 2 #include "Constants.h" 3 #include "Constants.g.cpp" 4 #include "shared_constants.h" 5 #include <ShlObj.h> 6 7 namespace winrt::PowerToys::Interop::implementation 8 { 9 uint32_t Constants::VK_WIN_BOTH() 10 { 11 return CommonSharedConstants::VK_WIN_BOTH; 12 } 13 hstring Constants::AppDataPath() 14 { 15 PWSTR local_app_path; 16 winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &local_app_path)); 17 winrt::hstring result{ local_app_path }; 18 CoTaskMemFree(local_app_path); 19 result = result + L"\\" + CommonSharedConstants::APPDATA_PATH; 20 return result; 21 } 22 hstring Constants::PowerLauncherSharedEvent() 23 { 24 return CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT; 25 } 26 hstring Constants::PowerLauncherCentralizedHookSharedEvent() 27 { 28 return CommonSharedConstants::POWER_LAUNCHER_CENTRALIZED_HOOK_SHARED_EVENT; 29 } 30 hstring Constants::RunSendSettingsTelemetryEvent() 31 { 32 return CommonSharedConstants::RUN_SEND_SETTINGS_TELEMETRY_EVENT; 33 } 34 hstring Constants::RunExitEvent() 35 { 36 return CommonSharedConstants::RUN_EXIT_EVENT; 37 } 38 hstring Constants::FZEExitEvent() 39 { 40 return CommonSharedConstants::FZE_EXIT_EVENT; 41 } 42 hstring Constants::FZEToggleEvent() 43 { 44 return CommonSharedConstants::FANCY_ZONES_EDITOR_TOGGLE_EVENT; 45 } 46 hstring Constants::ColorPickerSendSettingsTelemetryEvent() 47 { 48 return CommonSharedConstants::COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT; 49 } 50 hstring Constants::ShowColorPickerSharedEvent() 51 { 52 return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT; 53 } 54 hstring Constants::TerminateColorPickerSharedEvent() 55 { 56 return CommonSharedConstants::TERMINATE_COLOR_PICKER_SHARED_EVENT; 57 } 58 hstring Constants::AdvancedPasteShowUIMessage() 59 { 60 return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_MESSAGE; 61 } 62 hstring Constants::AdvancedPasteMarkdownMessage() 63 { 64 return CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_MESSAGE; 65 } 66 hstring Constants::AdvancedPasteJsonMessage() 67 { 68 return CommonSharedConstants::ADVANCED_PASTE_JSON_MESSAGE; 69 } 70 hstring Constants::AdvancedPasteAdditionalActionMessage() 71 { 72 return CommonSharedConstants::ADVANCED_PASTE_ADDITIONAL_ACTION_MESSAGE; 73 } 74 hstring Constants::AdvancedPasteCustomActionMessage() 75 { 76 return CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE; 77 } 78 hstring Constants::AdvancedPasteShowUIEvent() 79 { 80 return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_EVENT; 81 } 82 hstring Constants::AdvancedPasteTerminateAppMessage() 83 { 84 return CommonSharedConstants::ADVANCED_PASTE_TERMINATE_APP_MESSAGE; 85 } 86 hstring Constants::AlwaysOnTopPinEvent() 87 { 88 return CommonSharedConstants::ALWAYS_ON_TOP_PIN_EVENT; 89 } 90 hstring Constants::FindMyMouseTriggerEvent() 91 { 92 return CommonSharedConstants::FIND_MY_MOUSE_TRIGGER_EVENT; 93 } 94 hstring Constants::MouseHighlighterTriggerEvent() 95 { 96 return CommonSharedConstants::MOUSE_HIGHLIGHTER_TRIGGER_EVENT; 97 } 98 hstring Constants::MouseCrosshairsTriggerEvent() 99 { 100 return CommonSharedConstants::MOUSE_CROSSHAIRS_TRIGGER_EVENT; 101 } 102 hstring Constants::CursorWrapTriggerEvent() 103 { 104 return CommonSharedConstants::CURSOR_WRAP_TRIGGER_EVENT; 105 } 106 hstring Constants::LightSwitchToggleEvent() 107 { 108 return CommonSharedConstants::LIGHTSWITCH_TOGGLE_EVENT; 109 } 110 hstring Constants::ZoomItZoomEvent() 111 { 112 return CommonSharedConstants::ZOOMIT_ZOOM_EVENT; 113 } 114 hstring Constants::ZoomItDrawEvent() 115 { 116 return CommonSharedConstants::ZOOMIT_DRAW_EVENT; 117 } 118 hstring Constants::ZoomItBreakEvent() 119 { 120 return CommonSharedConstants::ZOOMIT_BREAK_EVENT; 121 } 122 hstring Constants::ZoomItLiveZoomEvent() 123 { 124 return CommonSharedConstants::ZOOMIT_LIVEZOOM_EVENT; 125 } 126 hstring Constants::ZoomItSnipEvent() 127 { 128 return CommonSharedConstants::ZOOMIT_SNIP_EVENT; 129 } 130 hstring Constants::ZoomItRecordEvent() 131 { 132 return CommonSharedConstants::ZOOMIT_RECORD_EVENT; 133 } 134 hstring Constants::ShowPowerOCRSharedEvent() 135 { 136 return CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT; 137 } 138 hstring Constants::TerminatePowerOCRSharedEvent() 139 { 140 return CommonSharedConstants::TERMINATE_POWEROCR_SHARED_EVENT; 141 } 142 hstring Constants::MouseJumpShowPreviewEvent() 143 { 144 return CommonSharedConstants::MOUSE_JUMP_SHOW_PREVIEW_EVENT; 145 } 146 hstring Constants::TerminateMouseJumpSharedEvent() 147 { 148 return CommonSharedConstants::TERMINATE_MOUSE_JUMP_SHARED_EVENT; 149 } 150 hstring Constants::AwakeExitEvent() 151 { 152 return CommonSharedConstants::AWAKE_EXIT_EVENT; 153 } 154 hstring Constants::ShowPeekEvent() 155 { 156 return CommonSharedConstants::SHOW_PEEK_SHARED_EVENT; 157 } 158 hstring Constants::TerminatePeekEvent() 159 { 160 return CommonSharedConstants::TERMINATE_PEEK_SHARED_EVENT; 161 } 162 hstring Constants::PowerAccentExitEvent() 163 { 164 return CommonSharedConstants::POWERACCENT_EXIT_EVENT; 165 } 166 hstring Constants::ShortcutGuideTriggerEvent() 167 { 168 return CommonSharedConstants::SHORTCUT_GUIDE_TRIGGER_EVENT; 169 } 170 hstring Constants::RegistryPreviewTriggerEvent() 171 { 172 return CommonSharedConstants::REGISTRY_PREVIEW_TRIGGER_EVENT; 173 } 174 hstring Constants::MeasureToolTriggerEvent() 175 { 176 return CommonSharedConstants::MEASURE_TOOL_TRIGGER_EVENT; 177 } 178 hstring Constants::GcodePreviewResizeEvent() 179 { 180 return CommonSharedConstants::GCODE_PREVIEW_RESIZE_EVENT; 181 } 182 hstring Constants::BgcodePreviewResizeEvent() 183 { 184 return CommonSharedConstants::BGCODE_PREVIEW_RESIZE_EVENT; 185 } 186 hstring Constants::QoiPreviewResizeEvent() 187 { 188 return CommonSharedConstants::QOI_PREVIEW_RESIZE_EVENT; 189 } 190 hstring Constants::DevFilesPreviewResizeEvent() 191 { 192 return CommonSharedConstants::DEV_FILES_PREVIEW_RESIZE_EVENT; 193 } 194 hstring Constants::MarkdownPreviewResizeEvent() 195 { 196 return CommonSharedConstants::MARKDOWN_PREVIEW_RESIZE_EVENT; 197 } 198 hstring Constants::PdfPreviewResizeEvent() 199 { 200 return CommonSharedConstants::PDF_PREVIEW_RESIZE_EVENT; 201 } 202 hstring Constants::SvgPreviewResizeEvent() 203 { 204 return CommonSharedConstants::SVG_PREVIEW_RESIZE_EVENT; 205 } 206 hstring Constants::ShowHostsSharedEvent() 207 { 208 return CommonSharedConstants::SHOW_HOSTS_EVENT; 209 } 210 hstring Constants::ShowHostsAdminSharedEvent() 211 { 212 return CommonSharedConstants::SHOW_HOSTS_ADMIN_EVENT; 213 } 214 hstring Constants::TerminateHostsSharedEvent() 215 { 216 return CommonSharedConstants::TERMINATE_HOSTS_EVENT; 217 } 218 hstring Constants::CropAndLockThumbnailEvent() 219 { 220 return CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT; 221 } 222 hstring Constants::CropAndLockReparentEvent() 223 { 224 return CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT; 225 } 226 hstring Constants::CropAndLockScreenshotEvent() 227 { 228 return CommonSharedConstants::CROP_AND_LOCK_SCREENSHOT_EVENT; 229 } 230 hstring Constants::ShowEnvironmentVariablesSharedEvent() 231 { 232 return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_EVENT; 233 } 234 hstring Constants::ShowEnvironmentVariablesAdminSharedEvent() 235 { 236 return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT; 237 } 238 hstring Constants::WorkspacesLaunchEditorEvent() 239 { 240 return CommonSharedConstants::WORKSPACES_LAUNCH_EDITOR_EVENT; 241 } 242 hstring Constants::WorkspacesHotkeyEvent() 243 { 244 return CommonSharedConstants::WORKSPACES_HOTKEY_EVENT; 245 } 246 hstring Constants::PowerToysRunnerTerminateSettingsEvent() 247 { 248 return CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT; 249 } 250 hstring Constants::ShowCmdPalEvent() 251 { 252 return CommonSharedConstants::CMDPAL_SHOW_EVENT; 253 } 254 hstring Constants::TogglePowerDisplayEvent() 255 { 256 return CommonSharedConstants::TOGGLE_POWER_DISPLAY_EVENT; 257 } 258 hstring Constants::TerminatePowerDisplayEvent() 259 { 260 return CommonSharedConstants::TERMINATE_POWER_DISPLAY_EVENT; 261 } 262 hstring Constants::RefreshPowerDisplayMonitorsEvent() 263 { 264 return CommonSharedConstants::REFRESH_POWER_DISPLAY_MONITORS_EVENT; 265 } 266 hstring Constants::SettingsUpdatedPowerDisplayEvent() 267 { 268 return CommonSharedConstants::SETTINGS_UPDATED_POWER_DISPLAY_EVENT; 269 } 270 hstring Constants::PowerDisplaySendSettingsTelemetryEvent() 271 { 272 return CommonSharedConstants::POWER_DISPLAY_SEND_SETTINGS_TELEMETRY_EVENT; 273 } 274 hstring Constants::HotkeyUpdatedPowerDisplayEvent() 275 { 276 return CommonSharedConstants::HOTKEY_UPDATED_POWER_DISPLAY_EVENT; 277 } 278 hstring Constants::PowerDisplayToggleMessage() 279 { 280 return CommonSharedConstants::POWER_DISPLAY_TOGGLE_MESSAGE; 281 } 282 hstring Constants::PowerDisplayApplyProfileMessage() 283 { 284 return CommonSharedConstants::POWER_DISPLAY_APPLY_PROFILE_MESSAGE; 285 } 286 hstring Constants::PowerDisplayTerminateAppMessage() 287 { 288 return CommonSharedConstants::POWER_DISPLAY_TERMINATE_APP_MESSAGE; 289 } 290 }