AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ADesktop.h
1/*
2 * AUI Framework - Declarative UI toolkit for modern C++20
3 * Copyright (C) 2020-2024 Alex2772 and Contributors
4 *
5 * SPDX-License-Identifier: MPL-2.0
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 */
11
12#pragma once
13
14#include "AUI/Views.h"
15#include <glm/glm.hpp>
16#include <AUI/IO/APath.h>
17#include <AUI/Thread/AFuture.h>
18#include <AUI/Image/IDrawable.h>
19
20class ACursor;
21
22class AWindowBase;
23
24
31namespace ADesktop
32{
34 AString name;
35 AString extension;
36 };
37
38 API_AUI_VIEWS glm::ivec2 getMousePosition();
39 API_AUI_VIEWS void setMousePos(const glm::ivec2& pos);
40
41
42 enum class SystemSound
43 {
44 QUESTION,
45 ASTERISK
46 };
47
51 API_AUI_VIEWS void playSystemSound(ADesktop::SystemSound s);
52
63 API_AUI_VIEWS AFuture<APath> browseForDir(AWindowBase* parent,
64 const APath& startingLocation = {});
65
77 API_AUI_VIEWS AFuture<APath> browseForFile(AWindowBase* parent,
78 const APath& startingLocation = {},
79 const AVector<FileExtension>& extensions = { {"All", "*"} });
80
81 API_AUI_VIEWS _<IDrawable> iconOfFile(const APath& file);
82}
Represents cursor type.
Definition: ACursor.h:27
Represents a value that will be available at some point in the future.
Definition: AFuture.h:620
An add-on to AString with functions for working with the path.
Definition: APath.h:106
Represents a Unicode character string.
Definition: AString.h:37
A std::vector with AUI extensions.
Definition: AVector.h:38
Definition: AWindowBase.h:33
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Desktop-specific functions.
Definition: ADesktop.h:32
API_AUI_VIEWS AFuture< APath > browseForDir(AWindowBase *parent, const APath &startingLocation={})
Opens native browse for directory dialog.
Definition: ADesktopImpl.cpp:23
API_AUI_VIEWS AFuture< APath > browseForFile(AWindowBase *parent, const APath &startingLocation={}, const AVector< FileExtension > &extensions={ {"All", "*"} })
Opens native browse for file dialog.
Definition: ADesktopImpl.cpp:31
API_AUI_VIEWS void playSystemSound(ADesktop::SystemSound s)
Play system sound asynchronously.
Definition: ADesktopImpl.cpp:44
Definition: ADesktop.h:33