-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from seebye/drop-python-xlib
drop python-xlib
- Loading branch information
Showing
19 changed files
with
869 additions
and
304 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
include ueberzug/lib/lib.sh | ||
include ueberzug/X/*.h | ||
include ueberzug/X/*.c |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "python.h" | ||
#include "display.h" | ||
#include "window.h" | ||
#include "Xshm.h" | ||
|
||
|
||
static PyModuleDef module = { | ||
PyModuleDef_HEAD_INIT, | ||
.m_name = "ueberzug.X", | ||
.m_doc = "Modul which implements the interaction with the Xshm extension.", | ||
.m_size = -1, | ||
}; | ||
|
||
|
||
PyMODINIT_FUNC | ||
PyInit_X(void) { | ||
PyObject *module_instance; | ||
if (PyType_Ready(&DisplayType) < 0 || | ||
PyType_Ready(&WindowType) < 0 || | ||
PyType_Ready(&ImageType) < 0) { | ||
return NULL; | ||
} | ||
|
||
module_instance = PyModule_Create(&module); | ||
if (module_instance == NULL) { | ||
return NULL; | ||
} | ||
|
||
Py_INCREF(&DisplayType); | ||
Py_INCREF(&WindowType); | ||
Py_INCREF(&ImageType); | ||
PyModule_AddObject(module_instance, "Display", (PyObject*)&DisplayType); | ||
PyModule_AddObject(module_instance, "OverlayWindow", (PyObject*)&WindowType); | ||
PyModule_AddObject(module_instance, "Image", (PyObject*)&ImageType); | ||
return module_instance; | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef __X_H__ | ||
#define __X_H__ | ||
#include "python.h" | ||
|
||
|
||
PyModuleDef module; | ||
#endif |
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef __XSHM_H__ | ||
#define __XSHM_H__ | ||
#include "python.h" | ||
|
||
|
||
PyTypeObject ImageType; | ||
#endif |
Oops, something went wrong.