最近打开的应用程序 [英] Recently Opened Apps
问题描述
有没有办法得到最近打开的应用程序的列表,比如说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屋!