diff options
author | Corentin Noël <corentin.noel@collabora.com> | 2022-05-10 16:08:39 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2022-08-07 20:32:12 +0000 |
commit | 46d67a18ba3e64297f95f7a900eeb9da24afd452 (patch) | |
tree | 6bea618a7022edc1210247344f0dba9c5bfd54e7 /gcr/gcr-certificate-section.h | |
parent | e934b5bb7642023b5a880a71e00997fccc12a262 (diff) | |
download | gcr-46d67a18ba3e64297f95f7a900eeb9da24afd452.tar.gz |
gcr: Add GcrCertificateSection/Field
Allows to use the same code-path for both GTK3 and GTK4.
Also allow any library-user to reimplement it with the toolkit of its choice or
to adapt it when a different styling is required (e.g. with libadwaita).
Diffstat (limited to 'gcr/gcr-certificate-section.h')
-rw-r--r-- | gcr/gcr-certificate-section.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcr/gcr-certificate-section.h b/gcr/gcr-certificate-section.h new file mode 100644 index 0000000..92267fc --- /dev/null +++ b/gcr/gcr-certificate-section.h @@ -0,0 +1,36 @@ +/* + * Copyright 2022 Collabora Ltd. + * Copyright Corentin Noël <corentin.noel@collabora.com> + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef __GCR_CERTIFICATE_SECTION_H__ +#define __GCR_CERTIFICATE_SECTION_H__ + +#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION) +#error "Only <gcr/gcr.h> can be included directly." +#endif + +#include <gcr/gcr-enum-types.h> + +#include <glib-object.h> +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define GCR_TYPE_CERTIFICATE_SECTION (gcr_certificate_section_get_type()) + +G_DECLARE_FINAL_TYPE (GcrCertificateSection, gcr_certificate_section, GCR, CERTIFICATE_SECTION, GObject) + +typedef enum { + GCR_CERTIFICATE_SECTION_NONE = 0, + GCR_CERTIFICATE_SECTION_IMPORTANT = 1 << 0, +} GcrCertificateSectionFlags; + +const char *gcr_certificate_section_get_label (GcrCertificateSection *self); +GListModel *gcr_certificate_section_get_fields (GcrCertificateSection *self); +GcrCertificateSectionFlags gcr_certificate_section_get_flags (GcrCertificateSection *self); + +G_END_DECLS + +#endif /* __GCR_CERTIFICATE_SECTION_H__ */ |