1 /* 2 * Copyright (C) 2005 Marc Pavot <marc.pavot@gmail.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2, or (at your option) 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 */ 19 20 #ifndef __ARIO_SHELL_H 21 #define __ARIO_SHELL_H 22 23 #include <gtk/gtk.h> 24 25 G_BEGIN_DECLS 26 27 /** 28 * ArioShell represents the main window of Ario. 29 * It is also in charge of starting the different services at startup 30 * and of stoping them on exit 31 */ 32 33 #define ARIO_TYPE_SHELL (ario_shell_get_type ()) 34 #define ARIO_SHELL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ARIO_TYPE_SHELL, ArioShell)) 35 #define ARIO_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ARIO_TYPE_SHELL, ArioShellClass)) 36 #define IS_ARIO_SHELL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ARIO_TYPE_SHELL)) 37 #define IS_ARIO_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ARIO_TYPE_SHELL)) 38 #define ARIO_SHELL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ARIO_TYPE_SHELL, ArioShellClass)) 39 40 typedef struct ArioShellPrivate ArioShellPrivate; 41 42 typedef struct 43 { 44 GtkApplicationWindow parent; 45 46 ArioShellPrivate *priv; 47 } ArioShell; 48 49 typedef struct 50 { 51 GtkApplicationWindowClass parent_class; 52 } ArioShellClass; 53 54 /* Main Window visibility */ 55 typedef enum 56 { 57 VISIBILITY_HIDDEN, 58 VISIBILITY_VISIBLE, 59 VISIBILITY_TOGGLE 60 } ArioVisibility; 61 62 GType ario_shell_get_type (void) G_GNUC_CONST; 63 64 ArioShell * ario_shell_new (GtkApplication *app); 65 66 void ario_shell_construct (ArioShell *shell, 67 gboolean minimized); 68 void ario_shell_shutdown (ArioShell *shell); 69 70 void ario_shell_present (ArioShell *shell); 71 72 void ario_shell_set_visibility (ArioShell *shell, 73 ArioVisibility state); 74 75 G_END_DECLS 76 77 #endif /* __ARIO_SHELL_H */ 78