diff options
Diffstat (limited to 'src/glibext/options.h')
-rw-r--r-- | src/glibext/options.h | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/glibext/options.h b/src/glibext/options.h index 1a30e81..3d2db97 100644 --- a/src/glibext/options.h +++ b/src/glibext/options.h @@ -2,7 +2,7 @@ /* Chrysalide - Outil d'analyse de fichiers binaires * gdisplayoptions.h - prototypes pour les options de rendus des lignes de code * - * Copyright (C) 2018 Cyrille Bagard + * Copyright (C) 2018-2024 Cyrille Bagard * * This file is part of Chrysalide. * @@ -21,45 +21,28 @@ */ -#ifndef _GLIBEXT_GDISPLAYOPTIONS_H -#define _GLIBEXT_GDISPLAYOPTIONS_H +#ifndef _GLIBEXT_OPTIONS_H +#define _GLIBEXT_OPTIONS_H -#include <glib-object.h> #include <stdbool.h> +#include "helpers.h" -#define G_TYPE_DISPLAY_OPTIONS g_display_options_get_type() -#define G_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_DISPLAY_OPTIONS, GDisplayOptions)) -#define G_IS_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_DISPLAY_OPTIONS)) -#define G_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DISPLAY_OPTIONS, GDisplayOptionsClass)) -#define G_IS_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DISPLAY_OPTIONS)) -#define G_DISPLAY_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DISPLAY_OPTIONS, GDisplayOptionsClass)) -/* Options de représentation (instance) */ -typedef struct _GDisplayOptions GDisplayOptions; +#define G_TYPE_DISPLAY_OPTIONS (g_display_options_get_type()) -/* Options de représentation (classe) */ -typedef struct _GDisplayOptionsClass GDisplayOptionsClass; +DECLARE_GTYPE(GDisplayOptions, g_display_options, G, DISPLAY_OPTIONS); -/* Indique le type défini pour des options de représentation. */ -GType g_display_options_get_type(void); - -/* Crée un groupe d'options pour le rendu des lignes. */ -GDisplayOptions *g_display_options_new(void); - /* Copie un groupe d'options pour le rendu des lignes. */ GDisplayOptions *g_display_options_dup(const GDisplayOptions *); /* Dénombre la quantité d'options représentées. */ size_t g_display_options_count(const GDisplayOptions *); -/* Ajoute une nouvelle option à l'ensemble. */ -void g_display_options_add(GDisplayOptions *, const char *, bool); - /* Fournit la désignation d'une option donnée. */ const char *g_display_options_get_name(const GDisplayOptions *, size_t); @@ -71,4 +54,4 @@ void g_display_options_set(GDisplayOptions *, size_t, bool); -#endif /* _GLIBEXT_GDISPLAYOPTIONS_H */ +#endif /* _GLIBEXT_OPTIONS_H */ |