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 #ifndef SFIELDSUM_H 43 #define SFIELDSUM_H 44 45 #include <glib.h> 46 47 #include <extraFunctions/scalarFields.h> 48 49 /** 50 * VisuScalarFieldBinaryOpTypes: 51 * @VISU_OPERATOR_ADDITION: an addition binary operation. 52 * @VISU_OPERATOR_DIFFERENCE: a difference binary operation. 53 * @VISU_OPERATOR_PRODUCT: a multiplication binary operation. 54 * @VISU_OPERATOR_RATIO: a division binary operation. 55 * 56 * Defines the kind of implemented binary operation. 57 * 58 * Since: 3.8 59 */ 60 typedef enum 61 { 62 VISU_OPERATOR_ADDITION, 63 VISU_OPERATOR_DIFFERENCE, 64 VISU_OPERATOR_PRODUCT, 65 VISU_OPERATOR_RATIO 66 } VisuScalarFieldBinaryOpTypes; 67 68 /** 69 * VISU_TYPE_SCALAR_FIELD_BINARY_OP: 70 * 71 * return the type of #VisuScalarFieldBinaryOp. 72 */ 73 #define VISU_TYPE_SCALAR_FIELD_BINARY_OP (visu_scalar_field_binary_op_get_type ()) 74 /** 75 * SCALAR_FIELD_BINARY_OP: 76 * @obj: a #GObject to cast. 77 * 78 * Cast the given @obj into #VisuScalarFieldBinaryOp type. 79 */ 80 #define VISU_SCALAR_FIELD_BINARY_OP(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, VISU_TYPE_SCALAR_FIELD_BINARY_OP, VisuScalarFieldBinaryOp)) 81 /** 82 * VISU_SCALAR_FIELD_BINARY_OP_CLASS: 83 * @klass: a #GObjectClass to cast. 84 * 85 * Cast the given @klass into #VisuScalarFieldBinaryOpClass. 86 */ 87 #define VISU_SCALAR_FIELD_BINARY_OP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, VISU_TYPE_SCALAR_FIELD_BINARY_OP, VisuScalarFieldBinaryOpClass)) 88 /** 89 * VISU_IS_SCALAR_FIELD_BINARY_OP: 90 * @obj: a #GObject to test. 91 * 92 * Test if the given @ogj is of the type of #VisuScalarFieldBinaryOp object. 93 */ 94 #define VISU_IS_SCALAR_FIELD_BINARY_OP(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, VISU_TYPE_SCALAR_FIELD_BINARY_OP)) 95 /** 96 * VISU_IS_SCALAR_FIELD_BINARY_OP_CLASS: 97 * @klass: a #GObjectClass to test. 98 * 99 * Test if the given @klass is of the type of #VisuScalarFieldBinaryOpClass class. 100 */ 101 #define VISU_IS_SCALAR_FIELD_BINARY_OP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, VISU_TYPE_SCALAR_FIELD_BINARY_OP)) 102 /** 103 * VISU_SCALAR_FIELD_BINARY_OP_GET_CLASS: 104 * @obj: a #GObject to get the class of. 105 * 106 * It returns the class of the given @obj. 107 */ 108 #define VISU_SCALAR_FIELD_BINARY_OP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_TYPE_SCALAR_FIELD_BINARY_OP, VisuScalarFieldBinaryOpClass)) 109 110 typedef struct _VisuScalarFieldBinaryOp VisuScalarFieldBinaryOp; 111 typedef struct _VisuScalarFieldBinaryOpPrivate VisuScalarFieldBinaryOpPrivate; 112 typedef struct _VisuScalarFieldBinaryOpClass VisuScalarFieldBinaryOpClass; 113 114 /** 115 * VisuScalarFieldBinaryOp: 116 * 117 * An opaque structure for the scalar field. 118 */ 119 struct _VisuScalarFieldBinaryOp 120 { 121 VisuScalarField parent; 122 123 VisuScalarFieldBinaryOpPrivate *priv; 124 }; 125 126 /** 127 * VisuScalarFieldBinaryOpClass: 128 * @parent: the parent class. 129 * 130 * An opaque structure for the class. 131 */ 132 struct _VisuScalarFieldBinaryOpClass 133 { 134 VisuScalarFieldClass parent; 135 }; 136 137 /** 138 * visu_scalar_field_operator_get_type: 139 * 140 * This method returns the type of #VisuScalarFieldBinaryOp, use VISU_TYPE_SCALAR_FIELD_BINARY_OP instead. 141 * 142 * Returns: the type of #VisuScalarFieldBinaryOp. 143 */ 144 GType visu_scalar_field_binary_op_get_type(void); 145 146 VisuScalarField* visu_scalar_field_binary_op_new(VisuScalarFieldBinaryOpTypes op, 147 VisuScalarField *a, 148 VisuScalarField *b); 149 150 VisuScalarField* visu_scalar_field_binary_op_new_withLeftConst(VisuScalarFieldBinaryOpTypes op, 151 double lValue, 152 VisuScalarField *b); 153 154 VisuScalarField* visu_scalar_field_binary_op_new_withRightConst(VisuScalarFieldBinaryOpTypes op, 155 VisuScalarField *a, 156 double rValue); 157 158 gboolean visu_scalar_field_binary_op_setLeftField(VisuScalarFieldBinaryOp *op, 159 VisuScalarField *field); 160 gboolean visu_scalar_field_binary_op_setRightField(VisuScalarFieldBinaryOp *op, 161 VisuScalarField *field); 162 163 #endif 164