MacOS的Exposé背后的逻辑 [英] The logic behind MacOS's Exposé

查看:117
本文介绍了MacOS的Exposé背后的逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这只是出于好奇.

Exposé具有两项功能,其中一项是重新排列桌面上的窗口,一项显示所有打开的窗口,以便用户可以看到隐藏在其他项之下的窗口,另一项功能是将所有窗口移至侧面,使用户与桌面交互.

Exposé has two functions, among others, that rearrange windows on the desktop, one shows all the open windows so the user can see windows that are hidden below others, and other function in which moves all the windows to the sides letting the user interact with the desktop.

我只是想知道是否有人知道显示桌面时操作系统决定窗口定位在何处以及边界移动到哪个边框的逻辑.

I just wonder if someone knows the logic by which the OS decides which window to position where and which border to move windows to when showing the desktop.

推荐答案

您正在寻找的通用概念称为图形绘图:

The generalized idea of what you're looking for is called Graph Drawing:

[图形]图基本上是图形在平面中的嵌入的图形表示,通常旨在方便地可视化所讨论图形或图形所建模的对象的某些属性.

[The] drawing of a graph is basically a pictorial representation of an embedding of the graph in the plane, usually aimed at a convenient visualization of certain properties of the graph in question or of the object modeled by the graph.

Exposé将使用一种算法或类似的算法来推导其窗口布局功能.您也可以查看 Graphviz项目的源代码.它具有与Exposé相似的布局图节点的算法.

Exposé would use an algorithm out of this, or a similar family to derive it's window layout functions. You can also have a look at the source code for the Graphviz project. It has algorithms for laying out graph nodes much the same way Exposé would.

关于将窗户推向侧面.可能是一种哑巴"算法,它会将窗口位置移到最接近的一侧.

As to shuffling windows off to the side. It's likely a "dumb" algorithm that takes the windows position and moves it to the closest side.

这篇关于MacOS的Exposé背后的逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆