• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
    • RDF quality heuristics
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.4.21 Foreign Code Hooks
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Foreign Code Hooks
            • PL_dispatch_hook()
            • PL_abort_hook()
            • PL_abort_unhook()
            • PL_on_halt()
            • PL_exit_hook()
            • PL_agc_hook()
    • Packages
Availability:C-language interface function
PL_dispatch_hook_t PL_dispatch_hook(PL_dispatch_hook_t)
If this hook is not NULL, this function is called when reading from the terminal. It is supposed to dispatch events when SWI-Prolog is connected to a window environment. It can return two values: PL_DISPATCH_INPUT indicates Prolog input is available on file descriptor 0 or PL_DISPATCH_TIMEOUT to indicate a timeout. The old hook is returned. The type PL_dispatch_hook_t is defined as:
typedef int  (*PL_dispatch_hook_t)(void);
ClioPatria (version V3.1.1-40-g9d9e003)