/* Chrysalide - Outil d'analyse de fichiers binaires
 * bufferline-int.h - prototypes pour la définition interne d'une représentation de fragments de texte en ligne
 *
 * Copyright (C) 2024 Cyrille Bagard
 *
 *  This file is part of Chrysalide.
 *
 *  Chrysalide is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Chrysalide 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef _GLIBEXT_BUFFERLINE_INT_H
#define _GLIBEXT_BUFFERLINE_INT_H


#include "bufferline.h"
#include "linecolumn.h"



#if 0
/* Mémorisation des origines de texte */
typedef struct _content_origin
{
    col_coord_t coord;                      /* Localisation d'attachement  */

    GObject *creator;                       /* Origine de la création      */

} content_origin;
#endif


/* Représentation de fragments de texte en ligne (instance) */
struct _GBufferLine
{
    GObject parent;                         /* A laisser en premier        */

    line_column_t *columns;                 /* Répartition du texte        */
    size_t col_count;                       /* Nombre de colonnes présentes*/
    size_t merge_start;                     /* Début de la zone globale    */

    BufferLineFlags flags;                  /* Drapeaux particuliers       */

#if 0

    content_origin *origins;                /* Mémorisation des origines   */
    size_t ocount;                          /* Nombre de ces mémorisations */

#endif

};

/* Représentation de fragments de texte en ligne (classe) */
struct _GBufferLineClass
{
    GObjectClass parent;                    /* A laisser en premier        */

#if 0

#ifdef INCLUDE_GTK_SUPPORT
    cairo_surface_t *entrypoint_img;        /* Image pour les entrées      */
    cairo_surface_t *bookmark_img;          /* Image pour les signets      */
#endif

    /* Signaux */

    void (* content_changed) (GBufferLine *, line_segment *);

    void (* flip_flag) (GBufferLine *, BufferLineFlags, BufferLineFlags);

#endif

};



/* Met en place une nouvelle représentation de bribes de texte. */
bool g_buffer_line_create(GBufferLine *, size_t);



#endif  /* _GLIBEXT_BUFFERLINE_INT_H */