AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ADesktop.h
    1/*
    2 * AUI Framework - Declarative UI toolkit for modern C++20
    3 * Copyright (C) 2020-2025 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
   30namespace ADesktop {
   31
   33    AString name;
   34    AString extension;
   35};
   36
   37API_AUI_VIEWS glm::ivec2 getMousePosition();
   38API_AUI_VIEWS void setMousePos(const glm::ivec2& pos);
   39
   40enum class SystemSound { QUESTION, ASTERISK };
   41
   45API_AUI_VIEWS void playSystemSound(ADesktop::SystemSound s);
   46
   57API_AUI_VIEWS AFuture<APath> browseForDir(AWindowBase* parent, const APath& startingLocation = {});
   58
   71    AWindowBase* parent, const APath& startingLocation = {},
   72    const AVector<FileExtension>& extensions = { { "All", "*" } });
   73
   74API_AUI_VIEWS _<IDrawable> iconOfFile(const APath& file);
   75}   // namespace ADesktop
Represents cursor type.
Definition ACursor.h:26
Represents a value that will be available at some point in the future.
Definition AFuture.h:621
An add-on to AString with functions for working with the path.
Definition APath.h:128
Represents a Unicode character string.
Definition AString.h:38
A std::vector with AUI extensions.
Definition AVector.h:39
Definition AWindowBase.h:33
Desktop-specific functions.
Definition ADesktop.h:30
API_AUI_VIEWS AFuture< APath > browseForDir(AWindowBase *parent, const APath &startingLocation={})
Opens native browse for directory dialog.
API_AUI_VIEWS AFuture< APath > browseForFile(AWindowBase *parent, const APath &startingLocation={}, const AVector< FileExtension > &extensions={ { "All", "*" } })
Opens native browse for file dialog.
API_AUI_VIEWS void playSystemSound(ADesktop::SystemSound s)
Play system sound asynchronously.
Definition ADesktop.h:32