aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-22 18:42:12 -0500
committerDavid Robillard <d@drobilla.net>2025-01-22 18:42:12 -0500
commit8905c1176aa5099545fd9abb2e673efc136d0311 (patch)
tree5bc2b2e01d0583147089ca910aac3880b5404089 /src/mac.m
parent1dce4defe62b5e0ed70460b52c444dc51a701e18 (diff)
downloadpugl-8905c1176aa5099545fd9abb2e673efc136d0311.tar.gz
pugl-8905c1176aa5099545fd9abb2e673efc136d0311.tar.bz2
pugl-8905c1176aa5099545fd9abb2e673efc136d0311.zip
Rename PuglViewSize to PuglArea
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mac.m b/src/mac.m
index 26048a8..368b137 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -345,9 +345,9 @@ dispatchCurrentChildViewConfiguration(PuglView* const view)
- (NSSize)intrinsicContentSize
{
- const PuglViewSize defaultSize = puglview->sizeHints[PUGL_DEFAULT_SIZE];
+ const PuglArea defaultSize = puglview->sizeHints[PUGL_DEFAULT_SIZE];
- return puglIsValidSize(defaultSize)
+ return puglIsValidArea(defaultSize)
? sizePoints(puglview, defaultSize.width, defaultSize.height)
: NSMakeSize(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
}
@@ -1117,7 +1117,7 @@ updateSizeHint(PuglView* const view, const PuglSizeHint hint)
{
const PuglSpan width = view->sizeHints[hint].width;
const PuglSpan height = view->sizeHints[hint].height;
- if (!puglIsValidSize(view->sizeHints[hint])) {
+ if (!puglIsValidArea(view->sizeHints[hint])) {
return PUGL_FAILURE;
}
@@ -1185,10 +1185,10 @@ getInitialFrame(PuglView* const view)
: [screen frame]);
// Center the frame around the center of the bounding rectangle
- const PuglViewSize defaultSize = view->sizeHints[PUGL_DEFAULT_SIZE];
- const NSRect boundsPx = nsRectFromPoints(view, boundsPt);
- const double centerX = boundsPx.origin.x + boundsPx.size.width / 2;
- const double centerY = boundsPx.origin.y + boundsPx.size.height / 2;
+ const PuglArea defaultSize = view->sizeHints[PUGL_DEFAULT_SIZE];
+ const NSRect boundsPx = nsRectFromPoints(view, boundsPt);
+ const double centerX = boundsPx.origin.x + boundsPx.size.width / 2;
+ const double centerY = boundsPx.origin.y + boundsPx.size.height / 2;
const PuglRect frame = {(PuglCoord)(centerX - (defaultSize.width / 2U)),
(PuglCoord)(centerY - (defaultSize.height / 2U)),
@@ -1272,7 +1272,7 @@ puglRealize(PuglView* view)
NSLayoutRelationGreaterThanOrEqual,
view->sizeHints[PUGL_MIN_SIZE].height)];
- if (puglIsValidSize(view->sizeHints[PUGL_MAX_SIZE])) {
+ if (puglIsValidArea(view->sizeHints[PUGL_MAX_SIZE])) {
[impl->wrapperView
addConstraint:puglConstraint(impl->wrapperView,
NSLayoutAttributeWidth,