1 /* EXTRAITS DE LA LICENCE 2 Copyright CEA, contributeurs : Luc BILLARD et Damien 3 CALISTE, laboratoire L_Sim, (2001-2005) 4 5 Adresse mèl : 6 BILLARD, non joignable par mèl ; 7 CALISTE, damien P caliste AT cea P fr. 8 9 Ce logiciel est un programme informatique servant à visualiser des 10 structures atomiques dans un rendu pseudo-3D. 11 12 Ce logiciel est régi par la licence CeCILL soumise au droit français et 13 respectant les principes de diffusion des logiciels libres. Vous pouvez 14 utiliser, modifier et/ou redistribuer ce programme sous les conditions 15 de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 16 sur le site "http://www.cecill.info". 17 18 Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 19 pris connaissance de la licence CeCILL, et que vous en avez accepté les 20 termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel). 21 */ 22 23 /* LICENCE SUM UP 24 Copyright CEA, contributors : Luc BILLARD et Damien 25 CALISTE, laboratoire L_Sim, (2001-2005) 26 27 E-mail address: 28 BILLARD, not reachable any more ; 29 CALISTE, damien P caliste AT cea P fr. 30 31 This software is a computer program whose purpose is to visualize atomic 32 configurations in 3D. 33 34 This software is governed by the CeCILL license under French law and 35 abiding by the rules of distribution of free software. You can use, 36 modify and/ or redistribute the software under the terms of the CeCILL 37 license as circulated by CEA, CNRS and INRIA at the following URL 38 "http://www.cecill.info". 39 40 The fact that you are presently reading this means that you have had 41 knowledge of the CeCILL license and that you accept its terms. You can 42 find a copy of this licence shipped with this software at Documentation/licence.en.txt. 43 */ 44 #ifndef VISU_ELEMENTS_H 45 #define VISU_ELEMENTS_H 46 47 #include <glib.h> 48 #include <glib-object.h> 49 50 #include "visu_tools.h" 51 52 G_BEGIN_DECLS 53 54 /** 55 * VISU_TYPE_ELEMENT: 56 * 57 * return the type of #VisuElement. 58 */ 59 #define VISU_TYPE_ELEMENT (visu_element_get_type ()) 60 /** 61 * VISU_ELEMENT: 62 * @obj: a #GObject to cast. 63 * 64 * Cast the given @obj into #VisuElement type. 65 */ 66 #define VISU_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, VISU_TYPE_ELEMENT, VisuElement)) 67 /** 68 * VISU_ELEMENT_CLASS: 69 * @klass: a #GObjectClass to cast. 70 * 71 * Cast the given @klass into #VisuElementClass. 72 */ 73 #define VISU_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, VISU_TYPE_ELEMENT, VisuElementClass)) 74 /** 75 * VISU_IS_ELEMENT: 76 * @obj: a #GObject to test. 77 * 78 * Test if the given @ogj is of the type of #VisuElement object. 79 */ 80 #define VISU_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, VISU_TYPE_ELEMENT)) 81 /** 82 * VISU_IS_ELEMENT_CLASS: 83 * @klass: a #GObjectClass to test. 84 * 85 * Test if the given @klass is of the type of #VisuElementClass class. 86 */ 87 #define VISU_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, VISU_TYPE_ELEMENT)) 88 /** 89 * VISU_ELEMENT_GET_CLASS: 90 * @obj: a #GObject to get the class of. 91 * 92 * It returns the class of the given @obj. 93 */ 94 #define VISU_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_TYPE_ELEMENT, VisuElementClass)) 95 96 typedef struct _VisuElementClass VisuElementClass; 97 typedef struct _VisuElement VisuElement; 98 99 /** 100 * visu_element_get_type: 101 * 102 * This method returns the type of #VisuElement, use VISU_TYPE_ELEMENT instead. 103 * 104 * Returns: the type of #VisuElement. 105 */ 106 GType visu_element_get_type(void); 107 108 struct _VisuElementClass 109 { 110 VisuObjectClass parent; 111 }; 112 113 struct _VisuElement 114 { 115 VisuObject parent; 116 117 /* Name of the key used in the hashtable to find 118 this element. The int variable is the number 119 of this type. */ 120 char* name; 121 /* An integer unique for each VisuElement, it is 122 used as a name for the opengl material associated 123 with it. */ 124 int typeNumber; 125 126 /* If the element should appear in the display list of elements or 127 if this element is an internal substitute. */ 128 gboolean physical; 129 130 gboolean _rendered, _maskable, _colorizable; 131 }; 132 133 const GList *visu_element_getAllElements(void); 134 VisuElement *visu_element_retrieveFromName(const gchar *name, gboolean *nw); 135 VisuElement *visu_element_lookup(const gchar *name); 136 137 VisuElement *visu_element_new(const char *key); 138 139 gboolean visu_element_getRendered(const VisuElement *self); 140 gboolean visu_element_setRendered(VisuElement *self, gboolean val); 141 142 gboolean visu_element_getMaskable(const VisuElement *self); 143 gboolean visu_element_setMaskable(VisuElement *self, gboolean val); 144 145 gboolean visu_element_getColorizable(const VisuElement *self); 146 gboolean visu_element_setColorizable(VisuElement *self, gboolean val); 147 148 149 const gchar* visu_element_getName(const VisuElement *ele); 150 gboolean visu_element_getPhysical(VisuElement *ele); 151 152 void visu_element_pool_finalize(void); 153 154 G_END_DECLS 155 156 #endif 157