- Proposal: IE-0012
- Reference link: #12
- Authors: Dannii Willis
- Language feature name: None
- Status: Implemented but unreleased
- Related proposals: None
- Implementation: None
Incorporate code from the extension Glulx Entry Points.
The extension Glulx Entry Points by Emily Short has become an almost essential part of the Inform ecosystem. Almost, but not fully, and there are some extensions which are not compatible with it, most notably Unified Glulx Input by Andrew Plotkin. Many extensions depend on GEP, which means that you can't use them if you need to use UGI, even though nothing may directly conflict between those extensions and UGI itself.
It is proposed that most of GEP be incorporated into the core Inform project, that is, the parts of GEP that are foundational and universally applicable. The parts of GEP that provide just one possible way to implement a feature will be split off into new extensions. This should allow more mixing and matching between formerly GEP-based extensions and UGI-based extensions.
GEP includes the following features:
- A kind for Glk events
- Phrases for checking interpreter features (gestalts)
- Glk object recovery: to fix memory references after restarting/restoring
- Exposing a few I6 variables
- Event handling rulebook
- Command replacement support
- Miscellaneous:
- Redraw the status line
- Print the prompt
- Minor changes to the natural-language syntax (see point 4 above.)
- Major changes to inbuild.
- Change to inform7.
- No change to inter.
- No change to the Inter specification.
- Change to runtime kits.
- Changes to the Standard Rules and Basic Inform.
- Minor changes to documentation.
- No change to the GUI apps, when downloading or installing extensions.
Glulx Entry Points was removed from Inform 10.1 to minimise disruption, but anyone who has installed it manually or any extensions that depend on it may have issues until those extensions are updated.
It is proposed that Inform incorporate the following extensions (which were previously split out of Glulx Entry Points):
The Glulx Definitions extension extracted out the phrases that checked for Glk interpreter features, and added Glulx phrases too. It also contains the definition of the glk event kind.
This extension replaces the convoluted multiple phase-based GGRecoverObjects/IdentifyGlkObject API that dates back to I6 with a simpler process that directly calls rulebooks for each phase of GGRecoverObjects. The logic is the same, it just does things in a more natural way for Inform 7.
This extension is an alternative to the original I6 HandleGlkEvent API inherited by I7 and GEP. One of the main flaws with that API is that the HandleGlkEvent hook is only called by the three standard input functions: VM_KeyChar, VM_KeyDelay, and VM_ReadKeyboard. If something else (usually an extension) ever calls glk_select by itself then the hook won't be called. So what this extension does instead is intercept calls to glk_select
. This means the author (or extension authors) has a single place to handle all events, including converting events from one type to another, cancelling the event (convert it to a null event), etc.
- Command replacement support
Command replacement should be made into a new extension.
- Miscellaneous:
- Redraw the status line
- Print the prompt
These could be brought into the Standard Rules, or perhaps into Basic Screen Effects?