mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 02:17:03 +00:00
Get the layout of the Cell structure
This commit is contained in:
parent
6689595277
commit
ed15f2f97e
1 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "glfw.h"
|
||||
#include "gl.h"
|
||||
#include "modes.h"
|
||||
#include <stddef.h>
|
||||
#ifdef WITH_PROFILER
|
||||
#include <gperftools/profiler.h>
|
||||
#endif
|
||||
|
|
@ -124,6 +125,11 @@ PyInit_fast_data_types(void) {
|
|||
if (!init_freetype_library(m)) return NULL;
|
||||
if (!init_fontconfig_library(m)) return NULL;
|
||||
#endif
|
||||
|
||||
#define OOF(n) #n, offsetof(Cell, n)
|
||||
if (PyModule_AddObject(m, "CELL", Py_BuildValue("{sI sI sI sI sI sI}",
|
||||
OOF(ch), OOF(fg), OOF(bg), OOF(decoration_fg), OOF(cc), "size", sizeof(Cell))) != 0) return NULL;
|
||||
#undef OOF
|
||||
PyModule_AddIntConstant(m, "BOLD", BOLD_SHIFT);
|
||||
PyModule_AddIntConstant(m, "ITALIC", ITALIC_SHIFT);
|
||||
PyModule_AddIntConstant(m, "REVERSE", REVERSE_SHIFT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue