summaryrefslogtreecommitdiff
path: root/cocoa/gui.m
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-07-06 10:45:31 +0100
committerVincent Sanders <vince@kyllikki.org>2014-07-06 10:45:31 +0100
commit0f151e37cba454fcb863b6b38e1780f2b04be903 (patch)
tree5b0f84879eb2896158c4f3c4f82c0391c8ec3380 /cocoa/gui.m
parentf5c62c2291add5e6e3b8fc604831283e4883a3c6 (diff)
parent18aefabd20a16dda9ed5363088f0da5ada0d4431 (diff)
downloadnetsurf-0f151e37cba454fcb863b6b38e1780f2b04be903.tar.gz
netsurf-0f151e37cba454fcb863b6b38e1780f2b04be903.tar.bz2
Merge branch 'vince/reformatpending'
Conflicts: amiga/gui.c
Diffstat (limited to 'cocoa/gui.m')
-rw-r--r--cocoa/gui.m17
1 files changed, 15 insertions, 2 deletions
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 713f456cd..405dab9c2 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -129,8 +129,20 @@ static void gui_window_set_scroll(struct gui_window *g, int sx, int sy)
[[(BrowserViewController *)g browserView] scrollPoint: cocoa_point( sx, sy )];
}
-static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+/**
+ * callback from core to reformat a window.
+ */
+static void cocoa_window_reformat(struct gui_window *gw)
+{
+ if (gw != NULL) {
+ [[(BrowserViewController *)g browserView] reformat ];
+ }
+}
+
+
+static void gui_window_get_dimensions(struct gui_window *g,
+ int *width, int *height,
+ bool scaled)
{
NSCParameterAssert( width != NULL && height != NULL );
@@ -278,6 +290,7 @@ static struct gui_window_table window_table = {
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
.update_extent = gui_window_update_extent,
+ .reformat = cocoa_window_reformat,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,