最近打开的应用程序 [英] Recently Opened Apps

查看:122
本文介绍了最近打开的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法得到最近打开的应用程序的列表,比如说4?如果是,如何?



(Cocoa Mac)

解决方案

请查看 LaunchServices / LSSharedFileList.h 头文件。不幸的是,这个文件中的函数没有记录在Xcode文档中,但文件中的注释是非常好的。基本上,通过将 kLSSharedFileListRecentApplicationItems 传递给 LSSharedFileListCreate(),可以创建对最近打开的应用程序列表的引用。然后使用 LSSharedFileListCopySnapshot()获取列表当前内容的数组。

Is there any way of getting a list of, say 4, recently opened Applications? If so, how?

(Cocoa Mac)

解决方案

Have a look at the LaunchServices/LSSharedFileList.h header file. Unfortunately, the functions in this file are not documented in the Xcode docs, but the comments in the file are very good. Basically, you create a reference to the list of recently opened applications by passing kLSSharedFileListRecentApplicationItems to LSSharedFileListCreate(). Then get an array of the current contents of the list with LSSharedFileListCopySnapshot().

这篇关于最近打开的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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