1 /* EXTRAITS DE LA LICENCE 2 Copyright CEA, contributeurs : Damien 3 CALISTE, laboratoire L_Sim, (2017) 4 5 Adresses mèl : 6 CALISTE, damien P caliste AT cea P fr. 7 8 Ce logiciel est un programme informatique servant à visualiser des 9 structures atomiques dans un rendu pseudo-3D. 10 11 Ce logiciel est régi par la licence CeCILL soumise au droit français et 12 respectant les principes de diffusion des logiciels libres. Vous pouvez 13 utiliser, modifier et/ou redistribuer ce programme sous les conditions 14 de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 15 sur le site "http://www.cecill.info". 16 17 Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 18 pris connaissance de la licence CeCILL, et que vous en avez accepté les 19 termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel). 20 */ 21 22 /* LICENCE SUM UP 23 Copyright CEA, contributors : Damien 24 CALISTE, laboratoire L_Sim, (2017) 25 26 E-mail addresses : 27 CALISTE, damien P caliste AT cea P fr. 28 29 This software is a computer program whose purpose is to visualize atomic 30 configurations in 3D. 31 32 This software is governed by the CeCILL license under French law and 33 abiding by the rules of distribution of free software. You can use, 34 modify and/ or redistribute the software under the terms of the CeCILL 35 license as circulated by CEA, CNRS and INRIA at the following URL 36 "http://www.cecill.info". 37 38 The fact that you are presently reading this means that you have had 39 knowledge of the CeCILL license and that you accept its terms. You can 40 find a copy of this licence shipped with this software at Documentation/licence.en.txt. 41 */ 42 43 #ifndef TOOLFILES_H 44 #define TOOLFILES_H 45 46 #include <glib-object.h> 47 48 #include "visu_tools.h" 49 50 /** 51 * TOOL_TYPE_FILES: 52 * 53 * return the type of #ToolFiles. 54 */ 55 #define TOOL_TYPE_FILES (tool_files_get_type ()) 56 /** 57 * FILES: 58 * @obj: a #GObject to cast. 59 * 60 * Cast the given @obj into #ToolFiles type. 61 */ 62 #define TOOL_FILES(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, TOOL_TYPE_FILES, ToolFiles)) 63 /** 64 * TOOL_FILES_CLASS: 65 * @klass: a #GObjectClass to cast. 66 * 67 * Cast the given @klass into #ToolFilesClass. 68 */ 69 #define TOOL_FILES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, TOOL_TYPE_FILES, ToolFilesClass)) 70 /** 71 * TOOL_IS_FILES: 72 * @obj: a #GObject to test. 73 * 74 * Test if the given @ogj is of the type of #ToolFiles object. 75 */ 76 #define TOOL_IS_FILES(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, TOOL_TYPE_FILES)) 77 /** 78 * TOOL_IS_FILES_CLASS: 79 * @klass: a #GObjectClass to test. 80 * 81 * Test if the given @klass is of the type of #ToolFilesClass class. 82 */ 83 #define TOOL_IS_FILES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, TOOL_TYPE_FILES)) 84 /** 85 * TOOL_FILES_GET_CLASS: 86 * @obj: a #GObject to get the class of. 87 * 88 * It returns the class of the given @obj. 89 */ 90 #define TOOL_FILES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, TOOL_TYPE_FILES, ToolFilesClass)) 91 92 typedef struct _ToolFiles ToolFiles; 93 typedef struct _ToolFilesPrivate ToolFilesPrivate; 94 typedef struct _ToolFilesClass ToolFilesClass; 95 96 /** 97 * ToolFiles: 98 * 99 * An opaque structure for the scalar field. 100 */ 101 struct _ToolFiles 102 { 103 VisuObject parent; 104 105 ToolFilesPrivate *priv; 106 }; 107 108 /** 109 * ToolFilesClass: 110 * @parent: the parent class. 111 * 112 * An opaque structure for the class. 113 */ 114 struct _ToolFilesClass 115 { 116 VisuObjectClass parent; 117 }; 118 119 /** 120 * tool_scalar_field_operator_get_type: 121 * 122 * This method returns the type of #ToolFiles, use TOOL_TYPE_FILES instead. 123 * 124 * Returns: the type of #ToolFiles. 125 */ 126 GType tool_files_get_type(void); 127 128 ToolFiles* tool_files_new(); 129 130 gboolean tool_files_open(ToolFiles *file, const gchar *filename, GError **error); 131 void tool_files_fromMemory(ToolFiles *file, const gchar *data); 132 void tool_files_setEncoding(ToolFiles *file, const gchar *encoding); 133 134 GIOStatus tool_files_read(ToolFiles *file, void *buffer, gsize count, GError **error); 135 GIOStatus tool_files_skip(ToolFiles *file, gsize count, GError **error); 136 GIOStatus tool_files_read_line_string(ToolFiles *file, GString *buffer, 137 gsize *terminator_pos, GError **error); 138 139 gboolean tool_files_atEnd(ToolFiles *file); 140 GIOStatus tool_files_rewind(ToolFiles *file, GError **error); 141 142 #endif 143