aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-14 17:17:57 +0100
committerDavid Robillard <d@drobilla.net>2020-03-15 10:24:47 +0100
commit02d565da853b6c7990c5944306b07e0dac69a1f6 (patch)
treef6560013ea4699e607b160192b36d1c95022f4dc
parent919dd0200074cbaac655ee2cb3f8767592f80514 (diff)
downloadpugl-02d565da853b6c7990c5944306b07e0dac69a1f6.tar.gz
pugl-02d565da853b6c7990c5944306b07e0dac69a1f6.tar.bz2
pugl-02d565da853b6c7990c5944306b07e0dac69a1f6.zip
Remove backend resize method
-rw-r--r--pugl/detail/mac.m8
-rw-r--r--pugl/detail/mac_cairo.m1
-rw-r--r--pugl/detail/mac_gl.m1
-rw-r--r--pugl/detail/mac_stub.m1
-rw-r--r--pugl/detail/types.h3
-rw-r--r--pugl/detail/win.c17
-rw-r--r--pugl/detail/win_cairo.c1
-rw-r--r--pugl/detail/win_gl.c1
-rw-r--r--pugl/detail/x11.c5
-rw-r--r--pugl/detail/x11_cairo.c1
-rw-r--r--pugl/detail/x11_gl.c1
-rw-r--r--pugl/pugl_stub.h9
12 files changed, 6 insertions, 43 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 837d3cc..2928951 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -117,14 +117,6 @@ updateViewRect(PuglView* view)
@implementation PuglWrapperView
-- (void) resizeWithOldSuperviewSize:(NSSize)oldSize
-{
- [super resizeWithOldSuperviewSize:oldSize];
-
- const NSRect bounds = [self bounds];
- puglview->backend->resize(puglview, bounds.size.width, bounds.size.height);
-}
-
- (void) dispatchExpose:(NSRect)rect
{
if (reshaped) {
diff --git a/pugl/detail/mac_cairo.m b/pugl/detail/mac_cairo.m
index 94339aa..51c1c13 100644
--- a/pugl/detail/mac_cairo.m
+++ b/pugl/detail/mac_cairo.m
@@ -149,7 +149,6 @@ const PuglBackend* puglCairoBackend(void)
puglMacCairoDestroy,
puglMacCairoEnter,
puglMacCairoLeave,
- puglStubResize,
puglMacCairoGetContext};
return &backend;
diff --git a/pugl/detail/mac_gl.m b/pugl/detail/mac_gl.m
index d6add02..54f0fdd 100644
--- a/pugl/detail/mac_gl.m
+++ b/pugl/detail/mac_gl.m
@@ -171,7 +171,6 @@ const PuglBackend* puglGlBackend(void)
puglMacGlDestroy,
puglMacGlEnter,
puglMacGlLeave,
- puglStubResize,
puglStubGetContext};
return &backend;
diff --git a/pugl/detail/mac_stub.m b/pugl/detail/mac_stub.m
index 4ed246b..71a54b8 100644
--- a/pugl/detail/mac_stub.m
+++ b/pugl/detail/mac_stub.m
@@ -89,7 +89,6 @@ puglStubBackend(void)
puglMacStubDestroy,
puglStubEnter,
puglStubLeave,
- puglStubResize,
puglStubGetContext};
return &backend;
diff --git a/pugl/detail/types.h b/pugl/detail/types.h
index 08a7854..71cfda0 100644
--- a/pugl/detail/types.h
+++ b/pugl/detail/types.h
@@ -106,9 +106,6 @@ struct PuglBackendImpl {
/** Leave drawing context, after drawing if expose is non-null. */
PuglStatus (*leave)(PuglView*, const PuglEventExpose*);
- /** Resize drawing context to the given width and height. */
- PuglStatus (*resize)(PuglView*, int, int);
-
/** Return the puglGetContext() handle for the application, if any. */
void* (*getContext)(PuglView*);
};
diff --git a/pugl/detail/win.c b/pugl/detail/win.c
index 0c8078f..409cc98 100644
--- a/pugl/detail/win.c
+++ b/pugl/detail/win.c
@@ -459,8 +459,6 @@ handleConfigure(PuglView* view, PuglEvent* event)
if (view->frame.width != width || view->frame.height != height) {
view->frame.width = width;
view->frame.height = height;
-
- view->backend->resize(view, width, height);
}
return rect;
@@ -1037,15 +1035,12 @@ puglWinStubLeave(PuglView* view, const PuglEventExpose* expose)
const PuglBackend*
puglStubBackend(void)
{
- static const PuglBackend backend = {
- puglWinStubConfigure,
- puglStubCreate,
- puglStubDestroy,
- puglWinStubEnter,
- puglWinStubLeave,
- puglStubResize,
- puglStubGetContext,
- };
+ static const PuglBackend backend = {puglWinStubConfigure,
+ puglStubCreate,
+ puglStubDestroy,
+ puglWinStubEnter,
+ puglWinStubLeave,
+ puglStubGetContext};
return &backend;
}
diff --git a/pugl/detail/win_cairo.c b/pugl/detail/win_cairo.c
index 4e37f0f..a8b371f 100644
--- a/pugl/detail/win_cairo.c
+++ b/pugl/detail/win_cairo.c
@@ -172,7 +172,6 @@ puglCairoBackend()
puglWinCairoDestroy,
puglWinCairoEnter,
puglWinCairoLeave,
- puglStubResize,
puglWinCairoGetContext};
return &backend;
diff --git a/pugl/detail/win_gl.c b/pugl/detail/win_gl.c
index edbe1dd..f5acfd6 100644
--- a/pugl/detail/win_gl.c
+++ b/pugl/detail/win_gl.c
@@ -302,7 +302,6 @@ puglGlBackend()
puglWinGlDestroy,
puglWinGlEnter,
puglWinGlLeave,
- puglStubResize,
puglStubGetContext};
return &backend;
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index ee5fb69..ea7f9a3 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -696,10 +696,6 @@ flushPendingConfigure(PuglView* view)
view->frame.width = configure->configure.width;
view->frame.height = configure->configure.height;
- view->backend->resize(view,
- (int)view->frame.width,
- (int)view->frame.height);
-
view->eventFunc(view, configure);
configure->type = 0;
}
@@ -1017,7 +1013,6 @@ puglStubBackend(void)
puglStubDestroy,
puglStubEnter,
puglStubLeave,
- puglStubResize,
puglStubGetContext,
};
diff --git a/pugl/detail/x11_cairo.c b/pugl/detail/x11_cairo.c
index d06c0d5..efbc5ca 100644
--- a/pugl/detail/x11_cairo.c
+++ b/pugl/detail/x11_cairo.c
@@ -165,7 +165,6 @@ puglCairoBackend(void)
puglX11CairoDestroy,
puglX11CairoEnter,
puglX11CairoLeave,
- puglStubResize,
puglX11CairoGetContext};
return &backend;
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c
index fec0899..33a05df 100644
--- a/pugl/detail/x11_gl.c
+++ b/pugl/detail/x11_gl.c
@@ -210,7 +210,6 @@ const PuglBackend* puglGlBackend(void)
puglX11GlDestroy,
puglX11GlEnter,
puglX11GlLeave,
- puglStubResize,
puglStubGetContext};
return &backend;
diff --git a/pugl/pugl_stub.h b/pugl/pugl_stub.h
index 295f4f9..da918aa 100644
--- a/pugl/pugl_stub.h
+++ b/pugl/pugl_stub.h
@@ -87,15 +87,6 @@ puglStubLeave(PuglView* view, const PuglEventExpose* expose)
return PUGL_SUCCESS;
}
-static inline PuglStatus
-puglStubResize(PuglView* view, int width, int height)
-{
- (void)view;
- (void)width;
- (void)height;
- return PUGL_SUCCESS;
-}
-
static inline void*
puglStubGetContext(PuglView* view)
{