FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/src/_windowing.cpp at mplot3d/minor_errors · WeatherGod/matplotlib · GitHub
WeatherGod
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
src
/
_windowing.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (38 loc) · 979 Bytes
Breadcrumbs
matplotlib
/
src
/
_windowing.cpp
Copy path
File metadata and controls
42 lines (38 loc) · 979 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
include
"
Python.h
"
#
include
<
windows.h
>
static
PyObject *
_GetForegroundWindow
(PyObject *
module
, PyObject *args)
{
HWND
handle =
GetForegroundWindow
();
if
(!
PyArg_ParseTuple
(args,
"
:GetForegroundWindow
"
))
{
return
NULL
;
}
return
PyInt_FromLong
((
long
) handle);
}
static
PyObject *
_SetForegroundWindow
(PyObject *
module
, PyObject *args)
{
HWND
handle;
if
(!
PyArg_ParseTuple
(args,
"
l:SetForegroundWindow
"
, &handle))
{
return
NULL
;
}
if
(!
SetForegroundWindow
(handle))
{
return
PyErr_Format
(PyExc_RuntimeError,
"
Error setting window
"
);
}
Py_INCREF
(Py_None);
return
Py_None;
}
static
PyMethodDef _windowing_methods[] =
{
{
"
GetForegroundWindow
"
, _GetForegroundWindow,
METH_VARARGS
},
{
"
SetForegroundWindow
"
, _SetForegroundWindow,
METH_VARARGS
},
{
NULL
,
NULL
}
};
extern
"
C
"
DL_EXPORT
(
void
) init_windowing()
{
Py_InitModule
(
"
_windowing
"
, _windowing_methods);
}
Back
|
FazBrowse Home
|
New Git URL