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 GTK_COLORCOMBOBOXWIDGET_H
45 #define GTK_COLORCOMBOBOXWIDGET_H
46 
47 #include <glib.h>
48 #include <glib-object.h>
49 
50 #include <gtk/gtk.h>
51 
52 #include <visu_gtk.h>
53 #include <openGLFunctions/light.h>
54 
55 G_BEGIN_DECLS
56 /**
57  * VISU_TYPE_UI_COLOR_COMBOBOX:
58  *
59  * Return the associated #GType to the VisuUiColorCombobox objects.
60  *
61  * Since: 3.1
62  */
63 #define VISU_TYPE_UI_COLOR_COMBOBOX         (visu_ui_color_combobox_get_type ())
64 /**
65  * VISU_UI_COLOR_COMBOBOX:
66  * @obj: the widget to cast.
67  *
68  * Cast the given object to a #VisuUiColorCombobox object.
69  *
70  * Since: 3.1
71  */
72 #define VISU_UI_COLOR_COMBOBOX(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISU_TYPE_UI_COLOR_COMBOBOX, VisuUiColorCombobox))
73 /**
74  * VISU_UI_COLOR_COMBOBOX_CLASS:
75  * @klass: the class to cast.
76  *
77  * Cast the given class to a #VisuUiColorComboboxClass object.
78  *
79  * Since: 3.1
80  */
81 #define VISU_UI_COLOR_COMBOBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VISU_TYPE_UI_COLOR_COMBOBOX, VisuUiColorComboboxClass))
82 /**
83  * VISU_IS_UI_COLOR_COMBOBOX:
84  * @obj: the object to test.
85  *
86  * Return if the given object is a valid #VisuUiColorCombobox object.
87  *
88  * Since: 3.1
89  */
90 #define VISU_IS_UI_COLOR_COMBOBOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISU_TYPE_UI_COLOR_COMBOBOX))
91 /**
92  * VISU_IS_UI_COLOR_COMBOBOX_CLASS:
93  * @klass: the class to test.
94  *
95  * Return if the given class is a valid #VisuUiColorComboboxClass class.
96  *
97  * Since: 3.1
98  */
99 #define VISU_IS_UI_COLOR_COMBOBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISU_TYPE_UI_COLOR_COMBOBOX))
100 /**
101  * VISU_UI_COLOR_COMBOBOX_GET_CLASS:
102  * @obj: a #GObject to get the class of.
103  *
104  * It returns the class of the given @obj.
105  */
106 #define VISU_UI_COLOR_COMBOBOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_TYPE_UI_COLOR_COMBOBOX, VisuUiColorComboboxClass))
107 
108 typedef struct _VisuUiColorCombobox VisuUiColorCombobox;
109 typedef struct _VisuUiColorComboboxClass VisuUiColorComboboxClass;
110 
111 GType visu_ui_color_combobox_get_type(void);
112 GtkWidget* visu_ui_color_combobox_new(gboolean hasAlphaChannel);
113 GtkWidget* visu_ui_color_combobox_newWithRanges(gboolean hasAlphaChannel);
114 
115 gboolean visu_ui_color_combobox_setSelection(VisuUiColorCombobox* colorComboBox, ToolColor *color);
116 void visu_ui_color_combobox_setRangeColor(VisuUiColorCombobox *colorComboBox,
117                                           const float rgba[4],
118                                           gboolean raiseSignal);
119 void visu_ui_color_combobox_setRangeMaterial(VisuUiColorCombobox *colorComboBox,
120                                              const float material[TOOL_MATERIAL_N_VALUES],
121                                              gboolean raiseSignal);
122 const ToolColor* visu_ui_color_combobox_getSelection(VisuUiColorCombobox *colorComboBox);
123 GdkPixbuf* visu_ui_color_combobox_getPixbufFromColor(VisuUiColorCombobox *colorComboBox,
124                                                      ToolColor *color);
125 float* visu_ui_color_combobox_getRangeMaterial(VisuUiColorCombobox *colorComboBox);
126 float* visu_ui_color_combobox_getRangeColor(VisuUiColorCombobox *colorComboBox);
127 
128 void visu_ui_color_combobox_setExpanded(VisuUiColorCombobox *colorComboBox, gboolean value);
129 GtkWidget* visu_ui_color_combobox_getRangeWidgets(VisuUiColorCombobox *colorComboBox);
130 void visu_ui_color_combobox_setPrintValues(VisuUiColorCombobox *colorComboBox, gboolean value);
131 
132 G_END_DECLS
133 
134 #endif
135