AwesomeWM 中的方法和函数有什么区别

发布于 2025-01-17 15:44:46 字数 399 浏览 0 评论 0原文

功能:

awful.screen.getbycoord (x, y)  Return the screen index corresponding to the given (pixel) coordinates.
awful.screen.focus (_screen)    Move the focus to a screen.

方法

screen:instances ()     Get the number of instances.
screen:screen ()    Iterate over screens.
screen:count ()     Get the number of screens.

谢谢

In each class of AwesomeWM documents there is two section. Methods and Functions. Whats the difference between the two. I searched in the lua document and can't found anything there either. Here is a sample

Functions:

awful.screen.getbycoord (x, y)  Return the screen index corresponding to the given (pixel) coordinates.
awful.screen.focus (_screen)    Move the focus to a screen.

Methods

screen:instances ()     Get the number of instances.
screen:screen ()    Iterate over screens.
screen:count ()     Get the number of screens.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相守太难 2025-01-24 15:44:46

https://www.codecademy.com/article/fwd-js-methods-功能

函数 - 执行任务的一组指令

方法 - 一组与对象相关联的指令

https://www.codecademy.com/article/fwd-js-methods-functions

Function — a set of instructions that perform a task.

Method — a set of instructions that are associated with an object.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文