Debian Codegraph @

lib/Cocoa.ss

raw
1 ;;; Ikarus Scheme -- A compiler for R6RS Scheme.
2 ;;; Copyright (C) 2008,2009 Abdulaziz Ghuloum
3 ;;;
4 ;;; This program is free software: you can redistribute it and/or modify
5 ;;; it under the terms of the GNU General Public License version 3 as
6 ;;; published by the Free Software Foundation.
7 ;;;
8 ;;; This program is distributed in the hope that it will be useful, but
9 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;;; General Public License for more details.
12 ;;;
13 ;;; You should have received a copy of the GNU General Public License
14 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 (library (Cocoa)
18 (export) ; below
19 (import (ikarus) (objc))
20
21 (define-syntax define-and-export
22 (syntax-rules ()
23 [(_ (def* name* . rest*) ...)
24 (begin
25 (def* name* . rest*) ...
26 (export name* ...))]))
27
28 (define-and-export
29 (define-framework Cocoa)
30 (define-class NSAutoreleasePool)
31 (define-class NSWindow)
32 (define-class NSApplication)
33 (define-class NSString)
34 (define-class NSMenu)
35 (define-class NSMenuItem)
36 (define-object NSApp Cocoa)
37
38 (define NSBorderlessWindowMask #b000000000)
39 (define NSTitledWindowMask #b000000001)
40 (define NSClosableWindowMask #b000000010)
41 (define NSMiniaturizableWindowMask #b000000100)
42 (define NSResizableWindowMask #b000001000)
43 (define NSTexturedBackgroundWindowMask #b100000000)
44
45 (define NSBackingStoreRetained 0)
46 (define NSBackingStoreNonretained 1)
47 (define NSBackingStoreBuffered 2)
48
49 (define NSASCIIStringEncoding 1) ; /* 0..127 only */
50 (define NSNEXTSTEPStringEncoding 2)
51 (define NSJapaneseEUCStringEncoding 3)
52 (define NSUTF8StringEncoding 4)
53 (define NSISOLatin1StringEncoding 5)
54 (define NSSymbolStringEncoding 6)
55 (define NSNonLossyASCIIStringEncoding 7)
56 (define NSShiftJISStringEncoding 8)
57 (define NSISOLatin2StringEncoding 9)
58 (define NSUnicodeStringEncoding 10)
59 (define NSWindowsCP1251StringEncoding 11) ; /* Cyrillic; same as AdobeStandardCyrillic */
60 (define NSWindowsCP1252StringEncoding 12) ; /* WinLatin1 */
61 (define NSWindowsCP1253StringEncoding 13) ; /* Greek */
62 (define NSWindowsCP1254StringEncoding 14) ; /* Turkish */
63 (define NSWindowsCP1250StringEncoding 15) ; /* WinLatin2 */
64 (define NSISO2022JPStringEncoding 21) ; /* ISO 2022 Japanese encoding for e-mail */
65 (define NSMacOSRomanStringEncoding 30)
66 (define NSProprietaryStringEncoding 65536) ; /* Installation-specific encoding */
67
68 (define NSAlphaShiftKeyMask (sll 1 16))
69 (define NSShiftKeyMask (sll 1 17))
70 (define NSControlKeyMask (sll 1 18))
71 (define NSAlternateKeyMask (sll 1 19))
72 (define NSCommandKeyMask (sll 1 20))
73 (define NSNumericPadKeyMask (sll 1 21))
74 (define NSHelpKeyMask (sll 1 22))
75 (define NSFunctionKeyMask (sll 1 23))
76 (define NSDeviceIndependentModifierFlagsMask #xffff0000)
77
78
79 ))
80
81
82
83