/[pearpc]/src/io/prom/fs/hfsplus/apple.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /src/io/prom/fs/hfsplus/apple.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Wed Sep 5 17:11:21 2007 UTC (16 years, 7 months ago) by dpavlin
File MIME type: text/plain
File size: 4760 byte(s)
import upstream CVS
1 dpavlin 1 /*
2     * libhfsp - library for reading and writing Macintosh HFS+ volumes
3     *
4     * This file contains defintions that are special for Apple.
5     * The names match the defintions found in Apple Header files.
6     *
7     * Copyright (C) 2000 Klaus Halfmann <klaus.halfmann@feri.de>
8     * Original code 1996-1998 by Robert Leslie <rob@mars.rog>
9     * other work 2000 from Brad Boyer (flar@pants.nu)
10     * Additional work in 2004 by Stefan Weyergraf for use in PearPC
11     *
12     * This program is free software; you can redistribute it and/or modify
13     * it under the terms of the GNU General Public License as published by
14     * the Free Software Foundation; either version 2 of the License, or
15     * (at your option) any later version.
16     *
17     * This program is distributed in the hope that it will be useful,
18     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20     * GNU General Public License for more details.
21     *
22     * You should have received a copy of the GNU General Public License
23     * along with this program; if not, write to the Free Software
24     * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25     *
26     */
27    
28     #ifndef APPLE_H
29     #define APPLE_H
30    
31     #include "system/types.h"
32     typedef signed char Char;
33     typedef unsigned char UChar;
34     typedef sint8 SInt8;
35     typedef uint8 UInt8;
36     typedef sint16 SInt16;
37     typedef uint16 UInt16;
38     typedef sint32 SInt32;
39     typedef uint32 UInt32;
40     typedef uint32 OSType;
41     typedef uint64 APPLEUInt64;
42    
43     #define PARTITION_SIG 0x504d /* 'PM' */
44    
45     typedef struct {
46     UInt16 pmSig; /* partition signature: should be 'PM' */
47     UInt16 pmSigPad; /* reserved stuff */
48     UInt32 pmMapBlkCnt; /* number of blocks in partition map */
49     UInt32 pmPyPartStart; /* startblock of the partition */
50     UInt32 pmPartBlkCnt; /* number of blocks in partition */
51     char pmPartName[ 32]; /* partition name */
52     char pmPartType[ 32]; /* partition type */
53     UInt32 pmLgDataStart; /* first logical block of data area */
54     UInt32 pmDataCnt; /* number of blocks in data area */
55     UInt32 pmPartStatus; /* partition status information */
56     UInt32 pmLgBootStart; /* first logical block of boot code */
57     UInt32 pmBootSize; /* size of boot code, in bytes */
58     UInt32 pmBootAddr; /* boot code load address */
59     UInt32 pmBootAddr2; /* reserved */
60     UInt32 pmBootEntry; /* boot code entry point */
61     UInt32 pmBootEntry2; /* reserved */
62     UInt32 pmBootCksum; /* boot code checksum */
63     char pmProcessor[ 16]; /* processor type */
64     UInt16 pmPad[ 188]; /* reserved, sums up with the rest to 512 */
65     } ApplePartition;
66    
67     /* A point, normally used by Quickdraw,
68     * but found in Finderinformation, too
69     */
70     typedef struct {
71     SInt16 v; /* vertical coordinate */
72     SInt16 h; /* horizontal coordinate */
73     } Point;
74    
75     /* A rectancle, normally used by Quickdraw,
76     * but found in Finderinformation, too.
77     */
78     typedef struct {
79     SInt16 top; /* top edge of rectangle */
80     SInt16 left; /* left edge */
81     SInt16 bottom; /* bottom edge */
82     SInt16 right; /* right edge */
83     } Rect;
84    
85     /* Information about the location and size of a folder
86     * used by the Finder.
87     */
88     typedef struct {
89     Rect frRect; /* folder's rectangle */
90     SInt16 frFlags; /* flags */
91     Point frLocation; /* folder's location */
92     SInt16 frView; /* folder's view */
93     } DInfo;
94    
95     /* Extended folder information used by the Finder ...
96     */
97     typedef struct {
98     Point frScroll; /* scroll position */
99     SInt32 frOpenChain; /* directory ID chain of open folders */
100     SInt16 frUnused; /* reserved */
101     SInt16 frComment; /* comment ID */
102     SInt32 frPutAway; /* directory ID */
103     } DXInfo;
104    
105     /* Finder information for a File
106     */
107     typedef struct {
108     OSType fdType; /* file type */
109     OSType fdCreator; /* file's creator */
110     SInt16 fdFlags; /* flags */
111     Point fdLocation; /* file's location */
112     SInt16 fdFldr; /* file's window */
113     } FInfo;
114    
115     /* Extendend Finder Information for a file
116     */
117     typedef struct {
118     SInt16 fdIconID; /* icon ID */
119     SInt16 fdUnused[4]; /* reserved */
120     SInt16 fdComment; /* comment ID */
121     SInt32 fdPutAway; /* home directory ID */
122     } FXInfo;
123    
124     /* Flagvalues for FInfo and DInfo */
125     # define HFS_FNDR_ISONDESK (1 << 0)
126     # define HFS_FNDR_COLOR 0x0e
127     # define HFS_FNDR_COLORRESERVED (1 << 4)
128     # define HFS_FNDR_REQUIRESSWITCHLAUNCH (1 << 5)
129     # define HFS_FNDR_ISSHARED (1 << 6)
130     # define HFS_FNDR_HASNOINITS (1 << 7)
131     # define HFS_FNDR_HASBEENINITED (1 << 8)
132     # define HFS_FNDR_RESERVED (1 << 9)
133     # define HFS_FNDR_HASCUSTOMICON (1 << 10)
134     # define HFS_FNDR_ISSTATIONERY (1 << 11)
135     # define HFS_FNDR_NAMELOCKED (1 << 12)
136     # define HFS_FNDR_HASBUNDLE (1 << 13)
137     # define HFS_FNDR_ISINVISIBLE (1 << 14)
138     # define HFS_FNDR_ISALIAS (1 << 15)
139    
140     #endif

  ViewVC Help
Powered by ViewVC 1.1.26