tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Windows11TaskbarPinning.h (1033B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 /**
      7 * This file exists to keep the Windows 11 Taskbar Pinning API
      8 * related code as self-contained as possible.
      9 */
     10 
     11 #ifndef SHELL_WINDOWS11TASKBARPINNING_H__
     12 #define SHELL_WINDOWS11TASKBARPINNING_H__
     13 
     14 #include "nsString.h"
     15 #include <wrl.h>
     16 #include <windows.h>  // for HRESULT
     17 
     18 enum class Win11PinToTaskBarResultStatus {
     19  Failed,
     20  NotCurrentlyAllowed,
     21  AlreadyPinned,
     22  NotPinned,
     23  Success,
     24  NotSupported,
     25 };
     26 
     27 struct Win11PinToTaskBarResult {
     28  HRESULT errorCode;
     29  Win11PinToTaskBarResultStatus result;
     30 };
     31 
     32 Win11PinToTaskBarResult PinCurrentAppToTaskbarWin11(
     33    bool aCheckOnly, const nsAString& aAppUserModelId);
     34 
     35 Win11PinToTaskBarResult IsCurrentAppPinnedToTaskbarWin11(bool aCheckOnly);
     36 
     37 #endif  // SHELL_WINDOWS11TASKBARPINNING_H__