~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/univint/AXValue.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
 *  AXValue.h
 
3
 *  Accessibility
 
4
 *
 
5
 *  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 
6
 *
 
7
 }
 
8
{         Pascal Translation:  Peter N Lewis, <peter@stairways.com.au>, 2004 }
 
9
 
 
10
 
 
11
{
 
12
    Modified for use with Free Pascal
 
13
    Version 200
 
14
    Please report any bugs to <gpc@microbizz.nl>
 
15
}
 
16
 
 
17
{$mode macpas}
 
18
{$packenum 1}
 
19
{$macro on}
 
20
{$inline on}
 
21
{$CALLING MWPASCAL}
 
22
 
 
23
unit AXValue;
 
24
interface
 
25
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
26
{$setc GAP_INTERFACES_VERSION := $0200}
 
27
 
 
28
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
29
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
30
{$endc}
 
31
 
 
32
{$ifc defined CPUPOWERPC and defined CPUI386}
 
33
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
34
{$endc}
 
35
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
36
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
37
{$endc}
 
38
 
 
39
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
40
        {$setc __ppc__ := 1}
 
41
{$elsec}
 
42
        {$setc __ppc__ := 0}
 
43
{$endc}
 
44
{$ifc not defined __i386__ and defined CPUI386}
 
45
        {$setc __i386__ := 1}
 
46
{$elsec}
 
47
        {$setc __i386__ := 0}
 
48
{$endc}
 
49
 
 
50
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
51
        {$error Conflicting definitions for __ppc__ and __i386__}
 
52
{$endc}
 
53
 
 
54
{$ifc defined __ppc__ and __ppc__}
 
55
        {$setc TARGET_CPU_PPC := TRUE}
 
56
        {$setc TARGET_CPU_X86 := FALSE}
 
57
{$elifc defined __i386__ and __i386__}
 
58
        {$setc TARGET_CPU_PPC := FALSE}
 
59
        {$setc TARGET_CPU_X86 := TRUE}
 
60
{$elsec}
 
61
        {$error Neither __ppc__ nor __i386__ is defined.}
 
62
{$endc}
 
63
{$setc TARGET_CPU_PPC_64 := FALSE}
 
64
 
 
65
{$ifc defined FPC_BIG_ENDIAN}
 
66
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
67
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
68
{$elifc defined FPC_LITTLE_ENDIAN}
 
69
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
70
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
71
{$elsec}
 
72
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
73
{$endc}
 
74
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
75
{$setc CALL_NOT_IN_CARBON := FALSE}
 
76
{$setc OLDROUTINENAMES := FALSE}
 
77
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
78
{$setc OPAQUE_UPP_TYPES := TRUE}
 
79
{$setc OTCARBONAPPLICATION := TRUE}
 
80
{$setc OTKERNEL := FALSE}
 
81
{$setc PM_USE_SESSION_APIS := TRUE}
 
82
{$setc TARGET_API_MAC_CARBON := TRUE}
 
83
{$setc TARGET_API_MAC_OS8 := FALSE}
 
84
{$setc TARGET_API_MAC_OSX := TRUE}
 
85
{$setc TARGET_CARBON := TRUE}
 
86
{$setc TARGET_CPU_68K := FALSE}
 
87
{$setc TARGET_CPU_MIPS := FALSE}
 
88
{$setc TARGET_CPU_SPARC := FALSE}
 
89
{$setc TARGET_OS_MAC := TRUE}
 
90
{$setc TARGET_OS_UNIX := FALSE}
 
91
{$setc TARGET_OS_WIN32 := FALSE}
 
92
{$setc TARGET_RT_MAC_68881 := FALSE}
 
93
{$setc TARGET_RT_MAC_CFM := FALSE}
 
94
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
95
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
96
{$setc TYPE_BOOL := FALSE}
 
97
{$setc TYPE_EXTENDED := FALSE}
 
98
{$setc TYPE_LONGLONG := TRUE}
 
99
uses MacTypes,CFBase;
 
100
{$ALIGN MAC68K}
 
101
type AXValueType = UInt32;
 
102
const
 
103
    { Types from CoreGraphics.h }
 
104
    kAXValueCGPointType = 1;
 
105
    kAXValueCGSizeType = 2;
 
106
    kAXValueCGRectType = 3;
 
107
 
 
108
    { Types from CFBase.h }
 
109
    kAXValueCFRangeType = 4;
 
110
 
 
111
    { Other }
 
112
    kAXValueIllegalType = 0;
 
113
 
 
114
type AXValueRef = ^UInt32;
 
115
 
 
116
// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
 
117
function AXValueGetTypeID: CFTypeID; external name '_AXValueGetTypeID';
 
118
 
 
119
 
 
120
function AXValueCreate( theType: AXValueType;  valuePtr: UnivPtr ): AXValueRef; external name '_AXValueCreate';
 
121
function AXValueGetType( value: AXValueRef ): AXValueType; external name '_AXValueGetType';
 
122
 
 
123
function AXValueGetValue( value: AXValueRef; theType: AXValueType;  valuePtr: UnivPtr ): Boolean; external name '_AXValueGetValue';
 
124
 
 
125
end.