<commit_before>.. _full_screen_applications:

Building full screen applications
=================================

`prompt_toolkit` can be used to create complex full screen terminal
applications. Typically, an application consists of a layout (to describe the
graphical part) and a set of key bindings.

The sections below describe the components required for full screen
applications (or custom, non full screen applications), and how to assemble
them together.


Running the application
-----------------------

To run our final Full screen Application, we need three I/O objects, and
an :class:`~prompt_toolkit.application.Application` instance. These are passed
as arguments to :class:`~prompt_toolkit.interface.CommandLineInterface`.

The three I/O objects are:

    - An :class:`~prompt_toolkit.eventloop.base.EventLoop` instance. This is
      basically a while-true loop that waits for user input, and when it receives
      something (like a key press), it will send that to the application.
    - An :class:`~prompt_toolkit.input.Input` instance. This is an abstraction
      on the input stream (stdin).
    - An :class:`~prompt_toolkit.output.Output` instance. This is an
      abstraction on the output stream, and is called by the renderer.
<commit_msg>Added warning about coming changes to the documentation about full screen applications.<commit_after>.. _full_screen_applications:

Building full screen applications
=================================

`prompt_toolkit` can be used to create complex full screen terminal
applications. Typically, an application consists of a layout (to describe the
graphical part) and a set of key bindings.

The sections below describe the components required for full screen
applications (or custom, non full screen applications), and how to assemble
them together.

.. warning:: This is going to change.

    The information below is still up to date, but we are planning to
    refactor some of the internal architecture of prompt_toolkit, to make it
    easier to build full screen applications. This will however be
    backwards-incompatible. The refactoring should probably be complete
    somewhere around half 2017.

Running the application
-----------------------

To run our final Full screen Application, we need three I/O objects, and
an :class:`~prompt_toolkit.application.Application` instance. These are passed
as arguments to :class:`~prompt_toolkit.interface.CommandLineInterface`.

The three I/O objects are:

    - An :class:`~prompt_toolkit.eventloop.base.EventLoop` instance. This is
      basically a while-true loop that waits for user input, and when it receives
      something (like a key press), it will send that to the application.
    - An :class:`~prompt_toolkit.input.Input` instance. This is an abstraction
      on the input stream (stdin).
    - An :class:`~prompt_toolkit.output.Output` instance. This is an
      abstraction on the output stream, and is called by the renderer.

{'fraction_non_alphanumeric': 0.09437141894169195, 'fraction_numerical': 0.0013481631277384564, 'mean_word_length': 4.0050590219224285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5426199', 'n_tokens_mistral': 754, 'n_tokens_neox': 718, 'n_words': 358}