1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * Brasero 4 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr> 5 * 6 * Brasero 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 * brasero is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with brasero. If not, write to: 18 * The Free Software Foundation, Inc., 19 * 51 Franklin Street, Fifth Floor 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef _BRASERO_APP_H_ 24 #define _BRASERO_APP_H_ 25 26 #include <glib-object.h> 27 #include <gtk/gtk.h> 28 29 #include "brasero-session-cfg.h" 30 31 G_BEGIN_DECLS 32 33 #define BRASERO_TYPE_APP (brasero_app_get_type ()) 34 #define BRASERO_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_APP, BraseroApp)) 35 #define BRASERO_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_APP, BraseroAppClass)) 36 #define BRASERO_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_APP)) 37 #define BRASERO_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_APP)) 38 #define BRASERO_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_APP, BraseroAppClass)) 39 40 typedef struct _BraseroAppClass BraseroAppClass; 41 typedef struct _BraseroApp BraseroApp; 42 43 struct _BraseroAppClass 44 { 45 GtkWindowClass parent_class; 46 }; 47 48 struct _BraseroApp 49 { 50 GtkWindow parent_instance; 51 }; 52 53 GType brasero_app_get_type (void) G_GNUC_CONST; 54 55 BraseroApp * 56 brasero_app_new (GApplication *gapp); 57 58 BraseroApp * 59 brasero_app_get_default (void); 60 61 void 62 brasero_app_set_parent (BraseroApp *app, 63 guint xid); 64 65 void 66 brasero_app_set_toplevel (BraseroApp *app, GtkWindow *window); 67 68 void 69 brasero_app_create_mainwin (BraseroApp *app); 70 71 gboolean 72 brasero_app_run_mainwin (BraseroApp *app); 73 74 gboolean 75 brasero_app_is_running (BraseroApp *app); 76 77 GtkWidget * 78 brasero_app_dialog (BraseroApp *app, 79 const gchar *primary_message, 80 GtkButtonsType button_type, 81 GtkMessageType msg_type); 82 83 void 84 brasero_app_alert (BraseroApp *app, 85 const gchar *primary_message, 86 const gchar *secondary_message, 87 GtkMessageType type); 88 89 gboolean 90 brasero_app_burn (BraseroApp *app, 91 BraseroBurnSession *session, 92 gboolean multi); 93 94 void 95 brasero_app_burn_uri (BraseroApp *app, 96 BraseroDrive *burner, 97 gboolean burn); 98 99 void 100 brasero_app_data (BraseroApp *app, 101 BraseroDrive *burner, 102 gchar * const *uris, 103 gboolean burn); 104 105 void 106 brasero_app_stream (BraseroApp *app, 107 BraseroDrive *burner, 108 gchar * const *uris, 109 gboolean is_video, 110 gboolean burn); 111 112 void 113 brasero_app_image (BraseroApp *app, 114 BraseroDrive *burner, 115 const gchar *uri, 116 gboolean burn); 117 118 void 119 brasero_app_copy_disc (BraseroApp *app, 120 BraseroDrive *burner, 121 const gchar *device, 122 const gchar *cover, 123 gboolean burn); 124 125 void 126 brasero_app_blank (BraseroApp *app, 127 BraseroDrive *burner, 128 gboolean burn); 129 130 void 131 brasero_app_check (BraseroApp *app, 132 BraseroDrive *burner, 133 gboolean burn); 134 135 gboolean 136 brasero_app_open_project (BraseroApp *app, 137 BraseroDrive *burner, 138 const gchar *uri, 139 gboolean is_playlist, 140 gboolean warn_user, 141 gboolean burn); 142 143 gboolean 144 brasero_app_open_uri (BraseroApp *app, 145 const gchar *uri_arg, 146 gboolean warn_user); 147 148 gboolean 149 brasero_app_open_uri_drive_detection (BraseroApp *app, 150 BraseroDrive *burner, 151 const gchar *uri, 152 const gchar *cover_project, 153 gboolean burn); 154 GtkWidget * 155 brasero_app_get_statusbar1 (BraseroApp *app); 156 157 GtkWidget * 158 brasero_app_get_statusbar2 (BraseroApp *app); 159 160 GtkWidget * 161 brasero_app_get_project_manager (BraseroApp *app); 162 163 /** 164 * Session management 165 */ 166 167 #define BRASERO_SESSION_TMP_PROJECT_PATH "brasero-tmp-project" 168 169 const gchar * 170 brasero_app_get_saved_contents (BraseroApp *app); 171 172 gboolean 173 brasero_app_save_contents (BraseroApp *app, 174 gboolean cancellable); 175 176 G_END_DECLS 177 178 #endif /* _BRASERO_APP_H_ */ 179