1 /* ide-toolchain.h 2 * 3 * Copyright 2018 Collabora Ltd. 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * Authors: Corentin Noël <corentin.noel@collabora.com> 19 * 20 * SPDX-License-Identifier: GPL-3.0-or-later 21 */ 22 23 #pragma once 24 25 #if !defined (IDE_FOUNDRY_INSIDE) && !defined (IDE_FOUNDRY_COMPILATION) 26 # error "Only <libide-foundry.h> can be included directly." 27 #endif 28 29 #include <libide-core.h> 30 31 #include "ide-foundry-types.h" 32 33 G_BEGIN_DECLS 34 35 #define IDE_TYPE_TOOLCHAIN (ide_toolchain_get_type()) 36 37 IDE_AVAILABLE_IN_3_32 38 G_DECLARE_DERIVABLE_TYPE (IdeToolchain, ide_toolchain, IDE, TOOLCHAIN, IdeObject) 39 40 struct _IdeToolchainClass 41 { 42 IdeObjectClass parent; 43 44 const gchar *(*get_tool_for_language) (IdeToolchain *self, 45 const gchar *language, 46 const gchar *tool_id); 47 48 GHashTable *(*get_tools_for_id) (IdeToolchain *self, 49 const gchar *tool_id); 50 51 /*< private >*/ 52 gpointer _reserved[16]; 53 }; 54 55 #define IDE_TOOLCHAIN_TOOL_CC "cc" 56 #define IDE_TOOLCHAIN_TOOL_CPP "cpp" 57 #define IDE_TOOLCHAIN_TOOL_AR "ar" 58 #define IDE_TOOLCHAIN_TOOL_LD "ld" 59 #define IDE_TOOLCHAIN_TOOL_STRIP "strip" 60 #define IDE_TOOLCHAIN_TOOL_EXEC "exec" 61 #define IDE_TOOLCHAIN_TOOL_PKG_CONFIG "pkg-config" 62 63 #define IDE_TOOLCHAIN_LANGUAGE_ANY "*" 64 #define IDE_TOOLCHAIN_LANGUAGE_C "c" 65 #define IDE_TOOLCHAIN_LANGUAGE_CPLUSPLUS "c++" 66 #define IDE_TOOLCHAIN_LANGUAGE_PYTHON "python" 67 #define IDE_TOOLCHAIN_LANGUAGE_VALA "vala" 68 #define IDE_TOOLCHAIN_LANGUAGE_FORTRAN "fortran" 69 #define IDE_TOOLCHAIN_LANGUAGE_D "d" 70 71 IDE_AVAILABLE_IN_3_32 72 const gchar *ide_toolchain_get_id (IdeToolchain *self); 73 IDE_AVAILABLE_IN_3_32 74 void ide_toolchain_set_id (IdeToolchain *self, 75 const gchar *id); 76 IDE_AVAILABLE_IN_3_32 77 const gchar *ide_toolchain_get_display_name (IdeToolchain *self); 78 IDE_AVAILABLE_IN_3_32 79 void ide_toolchain_set_display_name (IdeToolchain *self, 80 const gchar *display_name); 81 IDE_AVAILABLE_IN_3_32 82 IdeTriplet *ide_toolchain_get_host_triplet (IdeToolchain *self); 83 IDE_AVAILABLE_IN_3_32 84 void ide_toolchain_set_host_triplet (IdeToolchain *self, 85 IdeTriplet *host_triplet); 86 IDE_AVAILABLE_IN_3_32 87 const gchar *ide_toolchain_get_tool_for_language (IdeToolchain *self, 88 const gchar *language, 89 const gchar *tool_id); 90 IDE_AVAILABLE_IN_3_32 91 GHashTable *ide_toolchain_get_tools_for_id (IdeToolchain *self, 92 const gchar *tool_id); 93 94 G_END_DECLS 95