| 1 | /* |
| 2 | * Copyright 2021 Marius Gripsgard <[email protected]> |
| 3 | * Copyright 2021-2023 Robert Tari <[email protected]> |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 3, as published |
| 7 | * by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 11 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 12 | * PURPOSE. See the GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along |
| 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | #include <glib.h> |
| 22 | #include <glib-object.h> |
| 23 | #include <gio/gio.h> |
| 24 | |
| 25 | static const char * const DESKTOP_LOMIRI = "Lomiri"; |
| 26 | static const char * const DESKTOP_UBUNTUTOUCH = NULL; |
| 27 | static const char * const DESKTOP_UNITY = "Unity"; |
| 28 | static const char * const DESKTOP_MATE = "MATE"; |
| 29 | static const char * const DESKTOP_GNOME = "GNOME"; |
| 30 | static const char * const DESKTOP_XFCE = "XFCE"; |
| 31 | static const char * const DESKTOP_PANTHEON = "PANTHEON"; |
| 32 | static const char * const DESKTOP_BUDGIE = "Budgie"; |
| 33 | static const char * const SESSION_LOMIRI = "lomiri"; |
| 34 | static const char * const SESSION_UBUNTUTOUCH = "ubuntu-touch"; |
| 35 | static const char * const SESSION_UNITY = NULL; |
| 36 | static const char * const SESSION_MATE = "mate"; |
| 37 | static const char * const SESSION_GNOME = "gnome"; |
| 38 | static const char * const SESSION_XFCE = "xfce"; |
| 39 | static const char * const SESSION_PANTHEON = NULL; |
| 40 | static const char * const SESSION_BUDGIE = "budgie-desktop"; |
| 41 | |
| 42 | gboolean ayatana_common_utils_is_lomiri(); |
| 43 | gboolean ayatana_common_utils_is_ubuntutouch(); |
| 44 | gboolean ayatana_common_utils_is_unity(); |
| 45 | gboolean ayatana_common_utils_is_gnome(); |
| 46 | gboolean ayatana_common_utils_is_mate(); |
| 47 | gboolean ayatana_common_utils_is_xfce(); |
| 48 | gboolean ayatana_common_utils_is_pantheon(); |
| 49 | gboolean ayatana_common_utils_is_budgie(); |
| 50 | |
| 51 | gboolean ayatana_common_utils_have_unity_program (const gchar *program); |
| 52 | gboolean ayatana_common_utils_have_gnome_program (const gchar *program); |
| 53 | gboolean ayatana_common_utils_have_mate_program (const gchar *program); |
| 54 | gboolean ayatana_common_utils_have_xfce_program (const gchar *program); |
| 55 | gboolean ayatana_common_utils_have_pantheon_program (const gchar *program); |
| 56 | gboolean ayatana_common_utils_have_budgie_program (const gchar *program); |
| 57 | |
| 58 | gboolean ayatana_common_utils_execute_command(const gchar * cmd); |
| 59 | gboolean ayatana_common_utils_open_url(const gchar * url); |
| 60 | gboolean ayatana_common_utils_have_program(const gchar * program); |
| 61 | gboolean ayatana_common_utils_zenity_warning(const char *icon_name, const char *title, const char *text); |
| 62 | void ayatana_common_utils_ellipsize(char *sText); |
| 63 | gboolean ayatana_common_utils_execute_command_warn (const gchar *sProgram, const gchar *sArgs); |
| 64 | gboolean ayatana_common_utils_zenity_question (const gchar *sIcon, const gchar *sTitle, const gchar *sText, const gchar *sOk, const gchar *sCancel); |