1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4; coding: utf-8 -*- */ 2 /* am-project-private.h 3 * 4 * Copyright (C) 2009 Sébastien Granjoux 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of the 9 * License, or (at your option) any later version. 10 * 11 * This program 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. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public 17 * License along with this program; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef _AM_PROJECT_PRIVATE_H_ 23 #define _AM_PROJECT_PRIVATE_H_ 24 25 #include "am-project.h" 26 #include "command-queue.h" 27 #include <libanjuta/interfaces/ianjuta-language.h> 28 29 G_BEGIN_DECLS 30 31 typedef enum { 32 AM_PROPERTY_IN_CONFIGURE = 1 << 0, 33 AM_PROPERTY_IN_MAKEFILE = 1 << 1, 34 AM_PROPERTY_DIRECTORY = 1 << 2, /* Directory property (having dir suffix) */ 35 AM_PROPERTY_DISABLE_FOLLOWING = 1 << 3, /* Disable following property if true */ 36 AM_PROPERTY_PREFIX_OBJECT = 1 << 4, /* Target compilation flags, need a specific object */ 37 AM_PROPERTY_MANDATORY_VALUE = 1 << 5, /* Value is set by default when the node is created */ 38 } AmpPropertyFlag; 39 40 41 struct _AmpProperty { 42 AnjutaProjectProperty base; 43 AnjutaToken *token; 44 }; 45 46 struct _AmpPropertyInfo { 47 AnjutaProjectPropertyInfo base; 48 gint token_type; 49 gint position; 50 const gchar *suffix; 51 AmpPropertyFlag flags; 52 const gchar *value; 53 AnjutaProjectPropertyInfo *link; /* Link to a boolean property disabling this one */ 54 }; 55 56 struct _AmpProject { 57 AmpRootNode base; 58 59 /* GFile corresponding to root configure */ 60 GFile *configure; 61 AnjutaTokenFile *configure_file; 62 AnjutaToken *configure_token; 63 64 /* File monitor */ 65 GFileMonitor *monitor; 66 67 /* Project file list */ 68 GList *files; 69 70 /* shortcut hash tables, mapping id -> GNode from the tree above */ 71 GHashTable *groups; 72 GHashTable *configs; /* Config file from configure_file */ 73 74 75 GHashTable *ac_variables; 76 77 /* Number of not loaded node */ 78 gint loading; 79 80 /* Keep list style */ 81 AnjutaTokenStyle *ac_space_list; 82 AnjutaTokenStyle *am_space_list; 83 AnjutaTokenStyle *arg_list; 84 85 /* Command queue */ 86 PmCommandQueue *queue; 87 88 /* Language Manager */ 89 IAnjutaLanguage *lang_manager; 90 }; 91 92 typedef struct _AmpNodeInfo AmpNodeInfo; 93 94 struct _AmpNodeInfo { 95 AnjutaProjectNodeInfo base; 96 AnjutaTokenType token; 97 const gchar *prefix; 98 const gchar *install; 99 }; 100 101 102 G_END_DECLS 103 104 #endif /* _AM_PROJECT_PRIVATE_H_ */ 105