开发者

Looking for the mac os resource definition for the 'styl' resource

开发者 https://www.devze.com 2023-03-18 06:48 出处:网络
I have searched the net for this antiquated piece of Mac OS 9 technology and actually have a need of it for current Mac OS X development.

I have searched the net for this antiquated piece of Mac OS 9 technology and actually have a need of it for current Mac OS X development.

I can not find a .r definition in the current set of Mac OS X SDKs.

Effectively I 开发者_Go百科need to be able to analyse and create a styl resource.


The 'styl' resource contains the same structure used by TextEdit (the ancient TextEdit, not the current TextEdit.app) when copying styled text to the clipboard. It is always used in tandem with a corresponding plain text buffer. See this tech note.

This corresponds to struct StScrpRec in TextEdit.h. You can find this file at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/TextEdit.h. Note that there are not necessarily 1601 elements in the ScrpSTTable: it's a variable length array, whose actual length is given by the scrpNStyles member of StScrpRec.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号