1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ 2 /* 3 * anjuta 4 * Copyright (C) James Liggett 2009 <jrliggett@cox.net> 5 * 6 * anjuta is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * anjuta is distributed in the hope that it will be useful, but 12 * 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 along 17 * with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef _ANJUTA_COMMAND_QUEUE_H_ 21 #define _ANJUTA_COMMAND_QUEUE_H_ 22 23 #include <glib-object.h> 24 #include "anjuta-command.h" 25 26 G_BEGIN_DECLS 27 28 #define ANJUTA_TYPE_COMMAND_QUEUE (anjuta_command_queue_get_type ()) 29 #define ANJUTA_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_COMMAND_QUEUE, AnjutaCommandQueue)) 30 #define ANJUTA_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_COMMAND_QUEUE, AnjutaCommandQueueClass)) 31 #define ANJUTA_IS_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_COMMAND_QUEUE)) 32 #define ANJUTA_IS_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_COMMAND_QUEUE)) 33 #define ANJUTA_COMMAND_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_COMMAND_QUEUE, AnjutaCommandQueueClass)) 34 35 typedef struct _AnjutaCommandQueueClass AnjutaCommandQueueClass; 36 typedef struct _AnjutaCommandQueue AnjutaCommandQueue; 37 typedef struct _AnjutaCommandQueuePriv AnjutaCommandQueuePriv; 38 39 struct _AnjutaCommandQueueClass 40 { 41 GObjectClass parent_class; 42 43 /* Signals */ 44 void (*finished) (AnjutaCommandQueue *queue); 45 }; 46 47 struct _AnjutaCommandQueue 48 { 49 GObject parent_instance; 50 51 AnjutaCommandQueuePriv *priv; 52 }; 53 54 typedef enum 55 { 56 ANJUTA_COMMAND_QUEUE_EXECUTE_AUTOMATIC, 57 ANJUTA_COMMAND_QUEUE_EXECUTE_MANUAL 58 } AnjutaCommandQueueExecuteMode; 59 60 GType anjuta_command_queue_get_type (void) G_GNUC_CONST; 61 AnjutaCommandQueue * anjuta_command_queue_new (AnjutaCommandQueueExecuteMode mode); 62 void anjuta_command_queue_push (AnjutaCommandQueue *self, 63 AnjutaCommand *command); 64 gboolean anjuta_command_queue_start (AnjutaCommandQueue *self); 65 66 G_END_DECLS 67 68 #endif /* _ANJUTA_COMMAND_QUEUE_H_ */ 69