Commit 7967d65
committed
feat: six new methods on FigureManagerMac: mpl_connect, mpl_disconnect, _window_resize_event, _window_move_event, _focus_in_event,
_focus_out_event.
src/_macosx.m
@interface Window — added - (PyObject*)pyManager; declaration.
@interface View — added declarations for windowDidMove:, windowDidBecomeKey:, windowDidResignKey:.
@implementation Window — added pyManager accessor (lines 1261–1264) between closeButtonPressed and close.
windowDidResize: — augmented with a second PyObject_CallMethod on [window pyManager] calling _window_resize_event with
(width, height), reusing the already-acquired GIL.
Three new delegate methods added after windowDidResize::
- windowDidMove: — calls _window_move_event(x, y) with the window's new Cocoa origin
- windowDidBecomeKey: — calls _focus_in_event() via gil_call_method
- windowDidResignKey: — calls _focus_out_event() via gil_call_method
backend_macosx.py
FigureManagerMac.__init__ — initialises self._window_event_callbacks = cbook.CallbackRegistry().
Six new methods on FigureManagerMac: mpl_connect, mpl_disconnect, _window_resize_event, _window_move_event, _focus_in_event,
_focus_out_event.1 parent b162944 commit 7967d65
2 files changed
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
173 | 213 | | |
174 | 214 | | |
175 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
1254 | 1258 | | |
1255 | 1259 | | |
1256 | 1260 | | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1257 | 1266 | | |
1258 | 1267 | | |
1259 | 1268 | | |
| |||
1452 | 1461 | | |
1453 | 1462 | | |
1454 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
1455 | 1470 | | |
1456 | 1471 | | |
1457 | 1472 | | |
1458 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1459 | 1499 | | |
1460 | 1500 | | |
1461 | 1501 | | |
| |||
0 commit comments