1
-----------------------------------------------------------------------
4
-- Copyright (C) 2003-2007, AdaCore --
6
-- GPS is free software; you can redistribute it and/or modify it --
7
-- 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. --
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. You should have received --
15
-- a copy of the GNU General Public License along with this program; --
16
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
17
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
18
-----------------------------------------------------------------------
20
-- This package provides subprograms that are used when adding support for
21
-- new scripting languages. Applications should not typically have a need for
22
-- these types or subprograms.
24
package Scripts.Impl is
26
function From_Instance
27
(Script : access Scripting_Language_Record'Class;
28
Inst : access Class_Instance_Record'Class) return Class_Instance;
29
-- Return a class instance wrapping Inst.
30
-- For internal use by scripting languages only.
33
(Script : access Scripting_Language_Record'Class;
34
Console : Virtual_Console := null;
36
Hide : Boolean := False);
38
(Script : access Scripting_Language_Record'Class;
39
Console : Virtual_Console := null;
41
procedure Insert_Error
42
(Script : access Scripting_Language_Record'Class;
43
Console : Virtual_Console := null;
45
procedure Insert_Prompt
46
(Script : access Scripting_Language_Record'Class;
47
Console : Virtual_Console := null;
49
-- Display txt either on the specified console or on the scripts' default
50
-- console if Console is set to null.
51
-- If Hide is set to True, the text is not displayed on the console after
52
-- all, although it will be displayed in the log instead.
54
procedure Register_Console_Class
55
(Repo : Scripts_Repository;
57
-- Register the console class, which is used to redirect output of script
58
-- languages to a specific Virtual_Console