#######################################################################################################
Http://www.cppblog.com/windcsn/archive/2008/07/16/56346.html
Desktop Combination
The biggest change to current location Vista is the introduction of desktop portfolios. This becomes the foundation on which everything is executed by the DWM. The main feature of desktop composition is that the way the application gets the pixels on the screen has changed substantially.
In the brother version of Windows, until XP, the program passes through windows to paint their visible areas, and they directly paint to buffer and then reality to the graphics card. With Vista, the program passes through windows to paint their entire surface to an off-screen (offscreen) surface (which may be called bitmaps, buffers, or textures), and the DWM handles all these offscreen surfaces and combines them into onscreen buffers.
Read the previous paragraph again. From the Windows system display perspective, this is based on the esoteric hints of the implemented features, and also the quality that can be obtained. Some examples:
Access window
Now the program is render to offscreen, and these offscreen indicate that they can be used elsewhere. This is how flip,flip3d and small picture features work, and other features can take advantage of this point.
Do not involve a background program in a window operation.
When the window moves through XP or the previous screen, the background window portion is visible only when the background window wakes up and starts to paint (the corresponding WM_PAINT message, which receives the mobile message of the top-level window). A non-responsive background program, or even a responsive program that is exactly page out, can result in a poor user experience.
Consider moving the Paint program window through an IE window. In XP or the previous OS, the following symptoms are unfortunate but also very common: two case in the following IE program is not fast enough to repaint it itself to avoid the tail left by moving the paint window.
In Vista, this is not the case, the following window will not receive WM_PAINT messages, and will not be requested to render, because their content is already in the DWM, and used to combine this screen.
Tear Free Experience:
It is assumed that Dwmrender to SCREEN,DIREXTX provides a typical use of the latest technology in the game to be used throughout the desktop experience. Particularly low, the graphics card flip front buffer capability moves on the screen, adding a smoother line and quality to the user experience.
High-resolution Support:
The primary program output is agnostic to the monitor resolution (DPI). With the addition of high-resolution monitors (DPI,144DPI), programs appearing in very small physical spaces can lead to a bad experience. Because the DWM has access to the program window OFFSCREEN,DWM is the only place to zoom in on this DPI ignorant program, to finally show it to the user and improve the experience on the high-resolution monitor.
Possible topic in the future
The desktop mix is the most basic aspect of the DWM, but we've just briefly talked about the surface of the topic, there's still a lot of topic about exploring and fully understanding what we're doing in Vista. Here are a few topic:
1.DWM using DIREXTX, GPU and hardware acceleration
2.Vista shows the importance and impact of the drive model on the DWM
3. REDIRECT GDI and DIREXTX programs
4. How to uncover the WPF concepts and technologies that are being used
5.DWM How to paint window boundaries and other non-client areas
6.DWM remote, significant and accessible
7. High DPI Support
8. Public exploration of the DWM API
9.rener and visibility optimization
10.DWM of memory usage
Other DWM-related source information
The most technical understanding of the Web is possible to discuss the DWM, and indeed there are other places that have relevant information and news:
1.Kam Vedbrat maintains a log that often gives a description of the DWM interior, especially the DWM features and Vista Aero.
2.microsoft.public.windows.developer.winfx.aero New group to discuss all aero related things
#######################################################################################################
http://ihgs.blog.163.com/blog/static/19411710220101163331889/
principle
When the window Manager starts working, the interaction between the X server and the client will be redirected to the window manager. Whenever a new window is displayed, the request is redirected to the window manager, which determines the initial position of the window. In addition, most newer window managers change the kinship of the window, usually by adding a caption column to the top of the window and adding a decorative frame around the window. These two parts are controlled by the window manager, not other programs. Therefore, when the user taps or drags those components, the window manager makes the appropriate action (such as moving or changing the size of the window).
The window manager is also responsible for working with the diagram, and the diagram does not exist in the X Window core protocol hierarchy. When the user graphically displays the window, the Window Manager cancels the window's mapping (making it invisible) and completes the appropriate action to display the window as a diagram. Some window managers do not support the diagram feature.
The main goal of the window manager, as its name, is to manage the window. Many window managers provide additional functionality, such as handling mouse clicks on the root window, rendering panes and other visual elements, handling keystrokes (such as ALT-F4 to close windows), deciding which application to execute at startup, and so on.
#######################################################################################################
Simply put, the X Window system is divided into the client side and server side, the server is responsible for monitoring the mouse keyboard, drawing windows, and the client side is a GUI program, responsible for receiving mouse keyboard events, and handling these events. Server and client can be completely detached, for example, you can open a GUI (client) on a remote machine to display and manipulate it on the local Machine (server).
#######################################################################################################
http://www.ibm.com/developerworks/cn/linux/embed/minigui/minigui-4/
5.2 GAL and IAL
In the development of MiniGUI 0.3.xx, we introduced the concept of graphics and input abstraction layers (graphics and input abstract Layer,gal and IAL). The concept of an abstraction layer is similar to the concept of a Linux kernel virtual file system. It defines a set of abstract interfaces that do not depend on any particular hardware, and all top-level graphics operations and input processing are based on abstract interfaces. The underlying code used to implement this abstract interface is called the "graphics Engine" or "input engine", similar to the driver in the operating system. This is actually an object-oriented program structure. Using the GAL and Ial,minigui can be run on many graphics engines, such as Svgalib and Libggi, and it's very easy to port MiniGUI to other POSIX systems, just to implement a new graphics engine based on our abstraction layer interface. Currently, we have written a graphics engine based on Svgalib and Libggi. With Libggi, the MiniGUI application can run on the X Window and will greatly facilitate debugging of the application. We are currently working on the design and development of the MiniGUI private graphics engine. With MiniGUI's private graphics engine, we can optimize the graphics engine for the window system and ultimately improve the graphics performance and efficiency of the system.
The structure of the GAL and IAL is the same, we only take the GAL as an example to illustrate the use of object-oriented technology, see Figure 4.
The system maintains an array of registered graphics engines and holds pointers to each graphics engine's data structure. The system uses a pointer to save the currently used graphics engine. In general, there are at least two graphics engines in the system, one "dumb" graphics engine, no actual graphics output, and one is the actual graphics engine to use, such as Libggi or Svgalib. The data structure of each graphics engine defines some information about the graphics engine, such as identifiers, attributes, and more importantly, it implements the various interfaces defined by the GAL, including initialization and termination, graphical context management, point processing functions, line-drawing functions, Rectangle fill functions, palette functions, and so on.
#######################################################################################################
http://www.ibm.com/developerworks/cn/linux/embed/minigui/minigui-5/
3 Window Clipping algorithm
With the Z-order of the window, we can calculate the clipping field for each window. We refer to the clipping field resulting from the Z-order of the window as the "Global clipping field", which is relative to the clipping field defined by the window itself, which we call the "local clipping domain". All the output in the window is first affected by the global clipping domain, and secondly by the local clipping domain. Here we focus on the generation and maintenance of the global clipping domain of the window.
3.1 Generation and maintenance of global clipping domains
#######################################################################################################
Software Architecture for 4.1 Minigui
Why is MiniGUI able to run on so many embedded operating systems? This is because MiniGUI has a good software architecture that isolates the MiniGUI upper and lower operating systems through an abstraction layer. 4.1, MiniGUI-based applications typically implement their own functionality through ISO C libraries, operating system and driver interfaces, and APIs provided by MiniGUI themselves; the abstraction layer in MiniGUI hides the details of specific operating systems and underlying hardware, Thus the upper-level application does not care about the underlying hardware platform output and input devices. In addition, MiniGUI's unique operating mode concept also facilitates cross-operating system support.
Figure 4.1MiniGUI Software Architecture diagram
As shown, from bottom to top, the MiniGUI consists of several modules:
- The Graphics abstraction layer (graphics abastract layer,gal). The graphical abstraction layer abstracts the graphical interfaces from different operating systems or devices and provides a unified graphical interface for the Minigui upper layers. Within the graphics abstraction layer, packages contain software components for Linux FB devices, ECos LCD devices, and so on. These software components invoke the interface of the underlying device to implement specific graphical abstraction layers, such as turning on the device, setting the resolution and display mode, turning off the device, and so on. The software component that we use to adapt the graphical abstraction layer interface is called the engine, and the concept is similar to the device drivers in the operating system.
- Enter the abstraction layer (input abstract layer,ial). Like the GAL, the input abstraction Layer abstracts all input devices involved in MiniGUI, such as keyboards (keyboard), keypads (keypad), mouse (mouse), touch screen, etc., to provide a consistent interface for the upper layer. To support a different keyboard, touchscreen, or mouse interface, write different input engine implementations for IAL. MiniGUI provides support for input devices such as the Linux console (keyboard and mouse), touch screen, remote control, keypad, etc. via IAL and its input engine.
- Graphics Device Interface (INTERFACES,GDI). The module provides graphic-related interfaces for upper-level applications based on the graphical abstraction layer, such as drawing curves, outputting text, filling rectangles, and so on. The graphics device interface contains other relatively separate sub-modules, such as font character set (fonts and charset) support, image support, and so on.
- Message processing modules (Messaging module). Based on the input abstraction layer, the module realizes the message processing mechanism of MiniGUI, and provides a complete message management interface for the upper layer. As we all know, almost all GUI systems are essentially event-driven, the system itself runs, and the GUI application runs, all relying on the message processing module.
- Multi-window processing modules (windowing module) and controls (control or widgets). Based on graphics device interface and message processing module, MiniGUI implements multi-window processing module. The module provides a basic interface for the upper-level application to create the main window and controls, and is responsible for maintaining the control classes. The control class is an important concept for implementing control code reuse, and with the control class, we can create multiple control instances (instance) belonging to a control class so that the control instances use the same control class code, so that we implement similar C + + Class and instance concepts to maximize the reuse of existing code and improve the maintainability of the software. The MiniGUI control module implements common GUI controls such as static boxes, buttons, edit boxes, list boxes, drop-down boxes, and so on.
- Appearance support (look and feel). This module is an interface that MiniGUI V3.0 provides to upper-level applications, which can be used to customize the drawing of MiniGUI windows and controls. In the previous version of MiniGUI V3.0, the ability to customize the main window and controls has not been drawn out to form a separate module, but we can still use the configuration options to let MiniGUI main window, control has three kinds of display style, namely: PC-like three-dimensional style (pc3d), Flat style (FLAT), popular style (FASHION). In MiniGUI 3.0, the appearance of the main window and controls can be completely customized by the application, and when you create the main window or control, you specify the name of the skin renderer (renderer) so that the main window or control has a different appearance.
The above modules make up the core of the MiniGUI (core); On top of the MiniGUI interface, we also provide several components for the application: MGi? MGp? Mg3d? Mgutils? Mgplus, these components provide some special features to the application, respectively. We'll cover these components in more detail later
#######################################################################################################
#######################################################################################################
#######################################################################################################
#######################################################################################################
#######################################################################################################
#######################################################################################################
Desktop Window Manager