comparison dep/animone/src/win/quartz.cc @ 272:5437009cb10e

dep/animone: get macOS side building
author Paper <paper@paper.us.eu.org>
date Thu, 18 Apr 2024 16:51:35 -0400
parents f01b6e9c8fa2
children 246017a7907a
comparison
equal deleted inserted replaced
271:f01b6e9c8fa2 272:5437009cb10e
149 /* does this leak memory? probably. */ 149 /* does this leak memory? probably. */
150 AXValueRef val; 150 AXValueRef val;
151 if (AXUIElementCopyAttributeValue(window, kAXPositionAttribute, reinterpret_cast<CFTypeRef*>(&val)) == 151 if (AXUIElementCopyAttributeValue(window, kAXPositionAttribute, reinterpret_cast<CFTypeRef*>(&val)) ==
152 kAXErrorSuccess) { 152 kAXErrorSuccess) {
153 CGPoint point; 153 CGPoint point;
154 if (!AXValueGetValue(val, kAXValueCGPointType, reinterpret_cast<void*>(&point)) || 154 if (!AXValueGetValue(val, static_cast<AXValueType>(kAXValueCGPointType), reinterpret_cast<void*>(&point)) ||
155 (point.x != bounds.origin.x || point.y != bounds.origin.y)) { 155 (point.x != bounds.origin.x || point.y != bounds.origin.y)) {
156 CFRelease(val); 156 CFRelease(val);
157 continue; 157 continue;
158 } 158 }
159 } else { 159 } else {
164 CFRelease(val); 164 CFRelease(val);
165 165
166 if (AXUIElementCopyAttributeValue(window, kAXSizeAttribute, reinterpret_cast<CFTypeRef*>(&val)) == 166 if (AXUIElementCopyAttributeValue(window, kAXSizeAttribute, reinterpret_cast<CFTypeRef*>(&val)) ==
167 kAXErrorSuccess) { 167 kAXErrorSuccess) {
168 CGSize size; 168 CGSize size;
169 if (!AXValueGetValue(val, kAXValueCGSizeType, reinterpret_cast<void*>(&size)) || 169 if (!AXValueGetValue(val, static_cast<AXValueType>(kAXValueCGSizeType), reinterpret_cast<void*>(&size)) ||
170 (size.width != bounds.size.width || size.height != bounds.size.height)) { 170 (size.width != bounds.size.width || size.height != bounds.size.height)) {
171 CFRelease(val); 171 CFRelease(val);
172 continue; 172 continue;
173 } 173 }
174 } else { 174 } else {