1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * Libbrasero-media
4  * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
5  *
6  * Libbrasero-media is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * The Libbrasero-media authors hereby grant permission for non-GPL compatible
12  * GStreamer plugins to be used and distributed together with GStreamer
13  * and Libbrasero-media. This permission is above and beyond the permissions granted
14  * by the GPL license by which Libbrasero-media is covered. If you modify this code
15  * you may extend this exception to your version of the code, but you are not
16  * obligated to do so. If you do not wish to do so, delete this exception
17  * statement from your version.
18  *
19  * Libbrasero-media is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to:
26  * 	The Free Software Foundation, Inc.,
27  * 	51 Franklin Street, Fifth Floor
28  * 	Boston, MA  02110-1301, USA.
29  */
30 
31 #ifndef _BRASERO_MEDIUM_SELECTION_H_
32 #define _BRASERO_MEDIUM_SELECTION_H_
33 
34 #include <glib-object.h>
35 
36 #include <gtk/gtk.h>
37 
38 #include <brasero-medium-monitor.h>
39 #include <brasero-medium.h>
40 #include <brasero-drive.h>
41 
42 G_BEGIN_DECLS
43 
44 #define BRASERO_TYPE_MEDIUM_SELECTION             (brasero_medium_selection_get_type ())
45 #define BRASERO_MEDIUM_SELECTION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_MEDIUM_SELECTION, BraseroMediumSelection))
46 #define BRASERO_MEDIUM_SELECTION_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_MEDIUM_SELECTION, BraseroMediumSelectionClass))
47 #define BRASERO_IS_MEDIUM_SELECTION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_MEDIUM_SELECTION))
48 #define BRASERO_IS_MEDIUM_SELECTION_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_MEDIUM_SELECTION))
49 #define BRASERO_MEDIUM_SELECTION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_MEDIUM_SELECTION, BraseroMediumSelectionClass))
50 
51 typedef struct _BraseroMediumSelectionClass BraseroMediumSelectionClass;
52 typedef struct _BraseroMediumSelection BraseroMediumSelection;
53 
54 struct _BraseroMediumSelectionClass
55 {
56 	GtkComboBoxClass parent_class;
57 
58 	/* Signals */
59 	void		(* medium_changed)		(BraseroMediumSelection *selection,
60 							 BraseroMedium *medium);
61 
62 	/* virtual function */
63 	gchar *		(*format_medium_string)		(BraseroMediumSelection *selection,
64 							 BraseroMedium *medium);
65 };
66 
67 /**
68  * BraseroMediumSelection:
69  *
70  * Rename to: MediumSelection
71  */
72 
73 struct _BraseroMediumSelection
74 {
75 	GtkComboBox parent_instance;
76 };
77 
78 G_MODULE_EXPORT GType brasero_medium_selection_get_type (void) G_GNUC_CONST;
79 
80 GtkWidget* brasero_medium_selection_new (void);
81 
82 BraseroMedium *
83 brasero_medium_selection_get_active (BraseroMediumSelection *selector);
84 
85 gboolean
86 brasero_medium_selection_set_active (BraseroMediumSelection *selector,
87 				     BraseroMedium *medium);
88 
89 void
90 brasero_medium_selection_show_media_type (BraseroMediumSelection *selector,
91 					  BraseroMediaType type);
92 
93 G_END_DECLS
94 
95 #endif /* _BRASERO_MEDIUM_SELECTION_H_ */
96