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_STIPPLECOMBOBOXWIDGET_H
45 #define GTK_STIPPLECOMBOBOXWIDGET_H
46 
47 #include <glib.h>
48 #include <glib-object.h>
49 
50 #include <gtk/gtk.h>
51 
52 G_BEGIN_DECLS
53 /**
54  * VISU_TYPE_UI_VALUE_IO:
55  *
56  * Get the associated #GType to the VisuUiValueIo objects.
57  *
58  * Since: 3.5
59  */
60 #define VISU_TYPE_UI_VALUE_IO         (visu_ui_value_io_get_type ())
61 /**
62  * VISU_UI_VALUE_IO:
63  * @obj: the widget to cast.
64  *
65  * Cast the given object to a #VisuUiValueIo object.
66  *
67  * Since: 3.5
68  */
69 #define VISU_UI_VALUE_IO(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISU_TYPE_UI_VALUE_IO, VisuUiValueIo))
70 /**
71  * VISU_UI_VALUE_IO_CLASS:
72  * @klass: the class to cast.
73  *
74  * Cast the given class to a #VisuUiValueIoClass object.
75  *
76  * Since: 3.5
77  */
78 #define VISU_UI_VALUE_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VISU_TYPE_UI_VALUE_IO, VisuUiValueIoClass))
79 /**
80  * VISU_IS_UI_VALUE_IO:
81  * @obj: the object to test.
82  *
83  * Get if the given object is a valid #VisuUiValueIo object.
84  *
85  * Since: 3.5
86  */
87 #define VISU_IS_UI_VALUE_IO(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISU_TYPE_UI_VALUE_IO))
88 /**
89  * VISU_IS_UI_VALUE_IO_CLASS:
90  * @klass: the class to test.
91  *
92  * Get if the given class is a valid #VisuUiValueIoClass class.
93  *
94  * Since: 3.5
95  */
96 #define VISU_IS_UI_VALUE_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISU_TYPE_UI_VALUE_IO))
97 
98 typedef struct _VisuUiValueIo VisuUiValueIo;
99 typedef struct _VisuUiValueIoClass VisuUiValueIoClass;
100 
101 GType visu_ui_value_io_get_type(void);
102 GtkWidget* visu_ui_value_io_new(GtkWindow *parent, const gchar*tipsOpen,
103 		      const gchar*tipsSave, const gchar*tipsSaveAs);
104 
105 /**
106  * VisuUiValueIoCallback:
107  * @filename: the name of the file to be saved or opened ;
108  * @error: a location to store a possible error.
109  *
110  * Prototypes of functions to be called when an IO file is saved or
111  * opened, see visu_ui_value_io_connectOnOpen() and visu_ui_value_io_connectOnSave().
112  *
113  * Returns: should return TRUE if the action of the callback succeed.
114  */
115 typedef gboolean (*VisuUiValueIoCallback)(const gchar *filename, GError **error);
116 
117 void visu_ui_value_io_connectOnOpen(VisuUiValueIo *valueio, VisuUiValueIoCallback open);
118 void visu_ui_value_io_connectOnSave(VisuUiValueIo *valueio, VisuUiValueIoCallback save);
119 void visu_ui_value_io_setSensitiveOpen(VisuUiValueIo *valueio, gboolean status);
120 void visu_ui_value_io_setSensitiveSave(VisuUiValueIo *valueio, gboolean status);
121 gboolean visu_ui_value_io_setFilename(VisuUiValueIo *valueio, const gchar *filename);
122 gchar* visu_ui_value_io_getFilename(GtkWindow *parent);
123 
124 G_END_DECLS
125 
126 #endif
127