1e41f4b71Sopenharmony_ci# Window Overview 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Introduction 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThe **Window** module provides a mechanism for displaying multiple application UIs and allowing the end user to interact with them on the same physical screen. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci- For application developers, the **Window** module provides APIs for UI display and user interaction. 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci- For end users, the **Window** module provides a way to control application UIs. 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci- For the entire operating system, the **Window** module provides logic for application UI management. 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci## Features 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ciThe **Window** module has the following features: 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci- **Provides a `Window` object to hold application and system UIs.** You can load your application UIs through the window to display them to the end user. 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci- **Maintains the window relationship (overlay layers and positions).** Different types of application and system windows have different default positions and overlay layers (z-index). End users can adjust the position and overlay layer of a window within a certain range. 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci- **Provides window decoration.** Window decoration refers to the title bar and border of a window. The title bar usually provides the Maximize, Minimize, and Close buttons and has the default click behavior. The border can be dragged to relocate or resize the window. Window decoration is a system-level default behavior. You can enable or disable window decoration without paying attention to the implementation at the UI code layer. 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci- **Provides window animations.** When a window is displayed, hidden, or switched, an animation is usually used to smooth the interaction process. This is the default behavior for application windows. You do not need to set or modify the code. 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci- **Provides guidance for input event distribution.** Events are distributed based on the window status and focus. Touch and mouse events are distributed based on the window position and size, and keyboard events are distributed to the focused window. You can call APIs provided by the **Window** module to set whether a window is touchable and can gain focus. 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci## Basic Concepts 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci### Window Type 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ciThe **Window** module provides system windows and application windows. 36e41f4b71Sopenharmony_ci- A **system window** implements specific functionalities of the system. Examples include the volume bar, wallpaper, notification panel, status bar, and navigation bar. 37e41f4b71Sopenharmony_ci- An **application window** is related to the application display. Based on the displayed content, application windows are further classified into main windows and subwindows. 38e41f4b71Sopenharmony_ci - A main window shows the application UI and appears on the **Recents** page. 39e41f4b71Sopenharmony_ci - A subwindow is an auxiliary window of an application, such as a dialog box and floating window. It is not displayed on the **Recents** page. Its lifecycle follows that of the main window. 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci### Application Window Mode 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ciThe application window mode refers to the display mode of the main window when it is started. Currently, there are three application window modes: full-screen, split-screen, and freeform window. This support for multiple window modes is known as the multi-window capability. 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ci- In **full-screen** mode, the main window is displayed on the entire screen when it is started. 50e41f4b71Sopenharmony_ci- In **split-screen** mode, the main window occupies part of the screen when it is started, and the other part of the screen is occupied by another window. You can resize the two windows by dragging the split line between them. 51e41f4b71Sopenharmony_ci- In **freeform window** mode, the main window may come in any size or position as needed. Multiple freeform windows can be simultaneously displayed on the screen. These freeform windows are arranged on the z-axis in the sequence that they are opened or gain the focus. When a freeform window is clicked or touched, its z-index is incremented and it gains the focus. 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ci 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci 57e41f4b71Sopenharmony_ci## Working Principles 58e41f4b71Sopenharmony_ci 59e41f4b71Sopenharmony_ciThe window implementation and development vary according to the application development model, which can be FA model or stage model. 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ciFor details about the overall architecture and design ideas of the two models, see [Interpretation of the Application Model](../application-models/application-models.md). 62e41f4b71Sopenharmony_ci 63e41f4b71Sopenharmony_ciYou are advised to use the stage model for window development. 64e41f4b71Sopenharmony_ci 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci## Constraints 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ci- You cannot develop system windows in the FA model. 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci- The application main window and subwindow have the following size limits: [320, 2560] in width and [240, 2560] in height, both in units of vp. 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_ci- The system window has the following size limits: [0, 2560] in width and [0, 2560] in height, both in units of vp. 73