File indexing completed on 2024-06-02 05:19:14
0001 /* 0002 * desktop.h - desktop functions 0003 * Program: kalarm 0004 * SPDX-FileCopyrightText: 2008-2023 David Jarvie <djarvie@kde.org> 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <QRect> 0012 class QWidget; 0013 0014 namespace Desktop 0015 { 0016 0017 /** Desktop identity, obtained from XDG_CURRENT_DESKTOP. */ 0018 enum class Type 0019 { 0020 Kde, //!< KDE (KDE 4 and Plasma both identify as "KDE") 0021 Unity, //!< Unity 0022 Other 0023 }; 0024 0025 Type currentIdentity(); 0026 QString currentIdentityName(); 0027 0028 QRect workArea(int screen = -1); 0029 0030 /** Return the top level application window, for use as parent for dialogues etc. */ 0031 QWidget* mainWindow(); 0032 0033 /** Set the function to return the parent window for prompt and information messages. */ 0034 void setMainWindowFunc(QWidget* (*func)()); 0035 0036 } // namespace Desktop 0037 0038 // vim: et sw=4: