1/* Part of XPCE --- The SWI-Prolog GUI toolkit 2 3 Author: Jan Wielemaker and Anjo Anjewierden 4 E-mail: J.Wielemaker@cwi.nl 5 WWW: http://www.swi.psy.uva.nl/projects/xpce/ 6 Copyright (c) 2001-2020, University of Amsterdam 7 CWI, Amsterdam 8 All rights reserved. 9 10 Redistribution and use in source and binary forms, with or without 11 modification, are permitted provided that the following conditions 12 are met: 13 14 1. Redistributions of source code must retain the above copyright 15 notice, this list of conditions and the following disclaimer. 16 17 2. Redistributions in binary form must reproduce the above copyright 18 notice, this list of conditions and the following disclaimer in 19 the documentation and/or other materials provided with the 20 distribution. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 POSSIBILITY OF SUCH DAMAGE. 34*/ 35 36:- module(pce_swi_hooks, []). 37:- autoload(swi_compatibility, [auto_call/1]).
53:- set_module(class(development)). 54 55:- multifile 56 prolog:debug_control_hook/1, 57 prolog:show_profile_hook/1, % new 58 prolog:show_profile_hook/2. % compatibility 59 60 61 /******************************* 62 * DEBUG HOOKS * 63 *******************************/ 64 65prolog:debug_control_hook(spy(Method)) :- 66 auto_call(spypce(Method)). 67prolog:debug_control_hook(nospy(Method)) :- 68 auto_call(nospypce(Method)). 69 70 71 /******************************* 72 * PROFILING * 73 *******************************/ 74 75prologshow_profile_hook(_Options) :- 76 auto_call(pce_show_profile). 77prolog:show_profile_hook(_Style, _Top) :- 78 auto_call(pce_show_profile). 79 80 81 /******************************* 82 * SOURCE * 83 *******************************/
90:- multifile 91 prolog:alternate_syntax/4. 92 93prologalternate_syntax(pce_class, M, pce_expansion:push_compile_operators(M), 94 pce_expansion:pop_compile_operators) :- 95 current_prolog_flag(xpce, true)
Hook XPCE based graphics tools into IDE
Loading this file enables the graphical frontends for the online manual and profiler. This file is normally loaded from swipl.rc (swipl-win.rc on Windows); the file that makes XPCE known to Prolog.
This file uses call/1 to call the real work to avoid undefined predicate messages when using make/0 (calling list_undefined/0).
Since the introduction of the more advanced autoloader in library(prolog_autoload), using call/1 no longer suffices to stop this file from being loaded. */