| // Copyright (c) 2019-2023, QuantStack and Mamba Contributors | |
| // | |
| // Distributed under the terms of the BSD 3-Clause License. | |
| // | |
| // The full license is in the file LICENSE, distributed with this software. | |
| namespace mamba | |
| { | |
| // Intention is to avoid including `Windows.h`, while still using the basic Windows API types. | |
| using DWORD = unsigned long; | |
| bool is_admin(); | |
| fs::u8path get_self_exe_path(); | |
| fs::u8path get_libmamba_path(); | |
| using PID = | |
| DWORD | |
| int | |
| ; | |
| std::string get_process_name_by_pid(const PID pid); | |
| PID getppid(); | |
| void run_as_admin(const std::string& args); | |
| bool enable_long_paths_support(bool force, Palette palette = Palette::no_color()); | |
| void init_console(); | |
| void reset_console(); | |
| /* Test whether a given `std::ostream` object refers to a terminal. */ | |
| bool is_atty(const std::ostream& stream); | |
| struct ConsoleFeatures | |
| { | |
| bool virtual_terminal_processing, true_colors; | |
| }; | |
| ConsoleFeatures get_console_features(); | |
| int get_console_width(); | |
| int get_console_height(); | |
| void codesign(const fs::u8path& path, bool verbose = false); | |
| } | |