[gnome-panel/wip/muktupavels/api: 1/7] libgnome-panel: add GpLockdownFlags
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/muktupavels/api: 1/7] libgnome-panel: add GpLockdownFlags
- Date: Tue, 14 Apr 2020 22:18:59 +0000 (UTC)
commit e31cb41a53bcea42d5fef5f8b8578587e250417d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Apr 14 15:25:39 2020 +0300
libgnome-panel: add GpLockdownFlags
.../libgnome-panel/libgnome-panel-docs.xml | 1 +
libgnome-panel/Makefile.am | 4 ++
libgnome-panel/gp-lockdown.c | 28 +++++++++++
libgnome-panel/gp-lockdown.h | 54 ++++++++++++++++++++++
4 files changed, 87 insertions(+)
---
diff --git a/docs/reference/libgnome-panel/libgnome-panel-docs.xml
b/docs/reference/libgnome-panel/libgnome-panel-docs.xml
index 59b196779..e0f87f1a1 100644
--- a/docs/reference/libgnome-panel/libgnome-panel-docs.xml
+++ b/docs/reference/libgnome-panel/libgnome-panel-docs.xml
@@ -21,6 +21,7 @@
<xi:include href="xml/gp-applet.xml"/>
<xi:include href="xml/gp-applet-info.xml"/>
<xi:include href="xml/gp-image-menu-item.xml"/>
+ <xi:include href="xml/gp-lockdown.xml"/>
<xi:include href="xml/gp-module.xml"/>
</chapter>
diff --git a/libgnome-panel/Makefile.am b/libgnome-panel/Makefile.am
index 386b5a108..87e19cbcb 100644
--- a/libgnome-panel/Makefile.am
+++ b/libgnome-panel/Makefile.am
@@ -17,6 +17,8 @@ libgnome_panel_la_SOURCES = \
gp-initial-setup-dialog-private.h \
gp-initial-setup-dialog.c \
gp-initial-setup-dialog.h \
+ gp-lockdown.c \
+ gp-lockdown.h \
gp-module-private.h \
gp-module.c \
gp-module.h \
@@ -56,12 +58,14 @@ libgnome_panel_include_HEADERS = \
gp-enum-types.h \
gp-image-menu-item.h \
gp-initial-setup-dialog.h \
+ gp-lockdown.h \
gp-module.h \
gp-utils.h \
$(NULL)
ENUM_TYPES = \
$(srcdir)/gp-applet.h \
+ gp-lockdown.h \
$(NULL)
gp-enum-types.c: gp-enum-types.c.in gp-enum-types.h $(ENUM_TYPES)
diff --git a/libgnome-panel/gp-lockdown.c b/libgnome-panel/gp-lockdown.c
new file mode 100644
index 000000000..a5333ab37
--- /dev/null
+++ b/libgnome-panel/gp-lockdown.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 Alberts Muktupāvels
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include "gp-lockdown.h"
+
+/**
+ * SECTION: gp-lockdown
+ * @title: GpLockdown
+ * @short_description: lockdown enum
+ * @include: libgnome-panel/gp-lockdown.h
+ *
+ * A #GpLockdownFlags.
+ */
diff --git a/libgnome-panel/gp-lockdown.h b/libgnome-panel/gp-lockdown.h
new file mode 100644
index 000000000..e9e852057
--- /dev/null
+++ b/libgnome-panel/gp-lockdown.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2020 Alberts Muktupāvels
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef GP_LOCKDOWN_H
+#define GP_LOCKDOWN_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GpLockdownFlags:
+ * @GP_LOCKDOWN_FLAGS_NONE: No flags set.
+ * @GP_LOCKDOWN_FLAGS_APPLET: Applet is disabled.
+ * @GP_LOCKDOWN_FLAGS_FORCE_QUIT: Force quit is disabled.
+ * @GP_LOCKDOWN_FLAGS_LOCKED_DOWN: Panel is lockded down.
+ * @GP_LOCKDOWN_FLAGS_COMMAND_LINE: Command line is disabled.
+ * @GP_LOCKDOWN_FLAGS_LOCK_SCREEN: Lock screen is disabled.
+ * @GP_LOCKDOWN_FLAGS_LOG_OUT: Log out is disabled.
+ * @GP_LOCKDOWN_FLAGS_USER_SWITCHING: User switching is disabled.
+ *
+ * Flags indicating active lockdowns.
+ */
+typedef enum
+{
+ GP_LOCKDOWN_FLAGS_NONE = 0,
+
+ GP_LOCKDOWN_FLAGS_APPLET = 1 << 0,
+ GP_LOCKDOWN_FLAGS_FORCE_QUIT = 1 << 1,
+ GP_LOCKDOWN_FLAGS_LOCKED_DOWN = 1 << 2,
+
+ GP_LOCKDOWN_FLAGS_COMMAND_LINE = 1 << 3,
+ GP_LOCKDOWN_FLAGS_LOCK_SCREEN = 1 << 4,
+ GP_LOCKDOWN_FLAGS_LOG_OUT = 1 << 5,
+ GP_LOCKDOWN_FLAGS_USER_SWITCHING = 1 << 6
+} GpLockdownFlags;
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]