FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ENH: Add full-screen toggle to the macosx backend by greglucas · Pull Request #22936 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .m  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 10 additions & 0 deletions src/_macosx.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,13 @@ static CGFloat _get_device_scale(CGContextRef cr)
Py_RETURN_NONE;
}

static PyObject*
FigureManager_full_screen_toggle(FigureManager* self)
{
[self->window toggleFullScreen: nil];
Py_RETURN_NONE;
}

static PyTypeObject FigureManagerType = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "_macosx.FigureManager",
Expand Down Expand Up @@ -714,6 +721,9 @@ static CGFloat _get_device_scale(CGContextRef cr)
{"resize",
(PyCFunction)FigureManager_resize,
METH_VARARGS},
{"full_screen_toggle",
(PyCFunction)FigureManager_full_screen_toggle,
METH_NOARGS},
{} // sentinel
},
};
Expand Down

Back | FazBrowse Home | New Git URL