remove unused code
This commit is contained in:
parent
b63ae10a09
commit
295e8db04c
@ -320,7 +320,6 @@ void enter_event(void);
|
|||||||
void mouse_event(int, int, int);
|
void mouse_event(int, int, int);
|
||||||
void focus_in_event(void);
|
void focus_in_event(void);
|
||||||
void scroll_event(double, double, int, int);
|
void scroll_event(double, double, int, int);
|
||||||
void set_special_key_combo(int glfw_key, int mods, bool is_native);
|
|
||||||
void on_key_input(GLFWkeyevent *ev);
|
void on_key_input(GLFWkeyevent *ev);
|
||||||
void request_window_attention(id_type, bool);
|
void request_window_attention(id_type, bool);
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
|
|||||||
@ -598,17 +598,6 @@ set_url_prefixes(PyObject *up) {
|
|||||||
PyObject *key, *value; Py_ssize_t pos = 0; \
|
PyObject *key, *value; Py_ssize_t pos = 0; \
|
||||||
while (PyDict_Next(d, &pos, &key, &value))
|
while (PyDict_Next(d, &pos, &key, &value))
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_special_keys(PyObject *dict) {
|
|
||||||
dict_iter(dict) {
|
|
||||||
if (!PyTuple_Check(key)) { PyErr_SetString(PyExc_TypeError, "dict keys for special keys must be tuples"); return; }
|
|
||||||
int mods = PyLong_AsLong(PyTuple_GET_ITEM(key, 0));
|
|
||||||
bool is_native = PyTuple_GET_ITEM(key, 1) == Py_True;
|
|
||||||
int glfw_key = PyLong_AsLong(PyTuple_GET_ITEM(key, 2));
|
|
||||||
set_special_key_combo(glfw_key, mods, is_native);
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline float
|
static inline float
|
||||||
PyFloat_AsFloat(PyObject *o) {
|
PyFloat_AsFloat(PyObject *o) {
|
||||||
return (float)PyFloat_AsDouble(o);
|
return (float)PyFloat_AsDouble(o);
|
||||||
@ -727,9 +716,9 @@ PYWRAP1(set_options) {
|
|||||||
OPT(select_by_word_characters_count) = PyUnicode_GET_LENGTH(chars);
|
OPT(select_by_word_characters_count) = PyUnicode_GET_LENGTH(chars);
|
||||||
Py_DECREF(chars);
|
Py_DECREF(chars);
|
||||||
|
|
||||||
GA(keymap); set_special_keys(ret);
|
GA(keymap);
|
||||||
Py_DECREF(ret); if (PyErr_Occurred()) return NULL;
|
Py_DECREF(ret); if (PyErr_Occurred()) return NULL;
|
||||||
GA(sequence_map); set_special_keys(ret);
|
GA(sequence_map);
|
||||||
Py_DECREF(ret); if (PyErr_Occurred()) return NULL;
|
Py_DECREF(ret); if (PyErr_Occurred()) return NULL;
|
||||||
|
|
||||||
GA(background_image); background_image(ret); Py_CLEAR(ret);
|
GA(background_image); background_image(ret); Py_CLEAR(ret);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user