/ CoreGraphics / CGWindow.m
CGWindow.m
1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd <cjwl@objc.net> 2 3 Permission is hereby granted, free of charge, to any person obtaining a copy of 4 this software and associated documentation files (the "Software"), to deal in 5 the Software without restriction, including without limitation the rights to 6 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 the Software, and to permit persons to whom the Software is furnished to do so, 8 subject to the following conditions: 9 10 The above copyright notice and this permission notice shall be included in all 11 copies or substantial portions of the Software. 12 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 19 #import <CoreGraphics/CGWindow.h> 20 #import <Onyx2D/O2Exceptions.h> 21 22 const CFStringRef kCGWindowAlpha = CFSTR("kCGWindowAlpha"); 23 const CFStringRef kCGWindowBounds = CFSTR("kCGWindowBounds"); 24 const CFStringRef kCGWindowLayer = CFSTR("kCGWindowLayer"); 25 const CFStringRef kCGWindowOwnerName = CFSTR("kCGWindowOwnerName"); 26 const CFStringRef kCGWindowOwnerPID = CFSTR("kCGWindowOwnerPID"); 27 const CFStringRef kCGWindowNumber = CFSTR("kCGWindowNumber"); 28 const CFStringRef kCGWindowName = CFSTR("kCGWindowName"); 29 30 @implementation CGWindow 31 32 - (void) setDelegate: delegate { 33 O2InvalidAbstractInvocation(); 34 } 35 36 - delegate { 37 O2InvalidAbstractInvocation(); 38 return nil; 39 } 40 41 - (void) invalidate { 42 O2InvalidAbstractInvocation(); 43 } 44 45 - (void) syncDelegateProperties { 46 O2InvalidAbstractInvocation(); 47 } 48 49 //-(O2Context *)cgContext { 50 // O2InvalidAbstractInvocation(); 51 // return nil; 52 //} 53 54 - (NSUInteger) styleMask { 55 O2InvalidAbstractInvocation(); 56 return 0; 57 } 58 59 - (CGLContextObj) cglContext { 60 O2InvalidAbstractInvocation(); 61 return nil; 62 } 63 64 - (void) setLevel: (int) value { 65 O2InvalidAbstractInvocation(); 66 } 67 68 - (void) setStyleMask: (NSUInteger) mask { 69 O2InvalidAbstractInvocation(); 70 } 71 72 - (void) setTitle: (NSString *) title { 73 O2InvalidAbstractInvocation(); 74 } 75 76 - (void) setFrame: (CGRect) frame { 77 O2InvalidAbstractInvocation(); 78 } 79 80 - (void) setOpaque: (BOOL) value { 81 O2InvalidAbstractInvocation(); 82 } 83 84 - (void) setAlphaValue: (CGFloat) value { 85 O2InvalidAbstractInvocation(); 86 } 87 88 - (void) setHasShadow: (BOOL) value { 89 O2InvalidAbstractInvocation(); 90 } 91 92 - (void) sheetOrderFrontFromFrame: (NSRect) frame 93 aboveWindow: (CGWindow *) aboveWindow 94 { 95 O2InvalidAbstractInvocation(); 96 } 97 98 - (void) sheetOrderOutToFrame: (NSRect) frame { 99 O2InvalidAbstractInvocation(); 100 } 101 102 - (void) showWindowForAppActivation: (NSRect) frame { 103 O2InvalidAbstractInvocation(); 104 } 105 106 - (void) hideWindowForAppDeactivation: (NSRect) frame { 107 O2InvalidAbstractInvocation(); 108 } 109 110 - (void) showWindowWithoutActivation { 111 O2InvalidAbstractInvocation(); 112 } 113 114 - (void) hideWindow { 115 O2InvalidAbstractInvocation(); 116 } 117 118 // these suck 119 + windowWithWindowNumber: (NSInteger) windowNumber { 120 return (id) windowNumber; 121 } 122 123 - (NSInteger) windowNumber { 124 return (NSInteger) self; 125 } 126 127 - (void) placeAboveWindow: (NSInteger) other { 128 O2InvalidAbstractInvocation(); 129 } 130 131 - (void) placeBelowWindow: (NSInteger) other { 132 O2InvalidAbstractInvocation(); 133 } 134 135 - (void) makeKey { 136 O2InvalidAbstractInvocation(); 137 } 138 139 - (void) makeMain { 140 O2InvalidAbstractInvocation(); 141 } 142 143 - (void) captureEvents { 144 O2InvalidAbstractInvocation(); 145 } 146 147 - (void) miniaturize { 148 O2InvalidAbstractInvocation(); 149 } 150 151 - (void) deminiaturize { 152 O2InvalidAbstractInvocation(); 153 } 154 155 - (BOOL) isMiniaturized { 156 O2InvalidAbstractInvocation(); 157 return NO; 158 } 159 160 - (void) disableFlushWindow { 161 } 162 163 - (void) enableFlushWindow { 164 } 165 166 - (void) flushBuffer { 167 O2InvalidAbstractInvocation(); 168 } 169 170 - (void) dirtyRect: (CGRect) rect { 171 // Default does nothing - that can be used for optimized redraws 172 } 173 174 - (NSPoint) mouseLocationOutsideOfEventStream { 175 O2InvalidAbstractInvocation(); 176 return NSZeroPoint; 177 } 178 179 - (void) sendEvent: (CGEvent *) event { 180 O2InvalidAbstractInvocation(); 181 } 182 183 - (void) addEntriesToDeviceDictionary: (NSDictionary *) entries { 184 O2InvalidAbstractInvocation(); 185 } 186 187 - (void) flashWindow { 188 O2InvalidAbstractInvocation(); 189 } 190 191 - (void) addCGLContext: (CGLContextObj) cglContext { 192 } 193 194 - (void) removeCGLContext: (CGLContextObj) cglContext { 195 } 196 197 - (void) flushCGLContext: (CGLContextObj) cglContext { 198 } 199 200 - (CGSubWindow *) createSubWindowWithFrame: (CGRect) frame { 201 O2InvalidAbstractInvocation(); 202 return nil; 203 } 204 205 @end