Remove unused code

This commit is contained in:
Kovid Goyal 2017-08-21 19:38:52 +05:30
parent e1b276786b
commit 8c16be2ccd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 0 additions and 23 deletions

View File

@ -8,25 +8,6 @@
#include "data-types.h" #include "data-types.h"
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#include <AvailabilityMacros.h>
#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
#define NSWindowStyleMaskTitled NSTitledWindowMask
#endif
PyObject*
cocoa_hide_titlebar(PyObject UNUSED *self, PyObject *window_id) {
NSWindow *window = (NSWindow*)PyLong_AsVoidPtr(window_id);
@try {
[window setStyleMask:
[window styleMask] & ~NSWindowStyleMaskTitled];
} @catch (NSException *e) {
return PyErr_Format(PyExc_ValueError, "Failed to set style mask: %s: %s", [[e name] UTF8String], [[e reason] UTF8String]);
}
Py_RETURN_NONE;
}
PyObject* PyObject*
cocoa_get_lang(PyObject UNUSED *self) { cocoa_get_lang(PyObject UNUSED *self) {

View File

@ -20,12 +20,9 @@ PyObject* glfw_get_key_name(PyObject UNUSED *self, PyObject *args);
PyObject* glfw_init_hint_string(PyObject UNUSED *self, PyObject *args); PyObject* glfw_init_hint_string(PyObject UNUSED *self, PyObject *args);
#ifdef __APPLE__ #ifdef __APPLE__
PyObject* cocoa_hide_titlebar(PyObject UNUSED *self, PyObject *window_id);
PyObject* cocoa_get_lang(PyObject UNUSED *self); PyObject* cocoa_get_lang(PyObject UNUSED *self);
#define COCOA_HIDE_TITLEBAR {"cocoa_hide_titlebar", (PyCFunction)cocoa_hide_titlebar, METH_O, ""},
#define COCOA_GET_LANG {"cocoa_get_lang", (PyCFunction)cocoa_get_lang, METH_NOARGS, ""}, #define COCOA_GET_LANG {"cocoa_get_lang", (PyCFunction)cocoa_get_lang, METH_NOARGS, ""},
#else #else
#define COCOA_HIDE_TITLEBAR
#define COCOA_GET_LANG #define COCOA_GET_LANG
#endif #endif
@ -40,6 +37,5 @@ PyObject* cocoa_get_lang(PyObject UNUSED *self);
{"glfw_get_physical_dpi", (PyCFunction)glfw_get_physical_dpi, METH_NOARGS, ""}, \ {"glfw_get_physical_dpi", (PyCFunction)glfw_get_physical_dpi, METH_NOARGS, ""}, \
{"glfw_get_key_name", (PyCFunction)glfw_get_key_name, METH_VARARGS, ""}, \ {"glfw_get_key_name", (PyCFunction)glfw_get_key_name, METH_VARARGS, ""}, \
{"glfw_init_hint_string", (PyCFunction)glfw_init_hint_string, METH_VARARGS, ""}, \ {"glfw_init_hint_string", (PyCFunction)glfw_init_hint_string, METH_VARARGS, ""}, \
COCOA_HIDE_TITLEBAR \
COCOA_GET_LANG COCOA_GET_LANG