~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/univint/CGSession.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
 *  CGSession.h
 
3
 *  CoreGraphics
 
4
 *
 
5
 *  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
 
6
 *
 
7
 }
 
8
{       Pascal Translation:  Peter N Lewis, <peter@stairways.com.au>, August 2005 }
 
9
{
 
10
    Modified for use with Free Pascal
 
11
    Version 200
 
12
    Please report any bugs to <gpc@microbizz.nl>
 
13
}
 
14
 
 
15
{$mode macpas}
 
16
{$packenum 1}
 
17
{$macro on}
 
18
{$inline on}
 
19
{$CALLING MWPASCAL}
 
20
 
 
21
unit CGSession;
 
22
interface
 
23
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
24
{$setc GAP_INTERFACES_VERSION := $0200}
 
25
 
 
26
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
27
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
28
{$endc}
 
29
 
 
30
{$ifc defined CPUPOWERPC and defined CPUI386}
 
31
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
32
{$endc}
 
33
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
34
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
35
{$endc}
 
36
 
 
37
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
38
        {$setc __ppc__ := 1}
 
39
{$elsec}
 
40
        {$setc __ppc__ := 0}
 
41
{$endc}
 
42
{$ifc not defined __i386__ and defined CPUI386}
 
43
        {$setc __i386__ := 1}
 
44
{$elsec}
 
45
        {$setc __i386__ := 0}
 
46
{$endc}
 
47
 
 
48
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
49
        {$error Conflicting definitions for __ppc__ and __i386__}
 
50
{$endc}
 
51
 
 
52
{$ifc defined __ppc__ and __ppc__}
 
53
        {$setc TARGET_CPU_PPC := TRUE}
 
54
        {$setc TARGET_CPU_X86 := FALSE}
 
55
{$elifc defined __i386__ and __i386__}
 
56
        {$setc TARGET_CPU_PPC := FALSE}
 
57
        {$setc TARGET_CPU_X86 := TRUE}
 
58
{$elsec}
 
59
        {$error Neither __ppc__ nor __i386__ is defined.}
 
60
{$endc}
 
61
{$setc TARGET_CPU_PPC_64 := FALSE}
 
62
 
 
63
{$ifc defined FPC_BIG_ENDIAN}
 
64
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
65
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
66
{$elifc defined FPC_LITTLE_ENDIAN}
 
67
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
68
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
69
{$elsec}
 
70
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
71
{$endc}
 
72
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
73
{$setc CALL_NOT_IN_CARBON := FALSE}
 
74
{$setc OLDROUTINENAMES := FALSE}
 
75
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
76
{$setc OPAQUE_UPP_TYPES := TRUE}
 
77
{$setc OTCARBONAPPLICATION := TRUE}
 
78
{$setc OTKERNEL := FALSE}
 
79
{$setc PM_USE_SESSION_APIS := TRUE}
 
80
{$setc TARGET_API_MAC_CARBON := TRUE}
 
81
{$setc TARGET_API_MAC_OS8 := FALSE}
 
82
{$setc TARGET_API_MAC_OSX := TRUE}
 
83
{$setc TARGET_CARBON := TRUE}
 
84
{$setc TARGET_CPU_68K := FALSE}
 
85
{$setc TARGET_CPU_MIPS := FALSE}
 
86
{$setc TARGET_CPU_SPARC := FALSE}
 
87
{$setc TARGET_OS_MAC := TRUE}
 
88
{$setc TARGET_OS_UNIX := FALSE}
 
89
{$setc TARGET_OS_WIN32 := FALSE}
 
90
{$setc TARGET_RT_MAC_68881 := FALSE}
 
91
{$setc TARGET_RT_MAC_CFM := FALSE}
 
92
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
93
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
94
{$setc TYPE_BOOL := FALSE}
 
95
{$setc TYPE_EXTENDED := FALSE}
 
96
{$setc TYPE_LONGLONG := TRUE}
 
97
uses MacTypes,CFDictionary,CGBase;
 
98
{$ALIGN POWER}
 
99
 
 
100
 
 
101
{
 
102
 * Fetch the current session's dictionary
 
103
 * Returns NULL if the caller is not within a GUI session, as when the caller is a UNIX daemon,
 
104
 * or if a system is configured to not run a Quartz GUI (window server disabled)
 
105
 }
 
106
function CGSessionCopyCurrentDictionary: CFDictionaryRef; external name '_CGSessionCopyCurrentDictionary';
 
107
 
 
108
{
 
109
 * Predefined keys for the Session dictionaries
 
110
 * Values are provided as CFSTR() macros rather than extern C data for PEF/CFM support.
 
111
 * Constant values will remain unchanged in future releases for PEF/CFM compatibility.
 
112
 *
 
113
 * These keys are guaranteed by the system to be present in a session dictionary.
 
114
 * Additional keys and values may be defined and added to the dictionary by
 
115
 * other system components as needed.
 
116
 }
 
117
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
118
{$definec kCGSessionUserIDKey CFSTRP('kCGSSessionUserIDKey')}
 
119
{$endc}
 
120
        { value is a CFNumber encoding a uid_t for the session's current user. }
 
121
 
 
122
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
123
{$definec kCGSessionUserNameKey CFSTRP('kCGSSessionUserNameKey')}
 
124
{$endc}
 
125
        { value is a CFString encoding the session's short user name as set by loginwindow }
 
126
 
 
127
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
128
{$definec kCGSessionConsoleSetKey CFSTRP('kCGSSessionConsoleSetKey')}
 
129
{$endc}
 
130
        { value is a CFNumber encoding a 32 bit unsigned  integer value representing a set of hardware composing a console }
 
131
 
 
132
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
133
{$definec kCGSessionOnConsoleKey CFSTRP('kCGSSessionOnConsoleKey')}
 
134
{$endc}
 
135
        { value is a CFBoolean, kCFBooleanTrue if the session is on a console, otherwise kCFBooleanFalse }
 
136
 
 
137
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
138
{$definec kCGSessionLoginDoneKey CFSTRP('kCGSessionLoginDoneKey')}
 
139
{$endc}
 
140
        { value is a CFBoolean, kCFBooleanTrue if login operation has been done, otherwise kCFBooleanFalse }
 
141
 
 
142
{
 
143
 * When the GUI session on a console changes, a notification
 
144
 * is posted via the notify_post() API.  See notify (3) and
 
145
 * notify.h for details.
 
146
 }
 
147
const
 
148
        kCGNotifyGUIConsoleSessionChanged = 'com.apple.coregraphics.GUIConsoleSessionChanged';
 
149
{ When a user logs in or out of a session we post a notification via notify_post() }
 
150
const
 
151
        kCGNotifyGUISessionUserChanged = 'com.apple.coregraphics.GUISessionUserChanged';
 
152
 
 
153
 
 
154
end.