home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!hal.com!decwrl!sun-barr!ames!data.nas.nasa.gov!taligent!keith@taligent.com
- From: keith@taligent.com (Keith Rollin)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How does MPW store font and tab info?
- Message-ID: <BtLwu7.HCL@taligent.com>
- Date: 26 Aug 92 19:58:55 GMT
- References: <THOR.92Aug26030603@haydn.vivaldi.psu.edu>
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Distribution: comp
- Organization: Taligent
- Lines: 68
-
- In article <THOR.92Aug26030603@haydn.vivaldi.psu.edu>, thor@vivaldi.psu.edu
- (Thomas Moertel) writes:
- >
- > I need to know how MPW stores the font/tab information for TEXT files
- > it creates. I'm pretty sure this info is a 'MPSR' resource. I would
- > love to get a Rez definition or C/C++ struct declaration for the
- > beast. Thanks in advance for your help!
-
- #define resourceType 'MPSR'
- #define editResID 1005
-
- struct TABRSRC
- {
- short width; // width of space in points
- short count; // tab width in spaces
- };
-
- struct FONTRSRC
- {
- short size; // font size
- character name[32]; // font name
- };
-
- struct WINDRSRC
- {
- Rect openrect; // rectangle of window zoomed out
- Rect closerect; // rectangle of window zoomed in
- };
-
- struct SELRSRC
- {
- unsigned int date; // time of last edit
- int start; // offset to start of selection
- int end; // offset to end of selection
- int pos; // offset to first char in window
- };
-
- struct EditRsrc
- {
- struct FONTRSRC fontrsrc;
- struct TABRSRC tabrsrc;
- struct WINDRSRC windrsrc;
- struct SELRSRC selrsrc;
- character autoindent, // true if auto indent is on
- invisibles; // true if show invisibles is on
- };
-
-
- #define resourceType 'MPSR'
- #define editMarkID 1007
-
- struct MarkElement {
- int start; // start position of mark
- int end; // end position
- unsigned char charCount; // number of chars in mark name
- char name[1]; // first char of mark name
- }; // (name is null terminated)
-
-
- struct MarkRsrc {
- short count; // number of marks in the resource
- MarkElement mark[0]; // zero or more mark elements
- };
-
- --
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-