Merge tag 'upstream/6.99.11'
Upstream version 6.99.11
# gpg: Signature made Wed 07 Sep 2016 00:30:44 CEST
# gpg: using RSA key D9AD14B9513B51E4
# gpg: Good signature from "Markus Koschany <apo@gambaru.de>" [ultimate]
# gpg: aka "Markus Koschany <markus@koschany.net>" [ultimate]
# gpg: aka "Markus Koschany <apo@debian.org>" [ultimate]
Markus Koschany
7 years ago
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: pygame_sdl2 |
2 | Version: 2.1.0-for-renpy-6.99.10 | |
2 | Version: 2.1.0-for-renpy-6.99.11 | |
3 | 3 | Summary: UNKNOWN |
4 | 4 | Home-page: https://github.com/renpy/pygame_sdl2 |
5 | 5 | Author: Tom Rothamel |
127 | 127 | To build on windows, change into the pygame_sdl2 checkout, clone |
128 | 128 | renpy/pygame_sdl2_windeps using a command like:: |
129 | 129 | |
130 | git clone https://github.com/pygame_sdl2_windeps | |
130 | git clone https://github.com/renpy/pygame_sdl2_windeps | |
131 | 131 | |
132 | 132 | and then build and install using:: |
133 | 133 | |
135 | 135 | |
136 | 136 | This assumes you have installed a version of Visual Studio that is |
137 | 137 | appropriate for the version of Python you are using. |
138 | ||
139 | C Headers | |
140 | ^^^^^^^^^ | |
141 | ||
142 | A small number of C headers can be installed using the command:: | |
143 | ||
144 | python setup.py install_headers | |
145 | ||
146 | These headers export functions statically, and must be initialized by | |
147 | including "pygame_sdl2/pygame_sdl2.h" and calling | |
148 | the (C-language) import_pygame_sdl2() function from each C file in which a | |
149 | function will be called. The following functions are exposed: | |
150 | ||
151 | * PySurface_AsSurface - Returns the SDL_Surface underlying a pygame_sdl2.Surface. | |
152 | * PySurface_New - Wraps an SDL_Surface in a new pygame_sdl2.Surface. | |
138 | 153 | |
139 | 154 | |
140 | 155 | Contributing |
0 | /* Generated by Cython 0.23.4 */ | |
0 | /* Generated by Cython 0.23.5 */ | |
1 | 1 | |
2 | 2 | #define PY_SSIZE_T_CLEAN |
3 | 3 | #include "Python.h" |
6 | 6 | #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) |
7 | 7 | #error Cython requires Python 2.6+ or Python 3.2+. |
8 | 8 | #else |
9 | #define CYTHON_ABI "0_23_4" | |
9 | #define CYTHON_ABI "0_23_5" | |
10 | 10 | #include <stddef.h> |
11 | 11 | #ifndef offsetof |
12 | 12 | #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) |
1003 | 1003 | static char __pyx_k_close_window[] = "close_window"; |
1004 | 1004 | static char __pyx_k_default_icon[] = "default_icon"; |
1005 | 1005 | static char __pyx_k_get_platform[] = "get_platform"; |
1006 | static char __pyx_k_refresh_rate[] = "refresh_rate"; | |
1006 | 1007 | static char __pyx_k_default_title[] = "default_title"; |
1007 | 1008 | static char __pyx_k_pygame_window[] = "pygame window"; |
1008 | 1009 | static char __pyx_k_register_init[] = "register_init"; |
1136 | 1137 | static PyObject *__pyx_n_s_rect; |
1137 | 1138 | static PyObject *__pyx_n_s_rectangles; |
1138 | 1139 | static PyObject *__pyx_n_s_red; |
1140 | static PyObject *__pyx_n_s_refresh_rate; | |
1139 | 1141 | static PyObject *__pyx_n_s_register_init; |
1140 | 1142 | static PyObject *__pyx_n_s_register_quit; |
1141 | 1143 | static PyObject *__pyx_n_s_repr; |
6925 | 6927 | * self.current_w = dm.w |
6926 | 6928 | * self.current_h = dm.h # <<<<<<<<<<<<<< |
6927 | 6929 | * |
6928 | * # The rest of these are just guesses. | |
6930 | * self.refresh_rate = dm.refresh_rate | |
6929 | 6931 | */ |
6930 | 6932 | __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_dm.h); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
6931 | 6933 | __Pyx_GOTREF(__pyx_t_6); |
6934 | 6936 | } |
6935 | 6937 | __pyx_L5:; |
6936 | 6938 | |
6937 | /* "pygame_sdl2/display.pyx":470 | |
6939 | /* "pygame_sdl2/display.pyx":469 | |
6940 | * self.current_h = dm.h | |
6941 | * | |
6942 | * self.refresh_rate = dm.refresh_rate # <<<<<<<<<<<<<< | |
6943 | * | |
6944 | * # The rest of these are just guesses. | |
6945 | */ | |
6946 | __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_dm.refresh_rate); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6947 | __Pyx_GOTREF(__pyx_t_6); | |
6948 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_refresh_rate, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6949 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
6950 | ||
6951 | /* "pygame_sdl2/display.pyx":472 | |
6938 | 6952 | * |
6939 | 6953 | * # The rest of these are just guesses. |
6940 | 6954 | * self.hw = False # <<<<<<<<<<<<<< |
6941 | 6955 | * self.wm = True |
6942 | 6956 | * self.video_mem = 256 * 1024 * 1024 |
6943 | 6957 | */ |
6944 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6945 | ||
6946 | /* "pygame_sdl2/display.pyx":471 | |
6958 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6959 | ||
6960 | /* "pygame_sdl2/display.pyx":473 | |
6947 | 6961 | * # The rest of these are just guesses. |
6948 | 6962 | * self.hw = False |
6949 | 6963 | * self.wm = True # <<<<<<<<<<<<<< |
6950 | 6964 | * self.video_mem = 256 * 1024 * 1024 |
6951 | 6965 | * |
6952 | 6966 | */ |
6953 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wm, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6954 | ||
6955 | /* "pygame_sdl2/display.pyx":472 | |
6967 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wm, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6968 | ||
6969 | /* "pygame_sdl2/display.pyx":474 | |
6956 | 6970 | * self.hw = False |
6957 | 6971 | * self.wm = True |
6958 | 6972 | * self.video_mem = 256 * 1024 * 1024 # <<<<<<<<<<<<<< |
6959 | 6973 | * |
6960 | 6974 | * self.blit_hw = False |
6961 | 6975 | */ |
6962 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_video_mem, __pyx_int_268435456) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6963 | ||
6964 | /* "pygame_sdl2/display.pyx":474 | |
6976 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_video_mem, __pyx_int_268435456) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6977 | ||
6978 | /* "pygame_sdl2/display.pyx":476 | |
6965 | 6979 | * self.video_mem = 256 * 1024 * 1024 |
6966 | 6980 | * |
6967 | 6981 | * self.blit_hw = False # <<<<<<<<<<<<<< |
6968 | 6982 | * self.blit_hw_CC = False |
6969 | 6983 | * self.blit_hw_A = False |
6970 | 6984 | */ |
6971 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6972 | ||
6973 | /* "pygame_sdl2/display.pyx":475 | |
6985 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6986 | ||
6987 | /* "pygame_sdl2/display.pyx":477 | |
6974 | 6988 | * |
6975 | 6989 | * self.blit_hw = False |
6976 | 6990 | * self.blit_hw_CC = False # <<<<<<<<<<<<<< |
6977 | 6991 | * self.blit_hw_A = False |
6978 | 6992 | * |
6979 | 6993 | */ |
6980 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6981 | ||
6982 | /* "pygame_sdl2/display.pyx":476 | |
6994 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6995 | ||
6996 | /* "pygame_sdl2/display.pyx":478 | |
6983 | 6997 | * self.blit_hw = False |
6984 | 6998 | * self.blit_hw_CC = False |
6985 | 6999 | * self.blit_hw_A = False # <<<<<<<<<<<<<< |
6986 | 7000 | * |
6987 | 7001 | * self.blit_sw = False |
6988 | 7002 | */ |
6989 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6990 | ||
6991 | /* "pygame_sdl2/display.pyx":478 | |
7003 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7004 | ||
7005 | /* "pygame_sdl2/display.pyx":480 | |
6992 | 7006 | * self.blit_hw_A = False |
6993 | 7007 | * |
6994 | 7008 | * self.blit_sw = False # <<<<<<<<<<<<<< |
6995 | 7009 | * self.blit_sw_CC = False |
6996 | 7010 | * self.blit_sw_A = False |
6997 | 7011 | */ |
6998 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6999 | ||
7000 | /* "pygame_sdl2/display.pyx":479 | |
7012 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7013 | ||
7014 | /* "pygame_sdl2/display.pyx":481 | |
7001 | 7015 | * |
7002 | 7016 | * self.blit_sw = False |
7003 | 7017 | * self.blit_sw_CC = False # <<<<<<<<<<<<<< |
7004 | 7018 | * self.blit_sw_A = False |
7005 | 7019 | * |
7006 | 7020 | */ |
7007 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7008 | ||
7009 | /* "pygame_sdl2/display.pyx":480 | |
7021 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7022 | ||
7023 | /* "pygame_sdl2/display.pyx":482 | |
7010 | 7024 | * self.blit_sw = False |
7011 | 7025 | * self.blit_sw_CC = False |
7012 | 7026 | * self.blit_sw_A = False # <<<<<<<<<<<<<< |
7013 | 7027 | * |
7014 | 7028 | * def __repr__(self): |
7015 | 7029 | */ |
7016 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7030 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7017 | 7031 | |
7018 | 7032 | /* "pygame_sdl2/display.pyx":425 |
7019 | 7033 | * class Info(object): |
7040 | 7054 | return __pyx_r; |
7041 | 7055 | } |
7042 | 7056 | |
7043 | /* "pygame_sdl2/display.pyx":482 | |
7057 | /* "pygame_sdl2/display.pyx":484 | |
7044 | 7058 | * self.blit_sw_A = False |
7045 | 7059 | * |
7046 | 7060 | * def __repr__(self): # <<<<<<<<<<<<<< |
7075 | 7089 | int __pyx_clineno = 0; |
7076 | 7090 | __Pyx_RefNannySetupContext("__repr__", 0); |
7077 | 7091 | |
7078 | /* "pygame_sdl2/display.pyx":483 | |
7092 | /* "pygame_sdl2/display.pyx":485 | |
7079 | 7093 | * |
7080 | 7094 | * def __repr__(self): |
7081 | 7095 | * return "<Info({!r})>".format(self.__dict__) # <<<<<<<<<<<<<< |
7083 | 7097 | * |
7084 | 7098 | */ |
7085 | 7099 | __Pyx_XDECREF(__pyx_r); |
7086 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Info_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7100 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Info_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7087 | 7101 | __Pyx_GOTREF(__pyx_t_2); |
7088 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7102 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7089 | 7103 | __Pyx_GOTREF(__pyx_t_3); |
7090 | 7104 | __pyx_t_4 = NULL; |
7091 | 7105 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
7098 | 7112 | } |
7099 | 7113 | } |
7100 | 7114 | if (!__pyx_t_4) { |
7101 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7115 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7102 | 7116 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7103 | 7117 | __Pyx_GOTREF(__pyx_t_1); |
7104 | 7118 | } else { |
7105 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7119 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7106 | 7120 | __Pyx_GOTREF(__pyx_t_5); |
7107 | 7121 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; |
7108 | 7122 | __Pyx_GIVEREF(__pyx_t_3); |
7109 | 7123 | PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3); |
7110 | 7124 | __pyx_t_3 = 0; |
7111 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7125 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7112 | 7126 | __Pyx_GOTREF(__pyx_t_1); |
7113 | 7127 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
7114 | 7128 | } |
7117 | 7131 | __pyx_t_1 = 0; |
7118 | 7132 | goto __pyx_L0; |
7119 | 7133 | |
7120 | /* "pygame_sdl2/display.pyx":482 | |
7134 | /* "pygame_sdl2/display.pyx":484 | |
7121 | 7135 | * self.blit_sw_A = False |
7122 | 7136 | * |
7123 | 7137 | * def __repr__(self): # <<<<<<<<<<<<<< |
7140 | 7154 | return __pyx_r; |
7141 | 7155 | } |
7142 | 7156 | |
7143 | /* "pygame_sdl2/display.pyx":486 | |
7157 | /* "pygame_sdl2/display.pyx":488 | |
7144 | 7158 | * |
7145 | 7159 | * |
7146 | 7160 | * def get_wm_info(): # <<<<<<<<<<<<<< |
7174 | 7188 | int __pyx_clineno = 0; |
7175 | 7189 | __Pyx_RefNannySetupContext("get_wm_info", 0); |
7176 | 7190 | |
7177 | /* "pygame_sdl2/display.pyx":487 | |
7191 | /* "pygame_sdl2/display.pyx":489 | |
7178 | 7192 | * |
7179 | 7193 | * def get_wm_info(): |
7180 | 7194 | * if main_window: # <<<<<<<<<<<<<< |
7181 | 7195 | * return main_window.get_wm_info() |
7182 | 7196 | * |
7183 | 7197 | */ |
7184 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7198 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7185 | 7199 | if (__pyx_t_1) { |
7186 | 7200 | |
7187 | /* "pygame_sdl2/display.pyx":488 | |
7201 | /* "pygame_sdl2/display.pyx":490 | |
7188 | 7202 | * def get_wm_info(): |
7189 | 7203 | * if main_window: |
7190 | 7204 | * return main_window.get_wm_info() # <<<<<<<<<<<<<< |
7192 | 7206 | * return {} |
7193 | 7207 | */ |
7194 | 7208 | __Pyx_XDECREF(__pyx_r); |
7195 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_wm_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7209 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_wm_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7196 | 7210 | __Pyx_GOTREF(__pyx_t_3); |
7197 | 7211 | __pyx_t_4 = NULL; |
7198 | 7212 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
7205 | 7219 | } |
7206 | 7220 | } |
7207 | 7221 | if (__pyx_t_4) { |
7208 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7222 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7209 | 7223 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7210 | 7224 | } else { |
7211 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7225 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7212 | 7226 | } |
7213 | 7227 | __Pyx_GOTREF(__pyx_t_2); |
7214 | 7228 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7216 | 7230 | __pyx_t_2 = 0; |
7217 | 7231 | goto __pyx_L0; |
7218 | 7232 | |
7219 | /* "pygame_sdl2/display.pyx":487 | |
7233 | /* "pygame_sdl2/display.pyx":489 | |
7220 | 7234 | * |
7221 | 7235 | * def get_wm_info(): |
7222 | 7236 | * if main_window: # <<<<<<<<<<<<<< |
7225 | 7239 | */ |
7226 | 7240 | } |
7227 | 7241 | |
7228 | /* "pygame_sdl2/display.pyx":490 | |
7242 | /* "pygame_sdl2/display.pyx":492 | |
7229 | 7243 | * return main_window.get_wm_info() |
7230 | 7244 | * |
7231 | 7245 | * return {} # <<<<<<<<<<<<<< |
7233 | 7247 | * |
7234 | 7248 | */ |
7235 | 7249 | __Pyx_XDECREF(__pyx_r); |
7236 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7250 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7237 | 7251 | __Pyx_GOTREF(__pyx_t_2); |
7238 | 7252 | __pyx_r = __pyx_t_2; |
7239 | 7253 | __pyx_t_2 = 0; |
7240 | 7254 | goto __pyx_L0; |
7241 | 7255 | |
7242 | /* "pygame_sdl2/display.pyx":486 | |
7256 | /* "pygame_sdl2/display.pyx":488 | |
7243 | 7257 | * |
7244 | 7258 | * |
7245 | 7259 | * def get_wm_info(): # <<<<<<<<<<<<<< |
7260 | 7274 | return __pyx_r; |
7261 | 7275 | } |
7262 | 7276 | |
7263 | /* "pygame_sdl2/display.pyx":493 | |
7277 | /* "pygame_sdl2/display.pyx":495 | |
7264 | 7278 | * |
7265 | 7279 | * |
7266 | 7280 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
7296 | 7310 | int __pyx_clineno = 0; |
7297 | 7311 | __Pyx_RefNannySetupContext("get_num_video_displays", 0); |
7298 | 7312 | |
7299 | /* "pygame_sdl2/display.pyx":498 | |
7313 | /* "pygame_sdl2/display.pyx":500 | |
7300 | 7314 | * """ |
7301 | 7315 | * |
7302 | 7316 | * rv = SDL_GetNumVideoDisplays() # <<<<<<<<<<<<<< |
7305 | 7319 | */ |
7306 | 7320 | __pyx_v_rv = SDL_GetNumVideoDisplays(); |
7307 | 7321 | |
7308 | /* "pygame_sdl2/display.pyx":500 | |
7322 | /* "pygame_sdl2/display.pyx":502 | |
7309 | 7323 | * rv = SDL_GetNumVideoDisplays() |
7310 | 7324 | * |
7311 | 7325 | * if rv < 0: # <<<<<<<<<<<<<< |
7315 | 7329 | __pyx_t_1 = ((__pyx_v_rv < 0) != 0); |
7316 | 7330 | if (__pyx_t_1) { |
7317 | 7331 | |
7318 | /* "pygame_sdl2/display.pyx":501 | |
7332 | /* "pygame_sdl2/display.pyx":503 | |
7319 | 7333 | * |
7320 | 7334 | * if rv < 0: |
7321 | 7335 | * raise error() # <<<<<<<<<<<<<< |
7322 | 7336 | * |
7323 | 7337 | * return rv |
7324 | 7338 | */ |
7325 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7339 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7326 | 7340 | __Pyx_GOTREF(__pyx_t_3); |
7327 | 7341 | __pyx_t_4 = NULL; |
7328 | 7342 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
7335 | 7349 | } |
7336 | 7350 | } |
7337 | 7351 | if (__pyx_t_4) { |
7338 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7352 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7339 | 7353 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7340 | 7354 | } else { |
7341 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7355 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7342 | 7356 | } |
7343 | 7357 | __Pyx_GOTREF(__pyx_t_2); |
7344 | 7358 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7345 | 7359 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
7346 | 7360 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7347 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7348 | ||
7349 | /* "pygame_sdl2/display.pyx":500 | |
7361 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7362 | ||
7363 | /* "pygame_sdl2/display.pyx":502 | |
7350 | 7364 | * rv = SDL_GetNumVideoDisplays() |
7351 | 7365 | * |
7352 | 7366 | * if rv < 0: # <<<<<<<<<<<<<< |
7355 | 7369 | */ |
7356 | 7370 | } |
7357 | 7371 | |
7358 | /* "pygame_sdl2/display.pyx":503 | |
7372 | /* "pygame_sdl2/display.pyx":505 | |
7359 | 7373 | * raise error() |
7360 | 7374 | * |
7361 | 7375 | * return rv # <<<<<<<<<<<<<< |
7363 | 7377 | * |
7364 | 7378 | */ |
7365 | 7379 | __Pyx_XDECREF(__pyx_r); |
7366 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7380 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7367 | 7381 | __Pyx_GOTREF(__pyx_t_2); |
7368 | 7382 | __pyx_r = __pyx_t_2; |
7369 | 7383 | __pyx_t_2 = 0; |
7370 | 7384 | goto __pyx_L0; |
7371 | 7385 | |
7372 | /* "pygame_sdl2/display.pyx":493 | |
7386 | /* "pygame_sdl2/display.pyx":495 | |
7373 | 7387 | * |
7374 | 7388 | * |
7375 | 7389 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
7390 | 7404 | return __pyx_r; |
7391 | 7405 | } |
7392 | 7406 | |
7393 | /* "pygame_sdl2/display.pyx":506 | |
7407 | /* "pygame_sdl2/display.pyx":508 | |
7394 | 7408 | * |
7395 | 7409 | * |
7396 | 7410 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
7447 | 7461 | } |
7448 | 7462 | } |
7449 | 7463 | if (unlikely(kw_args > 0)) { |
7450 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_modes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7464 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_modes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7451 | 7465 | } |
7452 | 7466 | } else { |
7453 | 7467 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
7464 | 7478 | } |
7465 | 7479 | goto __pyx_L4_argument_unpacking_done; |
7466 | 7480 | __pyx_L5_argtuple_error:; |
7467 | __Pyx_RaiseArgtupleInvalid("list_modes", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7481 | __Pyx_RaiseArgtupleInvalid("list_modes", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7468 | 7482 | __pyx_L3_error:; |
7469 | 7483 | __Pyx_AddTraceback("pygame_sdl2.display.list_modes", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7470 | 7484 | __Pyx_RefNannyFinishContext(); |
7498 | 7512 | int __pyx_clineno = 0; |
7499 | 7513 | __Pyx_RefNannySetupContext("list_modes", 0); |
7500 | 7514 | |
7501 | /* "pygame_sdl2/display.pyx":516 | |
7515 | /* "pygame_sdl2/display.pyx":518 | |
7502 | 7516 | * cdef SDL_DisplayMode mode |
7503 | 7517 | * |
7504 | 7518 | * rv = [ ] # <<<<<<<<<<<<<< |
7505 | 7519 | * |
7506 | 7520 | * num_modes = SDL_GetNumDisplayModes(display) |
7507 | 7521 | */ |
7508 | __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7522 | __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7509 | 7523 | __Pyx_GOTREF(__pyx_t_1); |
7510 | 7524 | __pyx_v_rv = ((PyObject*)__pyx_t_1); |
7511 | 7525 | __pyx_t_1 = 0; |
7512 | 7526 | |
7513 | /* "pygame_sdl2/display.pyx":518 | |
7527 | /* "pygame_sdl2/display.pyx":520 | |
7514 | 7528 | * rv = [ ] |
7515 | 7529 | * |
7516 | 7530 | * num_modes = SDL_GetNumDisplayModes(display) # <<<<<<<<<<<<<< |
7517 | 7531 | * if num_modes < 0: |
7518 | 7532 | * raise error() |
7519 | 7533 | */ |
7520 | __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7534 | __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7521 | 7535 | __pyx_v_num_modes = SDL_GetNumDisplayModes(__pyx_t_2); |
7522 | 7536 | |
7523 | /* "pygame_sdl2/display.pyx":519 | |
7537 | /* "pygame_sdl2/display.pyx":521 | |
7524 | 7538 | * |
7525 | 7539 | * num_modes = SDL_GetNumDisplayModes(display) |
7526 | 7540 | * if num_modes < 0: # <<<<<<<<<<<<<< |
7530 | 7544 | __pyx_t_3 = ((__pyx_v_num_modes < 0) != 0); |
7531 | 7545 | if (__pyx_t_3) { |
7532 | 7546 | |
7533 | /* "pygame_sdl2/display.pyx":520 | |
7547 | /* "pygame_sdl2/display.pyx":522 | |
7534 | 7548 | * num_modes = SDL_GetNumDisplayModes(display) |
7535 | 7549 | * if num_modes < 0: |
7536 | 7550 | * raise error() # <<<<<<<<<<<<<< |
7537 | 7551 | * |
7538 | 7552 | * for 0 <= i < num_modes: |
7539 | 7553 | */ |
7540 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7554 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7541 | 7555 | __Pyx_GOTREF(__pyx_t_4); |
7542 | 7556 | __pyx_t_5 = NULL; |
7543 | 7557 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
7550 | 7564 | } |
7551 | 7565 | } |
7552 | 7566 | if (__pyx_t_5) { |
7553 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7567 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7554 | 7568 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
7555 | 7569 | } else { |
7556 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7570 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7557 | 7571 | } |
7558 | 7572 | __Pyx_GOTREF(__pyx_t_1); |
7559 | 7573 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7560 | 7574 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
7561 | 7575 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7562 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7563 | ||
7564 | /* "pygame_sdl2/display.pyx":519 | |
7576 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7577 | ||
7578 | /* "pygame_sdl2/display.pyx":521 | |
7565 | 7579 | * |
7566 | 7580 | * num_modes = SDL_GetNumDisplayModes(display) |
7567 | 7581 | * if num_modes < 0: # <<<<<<<<<<<<<< |
7570 | 7584 | */ |
7571 | 7585 | } |
7572 | 7586 | |
7573 | /* "pygame_sdl2/display.pyx":522 | |
7587 | /* "pygame_sdl2/display.pyx":524 | |
7574 | 7588 | * raise error() |
7575 | 7589 | * |
7576 | 7590 | * for 0 <= i < num_modes: # <<<<<<<<<<<<<< |
7580 | 7594 | __pyx_t_2 = __pyx_v_num_modes; |
7581 | 7595 | for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { |
7582 | 7596 | |
7583 | /* "pygame_sdl2/display.pyx":523 | |
7597 | /* "pygame_sdl2/display.pyx":525 | |
7584 | 7598 | * |
7585 | 7599 | * for 0 <= i < num_modes: |
7586 | 7600 | * if SDL_GetDisplayMode(display, i, &mode) == 0: # <<<<<<<<<<<<<< |
7587 | 7601 | * t = (mode.w, mode.h) |
7588 | 7602 | * if t not in rv: |
7589 | 7603 | */ |
7590 | __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7604 | __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7591 | 7605 | __pyx_t_3 = ((SDL_GetDisplayMode(__pyx_t_6, __pyx_v_i, (&__pyx_v_mode)) == 0) != 0); |
7592 | 7606 | if (__pyx_t_3) { |
7593 | 7607 | |
7594 | /* "pygame_sdl2/display.pyx":524 | |
7608 | /* "pygame_sdl2/display.pyx":526 | |
7595 | 7609 | * for 0 <= i < num_modes: |
7596 | 7610 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7597 | 7611 | * t = (mode.w, mode.h) # <<<<<<<<<<<<<< |
7598 | 7612 | * if t not in rv: |
7599 | 7613 | * rv.append(t) |
7600 | 7614 | */ |
7601 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_mode.w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7615 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_mode.w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7602 | 7616 | __Pyx_GOTREF(__pyx_t_1); |
7603 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_mode.h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7617 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_mode.h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7604 | 7618 | __Pyx_GOTREF(__pyx_t_4); |
7605 | __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7619 | __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7606 | 7620 | __Pyx_GOTREF(__pyx_t_5); |
7607 | 7621 | __Pyx_GIVEREF(__pyx_t_1); |
7608 | 7622 | PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); |
7613 | 7627 | __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5); |
7614 | 7628 | __pyx_t_5 = 0; |
7615 | 7629 | |
7616 | /* "pygame_sdl2/display.pyx":525 | |
7630 | /* "pygame_sdl2/display.pyx":527 | |
7617 | 7631 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7618 | 7632 | * t = (mode.w, mode.h) |
7619 | 7633 | * if t not in rv: # <<<<<<<<<<<<<< |
7620 | 7634 | * rv.append(t) |
7621 | 7635 | * |
7622 | 7636 | */ |
7623 | __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_t, __pyx_v_rv, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7637 | __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_t, __pyx_v_rv, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7624 | 7638 | __pyx_t_7 = (__pyx_t_3 != 0); |
7625 | 7639 | if (__pyx_t_7) { |
7626 | 7640 | |
7627 | /* "pygame_sdl2/display.pyx":526 | |
7641 | /* "pygame_sdl2/display.pyx":528 | |
7628 | 7642 | * t = (mode.w, mode.h) |
7629 | 7643 | * if t not in rv: |
7630 | 7644 | * rv.append(t) # <<<<<<<<<<<<<< |
7631 | 7645 | * |
7632 | 7646 | * return rv |
7633 | 7647 | */ |
7634 | __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_v_t); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7635 | ||
7636 | /* "pygame_sdl2/display.pyx":525 | |
7648 | __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_v_t); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7649 | ||
7650 | /* "pygame_sdl2/display.pyx":527 | |
7637 | 7651 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7638 | 7652 | * t = (mode.w, mode.h) |
7639 | 7653 | * if t not in rv: # <<<<<<<<<<<<<< |
7642 | 7656 | */ |
7643 | 7657 | } |
7644 | 7658 | |
7645 | /* "pygame_sdl2/display.pyx":523 | |
7659 | /* "pygame_sdl2/display.pyx":525 | |
7646 | 7660 | * |
7647 | 7661 | * for 0 <= i < num_modes: |
7648 | 7662 | * if SDL_GetDisplayMode(display, i, &mode) == 0: # <<<<<<<<<<<<<< |
7652 | 7666 | } |
7653 | 7667 | } |
7654 | 7668 | |
7655 | /* "pygame_sdl2/display.pyx":528 | |
7669 | /* "pygame_sdl2/display.pyx":530 | |
7656 | 7670 | * rv.append(t) |
7657 | 7671 | * |
7658 | 7672 | * return rv # <<<<<<<<<<<<<< |
7664 | 7678 | __pyx_r = __pyx_v_rv; |
7665 | 7679 | goto __pyx_L0; |
7666 | 7680 | |
7667 | /* "pygame_sdl2/display.pyx":506 | |
7681 | /* "pygame_sdl2/display.pyx":508 | |
7668 | 7682 | * |
7669 | 7683 | * |
7670 | 7684 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
7687 | 7701 | return __pyx_r; |
7688 | 7702 | } |
7689 | 7703 | |
7690 | /* "pygame_sdl2/display.pyx":531 | |
7704 | /* "pygame_sdl2/display.pyx":533 | |
7691 | 7705 | * |
7692 | 7706 | * |
7693 | 7707 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
7741 | 7755 | } |
7742 | 7756 | } |
7743 | 7757 | if (unlikely(kw_args > 0)) { |
7744 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_ok") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7758 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_ok") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7745 | 7759 | } |
7746 | 7760 | } else { |
7747 | 7761 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
7758 | 7772 | } |
7759 | 7773 | goto __pyx_L4_argument_unpacking_done; |
7760 | 7774 | __pyx_L5_argtuple_error:; |
7761 | __Pyx_RaiseArgtupleInvalid("mode_ok", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7775 | __Pyx_RaiseArgtupleInvalid("mode_ok", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7762 | 7776 | __pyx_L3_error:; |
7763 | 7777 | __Pyx_AddTraceback("pygame_sdl2.display.mode_ok", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7764 | 7778 | __Pyx_RefNannyFinishContext(); |
7784 | 7798 | int __pyx_clineno = 0; |
7785 | 7799 | __Pyx_RefNannySetupContext("mode_ok", 0); |
7786 | 7800 | |
7787 | /* "pygame_sdl2/display.pyx":536 | |
7801 | /* "pygame_sdl2/display.pyx":538 | |
7788 | 7802 | * """ |
7789 | 7803 | * |
7790 | 7804 | * return tuple(size) in list_modes() # <<<<<<<<<<<<<< |
7792 | 7806 | * def gl_reset_attributes(): |
7793 | 7807 | */ |
7794 | 7808 | __Pyx_XDECREF(__pyx_r); |
7795 | __pyx_t_1 = PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7809 | __pyx_t_1 = PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7796 | 7810 | __Pyx_GOTREF(__pyx_t_1); |
7797 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_modes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7811 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_modes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7798 | 7812 | __Pyx_GOTREF(__pyx_t_3); |
7799 | 7813 | __pyx_t_4 = NULL; |
7800 | 7814 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
7807 | 7821 | } |
7808 | 7822 | } |
7809 | 7823 | if (__pyx_t_4) { |
7810 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7824 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7811 | 7825 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7812 | 7826 | } else { |
7813 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7827 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7814 | 7828 | } |
7815 | 7829 | __Pyx_GOTREF(__pyx_t_2); |
7816 | 7830 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7817 | __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7831 | __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7818 | 7832 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7819 | 7833 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7820 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7834 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7821 | 7835 | __Pyx_GOTREF(__pyx_t_2); |
7822 | 7836 | __pyx_r = __pyx_t_2; |
7823 | 7837 | __pyx_t_2 = 0; |
7824 | 7838 | goto __pyx_L0; |
7825 | 7839 | |
7826 | /* "pygame_sdl2/display.pyx":531 | |
7840 | /* "pygame_sdl2/display.pyx":533 | |
7827 | 7841 | * |
7828 | 7842 | * |
7829 | 7843 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
7845 | 7859 | return __pyx_r; |
7846 | 7860 | } |
7847 | 7861 | |
7848 | /* "pygame_sdl2/display.pyx":538 | |
7862 | /* "pygame_sdl2/display.pyx":540 | |
7849 | 7863 | * return tuple(size) in list_modes() |
7850 | 7864 | * |
7851 | 7865 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
7872 | 7886 | __Pyx_RefNannyDeclarations |
7873 | 7887 | __Pyx_RefNannySetupContext("gl_reset_attributes", 0); |
7874 | 7888 | |
7875 | /* "pygame_sdl2/display.pyx":539 | |
7889 | /* "pygame_sdl2/display.pyx":541 | |
7876 | 7890 | * |
7877 | 7891 | * def gl_reset_attributes(): |
7878 | 7892 | * SDL_GL_ResetAttributes() # <<<<<<<<<<<<<< |
7881 | 7895 | */ |
7882 | 7896 | SDL_GL_ResetAttributes(); |
7883 | 7897 | |
7884 | /* "pygame_sdl2/display.pyx":538 | |
7898 | /* "pygame_sdl2/display.pyx":540 | |
7885 | 7899 | * return tuple(size) in list_modes() |
7886 | 7900 | * |
7887 | 7901 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
7896 | 7910 | return __pyx_r; |
7897 | 7911 | } |
7898 | 7912 | |
7899 | /* "pygame_sdl2/display.pyx":541 | |
7913 | /* "pygame_sdl2/display.pyx":543 | |
7900 | 7914 | * SDL_GL_ResetAttributes() |
7901 | 7915 | * |
7902 | 7916 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
7936 | 7950 | case 1: |
7937 | 7951 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; |
7938 | 7952 | else { |
7939 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7953 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7940 | 7954 | } |
7941 | 7955 | } |
7942 | 7956 | if (unlikely(kw_args > 0)) { |
7943 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gl_set_attribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7957 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gl_set_attribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7944 | 7958 | } |
7945 | 7959 | } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { |
7946 | 7960 | goto __pyx_L5_argtuple_error; |
7953 | 7967 | } |
7954 | 7968 | goto __pyx_L4_argument_unpacking_done; |
7955 | 7969 | __pyx_L5_argtuple_error:; |
7956 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7970 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7957 | 7971 | __pyx_L3_error:; |
7958 | 7972 | __Pyx_AddTraceback("pygame_sdl2.display.gl_set_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7959 | 7973 | __Pyx_RefNannyFinishContext(); |
7981 | 7995 | int __pyx_clineno = 0; |
7982 | 7996 | __Pyx_RefNannySetupContext("gl_set_attribute", 0); |
7983 | 7997 | |
7984 | /* "pygame_sdl2/display.pyx":543 | |
7998 | /* "pygame_sdl2/display.pyx":545 | |
7985 | 7999 | * def gl_set_attribute(flag, value): |
7986 | 8000 | * |
7987 | 8001 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
7988 | 8002 | * if ios: |
7989 | 8003 | * return |
7990 | 8004 | */ |
7991 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8005 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7992 | 8006 | __Pyx_GOTREF(__pyx_t_1); |
7993 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8007 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7994 | 8008 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7995 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8009 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7996 | 8010 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7997 | 8011 | if (__pyx_t_3) { |
7998 | 8012 | |
7999 | /* "pygame_sdl2/display.pyx":544 | |
8013 | /* "pygame_sdl2/display.pyx":546 | |
8000 | 8014 | * |
8001 | 8015 | * if flag == GL_SWAP_CONTROL: |
8002 | 8016 | * if ios: # <<<<<<<<<<<<<< |
8003 | 8017 | * return |
8004 | 8018 | * |
8005 | 8019 | */ |
8006 | __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ios); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8020 | __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ios); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8007 | 8021 | __Pyx_GOTREF(__pyx_t_2); |
8008 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8022 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8009 | 8023 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8010 | 8024 | if (__pyx_t_3) { |
8011 | 8025 | |
8012 | /* "pygame_sdl2/display.pyx":545 | |
8026 | /* "pygame_sdl2/display.pyx":547 | |
8013 | 8027 | * if flag == GL_SWAP_CONTROL: |
8014 | 8028 | * if ios: |
8015 | 8029 | * return # <<<<<<<<<<<<<< |
8020 | 8034 | __pyx_r = Py_None; __Pyx_INCREF(Py_None); |
8021 | 8035 | goto __pyx_L0; |
8022 | 8036 | |
8023 | /* "pygame_sdl2/display.pyx":544 | |
8037 | /* "pygame_sdl2/display.pyx":546 | |
8024 | 8038 | * |
8025 | 8039 | * if flag == GL_SWAP_CONTROL: |
8026 | 8040 | * if ios: # <<<<<<<<<<<<<< |
8029 | 8043 | */ |
8030 | 8044 | } |
8031 | 8045 | |
8032 | /* "pygame_sdl2/display.pyx":550 | |
8046 | /* "pygame_sdl2/display.pyx":552 | |
8033 | 8047 | * # to deal with the case where the negative interval isn't |
8034 | 8048 | * # supported. Then give up and carry on. |
8035 | 8049 | * if SDL_GL_SetSwapInterval(value): # <<<<<<<<<<<<<< |
8036 | 8050 | * SDL_GL_SetSwapInterval(-value) |
8037 | 8051 | * |
8038 | 8052 | */ |
8039 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8053 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8040 | 8054 | __pyx_t_3 = (SDL_GL_SetSwapInterval(__pyx_t_4) != 0); |
8041 | 8055 | if (__pyx_t_3) { |
8042 | 8056 | |
8043 | /* "pygame_sdl2/display.pyx":551 | |
8057 | /* "pygame_sdl2/display.pyx":553 | |
8044 | 8058 | * # supported. Then give up and carry on. |
8045 | 8059 | * if SDL_GL_SetSwapInterval(value): |
8046 | 8060 | * SDL_GL_SetSwapInterval(-value) # <<<<<<<<<<<<<< |
8047 | 8061 | * |
8048 | 8062 | * default_swap_control = value |
8049 | 8063 | */ |
8050 | __pyx_t_2 = PyNumber_Negative(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8064 | __pyx_t_2 = PyNumber_Negative(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8051 | 8065 | __Pyx_GOTREF(__pyx_t_2); |
8052 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8066 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8053 | 8067 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8054 | 8068 | SDL_GL_SetSwapInterval(__pyx_t_4); |
8055 | 8069 | |
8056 | /* "pygame_sdl2/display.pyx":550 | |
8070 | /* "pygame_sdl2/display.pyx":552 | |
8057 | 8071 | * # to deal with the case where the negative interval isn't |
8058 | 8072 | * # supported. Then give up and carry on. |
8059 | 8073 | * if SDL_GL_SetSwapInterval(value): # <<<<<<<<<<<<<< |
8062 | 8076 | */ |
8063 | 8077 | } |
8064 | 8078 | |
8065 | /* "pygame_sdl2/display.pyx":553 | |
8079 | /* "pygame_sdl2/display.pyx":555 | |
8066 | 8080 | * SDL_GL_SetSwapInterval(-value) |
8067 | 8081 | * |
8068 | 8082 | * default_swap_control = value # <<<<<<<<<<<<<< |
8072 | 8086 | __Pyx_INCREF(__pyx_v_value); |
8073 | 8087 | __pyx_v_default_swap_control = __pyx_v_value; |
8074 | 8088 | |
8075 | /* "pygame_sdl2/display.pyx":554 | |
8089 | /* "pygame_sdl2/display.pyx":556 | |
8076 | 8090 | * |
8077 | 8091 | * default_swap_control = value |
8078 | 8092 | * return # <<<<<<<<<<<<<< |
8083 | 8097 | __pyx_r = Py_None; __Pyx_INCREF(Py_None); |
8084 | 8098 | goto __pyx_L0; |
8085 | 8099 | |
8086 | /* "pygame_sdl2/display.pyx":543 | |
8100 | /* "pygame_sdl2/display.pyx":545 | |
8087 | 8101 | * def gl_set_attribute(flag, value): |
8088 | 8102 | * |
8089 | 8103 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8092 | 8106 | */ |
8093 | 8107 | } |
8094 | 8108 | |
8095 | /* "pygame_sdl2/display.pyx":556 | |
8109 | /* "pygame_sdl2/display.pyx":558 | |
8096 | 8110 | * return |
8097 | 8111 | * |
8098 | 8112 | * if SDL_GL_SetAttribute(flag, value): # <<<<<<<<<<<<<< |
8099 | 8113 | * raise error() |
8100 | 8114 | * |
8101 | 8115 | */ |
8102 | __pyx_t_5 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8103 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8116 | __pyx_t_5 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8117 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8104 | 8118 | __pyx_t_3 = (SDL_GL_SetAttribute(__pyx_t_5, __pyx_t_4) != 0); |
8105 | 8119 | if (__pyx_t_3) { |
8106 | 8120 | |
8107 | /* "pygame_sdl2/display.pyx":557 | |
8121 | /* "pygame_sdl2/display.pyx":559 | |
8108 | 8122 | * |
8109 | 8123 | * if SDL_GL_SetAttribute(flag, value): |
8110 | 8124 | * raise error() # <<<<<<<<<<<<<< |
8111 | 8125 | * |
8112 | 8126 | * def gl_get_attribute(flag): |
8113 | 8127 | */ |
8114 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8128 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8115 | 8129 | __Pyx_GOTREF(__pyx_t_1); |
8116 | 8130 | __pyx_t_6 = NULL; |
8117 | 8131 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { |
8124 | 8138 | } |
8125 | 8139 | } |
8126 | 8140 | if (__pyx_t_6) { |
8127 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8141 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8128 | 8142 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
8129 | 8143 | } else { |
8130 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8144 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8131 | 8145 | } |
8132 | 8146 | __Pyx_GOTREF(__pyx_t_2); |
8133 | 8147 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8134 | 8148 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
8135 | 8149 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8136 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8137 | ||
8138 | /* "pygame_sdl2/display.pyx":556 | |
8150 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8151 | ||
8152 | /* "pygame_sdl2/display.pyx":558 | |
8139 | 8153 | * return |
8140 | 8154 | * |
8141 | 8155 | * if SDL_GL_SetAttribute(flag, value): # <<<<<<<<<<<<<< |
8144 | 8158 | */ |
8145 | 8159 | } |
8146 | 8160 | |
8147 | /* "pygame_sdl2/display.pyx":541 | |
8161 | /* "pygame_sdl2/display.pyx":543 | |
8148 | 8162 | * SDL_GL_ResetAttributes() |
8149 | 8163 | * |
8150 | 8164 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
8168 | 8182 | return __pyx_r; |
8169 | 8183 | } |
8170 | 8184 | |
8171 | /* "pygame_sdl2/display.pyx":559 | |
8185 | /* "pygame_sdl2/display.pyx":561 | |
8172 | 8186 | * raise error() |
8173 | 8187 | * |
8174 | 8188 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
8204 | 8218 | int __pyx_clineno = 0; |
8205 | 8219 | __Pyx_RefNannySetupContext("gl_get_attribute", 0); |
8206 | 8220 | |
8207 | /* "pygame_sdl2/display.pyx":562 | |
8221 | /* "pygame_sdl2/display.pyx":564 | |
8208 | 8222 | * cdef int rv |
8209 | 8223 | * |
8210 | 8224 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8211 | 8225 | * return SDL_GL_GetSwapInterval() |
8212 | 8226 | * |
8213 | 8227 | */ |
8214 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8228 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8215 | 8229 | __Pyx_GOTREF(__pyx_t_1); |
8216 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8230 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8217 | 8231 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8218 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8232 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8219 | 8233 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8220 | 8234 | if (__pyx_t_3) { |
8221 | 8235 | |
8222 | /* "pygame_sdl2/display.pyx":563 | |
8236 | /* "pygame_sdl2/display.pyx":565 | |
8223 | 8237 | * |
8224 | 8238 | * if flag == GL_SWAP_CONTROL: |
8225 | 8239 | * return SDL_GL_GetSwapInterval() # <<<<<<<<<<<<<< |
8227 | 8241 | * if SDL_GL_GetAttribute(flag, &rv): |
8228 | 8242 | */ |
8229 | 8243 | __Pyx_XDECREF(__pyx_r); |
8230 | __pyx_t_2 = __Pyx_PyInt_From_int(SDL_GL_GetSwapInterval()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8244 | __pyx_t_2 = __Pyx_PyInt_From_int(SDL_GL_GetSwapInterval()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8231 | 8245 | __Pyx_GOTREF(__pyx_t_2); |
8232 | 8246 | __pyx_r = __pyx_t_2; |
8233 | 8247 | __pyx_t_2 = 0; |
8234 | 8248 | goto __pyx_L0; |
8235 | 8249 | |
8236 | /* "pygame_sdl2/display.pyx":562 | |
8250 | /* "pygame_sdl2/display.pyx":564 | |
8237 | 8251 | * cdef int rv |
8238 | 8252 | * |
8239 | 8253 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8242 | 8256 | */ |
8243 | 8257 | } |
8244 | 8258 | |
8245 | /* "pygame_sdl2/display.pyx":565 | |
8259 | /* "pygame_sdl2/display.pyx":567 | |
8246 | 8260 | * return SDL_GL_GetSwapInterval() |
8247 | 8261 | * |
8248 | 8262 | * if SDL_GL_GetAttribute(flag, &rv): # <<<<<<<<<<<<<< |
8249 | 8263 | * raise error() |
8250 | 8264 | * |
8251 | 8265 | */ |
8252 | __pyx_t_4 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8266 | __pyx_t_4 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8253 | 8267 | __pyx_t_3 = (SDL_GL_GetAttribute(__pyx_t_4, (&__pyx_v_rv)) != 0); |
8254 | 8268 | if (__pyx_t_3) { |
8255 | 8269 | |
8256 | /* "pygame_sdl2/display.pyx":566 | |
8270 | /* "pygame_sdl2/display.pyx":568 | |
8257 | 8271 | * |
8258 | 8272 | * if SDL_GL_GetAttribute(flag, &rv): |
8259 | 8273 | * raise error() # <<<<<<<<<<<<<< |
8260 | 8274 | * |
8261 | 8275 | * return rv |
8262 | 8276 | */ |
8263 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8277 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8264 | 8278 | __Pyx_GOTREF(__pyx_t_1); |
8265 | 8279 | __pyx_t_5 = NULL; |
8266 | 8280 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { |
8273 | 8287 | } |
8274 | 8288 | } |
8275 | 8289 | if (__pyx_t_5) { |
8276 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8290 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8277 | 8291 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8278 | 8292 | } else { |
8279 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8293 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8280 | 8294 | } |
8281 | 8295 | __Pyx_GOTREF(__pyx_t_2); |
8282 | 8296 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8283 | 8297 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
8284 | 8298 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8285 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8286 | ||
8287 | /* "pygame_sdl2/display.pyx":565 | |
8299 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8300 | ||
8301 | /* "pygame_sdl2/display.pyx":567 | |
8288 | 8302 | * return SDL_GL_GetSwapInterval() |
8289 | 8303 | * |
8290 | 8304 | * if SDL_GL_GetAttribute(flag, &rv): # <<<<<<<<<<<<<< |
8293 | 8307 | */ |
8294 | 8308 | } |
8295 | 8309 | |
8296 | /* "pygame_sdl2/display.pyx":568 | |
8310 | /* "pygame_sdl2/display.pyx":570 | |
8297 | 8311 | * raise error() |
8298 | 8312 | * |
8299 | 8313 | * return rv # <<<<<<<<<<<<<< |
8301 | 8315 | * def gl_load_library(path): |
8302 | 8316 | */ |
8303 | 8317 | __Pyx_XDECREF(__pyx_r); |
8304 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8318 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8305 | 8319 | __Pyx_GOTREF(__pyx_t_2); |
8306 | 8320 | __pyx_r = __pyx_t_2; |
8307 | 8321 | __pyx_t_2 = 0; |
8308 | 8322 | goto __pyx_L0; |
8309 | 8323 | |
8310 | /* "pygame_sdl2/display.pyx":559 | |
8324 | /* "pygame_sdl2/display.pyx":561 | |
8311 | 8325 | * raise error() |
8312 | 8326 | * |
8313 | 8327 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
8328 | 8342 | return __pyx_r; |
8329 | 8343 | } |
8330 | 8344 | |
8331 | /* "pygame_sdl2/display.pyx":570 | |
8345 | /* "pygame_sdl2/display.pyx":572 | |
8332 | 8346 | * return rv |
8333 | 8347 | * |
8334 | 8348 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
8364 | 8378 | int __pyx_clineno = 0; |
8365 | 8379 | __Pyx_RefNannySetupContext("gl_load_library", 0); |
8366 | 8380 | |
8367 | /* "pygame_sdl2/display.pyx":571 | |
8381 | /* "pygame_sdl2/display.pyx":573 | |
8368 | 8382 | * |
8369 | 8383 | * def gl_load_library(path): |
8370 | 8384 | * if path is None: # <<<<<<<<<<<<<< |
8375 | 8389 | __pyx_t_2 = (__pyx_t_1 != 0); |
8376 | 8390 | if (__pyx_t_2) { |
8377 | 8391 | |
8378 | /* "pygame_sdl2/display.pyx":572 | |
8392 | /* "pygame_sdl2/display.pyx":574 | |
8379 | 8393 | * def gl_load_library(path): |
8380 | 8394 | * if path is None: |
8381 | 8395 | * if SDL_GL_LoadLibrary(NULL): # <<<<<<<<<<<<<< |
8385 | 8399 | __pyx_t_2 = (SDL_GL_LoadLibrary(NULL) != 0); |
8386 | 8400 | if (__pyx_t_2) { |
8387 | 8401 | |
8388 | /* "pygame_sdl2/display.pyx":573 | |
8402 | /* "pygame_sdl2/display.pyx":575 | |
8389 | 8403 | * if path is None: |
8390 | 8404 | * if SDL_GL_LoadLibrary(NULL): |
8391 | 8405 | * raise error() # <<<<<<<<<<<<<< |
8392 | 8406 | * else: |
8393 | 8407 | * if SDL_GL_LoadLibrary(path): |
8394 | 8408 | */ |
8395 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8409 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8396 | 8410 | __Pyx_GOTREF(__pyx_t_4); |
8397 | 8411 | __pyx_t_5 = NULL; |
8398 | 8412 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
8405 | 8419 | } |
8406 | 8420 | } |
8407 | 8421 | if (__pyx_t_5) { |
8408 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8422 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8409 | 8423 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8410 | 8424 | } else { |
8411 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8425 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8412 | 8426 | } |
8413 | 8427 | __Pyx_GOTREF(__pyx_t_3); |
8414 | 8428 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8415 | 8429 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
8416 | 8430 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8417 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8418 | ||
8419 | /* "pygame_sdl2/display.pyx":572 | |
8431 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8432 | ||
8433 | /* "pygame_sdl2/display.pyx":574 | |
8420 | 8434 | * def gl_load_library(path): |
8421 | 8435 | * if path is None: |
8422 | 8436 | * if SDL_GL_LoadLibrary(NULL): # <<<<<<<<<<<<<< |
8425 | 8439 | */ |
8426 | 8440 | } |
8427 | 8441 | |
8428 | /* "pygame_sdl2/display.pyx":571 | |
8442 | /* "pygame_sdl2/display.pyx":573 | |
8429 | 8443 | * |
8430 | 8444 | * def gl_load_library(path): |
8431 | 8445 | * if path is None: # <<<<<<<<<<<<<< |
8435 | 8449 | goto __pyx_L3; |
8436 | 8450 | } |
8437 | 8451 | |
8438 | /* "pygame_sdl2/display.pyx":575 | |
8452 | /* "pygame_sdl2/display.pyx":577 | |
8439 | 8453 | * raise error() |
8440 | 8454 | * else: |
8441 | 8455 | * if SDL_GL_LoadLibrary(path): # <<<<<<<<<<<<<< |
8443 | 8457 | * |
8444 | 8458 | */ |
8445 | 8459 | /*else*/ { |
8446 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8460 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8447 | 8461 | __pyx_t_2 = (SDL_GL_LoadLibrary(__pyx_t_6) != 0); |
8448 | 8462 | if (__pyx_t_2) { |
8449 | 8463 | |
8450 | /* "pygame_sdl2/display.pyx":576 | |
8464 | /* "pygame_sdl2/display.pyx":578 | |
8451 | 8465 | * else: |
8452 | 8466 | * if SDL_GL_LoadLibrary(path): |
8453 | 8467 | * raise error() # <<<<<<<<<<<<<< |
8454 | 8468 | * |
8455 | 8469 | * def gl_unload_library(): |
8456 | 8470 | */ |
8457 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8471 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8458 | 8472 | __Pyx_GOTREF(__pyx_t_4); |
8459 | 8473 | __pyx_t_5 = NULL; |
8460 | 8474 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
8467 | 8481 | } |
8468 | 8482 | } |
8469 | 8483 | if (__pyx_t_5) { |
8470 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8484 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8471 | 8485 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8472 | 8486 | } else { |
8473 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8487 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8474 | 8488 | } |
8475 | 8489 | __Pyx_GOTREF(__pyx_t_3); |
8476 | 8490 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8477 | 8491 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
8478 | 8492 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8479 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8480 | ||
8481 | /* "pygame_sdl2/display.pyx":575 | |
8493 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8494 | ||
8495 | /* "pygame_sdl2/display.pyx":577 | |
8482 | 8496 | * raise error() |
8483 | 8497 | * else: |
8484 | 8498 | * if SDL_GL_LoadLibrary(path): # <<<<<<<<<<<<<< |
8489 | 8503 | } |
8490 | 8504 | __pyx_L3:; |
8491 | 8505 | |
8492 | /* "pygame_sdl2/display.pyx":570 | |
8506 | /* "pygame_sdl2/display.pyx":572 | |
8493 | 8507 | * return rv |
8494 | 8508 | * |
8495 | 8509 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
8512 | 8526 | return __pyx_r; |
8513 | 8527 | } |
8514 | 8528 | |
8515 | /* "pygame_sdl2/display.pyx":578 | |
8529 | /* "pygame_sdl2/display.pyx":580 | |
8516 | 8530 | * raise error() |
8517 | 8531 | * |
8518 | 8532 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
8539 | 8553 | __Pyx_RefNannyDeclarations |
8540 | 8554 | __Pyx_RefNannySetupContext("gl_unload_library", 0); |
8541 | 8555 | |
8542 | /* "pygame_sdl2/display.pyx":579 | |
8556 | /* "pygame_sdl2/display.pyx":581 | |
8543 | 8557 | * |
8544 | 8558 | * def gl_unload_library(): |
8545 | 8559 | * SDL_GL_UnloadLibrary() # <<<<<<<<<<<<<< |
8548 | 8562 | */ |
8549 | 8563 | SDL_GL_UnloadLibrary(); |
8550 | 8564 | |
8551 | /* "pygame_sdl2/display.pyx":578 | |
8565 | /* "pygame_sdl2/display.pyx":580 | |
8552 | 8566 | * raise error() |
8553 | 8567 | * |
8554 | 8568 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
8563 | 8577 | return __pyx_r; |
8564 | 8578 | } |
8565 | 8579 | |
8566 | /* "pygame_sdl2/display.pyx":581 | |
8580 | /* "pygame_sdl2/display.pyx":583 | |
8567 | 8581 | * SDL_GL_UnloadLibrary() |
8568 | 8582 | * |
8569 | 8583 | * def get_active(): # <<<<<<<<<<<<<< |
8597 | 8611 | int __pyx_clineno = 0; |
8598 | 8612 | __Pyx_RefNannySetupContext("get_active", 0); |
8599 | 8613 | |
8600 | /* "pygame_sdl2/display.pyx":582 | |
8614 | /* "pygame_sdl2/display.pyx":584 | |
8601 | 8615 | * |
8602 | 8616 | * def get_active(): |
8603 | 8617 | * if main_window: # <<<<<<<<<<<<<< |
8604 | 8618 | * return main_window.get_active() |
8605 | 8619 | * return False |
8606 | 8620 | */ |
8607 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8621 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8608 | 8622 | if (__pyx_t_1) { |
8609 | 8623 | |
8610 | /* "pygame_sdl2/display.pyx":583 | |
8624 | /* "pygame_sdl2/display.pyx":585 | |
8611 | 8625 | * def get_active(): |
8612 | 8626 | * if main_window: |
8613 | 8627 | * return main_window.get_active() # <<<<<<<<<<<<<< |
8615 | 8629 | * |
8616 | 8630 | */ |
8617 | 8631 | __Pyx_XDECREF(__pyx_r); |
8618 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_active); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8632 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_active); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8619 | 8633 | __Pyx_GOTREF(__pyx_t_3); |
8620 | 8634 | __pyx_t_4 = NULL; |
8621 | 8635 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8628 | 8642 | } |
8629 | 8643 | } |
8630 | 8644 | if (__pyx_t_4) { |
8631 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8645 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8632 | 8646 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8633 | 8647 | } else { |
8634 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8648 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8635 | 8649 | } |
8636 | 8650 | __Pyx_GOTREF(__pyx_t_2); |
8637 | 8651 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8639 | 8653 | __pyx_t_2 = 0; |
8640 | 8654 | goto __pyx_L0; |
8641 | 8655 | |
8642 | /* "pygame_sdl2/display.pyx":582 | |
8656 | /* "pygame_sdl2/display.pyx":584 | |
8643 | 8657 | * |
8644 | 8658 | * def get_active(): |
8645 | 8659 | * if main_window: # <<<<<<<<<<<<<< |
8648 | 8662 | */ |
8649 | 8663 | } |
8650 | 8664 | |
8651 | /* "pygame_sdl2/display.pyx":584 | |
8665 | /* "pygame_sdl2/display.pyx":586 | |
8652 | 8666 | * if main_window: |
8653 | 8667 | * return main_window.get_active() |
8654 | 8668 | * return False # <<<<<<<<<<<<<< |
8660 | 8674 | __pyx_r = Py_False; |
8661 | 8675 | goto __pyx_L0; |
8662 | 8676 | |
8663 | /* "pygame_sdl2/display.pyx":581 | |
8677 | /* "pygame_sdl2/display.pyx":583 | |
8664 | 8678 | * SDL_GL_UnloadLibrary() |
8665 | 8679 | * |
8666 | 8680 | * def get_active(): # <<<<<<<<<<<<<< |
8681 | 8695 | return __pyx_r; |
8682 | 8696 | } |
8683 | 8697 | |
8684 | /* "pygame_sdl2/display.pyx":586 | |
8698 | /* "pygame_sdl2/display.pyx":588 | |
8685 | 8699 | * return False |
8686 | 8700 | * |
8687 | 8701 | * def iconify(): # <<<<<<<<<<<<<< |
8715 | 8729 | int __pyx_clineno = 0; |
8716 | 8730 | __Pyx_RefNannySetupContext("iconify", 0); |
8717 | 8731 | |
8718 | /* "pygame_sdl2/display.pyx":587 | |
8732 | /* "pygame_sdl2/display.pyx":589 | |
8719 | 8733 | * |
8720 | 8734 | * def iconify(): |
8721 | 8735 | * if main_window: # <<<<<<<<<<<<<< |
8722 | 8736 | * return main_window.iconify() |
8723 | 8737 | * |
8724 | 8738 | */ |
8725 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8739 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8726 | 8740 | if (__pyx_t_1) { |
8727 | 8741 | |
8728 | /* "pygame_sdl2/display.pyx":588 | |
8742 | /* "pygame_sdl2/display.pyx":590 | |
8729 | 8743 | * def iconify(): |
8730 | 8744 | * if main_window: |
8731 | 8745 | * return main_window.iconify() # <<<<<<<<<<<<<< |
8733 | 8747 | * return False |
8734 | 8748 | */ |
8735 | 8749 | __Pyx_XDECREF(__pyx_r); |
8736 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_iconify); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8750 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_iconify); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8737 | 8751 | __Pyx_GOTREF(__pyx_t_3); |
8738 | 8752 | __pyx_t_4 = NULL; |
8739 | 8753 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8746 | 8760 | } |
8747 | 8761 | } |
8748 | 8762 | if (__pyx_t_4) { |
8749 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8763 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8750 | 8764 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8751 | 8765 | } else { |
8752 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8766 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8753 | 8767 | } |
8754 | 8768 | __Pyx_GOTREF(__pyx_t_2); |
8755 | 8769 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8757 | 8771 | __pyx_t_2 = 0; |
8758 | 8772 | goto __pyx_L0; |
8759 | 8773 | |
8760 | /* "pygame_sdl2/display.pyx":587 | |
8774 | /* "pygame_sdl2/display.pyx":589 | |
8761 | 8775 | * |
8762 | 8776 | * def iconify(): |
8763 | 8777 | * if main_window: # <<<<<<<<<<<<<< |
8766 | 8780 | */ |
8767 | 8781 | } |
8768 | 8782 | |
8769 | /* "pygame_sdl2/display.pyx":590 | |
8783 | /* "pygame_sdl2/display.pyx":592 | |
8770 | 8784 | * return main_window.iconify() |
8771 | 8785 | * |
8772 | 8786 | * return False # <<<<<<<<<<<<<< |
8778 | 8792 | __pyx_r = Py_False; |
8779 | 8793 | goto __pyx_L0; |
8780 | 8794 | |
8781 | /* "pygame_sdl2/display.pyx":586 | |
8795 | /* "pygame_sdl2/display.pyx":588 | |
8782 | 8796 | * return False |
8783 | 8797 | * |
8784 | 8798 | * def iconify(): # <<<<<<<<<<<<<< |
8799 | 8813 | return __pyx_r; |
8800 | 8814 | } |
8801 | 8815 | |
8802 | /* "pygame_sdl2/display.pyx":592 | |
8816 | /* "pygame_sdl2/display.pyx":594 | |
8803 | 8817 | * return False |
8804 | 8818 | * |
8805 | 8819 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
8833 | 8847 | int __pyx_clineno = 0; |
8834 | 8848 | __Pyx_RefNannySetupContext("toggle_fullscreen", 0); |
8835 | 8849 | |
8836 | /* "pygame_sdl2/display.pyx":593 | |
8850 | /* "pygame_sdl2/display.pyx":595 | |
8837 | 8851 | * |
8838 | 8852 | * def toggle_fullscreen(): |
8839 | 8853 | * if main_window: # <<<<<<<<<<<<<< |
8840 | 8854 | * return main_window.toggle_fullscreen() |
8841 | 8855 | * |
8842 | 8856 | */ |
8843 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8857 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8844 | 8858 | if (__pyx_t_1) { |
8845 | 8859 | |
8846 | /* "pygame_sdl2/display.pyx":594 | |
8860 | /* "pygame_sdl2/display.pyx":596 | |
8847 | 8861 | * def toggle_fullscreen(): |
8848 | 8862 | * if main_window: |
8849 | 8863 | * return main_window.toggle_fullscreen() # <<<<<<<<<<<<<< |
8851 | 8865 | * return True |
8852 | 8866 | */ |
8853 | 8867 | __Pyx_XDECREF(__pyx_r); |
8854 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_toggle_fullscreen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8868 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_toggle_fullscreen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8855 | 8869 | __Pyx_GOTREF(__pyx_t_3); |
8856 | 8870 | __pyx_t_4 = NULL; |
8857 | 8871 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8864 | 8878 | } |
8865 | 8879 | } |
8866 | 8880 | if (__pyx_t_4) { |
8867 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8881 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8868 | 8882 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8869 | 8883 | } else { |
8870 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8884 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8871 | 8885 | } |
8872 | 8886 | __Pyx_GOTREF(__pyx_t_2); |
8873 | 8887 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8875 | 8889 | __pyx_t_2 = 0; |
8876 | 8890 | goto __pyx_L0; |
8877 | 8891 | |
8878 | /* "pygame_sdl2/display.pyx":593 | |
8892 | /* "pygame_sdl2/display.pyx":595 | |
8879 | 8893 | * |
8880 | 8894 | * def toggle_fullscreen(): |
8881 | 8895 | * if main_window: # <<<<<<<<<<<<<< |
8884 | 8898 | */ |
8885 | 8899 | } |
8886 | 8900 | |
8887 | /* "pygame_sdl2/display.pyx":596 | |
8901 | /* "pygame_sdl2/display.pyx":598 | |
8888 | 8902 | * return main_window.toggle_fullscreen() |
8889 | 8903 | * |
8890 | 8904 | * return True # <<<<<<<<<<<<<< |
8896 | 8910 | __pyx_r = Py_True; |
8897 | 8911 | goto __pyx_L0; |
8898 | 8912 | |
8899 | /* "pygame_sdl2/display.pyx":592 | |
8913 | /* "pygame_sdl2/display.pyx":594 | |
8900 | 8914 | * return False |
8901 | 8915 | * |
8902 | 8916 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
8917 | 8931 | return __pyx_r; |
8918 | 8932 | } |
8919 | 8933 | |
8920 | /* "pygame_sdl2/display.pyx":598 | |
8934 | /* "pygame_sdl2/display.pyx":600 | |
8921 | 8935 | * return True |
8922 | 8936 | * |
8923 | 8937 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
8970 | 8984 | } |
8971 | 8985 | } |
8972 | 8986 | if (unlikely(kw_args > 0)) { |
8973 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8987 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8974 | 8988 | } |
8975 | 8989 | } else { |
8976 | 8990 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
8987 | 9001 | } |
8988 | 9002 | goto __pyx_L4_argument_unpacking_done; |
8989 | 9003 | __pyx_L5_argtuple_error:; |
8990 | __Pyx_RaiseArgtupleInvalid("set_gamma", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9004 | __Pyx_RaiseArgtupleInvalid("set_gamma", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8991 | 9005 | __pyx_L3_error:; |
8992 | 9006 | __Pyx_AddTraceback("pygame_sdl2.display.set_gamma", __pyx_clineno, __pyx_lineno, __pyx_filename); |
8993 | 9007 | __Pyx_RefNannyFinishContext(); |
9014 | 9028 | int __pyx_clineno = 0; |
9015 | 9029 | __Pyx_RefNannySetupContext("set_gamma", 0); |
9016 | 9030 | |
9017 | /* "pygame_sdl2/display.pyx":599 | |
9031 | /* "pygame_sdl2/display.pyx":601 | |
9018 | 9032 | * |
9019 | 9033 | * def set_gamma(red, green=None, blue=None): |
9020 | 9034 | * if main_window: # <<<<<<<<<<<<<< |
9021 | 9035 | * return main_window.set_gamma(red, green, blue) |
9022 | 9036 | * return False |
9023 | 9037 | */ |
9024 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9038 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9025 | 9039 | if (__pyx_t_1) { |
9026 | 9040 | |
9027 | /* "pygame_sdl2/display.pyx":600 | |
9041 | /* "pygame_sdl2/display.pyx":602 | |
9028 | 9042 | * def set_gamma(red, green=None, blue=None): |
9029 | 9043 | * if main_window: |
9030 | 9044 | * return main_window.set_gamma(red, green, blue) # <<<<<<<<<<<<<< |
9032 | 9046 | * |
9033 | 9047 | */ |
9034 | 9048 | __Pyx_XDECREF(__pyx_r); |
9035 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9049 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9036 | 9050 | __Pyx_GOTREF(__pyx_t_3); |
9037 | 9051 | __pyx_t_4 = NULL; |
9038 | 9052 | __pyx_t_5 = 0; |
9046 | 9060 | __pyx_t_5 = 1; |
9047 | 9061 | } |
9048 | 9062 | } |
9049 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9063 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9050 | 9064 | __Pyx_GOTREF(__pyx_t_6); |
9051 | 9065 | if (__pyx_t_4) { |
9052 | 9066 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; |
9060 | 9074 | __Pyx_INCREF(__pyx_v_blue); |
9061 | 9075 | __Pyx_GIVEREF(__pyx_v_blue); |
9062 | 9076 | PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_blue); |
9063 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9077 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9064 | 9078 | __Pyx_GOTREF(__pyx_t_2); |
9065 | 9079 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9066 | 9080 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9068 | 9082 | __pyx_t_2 = 0; |
9069 | 9083 | goto __pyx_L0; |
9070 | 9084 | |
9071 | /* "pygame_sdl2/display.pyx":599 | |
9085 | /* "pygame_sdl2/display.pyx":601 | |
9072 | 9086 | * |
9073 | 9087 | * def set_gamma(red, green=None, blue=None): |
9074 | 9088 | * if main_window: # <<<<<<<<<<<<<< |
9077 | 9091 | */ |
9078 | 9092 | } |
9079 | 9093 | |
9080 | /* "pygame_sdl2/display.pyx":601 | |
9094 | /* "pygame_sdl2/display.pyx":603 | |
9081 | 9095 | * if main_window: |
9082 | 9096 | * return main_window.set_gamma(red, green, blue) |
9083 | 9097 | * return False # <<<<<<<<<<<<<< |
9089 | 9103 | __pyx_r = Py_False; |
9090 | 9104 | goto __pyx_L0; |
9091 | 9105 | |
9092 | /* "pygame_sdl2/display.pyx":598 | |
9106 | /* "pygame_sdl2/display.pyx":600 | |
9093 | 9107 | * return True |
9094 | 9108 | * |
9095 | 9109 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
9111 | 9125 | return __pyx_r; |
9112 | 9126 | } |
9113 | 9127 | |
9114 | /* "pygame_sdl2/display.pyx":603 | |
9128 | /* "pygame_sdl2/display.pyx":605 | |
9115 | 9129 | * return False |
9116 | 9130 | * |
9117 | 9131 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
9153 | 9167 | case 1: |
9154 | 9168 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_green)) != 0)) kw_args--; |
9155 | 9169 | else { |
9156 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9170 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9157 | 9171 | } |
9158 | 9172 | case 2: |
9159 | 9173 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_blue)) != 0)) kw_args--; |
9160 | 9174 | else { |
9161 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9175 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9162 | 9176 | } |
9163 | 9177 | } |
9164 | 9178 | if (unlikely(kw_args > 0)) { |
9165 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma_ramp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9179 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma_ramp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9166 | 9180 | } |
9167 | 9181 | } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { |
9168 | 9182 | goto __pyx_L5_argtuple_error; |
9177 | 9191 | } |
9178 | 9192 | goto __pyx_L4_argument_unpacking_done; |
9179 | 9193 | __pyx_L5_argtuple_error:; |
9180 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9194 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9181 | 9195 | __pyx_L3_error:; |
9182 | 9196 | __Pyx_AddTraceback("pygame_sdl2.display.set_gamma_ramp", __pyx_clineno, __pyx_lineno, __pyx_filename); |
9183 | 9197 | __Pyx_RefNannyFinishContext(); |
9204 | 9218 | int __pyx_clineno = 0; |
9205 | 9219 | __Pyx_RefNannySetupContext("set_gamma_ramp", 0); |
9206 | 9220 | |
9207 | /* "pygame_sdl2/display.pyx":604 | |
9221 | /* "pygame_sdl2/display.pyx":606 | |
9208 | 9222 | * |
9209 | 9223 | * def set_gamma_ramp(red, green, blue): |
9210 | 9224 | * if main_window: # <<<<<<<<<<<<<< |
9211 | 9225 | * return main_window.set_gamma_ramp(red, green, blue) |
9212 | 9226 | * return False |
9213 | 9227 | */ |
9214 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9228 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9215 | 9229 | if (__pyx_t_1) { |
9216 | 9230 | |
9217 | /* "pygame_sdl2/display.pyx":605 | |
9231 | /* "pygame_sdl2/display.pyx":607 | |
9218 | 9232 | * def set_gamma_ramp(red, green, blue): |
9219 | 9233 | * if main_window: |
9220 | 9234 | * return main_window.set_gamma_ramp(red, green, blue) # <<<<<<<<<<<<<< |
9222 | 9236 | * |
9223 | 9237 | */ |
9224 | 9238 | __Pyx_XDECREF(__pyx_r); |
9225 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma_ramp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9239 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma_ramp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9226 | 9240 | __Pyx_GOTREF(__pyx_t_3); |
9227 | 9241 | __pyx_t_4 = NULL; |
9228 | 9242 | __pyx_t_5 = 0; |
9236 | 9250 | __pyx_t_5 = 1; |
9237 | 9251 | } |
9238 | 9252 | } |
9239 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9253 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9240 | 9254 | __Pyx_GOTREF(__pyx_t_6); |
9241 | 9255 | if (__pyx_t_4) { |
9242 | 9256 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; |
9250 | 9264 | __Pyx_INCREF(__pyx_v_blue); |
9251 | 9265 | __Pyx_GIVEREF(__pyx_v_blue); |
9252 | 9266 | PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_blue); |
9253 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9267 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9254 | 9268 | __Pyx_GOTREF(__pyx_t_2); |
9255 | 9269 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9256 | 9270 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9258 | 9272 | __pyx_t_2 = 0; |
9259 | 9273 | goto __pyx_L0; |
9260 | 9274 | |
9261 | /* "pygame_sdl2/display.pyx":604 | |
9275 | /* "pygame_sdl2/display.pyx":606 | |
9262 | 9276 | * |
9263 | 9277 | * def set_gamma_ramp(red, green, blue): |
9264 | 9278 | * if main_window: # <<<<<<<<<<<<<< |
9267 | 9281 | */ |
9268 | 9282 | } |
9269 | 9283 | |
9270 | /* "pygame_sdl2/display.pyx":606 | |
9284 | /* "pygame_sdl2/display.pyx":608 | |
9271 | 9285 | * if main_window: |
9272 | 9286 | * return main_window.set_gamma_ramp(red, green, blue) |
9273 | 9287 | * return False # <<<<<<<<<<<<<< |
9279 | 9293 | __pyx_r = Py_False; |
9280 | 9294 | goto __pyx_L0; |
9281 | 9295 | |
9282 | /* "pygame_sdl2/display.pyx":603 | |
9296 | /* "pygame_sdl2/display.pyx":605 | |
9283 | 9297 | * return False |
9284 | 9298 | * |
9285 | 9299 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
9301 | 9315 | return __pyx_r; |
9302 | 9316 | } |
9303 | 9317 | |
9304 | /* "pygame_sdl2/display.pyx":608 | |
9318 | /* "pygame_sdl2/display.pyx":610 | |
9305 | 9319 | * return False |
9306 | 9320 | * |
9307 | 9321 | * def set_icon(surface): # <<<<<<<<<<<<<< |
9338 | 9352 | int __pyx_clineno = 0; |
9339 | 9353 | __Pyx_RefNannySetupContext("set_icon", 0); |
9340 | 9354 | |
9341 | /* "pygame_sdl2/display.pyx":611 | |
9355 | /* "pygame_sdl2/display.pyx":613 | |
9342 | 9356 | * global default_icon |
9343 | 9357 | * |
9344 | 9358 | * default_icon = surface.copy() # <<<<<<<<<<<<<< |
9345 | 9359 | * |
9346 | 9360 | * if main_window is not None: |
9347 | 9361 | */ |
9348 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9362 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9349 | 9363 | __Pyx_GOTREF(__pyx_t_2); |
9350 | 9364 | __pyx_t_3 = NULL; |
9351 | 9365 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
9358 | 9372 | } |
9359 | 9373 | } |
9360 | 9374 | if (__pyx_t_3) { |
9361 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9375 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9362 | 9376 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9363 | 9377 | } else { |
9364 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9378 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9365 | 9379 | } |
9366 | 9380 | __Pyx_GOTREF(__pyx_t_1); |
9367 | 9381 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9368 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_icon, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9382 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_icon, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9369 | 9383 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
9370 | 9384 | |
9371 | /* "pygame_sdl2/display.pyx":613 | |
9385 | /* "pygame_sdl2/display.pyx":615 | |
9372 | 9386 | * default_icon = surface.copy() |
9373 | 9387 | * |
9374 | 9388 | * if main_window is not None: # <<<<<<<<<<<<<< |
9379 | 9393 | __pyx_t_5 = (__pyx_t_4 != 0); |
9380 | 9394 | if (__pyx_t_5) { |
9381 | 9395 | |
9382 | /* "pygame_sdl2/display.pyx":614 | |
9396 | /* "pygame_sdl2/display.pyx":616 | |
9383 | 9397 | * |
9384 | 9398 | * if main_window is not None: |
9385 | 9399 | * main_window.set_icon(default_icon) # <<<<<<<<<<<<<< |
9386 | 9400 | * |
9387 | 9401 | * def set_caption(title, icontitle = None): |
9388 | 9402 | */ |
9389 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9403 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9390 | 9404 | __Pyx_GOTREF(__pyx_t_2); |
9391 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_icon); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9405 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_icon); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9392 | 9406 | __Pyx_GOTREF(__pyx_t_3); |
9393 | 9407 | __pyx_t_6 = NULL; |
9394 | 9408 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
9401 | 9415 | } |
9402 | 9416 | } |
9403 | 9417 | if (!__pyx_t_6) { |
9404 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9418 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9405 | 9419 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9406 | 9420 | __Pyx_GOTREF(__pyx_t_1); |
9407 | 9421 | } else { |
9408 | __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9422 | __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9409 | 9423 | __Pyx_GOTREF(__pyx_t_7); |
9410 | 9424 | __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; |
9411 | 9425 | __Pyx_GIVEREF(__pyx_t_3); |
9412 | 9426 | PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3); |
9413 | 9427 | __pyx_t_3 = 0; |
9414 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9428 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9415 | 9429 | __Pyx_GOTREF(__pyx_t_1); |
9416 | 9430 | __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; |
9417 | 9431 | } |
9418 | 9432 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9419 | 9433 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
9420 | 9434 | |
9421 | /* "pygame_sdl2/display.pyx":613 | |
9435 | /* "pygame_sdl2/display.pyx":615 | |
9422 | 9436 | * default_icon = surface.copy() |
9423 | 9437 | * |
9424 | 9438 | * if main_window is not None: # <<<<<<<<<<<<<< |
9427 | 9441 | */ |
9428 | 9442 | } |
9429 | 9443 | |
9430 | /* "pygame_sdl2/display.pyx":608 | |
9444 | /* "pygame_sdl2/display.pyx":610 | |
9431 | 9445 | * return False |
9432 | 9446 | * |
9433 | 9447 | * def set_icon(surface): # <<<<<<<<<<<<<< |
9452 | 9466 | return __pyx_r; |
9453 | 9467 | } |
9454 | 9468 | |
9455 | /* "pygame_sdl2/display.pyx":616 | |
9469 | /* "pygame_sdl2/display.pyx":618 | |
9456 | 9470 | * main_window.set_icon(default_icon) |
9457 | 9471 | * |
9458 | 9472 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
9497 | 9511 | } |
9498 | 9512 | } |
9499 | 9513 | if (unlikely(kw_args > 0)) { |
9500 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_caption") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9514 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_caption") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9501 | 9515 | } |
9502 | 9516 | } else { |
9503 | 9517 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
9512 | 9526 | } |
9513 | 9527 | goto __pyx_L4_argument_unpacking_done; |
9514 | 9528 | __pyx_L5_argtuple_error:; |
9515 | __Pyx_RaiseArgtupleInvalid("set_caption", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9529 | __Pyx_RaiseArgtupleInvalid("set_caption", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9516 | 9530 | __pyx_L3_error:; |
9517 | 9531 | __Pyx_AddTraceback("pygame_sdl2.display.set_caption", __pyx_clineno, __pyx_lineno, __pyx_filename); |
9518 | 9532 | __Pyx_RefNannyFinishContext(); |
9539 | 9553 | int __pyx_clineno = 0; |
9540 | 9554 | __Pyx_RefNannySetupContext("set_caption", 0); |
9541 | 9555 | |
9542 | /* "pygame_sdl2/display.pyx":619 | |
9556 | /* "pygame_sdl2/display.pyx":621 | |
9543 | 9557 | * global default_title |
9544 | 9558 | * |
9545 | 9559 | * default_title = title # <<<<<<<<<<<<<< |
9546 | 9560 | * |
9547 | 9561 | * if main_window: |
9548 | 9562 | */ |
9549 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_title, __pyx_v_title) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9550 | ||
9551 | /* "pygame_sdl2/display.pyx":621 | |
9563 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_title, __pyx_v_title) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9564 | ||
9565 | /* "pygame_sdl2/display.pyx":623 | |
9552 | 9566 | * default_title = title |
9553 | 9567 | * |
9554 | 9568 | * if main_window: # <<<<<<<<<<<<<< |
9555 | 9569 | * main_window.set_caption(default_title) |
9556 | 9570 | * |
9557 | 9571 | */ |
9558 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9572 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9559 | 9573 | if (__pyx_t_1) { |
9560 | 9574 | |
9561 | /* "pygame_sdl2/display.pyx":622 | |
9575 | /* "pygame_sdl2/display.pyx":624 | |
9562 | 9576 | * |
9563 | 9577 | * if main_window: |
9564 | 9578 | * main_window.set_caption(default_title) # <<<<<<<<<<<<<< |
9565 | 9579 | * |
9566 | 9580 | * def get_caption(): |
9567 | 9581 | */ |
9568 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_caption); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9582 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_caption); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9569 | 9583 | __Pyx_GOTREF(__pyx_t_3); |
9570 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9584 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9571 | 9585 | __Pyx_GOTREF(__pyx_t_4); |
9572 | 9586 | __pyx_t_5 = NULL; |
9573 | 9587 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
9580 | 9594 | } |
9581 | 9595 | } |
9582 | 9596 | if (!__pyx_t_5) { |
9583 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9597 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9584 | 9598 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9585 | 9599 | __Pyx_GOTREF(__pyx_t_2); |
9586 | 9600 | } else { |
9587 | __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9601 | __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9588 | 9602 | __Pyx_GOTREF(__pyx_t_6); |
9589 | 9603 | __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; |
9590 | 9604 | __Pyx_GIVEREF(__pyx_t_4); |
9591 | 9605 | PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); |
9592 | 9606 | __pyx_t_4 = 0; |
9593 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9607 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9594 | 9608 | __Pyx_GOTREF(__pyx_t_2); |
9595 | 9609 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9596 | 9610 | } |
9597 | 9611 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9598 | 9612 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9599 | 9613 | |
9600 | /* "pygame_sdl2/display.pyx":621 | |
9614 | /* "pygame_sdl2/display.pyx":623 | |
9601 | 9615 | * default_title = title |
9602 | 9616 | * |
9603 | 9617 | * if main_window: # <<<<<<<<<<<<<< |
9606 | 9620 | */ |
9607 | 9621 | } |
9608 | 9622 | |
9609 | /* "pygame_sdl2/display.pyx":616 | |
9623 | /* "pygame_sdl2/display.pyx":618 | |
9610 | 9624 | * main_window.set_icon(default_icon) |
9611 | 9625 | * |
9612 | 9626 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
9631 | 9645 | return __pyx_r; |
9632 | 9646 | } |
9633 | 9647 | |
9634 | /* "pygame_sdl2/display.pyx":624 | |
9648 | /* "pygame_sdl2/display.pyx":626 | |
9635 | 9649 | * main_window.set_caption(default_title) |
9636 | 9650 | * |
9637 | 9651 | * def get_caption(): # <<<<<<<<<<<<<< |
9662 | 9676 | int __pyx_clineno = 0; |
9663 | 9677 | __Pyx_RefNannySetupContext("get_caption", 0); |
9664 | 9678 | |
9665 | /* "pygame_sdl2/display.pyx":625 | |
9679 | /* "pygame_sdl2/display.pyx":627 | |
9666 | 9680 | * |
9667 | 9681 | * def get_caption(): |
9668 | 9682 | * return default_title # <<<<<<<<<<<<<< |
9670 | 9684 | * def get_drawable_size(): |
9671 | 9685 | */ |
9672 | 9686 | __Pyx_XDECREF(__pyx_r); |
9673 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9687 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9674 | 9688 | __Pyx_GOTREF(__pyx_t_1); |
9675 | 9689 | __pyx_r = __pyx_t_1; |
9676 | 9690 | __pyx_t_1 = 0; |
9677 | 9691 | goto __pyx_L0; |
9678 | 9692 | |
9679 | /* "pygame_sdl2/display.pyx":624 | |
9693 | /* "pygame_sdl2/display.pyx":626 | |
9680 | 9694 | * main_window.set_caption(default_title) |
9681 | 9695 | * |
9682 | 9696 | * def get_caption(): # <<<<<<<<<<<<<< |
9695 | 9709 | return __pyx_r; |
9696 | 9710 | } |
9697 | 9711 | |
9698 | /* "pygame_sdl2/display.pyx":627 | |
9712 | /* "pygame_sdl2/display.pyx":629 | |
9699 | 9713 | * return default_title |
9700 | 9714 | * |
9701 | 9715 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
9729 | 9743 | int __pyx_clineno = 0; |
9730 | 9744 | __Pyx_RefNannySetupContext("get_drawable_size", 0); |
9731 | 9745 | |
9732 | /* "pygame_sdl2/display.pyx":628 | |
9746 | /* "pygame_sdl2/display.pyx":630 | |
9733 | 9747 | * |
9734 | 9748 | * def get_drawable_size(): |
9735 | 9749 | * if main_window: # <<<<<<<<<<<<<< |
9736 | 9750 | * return main_window.get_drawable_size() |
9737 | 9751 | * return None |
9738 | 9752 | */ |
9739 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9753 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9740 | 9754 | if (__pyx_t_1) { |
9741 | 9755 | |
9742 | /* "pygame_sdl2/display.pyx":629 | |
9756 | /* "pygame_sdl2/display.pyx":631 | |
9743 | 9757 | * def get_drawable_size(): |
9744 | 9758 | * if main_window: |
9745 | 9759 | * return main_window.get_drawable_size() # <<<<<<<<<<<<<< |
9747 | 9761 | * |
9748 | 9762 | */ |
9749 | 9763 | __Pyx_XDECREF(__pyx_r); |
9750 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_drawable_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9764 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_drawable_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9751 | 9765 | __Pyx_GOTREF(__pyx_t_3); |
9752 | 9766 | __pyx_t_4 = NULL; |
9753 | 9767 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
9760 | 9774 | } |
9761 | 9775 | } |
9762 | 9776 | if (__pyx_t_4) { |
9763 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9777 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9764 | 9778 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9765 | 9779 | } else { |
9766 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9780 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9767 | 9781 | } |
9768 | 9782 | __Pyx_GOTREF(__pyx_t_2); |
9769 | 9783 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9771 | 9785 | __pyx_t_2 = 0; |
9772 | 9786 | goto __pyx_L0; |
9773 | 9787 | |
9774 | /* "pygame_sdl2/display.pyx":628 | |
9788 | /* "pygame_sdl2/display.pyx":630 | |
9775 | 9789 | * |
9776 | 9790 | * def get_drawable_size(): |
9777 | 9791 | * if main_window: # <<<<<<<<<<<<<< |
9780 | 9794 | */ |
9781 | 9795 | } |
9782 | 9796 | |
9783 | /* "pygame_sdl2/display.pyx":630 | |
9797 | /* "pygame_sdl2/display.pyx":632 | |
9784 | 9798 | * if main_window: |
9785 | 9799 | * return main_window.get_drawable_size() |
9786 | 9800 | * return None # <<<<<<<<<<<<<< |
9792 | 9806 | __pyx_r = Py_None; |
9793 | 9807 | goto __pyx_L0; |
9794 | 9808 | |
9795 | /* "pygame_sdl2/display.pyx":627 | |
9809 | /* "pygame_sdl2/display.pyx":629 | |
9796 | 9810 | * return default_title |
9797 | 9811 | * |
9798 | 9812 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
9813 | 9827 | return __pyx_r; |
9814 | 9828 | } |
9815 | 9829 | |
9816 | /* "pygame_sdl2/display.pyx":632 | |
9830 | /* "pygame_sdl2/display.pyx":634 | |
9817 | 9831 | * return None |
9818 | 9832 | * |
9819 | 9833 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
9848 | 9862 | int __pyx_clineno = 0; |
9849 | 9863 | __Pyx_RefNannySetupContext("get_num_video_displays", 0); |
9850 | 9864 | |
9851 | /* "pygame_sdl2/display.pyx":633 | |
9865 | /* "pygame_sdl2/display.pyx":635 | |
9852 | 9866 | * |
9853 | 9867 | * def get_num_video_displays(): |
9854 | 9868 | * rv = SDL_GetNumVideoDisplays() # <<<<<<<<<<<<<< |
9857 | 9871 | */ |
9858 | 9872 | __pyx_v_rv = SDL_GetNumVideoDisplays(); |
9859 | 9873 | |
9860 | /* "pygame_sdl2/display.pyx":634 | |
9874 | /* "pygame_sdl2/display.pyx":636 | |
9861 | 9875 | * def get_num_video_displays(): |
9862 | 9876 | * rv = SDL_GetNumVideoDisplays() |
9863 | 9877 | * if rv < 0: # <<<<<<<<<<<<<< |
9867 | 9881 | __pyx_t_1 = ((__pyx_v_rv < 0) != 0); |
9868 | 9882 | if (__pyx_t_1) { |
9869 | 9883 | |
9870 | /* "pygame_sdl2/display.pyx":635 | |
9884 | /* "pygame_sdl2/display.pyx":637 | |
9871 | 9885 | * rv = SDL_GetNumVideoDisplays() |
9872 | 9886 | * if rv < 0: |
9873 | 9887 | * raise error() # <<<<<<<<<<<<<< |
9874 | 9888 | * |
9875 | 9889 | * return rv |
9876 | 9890 | */ |
9877 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9891 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9878 | 9892 | __Pyx_GOTREF(__pyx_t_3); |
9879 | 9893 | __pyx_t_4 = NULL; |
9880 | 9894 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
9887 | 9901 | } |
9888 | 9902 | } |
9889 | 9903 | if (__pyx_t_4) { |
9890 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9904 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9891 | 9905 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9892 | 9906 | } else { |
9893 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9907 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9894 | 9908 | } |
9895 | 9909 | __Pyx_GOTREF(__pyx_t_2); |
9896 | 9910 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9897 | 9911 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
9898 | 9912 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9899 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9900 | ||
9901 | /* "pygame_sdl2/display.pyx":634 | |
9913 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9914 | ||
9915 | /* "pygame_sdl2/display.pyx":636 | |
9902 | 9916 | * def get_num_video_displays(): |
9903 | 9917 | * rv = SDL_GetNumVideoDisplays() |
9904 | 9918 | * if rv < 0: # <<<<<<<<<<<<<< |
9907 | 9921 | */ |
9908 | 9922 | } |
9909 | 9923 | |
9910 | /* "pygame_sdl2/display.pyx":637 | |
9924 | /* "pygame_sdl2/display.pyx":639 | |
9911 | 9925 | * raise error() |
9912 | 9926 | * |
9913 | 9927 | * return rv # <<<<<<<<<<<<<< |
9915 | 9929 | * def get_display_bounds(index): |
9916 | 9930 | */ |
9917 | 9931 | __Pyx_XDECREF(__pyx_r); |
9918 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9932 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9919 | 9933 | __Pyx_GOTREF(__pyx_t_2); |
9920 | 9934 | __pyx_r = __pyx_t_2; |
9921 | 9935 | __pyx_t_2 = 0; |
9922 | 9936 | goto __pyx_L0; |
9923 | 9937 | |
9924 | /* "pygame_sdl2/display.pyx":632 | |
9938 | /* "pygame_sdl2/display.pyx":634 | |
9925 | 9939 | * return None |
9926 | 9940 | * |
9927 | 9941 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
9942 | 9956 | return __pyx_r; |
9943 | 9957 | } |
9944 | 9958 | |
9945 | /* "pygame_sdl2/display.pyx":639 | |
9959 | /* "pygame_sdl2/display.pyx":641 | |
9946 | 9960 | * return rv |
9947 | 9961 | * |
9948 | 9962 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
9980 | 9994 | int __pyx_clineno = 0; |
9981 | 9995 | __Pyx_RefNannySetupContext("get_display_bounds", 0); |
9982 | 9996 | |
9983 | /* "pygame_sdl2/display.pyx":641 | |
9997 | /* "pygame_sdl2/display.pyx":643 | |
9984 | 9998 | * def get_display_bounds(index): |
9985 | 9999 | * cdef SDL_Rect rect |
9986 | 10000 | * rv = SDL_GetDisplayBounds(index, &rect) # <<<<<<<<<<<<<< |
9987 | 10001 | * |
9988 | 10002 | * return (rect.x, rect.y, rect.w, rect.h) |
9989 | 10003 | */ |
9990 | __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10004 | __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9991 | 10005 | __pyx_v_rv = SDL_GetDisplayBounds(__pyx_t_1, (&__pyx_v_rect)); |
9992 | 10006 | |
9993 | /* "pygame_sdl2/display.pyx":643 | |
10007 | /* "pygame_sdl2/display.pyx":645 | |
9994 | 10008 | * rv = SDL_GetDisplayBounds(index, &rect) |
9995 | 10009 | * |
9996 | 10010 | * return (rect.x, rect.y, rect.w, rect.h) # <<<<<<<<<<<<<< |
9998 | 10012 | * def hint(hint, value): |
9999 | 10013 | */ |
10000 | 10014 | __Pyx_XDECREF(__pyx_r); |
10001 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rect.x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10015 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rect.x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10002 | 10016 | __Pyx_GOTREF(__pyx_t_2); |
10003 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rect.y); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10017 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rect.y); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10004 | 10018 | __Pyx_GOTREF(__pyx_t_3); |
10005 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rect.w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10019 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rect.w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10006 | 10020 | __Pyx_GOTREF(__pyx_t_4); |
10007 | __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rect.h); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10021 | __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rect.h); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10008 | 10022 | __Pyx_GOTREF(__pyx_t_5); |
10009 | __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10023 | __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10010 | 10024 | __Pyx_GOTREF(__pyx_t_6); |
10011 | 10025 | __Pyx_GIVEREF(__pyx_t_2); |
10012 | 10026 | PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); |
10024 | 10038 | __pyx_t_6 = 0; |
10025 | 10039 | goto __pyx_L0; |
10026 | 10040 | |
10027 | /* "pygame_sdl2/display.pyx":639 | |
10041 | /* "pygame_sdl2/display.pyx":641 | |
10028 | 10042 | * return rv |
10029 | 10043 | * |
10030 | 10044 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
10047 | 10061 | return __pyx_r; |
10048 | 10062 | } |
10049 | 10063 | |
10050 | /* "pygame_sdl2/display.pyx":645 | |
10064 | /* "pygame_sdl2/display.pyx":647 | |
10051 | 10065 | * return (rect.x, rect.y, rect.w, rect.h) |
10052 | 10066 | * |
10053 | 10067 | * def hint(hint, value): # <<<<<<<<<<<<<< |
10087 | 10101 | case 1: |
10088 | 10102 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; |
10089 | 10103 | else { |
10090 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10104 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10091 | 10105 | } |
10092 | 10106 | } |
10093 | 10107 | if (unlikely(kw_args > 0)) { |
10094 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10108 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10095 | 10109 | } |
10096 | 10110 | } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { |
10097 | 10111 | goto __pyx_L5_argtuple_error; |
10104 | 10118 | } |
10105 | 10119 | goto __pyx_L4_argument_unpacking_done; |
10106 | 10120 | __pyx_L5_argtuple_error:; |
10107 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10121 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10108 | 10122 | __pyx_L3_error:; |
10109 | 10123 | __Pyx_AddTraceback("pygame_sdl2.display.hint", __pyx_clineno, __pyx_lineno, __pyx_filename); |
10110 | 10124 | __Pyx_RefNannyFinishContext(); |
10133 | 10147 | __Pyx_INCREF(__pyx_v_hint); |
10134 | 10148 | __Pyx_INCREF(__pyx_v_value); |
10135 | 10149 | |
10136 | /* "pygame_sdl2/display.pyx":647 | |
10150 | /* "pygame_sdl2/display.pyx":649 | |
10137 | 10151 | * def hint(hint, value): |
10138 | 10152 | * |
10139 | 10153 | * if not isinstance(hint, bytes): # <<<<<<<<<<<<<< |
10144 | 10158 | __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); |
10145 | 10159 | if (__pyx_t_2) { |
10146 | 10160 | |
10147 | /* "pygame_sdl2/display.pyx":648 | |
10161 | /* "pygame_sdl2/display.pyx":650 | |
10148 | 10162 | * |
10149 | 10163 | * if not isinstance(hint, bytes): |
10150 | 10164 | * hint = hint.encode("utf-8") # <<<<<<<<<<<<<< |
10151 | 10165 | * |
10152 | 10166 | * if not isinstance(value, bytes): |
10153 | 10167 | */ |
10154 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hint, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10168 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hint, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10155 | 10169 | __Pyx_GOTREF(__pyx_t_3); |
10156 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10170 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10157 | 10171 | __Pyx_GOTREF(__pyx_t_4); |
10158 | 10172 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
10159 | 10173 | __Pyx_DECREF_SET(__pyx_v_hint, __pyx_t_4); |
10160 | 10174 | __pyx_t_4 = 0; |
10161 | 10175 | |
10162 | /* "pygame_sdl2/display.pyx":647 | |
10176 | /* "pygame_sdl2/display.pyx":649 | |
10163 | 10177 | * def hint(hint, value): |
10164 | 10178 | * |
10165 | 10179 | * if not isinstance(hint, bytes): # <<<<<<<<<<<<<< |
10168 | 10182 | */ |
10169 | 10183 | } |
10170 | 10184 | |
10171 | /* "pygame_sdl2/display.pyx":650 | |
10185 | /* "pygame_sdl2/display.pyx":652 | |
10172 | 10186 | * hint = hint.encode("utf-8") |
10173 | 10187 | * |
10174 | 10188 | * if not isinstance(value, bytes): # <<<<<<<<<<<<<< |
10179 | 10193 | __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); |
10180 | 10194 | if (__pyx_t_1) { |
10181 | 10195 | |
10182 | /* "pygame_sdl2/display.pyx":651 | |
10196 | /* "pygame_sdl2/display.pyx":653 | |
10183 | 10197 | * |
10184 | 10198 | * if not isinstance(value, bytes): |
10185 | 10199 | * value = value.encode("utf-8") # <<<<<<<<<<<<<< |
10186 | 10200 | * |
10187 | 10201 | * SDL_SetHint(hint, value) |
10188 | 10202 | */ |
10189 | __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10203 | __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10190 | 10204 | __Pyx_GOTREF(__pyx_t_4); |
10191 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10205 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10192 | 10206 | __Pyx_GOTREF(__pyx_t_3); |
10193 | 10207 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
10194 | 10208 | __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); |
10195 | 10209 | __pyx_t_3 = 0; |
10196 | 10210 | |
10197 | /* "pygame_sdl2/display.pyx":650 | |
10211 | /* "pygame_sdl2/display.pyx":652 | |
10198 | 10212 | * hint = hint.encode("utf-8") |
10199 | 10213 | * |
10200 | 10214 | * if not isinstance(value, bytes): # <<<<<<<<<<<<<< |
10203 | 10217 | */ |
10204 | 10218 | } |
10205 | 10219 | |
10206 | /* "pygame_sdl2/display.pyx":653 | |
10220 | /* "pygame_sdl2/display.pyx":655 | |
10207 | 10221 | * value = value.encode("utf-8") |
10208 | 10222 | * |
10209 | 10223 | * SDL_SetHint(hint, value) # <<<<<<<<<<<<<< |
10210 | 10224 | * |
10211 | 10225 | * def get_platform(): |
10212 | 10226 | */ |
10213 | __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_hint); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10214 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10227 | __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_hint); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10228 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10215 | 10229 | SDL_SetHint(__pyx_t_5, __pyx_t_6); |
10216 | 10230 | |
10217 | /* "pygame_sdl2/display.pyx":645 | |
10231 | /* "pygame_sdl2/display.pyx":647 | |
10218 | 10232 | * return (rect.x, rect.y, rect.w, rect.h) |
10219 | 10233 | * |
10220 | 10234 | * def hint(hint, value): # <<<<<<<<<<<<<< |
10238 | 10252 | return __pyx_r; |
10239 | 10253 | } |
10240 | 10254 | |
10241 | /* "pygame_sdl2/display.pyx":655 | |
10255 | /* "pygame_sdl2/display.pyx":657 | |
10242 | 10256 | * SDL_SetHint(hint, value) |
10243 | 10257 | * |
10244 | 10258 | * def get_platform(): # <<<<<<<<<<<<<< |
10269 | 10283 | int __pyx_clineno = 0; |
10270 | 10284 | __Pyx_RefNannySetupContext("get_platform", 0); |
10271 | 10285 | |
10272 | /* "pygame_sdl2/display.pyx":656 | |
10286 | /* "pygame_sdl2/display.pyx":658 | |
10273 | 10287 | * |
10274 | 10288 | * def get_platform(): |
10275 | 10289 | * return SDL_GetPlatform() # <<<<<<<<<<<<<< |
10277 | 10291 | * cdef api SDL_Window *PyWindow_AsWindow(window): |
10278 | 10292 | */ |
10279 | 10293 | __Pyx_XDECREF(__pyx_r); |
10280 | __pyx_t_1 = __Pyx_PyBytes_FromString(SDL_GetPlatform()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10294 | __pyx_t_1 = __Pyx_PyBytes_FromString(SDL_GetPlatform()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10281 | 10295 | __Pyx_GOTREF(__pyx_t_1); |
10282 | 10296 | __pyx_r = __pyx_t_1; |
10283 | 10297 | __pyx_t_1 = 0; |
10284 | 10298 | goto __pyx_L0; |
10285 | 10299 | |
10286 | /* "pygame_sdl2/display.pyx":655 | |
10300 | /* "pygame_sdl2/display.pyx":657 | |
10287 | 10301 | * SDL_SetHint(hint, value) |
10288 | 10302 | * |
10289 | 10303 | * def get_platform(): # <<<<<<<<<<<<<< |
10302 | 10316 | return __pyx_r; |
10303 | 10317 | } |
10304 | 10318 | |
10305 | /* "pygame_sdl2/display.pyx":658 | |
10319 | /* "pygame_sdl2/display.pyx":660 | |
10306 | 10320 | * return SDL_GetPlatform() |
10307 | 10321 | * |
10308 | 10322 | * cdef api SDL_Window *PyWindow_AsWindow(window): # <<<<<<<<<<<<<< |
10318 | 10332 | __Pyx_RefNannySetupContext("PyWindow_AsWindow", 0); |
10319 | 10333 | __Pyx_INCREF(__pyx_v_window); |
10320 | 10334 | |
10321 | /* "pygame_sdl2/display.pyx":665 | |
10335 | /* "pygame_sdl2/display.pyx":667 | |
10322 | 10336 | * """ |
10323 | 10337 | * |
10324 | 10338 | * if window is None: # <<<<<<<<<<<<<< |
10329 | 10343 | __pyx_t_2 = (__pyx_t_1 != 0); |
10330 | 10344 | if (__pyx_t_2) { |
10331 | 10345 | |
10332 | /* "pygame_sdl2/display.pyx":666 | |
10346 | /* "pygame_sdl2/display.pyx":668 | |
10333 | 10347 | * |
10334 | 10348 | * if window is None: |
10335 | 10349 | * window = main_window # <<<<<<<<<<<<<< |
10339 | 10353 | __Pyx_INCREF(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); |
10340 | 10354 | __Pyx_DECREF_SET(__pyx_v_window, ((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); |
10341 | 10355 | |
10342 | /* "pygame_sdl2/display.pyx":665 | |
10356 | /* "pygame_sdl2/display.pyx":667 | |
10343 | 10357 | * """ |
10344 | 10358 | * |
10345 | 10359 | * if window is None: # <<<<<<<<<<<<<< |
10348 | 10362 | */ |
10349 | 10363 | } |
10350 | 10364 | |
10351 | /* "pygame_sdl2/display.pyx":668 | |
10365 | /* "pygame_sdl2/display.pyx":670 | |
10352 | 10366 | * window = main_window |
10353 | 10367 | * |
10354 | 10368 | * if window is None: # <<<<<<<<<<<<<< |
10359 | 10373 | __pyx_t_1 = (__pyx_t_2 != 0); |
10360 | 10374 | if (__pyx_t_1) { |
10361 | 10375 | |
10362 | /* "pygame_sdl2/display.pyx":669 | |
10376 | /* "pygame_sdl2/display.pyx":671 | |
10363 | 10377 | * |
10364 | 10378 | * if window is None: |
10365 | 10379 | * return NULL # <<<<<<<<<<<<<< |
10369 | 10383 | __pyx_r = NULL; |
10370 | 10384 | goto __pyx_L0; |
10371 | 10385 | |
10372 | /* "pygame_sdl2/display.pyx":668 | |
10386 | /* "pygame_sdl2/display.pyx":670 | |
10373 | 10387 | * window = main_window |
10374 | 10388 | * |
10375 | 10389 | * if window is None: # <<<<<<<<<<<<<< |
10378 | 10392 | */ |
10379 | 10393 | } |
10380 | 10394 | |
10381 | /* "pygame_sdl2/display.pyx":671 | |
10395 | /* "pygame_sdl2/display.pyx":673 | |
10382 | 10396 | * return NULL |
10383 | 10397 | * |
10384 | 10398 | * return (<Window> window).window # <<<<<<<<<<<<<< |
10386 | 10400 | __pyx_r = ((struct __pyx_obj_11pygame_sdl2_7display_Window *)__pyx_v_window)->window; |
10387 | 10401 | goto __pyx_L0; |
10388 | 10402 | |
10389 | /* "pygame_sdl2/display.pyx":658 | |
10403 | /* "pygame_sdl2/display.pyx":660 | |
10390 | 10404 | * return SDL_GetPlatform() |
10391 | 10405 | * |
10392 | 10406 | * cdef api SDL_Window *PyWindow_AsWindow(window): # <<<<<<<<<<<<<< |
10673 | 10687 | {&__pyx_n_s_rect, __pyx_k_rect, sizeof(__pyx_k_rect), 0, 0, 1, 1}, |
10674 | 10688 | {&__pyx_n_s_rectangles, __pyx_k_rectangles, sizeof(__pyx_k_rectangles), 0, 0, 1, 1}, |
10675 | 10689 | {&__pyx_n_s_red, __pyx_k_red, sizeof(__pyx_k_red), 0, 0, 1, 1}, |
10690 | {&__pyx_n_s_refresh_rate, __pyx_k_refresh_rate, sizeof(__pyx_k_refresh_rate), 0, 0, 1, 1}, | |
10676 | 10691 | {&__pyx_n_s_register_init, __pyx_k_register_init, sizeof(__pyx_k_register_init), 0, 0, 1, 1}, |
10677 | 10692 | {&__pyx_n_s_register_quit, __pyx_k_register_quit, sizeof(__pyx_k_register_quit), 0, 0, 1, 1}, |
10678 | 10693 | {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, |
10792 | 10807 | __Pyx_GOTREF(__pyx_tuple__8); |
10793 | 10808 | __Pyx_GIVEREF(__pyx_tuple__8); |
10794 | 10809 | |
10795 | /* "pygame_sdl2/display.pyx":648 | |
10810 | /* "pygame_sdl2/display.pyx":650 | |
10796 | 10811 | * |
10797 | 10812 | * if not isinstance(hint, bytes): |
10798 | 10813 | * hint = hint.encode("utf-8") # <<<<<<<<<<<<<< |
10799 | 10814 | * |
10800 | 10815 | * if not isinstance(value, bytes): |
10801 | 10816 | */ |
10802 | __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10817 | __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10803 | 10818 | __Pyx_GOTREF(__pyx_tuple__10); |
10804 | 10819 | __Pyx_GIVEREF(__pyx_tuple__10); |
10805 | 10820 | |
10806 | /* "pygame_sdl2/display.pyx":651 | |
10821 | /* "pygame_sdl2/display.pyx":653 | |
10807 | 10822 | * |
10808 | 10823 | * if not isinstance(value, bytes): |
10809 | 10824 | * value = value.encode("utf-8") # <<<<<<<<<<<<<< |
10810 | 10825 | * |
10811 | 10826 | * SDL_SetHint(hint, value) |
10812 | 10827 | */ |
10813 | __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10828 | __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10814 | 10829 | __Pyx_GOTREF(__pyx_tuple__11); |
10815 | 10830 | __Pyx_GIVEREF(__pyx_tuple__11); |
10816 | 10831 | |
10925 | 10940 | __Pyx_GIVEREF(__pyx_tuple__25); |
10926 | 10941 | __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_init_2, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
10927 | 10942 | |
10928 | /* "pygame_sdl2/display.pyx":482 | |
10943 | /* "pygame_sdl2/display.pyx":484 | |
10929 | 10944 | * self.blit_sw_A = False |
10930 | 10945 | * |
10931 | 10946 | * def __repr__(self): # <<<<<<<<<<<<<< |
10932 | 10947 | * return "<Info({!r})>".format(self.__dict__) |
10933 | 10948 | * |
10934 | 10949 | */ |
10935 | __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10950 | __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10936 | 10951 | __Pyx_GOTREF(__pyx_tuple__27); |
10937 | 10952 | __Pyx_GIVEREF(__pyx_tuple__27); |
10938 | __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_repr, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10939 | ||
10940 | /* "pygame_sdl2/display.pyx":486 | |
10953 | __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_repr, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10954 | ||
10955 | /* "pygame_sdl2/display.pyx":488 | |
10941 | 10956 | * |
10942 | 10957 | * |
10943 | 10958 | * def get_wm_info(): # <<<<<<<<<<<<<< |
10944 | 10959 | * if main_window: |
10945 | 10960 | * return main_window.get_wm_info() |
10946 | 10961 | */ |
10947 | __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_wm_info, 486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10948 | ||
10949 | /* "pygame_sdl2/display.pyx":493 | |
10962 | __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_wm_info, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10963 | ||
10964 | /* "pygame_sdl2/display.pyx":495 | |
10950 | 10965 | * |
10951 | 10966 | * |
10952 | 10967 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
10953 | 10968 | * """ |
10954 | 10969 | * Returns the number of video displays connected to the system. |
10955 | 10970 | */ |
10956 | __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10971 | __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10957 | 10972 | __Pyx_GOTREF(__pyx_tuple__30); |
10958 | 10973 | __Pyx_GIVEREF(__pyx_tuple__30); |
10959 | __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10960 | ||
10961 | /* "pygame_sdl2/display.pyx":506 | |
10974 | __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10975 | ||
10976 | /* "pygame_sdl2/display.pyx":508 | |
10962 | 10977 | * |
10963 | 10978 | * |
10964 | 10979 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
10965 | 10980 | * """ |
10966 | 10981 | * Returns a list of possible display modes for the display `display`. |
10967 | 10982 | */ |
10968 | __pyx_tuple__32 = PyTuple_Pack(8, __pyx_n_s_depth, __pyx_n_s_flags, __pyx_n_s_display, __pyx_n_s_num_modes, __pyx_n_s_i, __pyx_n_s_mode, __pyx_n_s_rv, __pyx_n_s_t); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10983 | __pyx_tuple__32 = PyTuple_Pack(8, __pyx_n_s_depth, __pyx_n_s_flags, __pyx_n_s_display, __pyx_n_s_num_modes, __pyx_n_s_i, __pyx_n_s_mode, __pyx_n_s_rv, __pyx_n_s_t); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10969 | 10984 | __Pyx_GOTREF(__pyx_tuple__32); |
10970 | 10985 | __Pyx_GIVEREF(__pyx_tuple__32); |
10971 | __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_list_modes, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10972 | ||
10973 | /* "pygame_sdl2/display.pyx":531 | |
10986 | __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_list_modes, 508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10987 | ||
10988 | /* "pygame_sdl2/display.pyx":533 | |
10974 | 10989 | * |
10975 | 10990 | * |
10976 | 10991 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
10977 | 10992 | * """ |
10978 | 10993 | * Returns true if size is in the result of list_modes(). |
10979 | 10994 | */ |
10980 | __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_flags, __pyx_n_s_depth); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10995 | __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_flags, __pyx_n_s_depth); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10981 | 10996 | __Pyx_GOTREF(__pyx_tuple__34); |
10982 | 10997 | __Pyx_GIVEREF(__pyx_tuple__34); |
10983 | __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_mode_ok, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10984 | ||
10985 | /* "pygame_sdl2/display.pyx":538 | |
10998 | __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_mode_ok, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10999 | ||
11000 | /* "pygame_sdl2/display.pyx":540 | |
10986 | 11001 | * return tuple(size) in list_modes() |
10987 | 11002 | * |
10988 | 11003 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
10989 | 11004 | * SDL_GL_ResetAttributes() |
10990 | 11005 | * |
10991 | 11006 | */ |
10992 | __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_reset_attributes, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10993 | ||
10994 | /* "pygame_sdl2/display.pyx":541 | |
11007 | __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_reset_attributes, 540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11008 | ||
11009 | /* "pygame_sdl2/display.pyx":543 | |
10995 | 11010 | * SDL_GL_ResetAttributes() |
10996 | 11011 | * |
10997 | 11012 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
10998 | 11013 | * |
10999 | 11014 | * if flag == GL_SWAP_CONTROL: |
11000 | 11015 | */ |
11001 | __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_default_swap_control); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11016 | __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_default_swap_control); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11002 | 11017 | __Pyx_GOTREF(__pyx_tuple__37); |
11003 | 11018 | __Pyx_GIVEREF(__pyx_tuple__37); |
11004 | __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_set_attribute, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11005 | ||
11006 | /* "pygame_sdl2/display.pyx":559 | |
11019 | __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_set_attribute, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11020 | ||
11021 | /* "pygame_sdl2/display.pyx":561 | |
11007 | 11022 | * raise error() |
11008 | 11023 | * |
11009 | 11024 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
11010 | 11025 | * cdef int rv |
11011 | 11026 | * |
11012 | 11027 | */ |
11013 | __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_flag, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11028 | __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_flag, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11014 | 11029 | __Pyx_GOTREF(__pyx_tuple__39); |
11015 | 11030 | __Pyx_GIVEREF(__pyx_tuple__39); |
11016 | __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_get_attribute, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11017 | ||
11018 | /* "pygame_sdl2/display.pyx":570 | |
11031 | __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_get_attribute, 561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11032 | ||
11033 | /* "pygame_sdl2/display.pyx":572 | |
11019 | 11034 | * return rv |
11020 | 11035 | * |
11021 | 11036 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
11022 | 11037 | * if path is None: |
11023 | 11038 | * if SDL_GL_LoadLibrary(NULL): |
11024 | 11039 | */ |
11025 | __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11040 | __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11026 | 11041 | __Pyx_GOTREF(__pyx_tuple__41); |
11027 | 11042 | __Pyx_GIVEREF(__pyx_tuple__41); |
11028 | __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_load_library, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11029 | ||
11030 | /* "pygame_sdl2/display.pyx":578 | |
11043 | __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_load_library, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11044 | ||
11045 | /* "pygame_sdl2/display.pyx":580 | |
11031 | 11046 | * raise error() |
11032 | 11047 | * |
11033 | 11048 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
11034 | 11049 | * SDL_GL_UnloadLibrary() |
11035 | 11050 | * |
11036 | 11051 | */ |
11037 | __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_unload_library, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11038 | ||
11039 | /* "pygame_sdl2/display.pyx":581 | |
11052 | __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_unload_library, 580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11053 | ||
11054 | /* "pygame_sdl2/display.pyx":583 | |
11040 | 11055 | * SDL_GL_UnloadLibrary() |
11041 | 11056 | * |
11042 | 11057 | * def get_active(): # <<<<<<<<<<<<<< |
11043 | 11058 | * if main_window: |
11044 | 11059 | * return main_window.get_active() |
11045 | 11060 | */ |
11046 | __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_active, 581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11047 | ||
11048 | /* "pygame_sdl2/display.pyx":586 | |
11061 | __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_active, 583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11062 | ||
11063 | /* "pygame_sdl2/display.pyx":588 | |
11049 | 11064 | * return False |
11050 | 11065 | * |
11051 | 11066 | * def iconify(): # <<<<<<<<<<<<<< |
11052 | 11067 | * if main_window: |
11053 | 11068 | * return main_window.iconify() |
11054 | 11069 | */ |
11055 | __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_iconify, 586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11056 | ||
11057 | /* "pygame_sdl2/display.pyx":592 | |
11070 | __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_iconify, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11071 | ||
11072 | /* "pygame_sdl2/display.pyx":594 | |
11058 | 11073 | * return False |
11059 | 11074 | * |
11060 | 11075 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
11061 | 11076 | * if main_window: |
11062 | 11077 | * return main_window.toggle_fullscreen() |
11063 | 11078 | */ |
11064 | __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_toggle_fullscreen, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11065 | ||
11066 | /* "pygame_sdl2/display.pyx":598 | |
11079 | __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_toggle_fullscreen, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11080 | ||
11081 | /* "pygame_sdl2/display.pyx":600 | |
11067 | 11082 | * return True |
11068 | 11083 | * |
11069 | 11084 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
11070 | 11085 | * if main_window: |
11071 | 11086 | * return main_window.set_gamma(red, green, blue) |
11072 | 11087 | */ |
11073 | __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11088 | __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11074 | 11089 | __Pyx_GOTREF(__pyx_tuple__47); |
11075 | 11090 | __Pyx_GIVEREF(__pyx_tuple__47); |
11076 | __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11077 | ||
11078 | /* "pygame_sdl2/display.pyx":603 | |
11091 | __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11092 | ||
11093 | /* "pygame_sdl2/display.pyx":605 | |
11079 | 11094 | * return False |
11080 | 11095 | * |
11081 | 11096 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
11082 | 11097 | * if main_window: |
11083 | 11098 | * return main_window.set_gamma_ramp(red, green, blue) |
11084 | 11099 | */ |
11085 | __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11100 | __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11086 | 11101 | __Pyx_GOTREF(__pyx_tuple__49); |
11087 | 11102 | __Pyx_GIVEREF(__pyx_tuple__49); |
11088 | __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma_ramp, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11089 | ||
11090 | /* "pygame_sdl2/display.pyx":608 | |
11103 | __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma_ramp, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11104 | ||
11105 | /* "pygame_sdl2/display.pyx":610 | |
11091 | 11106 | * return False |
11092 | 11107 | * |
11093 | 11108 | * def set_icon(surface): # <<<<<<<<<<<<<< |
11094 | 11109 | * global default_icon |
11095 | 11110 | * |
11096 | 11111 | */ |
11097 | __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11112 | __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11098 | 11113 | __Pyx_GOTREF(__pyx_tuple__51); |
11099 | 11114 | __Pyx_GIVEREF(__pyx_tuple__51); |
11100 | __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_icon, 608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11101 | ||
11102 | /* "pygame_sdl2/display.pyx":616 | |
11115 | __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_icon, 610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11116 | ||
11117 | /* "pygame_sdl2/display.pyx":618 | |
11103 | 11118 | * main_window.set_icon(default_icon) |
11104 | 11119 | * |
11105 | 11120 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
11106 | 11121 | * global default_title |
11107 | 11122 | * |
11108 | 11123 | */ |
11109 | __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_title, __pyx_n_s_icontitle); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11124 | __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_title, __pyx_n_s_icontitle); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11110 | 11125 | __Pyx_GOTREF(__pyx_tuple__53); |
11111 | 11126 | __Pyx_GIVEREF(__pyx_tuple__53); |
11112 | __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_caption, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11113 | ||
11114 | /* "pygame_sdl2/display.pyx":624 | |
11127 | __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_caption, 618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11128 | ||
11129 | /* "pygame_sdl2/display.pyx":626 | |
11115 | 11130 | * main_window.set_caption(default_title) |
11116 | 11131 | * |
11117 | 11132 | * def get_caption(): # <<<<<<<<<<<<<< |
11118 | 11133 | * return default_title |
11119 | 11134 | * |
11120 | 11135 | */ |
11121 | __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_caption, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11122 | ||
11123 | /* "pygame_sdl2/display.pyx":627 | |
11136 | __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_caption, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11137 | ||
11138 | /* "pygame_sdl2/display.pyx":629 | |
11124 | 11139 | * return default_title |
11125 | 11140 | * |
11126 | 11141 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
11127 | 11142 | * if main_window: |
11128 | 11143 | * return main_window.get_drawable_size() |
11129 | 11144 | */ |
11130 | __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_drawable_size, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11131 | ||
11132 | /* "pygame_sdl2/display.pyx":632 | |
11145 | __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_drawable_size, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11146 | ||
11147 | /* "pygame_sdl2/display.pyx":634 | |
11133 | 11148 | * return None |
11134 | 11149 | * |
11135 | 11150 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11136 | 11151 | * rv = SDL_GetNumVideoDisplays() |
11137 | 11152 | * if rv < 0: |
11138 | 11153 | */ |
11139 | __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11154 | __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11140 | 11155 | __Pyx_GOTREF(__pyx_tuple__57); |
11141 | 11156 | __Pyx_GIVEREF(__pyx_tuple__57); |
11142 | __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11143 | ||
11144 | /* "pygame_sdl2/display.pyx":639 | |
11157 | __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11158 | ||
11159 | /* "pygame_sdl2/display.pyx":641 | |
11145 | 11160 | * return rv |
11146 | 11161 | * |
11147 | 11162 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
11148 | 11163 | * cdef SDL_Rect rect |
11149 | 11164 | * rv = SDL_GetDisplayBounds(index, &rect) |
11150 | 11165 | */ |
11151 | __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_index, __pyx_n_s_rect, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11166 | __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_index, __pyx_n_s_rect, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11152 | 11167 | __Pyx_GOTREF(__pyx_tuple__59); |
11153 | 11168 | __Pyx_GIVEREF(__pyx_tuple__59); |
11154 | __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_display_bounds, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11155 | ||
11156 | /* "pygame_sdl2/display.pyx":645 | |
11169 | __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_display_bounds, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11170 | ||
11171 | /* "pygame_sdl2/display.pyx":647 | |
11157 | 11172 | * return (rect.x, rect.y, rect.w, rect.h) |
11158 | 11173 | * |
11159 | 11174 | * def hint(hint, value): # <<<<<<<<<<<<<< |
11160 | 11175 | * |
11161 | 11176 | * if not isinstance(hint, bytes): |
11162 | 11177 | */ |
11163 | __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_hint, __pyx_n_s_value); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11178 | __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_hint, __pyx_n_s_value); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11164 | 11179 | __Pyx_GOTREF(__pyx_tuple__61); |
11165 | 11180 | __Pyx_GIVEREF(__pyx_tuple__61); |
11166 | __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_hint, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11167 | ||
11168 | /* "pygame_sdl2/display.pyx":655 | |
11181 | __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_hint, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11182 | ||
11183 | /* "pygame_sdl2/display.pyx":657 | |
11169 | 11184 | * SDL_SetHint(hint, value) |
11170 | 11185 | * |
11171 | 11186 | * def get_platform(): # <<<<<<<<<<<<<< |
11172 | 11187 | * return SDL_GetPlatform() |
11173 | 11188 | * |
11174 | 11189 | */ |
11175 | __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_platform, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11190 | __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_platform, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11176 | 11191 | __Pyx_RefNannyFinishContext(); |
11177 | 11192 | return 0; |
11178 | 11193 | __pyx_L1_error:; |
11731 | 11746 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
11732 | 11747 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
11733 | 11748 | |
11734 | /* "pygame_sdl2/display.pyx":482 | |
11749 | /* "pygame_sdl2/display.pyx":484 | |
11735 | 11750 | * self.blit_sw_A = False |
11736 | 11751 | * |
11737 | 11752 | * def __repr__(self): # <<<<<<<<<<<<<< |
11738 | 11753 | * return "<Info({!r})>".format(self.__dict__) |
11739 | 11754 | * |
11740 | 11755 | */ |
11741 | __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_4Info_3__repr__, 0, __pyx_n_s_Info___repr, NULL, __pyx_n_s_pygame_sdl2_display, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11756 | __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_4Info_3__repr__, 0, __pyx_n_s_Info___repr, NULL, __pyx_n_s_pygame_sdl2_display, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11742 | 11757 | __Pyx_GOTREF(__pyx_t_5); |
11743 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_repr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11758 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_repr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11744 | 11759 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
11745 | 11760 | |
11746 | 11761 | /* "pygame_sdl2/display.pyx":423 |
11758 | 11773 | __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; |
11759 | 11774 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11760 | 11775 | |
11761 | /* "pygame_sdl2/display.pyx":486 | |
11776 | /* "pygame_sdl2/display.pyx":488 | |
11762 | 11777 | * |
11763 | 11778 | * |
11764 | 11779 | * def get_wm_info(): # <<<<<<<<<<<<<< |
11765 | 11780 | * if main_window: |
11766 | 11781 | * return main_window.get_wm_info() |
11767 | 11782 | */ |
11768 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_21get_wm_info, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11783 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_21get_wm_info, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11769 | 11784 | __Pyx_GOTREF(__pyx_t_3); |
11770 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_wm_info, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11785 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_wm_info, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11771 | 11786 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11772 | 11787 | |
11773 | /* "pygame_sdl2/display.pyx":493 | |
11788 | /* "pygame_sdl2/display.pyx":495 | |
11774 | 11789 | * |
11775 | 11790 | * |
11776 | 11791 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11777 | 11792 | * """ |
11778 | 11793 | * Returns the number of video displays connected to the system. |
11779 | 11794 | */ |
11780 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_23get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11795 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_23get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11781 | 11796 | __Pyx_GOTREF(__pyx_t_3); |
11782 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11797 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11783 | 11798 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11784 | 11799 | |
11785 | /* "pygame_sdl2/display.pyx":506 | |
11800 | /* "pygame_sdl2/display.pyx":508 | |
11786 | 11801 | * |
11787 | 11802 | * |
11788 | 11803 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
11789 | 11804 | * """ |
11790 | 11805 | * Returns a list of possible display modes for the display `display`. |
11791 | 11806 | */ |
11792 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_25list_modes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11807 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_25list_modes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11793 | 11808 | __Pyx_GOTREF(__pyx_t_3); |
11794 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_modes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11809 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_modes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11795 | 11810 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11796 | 11811 | |
11797 | /* "pygame_sdl2/display.pyx":531 | |
11812 | /* "pygame_sdl2/display.pyx":533 | |
11798 | 11813 | * |
11799 | 11814 | * |
11800 | 11815 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
11801 | 11816 | * """ |
11802 | 11817 | * Returns true if size is in the result of list_modes(). |
11803 | 11818 | */ |
11804 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_27mode_ok, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11819 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_27mode_ok, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11805 | 11820 | __Pyx_GOTREF(__pyx_t_3); |
11806 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_ok, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11821 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_ok, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11807 | 11822 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11808 | 11823 | |
11809 | /* "pygame_sdl2/display.pyx":538 | |
11824 | /* "pygame_sdl2/display.pyx":540 | |
11810 | 11825 | * return tuple(size) in list_modes() |
11811 | 11826 | * |
11812 | 11827 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
11813 | 11828 | * SDL_GL_ResetAttributes() |
11814 | 11829 | * |
11815 | 11830 | */ |
11816 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_29gl_reset_attributes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11831 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_29gl_reset_attributes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11817 | 11832 | __Pyx_GOTREF(__pyx_t_3); |
11818 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_reset_attributes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11833 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_reset_attributes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11819 | 11834 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11820 | 11835 | |
11821 | /* "pygame_sdl2/display.pyx":541 | |
11836 | /* "pygame_sdl2/display.pyx":543 | |
11822 | 11837 | * SDL_GL_ResetAttributes() |
11823 | 11838 | * |
11824 | 11839 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
11825 | 11840 | * |
11826 | 11841 | * if flag == GL_SWAP_CONTROL: |
11827 | 11842 | */ |
11828 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_31gl_set_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11843 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_31gl_set_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11829 | 11844 | __Pyx_GOTREF(__pyx_t_3); |
11830 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_set_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11845 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_set_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11831 | 11846 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11832 | 11847 | |
11833 | /* "pygame_sdl2/display.pyx":559 | |
11848 | /* "pygame_sdl2/display.pyx":561 | |
11834 | 11849 | * raise error() |
11835 | 11850 | * |
11836 | 11851 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
11837 | 11852 | * cdef int rv |
11838 | 11853 | * |
11839 | 11854 | */ |
11840 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_33gl_get_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11855 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_33gl_get_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11841 | 11856 | __Pyx_GOTREF(__pyx_t_3); |
11842 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_get_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11857 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_get_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11843 | 11858 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11844 | 11859 | |
11845 | /* "pygame_sdl2/display.pyx":570 | |
11860 | /* "pygame_sdl2/display.pyx":572 | |
11846 | 11861 | * return rv |
11847 | 11862 | * |
11848 | 11863 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
11849 | 11864 | * if path is None: |
11850 | 11865 | * if SDL_GL_LoadLibrary(NULL): |
11851 | 11866 | */ |
11852 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_35gl_load_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11867 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_35gl_load_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11853 | 11868 | __Pyx_GOTREF(__pyx_t_3); |
11854 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_load_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11869 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_load_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11855 | 11870 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11856 | 11871 | |
11857 | /* "pygame_sdl2/display.pyx":578 | |
11872 | /* "pygame_sdl2/display.pyx":580 | |
11858 | 11873 | * raise error() |
11859 | 11874 | * |
11860 | 11875 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
11861 | 11876 | * SDL_GL_UnloadLibrary() |
11862 | 11877 | * |
11863 | 11878 | */ |
11864 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_37gl_unload_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11879 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_37gl_unload_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11865 | 11880 | __Pyx_GOTREF(__pyx_t_3); |
11866 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_unload_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11881 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_unload_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11867 | 11882 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11868 | 11883 | |
11869 | /* "pygame_sdl2/display.pyx":581 | |
11884 | /* "pygame_sdl2/display.pyx":583 | |
11870 | 11885 | * SDL_GL_UnloadLibrary() |
11871 | 11886 | * |
11872 | 11887 | * def get_active(): # <<<<<<<<<<<<<< |
11873 | 11888 | * if main_window: |
11874 | 11889 | * return main_window.get_active() |
11875 | 11890 | */ |
11876 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_39get_active, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11891 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_39get_active, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11877 | 11892 | __Pyx_GOTREF(__pyx_t_3); |
11878 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_active, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11893 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_active, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11879 | 11894 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11880 | 11895 | |
11881 | /* "pygame_sdl2/display.pyx":586 | |
11896 | /* "pygame_sdl2/display.pyx":588 | |
11882 | 11897 | * return False |
11883 | 11898 | * |
11884 | 11899 | * def iconify(): # <<<<<<<<<<<<<< |
11885 | 11900 | * if main_window: |
11886 | 11901 | * return main_window.iconify() |
11887 | 11902 | */ |
11888 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_41iconify, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11903 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_41iconify, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11889 | 11904 | __Pyx_GOTREF(__pyx_t_3); |
11890 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_iconify, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11905 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_iconify, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11891 | 11906 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11892 | 11907 | |
11893 | /* "pygame_sdl2/display.pyx":592 | |
11908 | /* "pygame_sdl2/display.pyx":594 | |
11894 | 11909 | * return False |
11895 | 11910 | * |
11896 | 11911 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
11897 | 11912 | * if main_window: |
11898 | 11913 | * return main_window.toggle_fullscreen() |
11899 | 11914 | */ |
11900 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_43toggle_fullscreen, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11915 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_43toggle_fullscreen, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11901 | 11916 | __Pyx_GOTREF(__pyx_t_3); |
11902 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_toggle_fullscreen, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11917 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_toggle_fullscreen, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11903 | 11918 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11904 | 11919 | |
11905 | /* "pygame_sdl2/display.pyx":598 | |
11920 | /* "pygame_sdl2/display.pyx":600 | |
11906 | 11921 | * return True |
11907 | 11922 | * |
11908 | 11923 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
11909 | 11924 | * if main_window: |
11910 | 11925 | * return main_window.set_gamma(red, green, blue) |
11911 | 11926 | */ |
11912 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_45set_gamma, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11927 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_45set_gamma, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11913 | 11928 | __Pyx_GOTREF(__pyx_t_3); |
11914 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11929 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11915 | 11930 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11916 | 11931 | |
11917 | /* "pygame_sdl2/display.pyx":603 | |
11932 | /* "pygame_sdl2/display.pyx":605 | |
11918 | 11933 | * return False |
11919 | 11934 | * |
11920 | 11935 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
11921 | 11936 | * if main_window: |
11922 | 11937 | * return main_window.set_gamma_ramp(red, green, blue) |
11923 | 11938 | */ |
11924 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_47set_gamma_ramp, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11939 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_47set_gamma_ramp, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11925 | 11940 | __Pyx_GOTREF(__pyx_t_3); |
11926 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma_ramp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11941 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma_ramp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11927 | 11942 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11928 | 11943 | |
11929 | /* "pygame_sdl2/display.pyx":608 | |
11944 | /* "pygame_sdl2/display.pyx":610 | |
11930 | 11945 | * return False |
11931 | 11946 | * |
11932 | 11947 | * def set_icon(surface): # <<<<<<<<<<<<<< |
11933 | 11948 | * global default_icon |
11934 | 11949 | * |
11935 | 11950 | */ |
11936 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_49set_icon, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11951 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_49set_icon, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11937 | 11952 | __Pyx_GOTREF(__pyx_t_3); |
11938 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_icon, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11953 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_icon, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11939 | 11954 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11940 | 11955 | |
11941 | /* "pygame_sdl2/display.pyx":616 | |
11956 | /* "pygame_sdl2/display.pyx":618 | |
11942 | 11957 | * main_window.set_icon(default_icon) |
11943 | 11958 | * |
11944 | 11959 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
11945 | 11960 | * global default_title |
11946 | 11961 | * |
11947 | 11962 | */ |
11948 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_51set_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11963 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_51set_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11949 | 11964 | __Pyx_GOTREF(__pyx_t_3); |
11950 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11965 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11951 | 11966 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11952 | 11967 | |
11953 | /* "pygame_sdl2/display.pyx":624 | |
11968 | /* "pygame_sdl2/display.pyx":626 | |
11954 | 11969 | * main_window.set_caption(default_title) |
11955 | 11970 | * |
11956 | 11971 | * def get_caption(): # <<<<<<<<<<<<<< |
11957 | 11972 | * return default_title |
11958 | 11973 | * |
11959 | 11974 | */ |
11960 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_53get_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11975 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_53get_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11961 | 11976 | __Pyx_GOTREF(__pyx_t_3); |
11962 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11977 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11963 | 11978 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11964 | 11979 | |
11965 | /* "pygame_sdl2/display.pyx":627 | |
11980 | /* "pygame_sdl2/display.pyx":629 | |
11966 | 11981 | * return default_title |
11967 | 11982 | * |
11968 | 11983 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
11969 | 11984 | * if main_window: |
11970 | 11985 | * return main_window.get_drawable_size() |
11971 | 11986 | */ |
11972 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_55get_drawable_size, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11987 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_55get_drawable_size, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11973 | 11988 | __Pyx_GOTREF(__pyx_t_3); |
11974 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drawable_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11989 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drawable_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11975 | 11990 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11976 | 11991 | |
11977 | /* "pygame_sdl2/display.pyx":632 | |
11992 | /* "pygame_sdl2/display.pyx":634 | |
11978 | 11993 | * return None |
11979 | 11994 | * |
11980 | 11995 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11981 | 11996 | * rv = SDL_GetNumVideoDisplays() |
11982 | 11997 | * if rv < 0: |
11983 | 11998 | */ |
11984 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_57get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11999 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_57get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11985 | 12000 | __Pyx_GOTREF(__pyx_t_3); |
11986 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12001 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11987 | 12002 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11988 | 12003 | |
11989 | /* "pygame_sdl2/display.pyx":639 | |
12004 | /* "pygame_sdl2/display.pyx":641 | |
11990 | 12005 | * return rv |
11991 | 12006 | * |
11992 | 12007 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
11993 | 12008 | * cdef SDL_Rect rect |
11994 | 12009 | * rv = SDL_GetDisplayBounds(index, &rect) |
11995 | 12010 | */ |
11996 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_59get_display_bounds, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12011 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_59get_display_bounds, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11997 | 12012 | __Pyx_GOTREF(__pyx_t_3); |
11998 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_bounds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12013 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_bounds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11999 | 12014 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12000 | 12015 | |
12001 | /* "pygame_sdl2/display.pyx":645 | |
12016 | /* "pygame_sdl2/display.pyx":647 | |
12002 | 12017 | * return (rect.x, rect.y, rect.w, rect.h) |
12003 | 12018 | * |
12004 | 12019 | * def hint(hint, value): # <<<<<<<<<<<<<< |
12005 | 12020 | * |
12006 | 12021 | * if not isinstance(hint, bytes): |
12007 | 12022 | */ |
12008 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_61hint, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12023 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_61hint, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12009 | 12024 | __Pyx_GOTREF(__pyx_t_3); |
12010 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_hint, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12025 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_hint, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12011 | 12026 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12012 | 12027 | |
12013 | /* "pygame_sdl2/display.pyx":655 | |
12028 | /* "pygame_sdl2/display.pyx":657 | |
12014 | 12029 | * SDL_SetHint(hint, value) |
12015 | 12030 | * |
12016 | 12031 | * def get_platform(): # <<<<<<<<<<<<<< |
12017 | 12032 | * return SDL_GetPlatform() |
12018 | 12033 | * |
12019 | 12034 | */ |
12020 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_63get_platform, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12035 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_63get_platform, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12021 | 12036 | __Pyx_GOTREF(__pyx_t_3); |
12022 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_platform, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12037 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_platform, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12023 | 12038 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12024 | 12039 | |
12025 | 12040 | /* "pygame_sdl2/display.pyx":1 |
13903 | 13918 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
13904 | 13919 | switch (Py_SIZE(x)) { |
13905 | 13920 | case 0: return (uint32_t) 0; |
13906 | case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0]) | |
13921 | case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0])) | |
13907 | 13922 | case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, +digits[0]) |
13908 | 13923 | case -2: |
13909 | 13924 | if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) { |
14139 | 14154 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
14140 | 14155 | switch (Py_SIZE(x)) { |
14141 | 14156 | case 0: return (int) 0; |
14142 | case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) | |
14157 | case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) | |
14143 | 14158 | case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) |
14144 | 14159 | case -2: |
14145 | 14160 | if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { |
14349 | 14364 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
14350 | 14365 | switch (Py_SIZE(x)) { |
14351 | 14366 | case 0: return (long) 0; |
14352 | case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) | |
14367 | case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) | |
14353 | 14368 | case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) |
14354 | 14369 | case -2: |
14355 | 14370 | if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { |
14533 | 14548 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
14534 | 14549 | switch (Py_SIZE(x)) { |
14535 | 14550 | case 0: return (uint16_t) 0; |
14536 | case -1: __PYX_VERIFY_RETURN_INT(uint16_t, sdigit, -(sdigit) digits[0]) | |
14551 | case -1: __PYX_VERIFY_RETURN_INT(uint16_t, sdigit, (sdigit) (-(sdigit)digits[0])) | |
14537 | 14552 | case 1: __PYX_VERIFY_RETURN_INT(uint16_t, digit, +digits[0]) |
14538 | 14553 | case -2: |
14539 | 14554 | if (8 * sizeof(uint16_t) - 1 > 1 * PyLong_SHIFT) { |
14743 | 14758 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
14744 | 14759 | switch (Py_SIZE(x)) { |
14745 | 14760 | case 0: return (SDL_GLattr) 0; |
14746 | case -1: __PYX_VERIFY_RETURN_INT(SDL_GLattr, sdigit, -(sdigit) digits[0]) | |
14761 | case -1: __PYX_VERIFY_RETURN_INT(SDL_GLattr, sdigit, (sdigit) (-(sdigit)digits[0])) | |
14747 | 14762 | case 1: __PYX_VERIFY_RETURN_INT(SDL_GLattr, digit, +digits[0]) |
14748 | 14763 | case -2: |
14749 | 14764 | if (8 * sizeof(SDL_GLattr) - 1 > 1 * PyLong_SHIFT) { |
1003 | 1003 | static char __pyx_k_close_window[] = "close_window"; |
1004 | 1004 | static char __pyx_k_default_icon[] = "default_icon"; |
1005 | 1005 | static char __pyx_k_get_platform[] = "get_platform"; |
1006 | static char __pyx_k_refresh_rate[] = "refresh_rate"; | |
1006 | 1007 | static char __pyx_k_default_title[] = "default_title"; |
1007 | 1008 | static char __pyx_k_pygame_window[] = "pygame window"; |
1008 | 1009 | static char __pyx_k_register_init[] = "register_init"; |
1136 | 1137 | static PyObject *__pyx_n_s_rect; |
1137 | 1138 | static PyObject *__pyx_n_s_rectangles; |
1138 | 1139 | static PyObject *__pyx_n_s_red; |
1140 | static PyObject *__pyx_n_s_refresh_rate; | |
1139 | 1141 | static PyObject *__pyx_n_s_register_init; |
1140 | 1142 | static PyObject *__pyx_n_s_register_quit; |
1141 | 1143 | static PyObject *__pyx_n_s_repr; |
6925 | 6927 | * self.current_w = dm.w |
6926 | 6928 | * self.current_h = dm.h # <<<<<<<<<<<<<< |
6927 | 6929 | * |
6928 | * # The rest of these are just guesses. | |
6930 | * self.refresh_rate = dm.refresh_rate | |
6929 | 6931 | */ |
6930 | 6932 | __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_dm.h); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
6931 | 6933 | __Pyx_GOTREF(__pyx_t_6); |
6934 | 6936 | } |
6935 | 6937 | __pyx_L5:; |
6936 | 6938 | |
6937 | /* "pygame_sdl2/display.pyx":470 | |
6939 | /* "pygame_sdl2/display.pyx":469 | |
6940 | * self.current_h = dm.h | |
6941 | * | |
6942 | * self.refresh_rate = dm.refresh_rate # <<<<<<<<<<<<<< | |
6943 | * | |
6944 | * # The rest of these are just guesses. | |
6945 | */ | |
6946 | __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_dm.refresh_rate); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6947 | __Pyx_GOTREF(__pyx_t_6); | |
6948 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_refresh_rate, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6949 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
6950 | ||
6951 | /* "pygame_sdl2/display.pyx":472 | |
6938 | 6952 | * |
6939 | 6953 | * # The rest of these are just guesses. |
6940 | 6954 | * self.hw = False # <<<<<<<<<<<<<< |
6941 | 6955 | * self.wm = True |
6942 | 6956 | * self.video_mem = 256 * 1024 * 1024 |
6943 | 6957 | */ |
6944 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6945 | ||
6946 | /* "pygame_sdl2/display.pyx":471 | |
6958 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6959 | ||
6960 | /* "pygame_sdl2/display.pyx":473 | |
6947 | 6961 | * # The rest of these are just guesses. |
6948 | 6962 | * self.hw = False |
6949 | 6963 | * self.wm = True # <<<<<<<<<<<<<< |
6950 | 6964 | * self.video_mem = 256 * 1024 * 1024 |
6951 | 6965 | * |
6952 | 6966 | */ |
6953 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wm, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6954 | ||
6955 | /* "pygame_sdl2/display.pyx":472 | |
6967 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wm, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6968 | ||
6969 | /* "pygame_sdl2/display.pyx":474 | |
6956 | 6970 | * self.hw = False |
6957 | 6971 | * self.wm = True |
6958 | 6972 | * self.video_mem = 256 * 1024 * 1024 # <<<<<<<<<<<<<< |
6959 | 6973 | * |
6960 | 6974 | * self.blit_hw = False |
6961 | 6975 | */ |
6962 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_video_mem, __pyx_int_268435456) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6963 | ||
6964 | /* "pygame_sdl2/display.pyx":474 | |
6976 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_video_mem, __pyx_int_268435456) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6977 | ||
6978 | /* "pygame_sdl2/display.pyx":476 | |
6965 | 6979 | * self.video_mem = 256 * 1024 * 1024 |
6966 | 6980 | * |
6967 | 6981 | * self.blit_hw = False # <<<<<<<<<<<<<< |
6968 | 6982 | * self.blit_hw_CC = False |
6969 | 6983 | * self.blit_hw_A = False |
6970 | 6984 | */ |
6971 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6972 | ||
6973 | /* "pygame_sdl2/display.pyx":475 | |
6985 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6986 | ||
6987 | /* "pygame_sdl2/display.pyx":477 | |
6974 | 6988 | * |
6975 | 6989 | * self.blit_hw = False |
6976 | 6990 | * self.blit_hw_CC = False # <<<<<<<<<<<<<< |
6977 | 6991 | * self.blit_hw_A = False |
6978 | 6992 | * |
6979 | 6993 | */ |
6980 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6981 | ||
6982 | /* "pygame_sdl2/display.pyx":476 | |
6994 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6995 | ||
6996 | /* "pygame_sdl2/display.pyx":478 | |
6983 | 6997 | * self.blit_hw = False |
6984 | 6998 | * self.blit_hw_CC = False |
6985 | 6999 | * self.blit_hw_A = False # <<<<<<<<<<<<<< |
6986 | 7000 | * |
6987 | 7001 | * self.blit_sw = False |
6988 | 7002 | */ |
6989 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6990 | ||
6991 | /* "pygame_sdl2/display.pyx":478 | |
7003 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_hw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7004 | ||
7005 | /* "pygame_sdl2/display.pyx":480 | |
6992 | 7006 | * self.blit_hw_A = False |
6993 | 7007 | * |
6994 | 7008 | * self.blit_sw = False # <<<<<<<<<<<<<< |
6995 | 7009 | * self.blit_sw_CC = False |
6996 | 7010 | * self.blit_sw_A = False |
6997 | 7011 | */ |
6998 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
6999 | ||
7000 | /* "pygame_sdl2/display.pyx":479 | |
7012 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7013 | ||
7014 | /* "pygame_sdl2/display.pyx":481 | |
7001 | 7015 | * |
7002 | 7016 | * self.blit_sw = False |
7003 | 7017 | * self.blit_sw_CC = False # <<<<<<<<<<<<<< |
7004 | 7018 | * self.blit_sw_A = False |
7005 | 7019 | * |
7006 | 7020 | */ |
7007 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7008 | ||
7009 | /* "pygame_sdl2/display.pyx":480 | |
7021 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_CC, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7022 | ||
7023 | /* "pygame_sdl2/display.pyx":482 | |
7010 | 7024 | * self.blit_sw = False |
7011 | 7025 | * self.blit_sw_CC = False |
7012 | 7026 | * self.blit_sw_A = False # <<<<<<<<<<<<<< |
7013 | 7027 | * |
7014 | 7028 | * def __repr__(self): |
7015 | 7029 | */ |
7016 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7030 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blit_sw_A, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7017 | 7031 | |
7018 | 7032 | /* "pygame_sdl2/display.pyx":425 |
7019 | 7033 | * class Info(object): |
7040 | 7054 | return __pyx_r; |
7041 | 7055 | } |
7042 | 7056 | |
7043 | /* "pygame_sdl2/display.pyx":482 | |
7057 | /* "pygame_sdl2/display.pyx":484 | |
7044 | 7058 | * self.blit_sw_A = False |
7045 | 7059 | * |
7046 | 7060 | * def __repr__(self): # <<<<<<<<<<<<<< |
7075 | 7089 | int __pyx_clineno = 0; |
7076 | 7090 | __Pyx_RefNannySetupContext("__repr__", 0); |
7077 | 7091 | |
7078 | /* "pygame_sdl2/display.pyx":483 | |
7092 | /* "pygame_sdl2/display.pyx":485 | |
7079 | 7093 | * |
7080 | 7094 | * def __repr__(self): |
7081 | 7095 | * return "<Info({!r})>".format(self.__dict__) # <<<<<<<<<<<<<< |
7083 | 7097 | * |
7084 | 7098 | */ |
7085 | 7099 | __Pyx_XDECREF(__pyx_r); |
7086 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Info_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7100 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Info_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7087 | 7101 | __Pyx_GOTREF(__pyx_t_2); |
7088 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7102 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7089 | 7103 | __Pyx_GOTREF(__pyx_t_3); |
7090 | 7104 | __pyx_t_4 = NULL; |
7091 | 7105 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
7098 | 7112 | } |
7099 | 7113 | } |
7100 | 7114 | if (!__pyx_t_4) { |
7101 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7115 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7102 | 7116 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7103 | 7117 | __Pyx_GOTREF(__pyx_t_1); |
7104 | 7118 | } else { |
7105 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7119 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7106 | 7120 | __Pyx_GOTREF(__pyx_t_5); |
7107 | 7121 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; |
7108 | 7122 | __Pyx_GIVEREF(__pyx_t_3); |
7109 | 7123 | PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3); |
7110 | 7124 | __pyx_t_3 = 0; |
7111 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7125 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7112 | 7126 | __Pyx_GOTREF(__pyx_t_1); |
7113 | 7127 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
7114 | 7128 | } |
7117 | 7131 | __pyx_t_1 = 0; |
7118 | 7132 | goto __pyx_L0; |
7119 | 7133 | |
7120 | /* "pygame_sdl2/display.pyx":482 | |
7134 | /* "pygame_sdl2/display.pyx":484 | |
7121 | 7135 | * self.blit_sw_A = False |
7122 | 7136 | * |
7123 | 7137 | * def __repr__(self): # <<<<<<<<<<<<<< |
7140 | 7154 | return __pyx_r; |
7141 | 7155 | } |
7142 | 7156 | |
7143 | /* "pygame_sdl2/display.pyx":486 | |
7157 | /* "pygame_sdl2/display.pyx":488 | |
7144 | 7158 | * |
7145 | 7159 | * |
7146 | 7160 | * def get_wm_info(): # <<<<<<<<<<<<<< |
7174 | 7188 | int __pyx_clineno = 0; |
7175 | 7189 | __Pyx_RefNannySetupContext("get_wm_info", 0); |
7176 | 7190 | |
7177 | /* "pygame_sdl2/display.pyx":487 | |
7191 | /* "pygame_sdl2/display.pyx":489 | |
7178 | 7192 | * |
7179 | 7193 | * def get_wm_info(): |
7180 | 7194 | * if main_window: # <<<<<<<<<<<<<< |
7181 | 7195 | * return main_window.get_wm_info() |
7182 | 7196 | * |
7183 | 7197 | */ |
7184 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7198 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7185 | 7199 | if (__pyx_t_1) { |
7186 | 7200 | |
7187 | /* "pygame_sdl2/display.pyx":488 | |
7201 | /* "pygame_sdl2/display.pyx":490 | |
7188 | 7202 | * def get_wm_info(): |
7189 | 7203 | * if main_window: |
7190 | 7204 | * return main_window.get_wm_info() # <<<<<<<<<<<<<< |
7192 | 7206 | * return {} |
7193 | 7207 | */ |
7194 | 7208 | __Pyx_XDECREF(__pyx_r); |
7195 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_wm_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7209 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_wm_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7196 | 7210 | __Pyx_GOTREF(__pyx_t_3); |
7197 | 7211 | __pyx_t_4 = NULL; |
7198 | 7212 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
7205 | 7219 | } |
7206 | 7220 | } |
7207 | 7221 | if (__pyx_t_4) { |
7208 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7222 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7209 | 7223 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7210 | 7224 | } else { |
7211 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7225 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7212 | 7226 | } |
7213 | 7227 | __Pyx_GOTREF(__pyx_t_2); |
7214 | 7228 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7216 | 7230 | __pyx_t_2 = 0; |
7217 | 7231 | goto __pyx_L0; |
7218 | 7232 | |
7219 | /* "pygame_sdl2/display.pyx":487 | |
7233 | /* "pygame_sdl2/display.pyx":489 | |
7220 | 7234 | * |
7221 | 7235 | * def get_wm_info(): |
7222 | 7236 | * if main_window: # <<<<<<<<<<<<<< |
7225 | 7239 | */ |
7226 | 7240 | } |
7227 | 7241 | |
7228 | /* "pygame_sdl2/display.pyx":490 | |
7242 | /* "pygame_sdl2/display.pyx":492 | |
7229 | 7243 | * return main_window.get_wm_info() |
7230 | 7244 | * |
7231 | 7245 | * return {} # <<<<<<<<<<<<<< |
7233 | 7247 | * |
7234 | 7248 | */ |
7235 | 7249 | __Pyx_XDECREF(__pyx_r); |
7236 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7250 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7237 | 7251 | __Pyx_GOTREF(__pyx_t_2); |
7238 | 7252 | __pyx_r = __pyx_t_2; |
7239 | 7253 | __pyx_t_2 = 0; |
7240 | 7254 | goto __pyx_L0; |
7241 | 7255 | |
7242 | /* "pygame_sdl2/display.pyx":486 | |
7256 | /* "pygame_sdl2/display.pyx":488 | |
7243 | 7257 | * |
7244 | 7258 | * |
7245 | 7259 | * def get_wm_info(): # <<<<<<<<<<<<<< |
7260 | 7274 | return __pyx_r; |
7261 | 7275 | } |
7262 | 7276 | |
7263 | /* "pygame_sdl2/display.pyx":493 | |
7277 | /* "pygame_sdl2/display.pyx":495 | |
7264 | 7278 | * |
7265 | 7279 | * |
7266 | 7280 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
7296 | 7310 | int __pyx_clineno = 0; |
7297 | 7311 | __Pyx_RefNannySetupContext("get_num_video_displays", 0); |
7298 | 7312 | |
7299 | /* "pygame_sdl2/display.pyx":498 | |
7313 | /* "pygame_sdl2/display.pyx":500 | |
7300 | 7314 | * """ |
7301 | 7315 | * |
7302 | 7316 | * rv = SDL_GetNumVideoDisplays() # <<<<<<<<<<<<<< |
7305 | 7319 | */ |
7306 | 7320 | __pyx_v_rv = SDL_GetNumVideoDisplays(); |
7307 | 7321 | |
7308 | /* "pygame_sdl2/display.pyx":500 | |
7322 | /* "pygame_sdl2/display.pyx":502 | |
7309 | 7323 | * rv = SDL_GetNumVideoDisplays() |
7310 | 7324 | * |
7311 | 7325 | * if rv < 0: # <<<<<<<<<<<<<< |
7315 | 7329 | __pyx_t_1 = ((__pyx_v_rv < 0) != 0); |
7316 | 7330 | if (__pyx_t_1) { |
7317 | 7331 | |
7318 | /* "pygame_sdl2/display.pyx":501 | |
7332 | /* "pygame_sdl2/display.pyx":503 | |
7319 | 7333 | * |
7320 | 7334 | * if rv < 0: |
7321 | 7335 | * raise error() # <<<<<<<<<<<<<< |
7322 | 7336 | * |
7323 | 7337 | * return rv |
7324 | 7338 | */ |
7325 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7339 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7326 | 7340 | __Pyx_GOTREF(__pyx_t_3); |
7327 | 7341 | __pyx_t_4 = NULL; |
7328 | 7342 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
7335 | 7349 | } |
7336 | 7350 | } |
7337 | 7351 | if (__pyx_t_4) { |
7338 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7352 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7339 | 7353 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7340 | 7354 | } else { |
7341 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7355 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7342 | 7356 | } |
7343 | 7357 | __Pyx_GOTREF(__pyx_t_2); |
7344 | 7358 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7345 | 7359 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
7346 | 7360 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7347 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7348 | ||
7349 | /* "pygame_sdl2/display.pyx":500 | |
7361 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7362 | ||
7363 | /* "pygame_sdl2/display.pyx":502 | |
7350 | 7364 | * rv = SDL_GetNumVideoDisplays() |
7351 | 7365 | * |
7352 | 7366 | * if rv < 0: # <<<<<<<<<<<<<< |
7355 | 7369 | */ |
7356 | 7370 | } |
7357 | 7371 | |
7358 | /* "pygame_sdl2/display.pyx":503 | |
7372 | /* "pygame_sdl2/display.pyx":505 | |
7359 | 7373 | * raise error() |
7360 | 7374 | * |
7361 | 7375 | * return rv # <<<<<<<<<<<<<< |
7363 | 7377 | * |
7364 | 7378 | */ |
7365 | 7379 | __Pyx_XDECREF(__pyx_r); |
7366 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7380 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7367 | 7381 | __Pyx_GOTREF(__pyx_t_2); |
7368 | 7382 | __pyx_r = __pyx_t_2; |
7369 | 7383 | __pyx_t_2 = 0; |
7370 | 7384 | goto __pyx_L0; |
7371 | 7385 | |
7372 | /* "pygame_sdl2/display.pyx":493 | |
7386 | /* "pygame_sdl2/display.pyx":495 | |
7373 | 7387 | * |
7374 | 7388 | * |
7375 | 7389 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
7390 | 7404 | return __pyx_r; |
7391 | 7405 | } |
7392 | 7406 | |
7393 | /* "pygame_sdl2/display.pyx":506 | |
7407 | /* "pygame_sdl2/display.pyx":508 | |
7394 | 7408 | * |
7395 | 7409 | * |
7396 | 7410 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
7447 | 7461 | } |
7448 | 7462 | } |
7449 | 7463 | if (unlikely(kw_args > 0)) { |
7450 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_modes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7464 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_modes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7451 | 7465 | } |
7452 | 7466 | } else { |
7453 | 7467 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
7464 | 7478 | } |
7465 | 7479 | goto __pyx_L4_argument_unpacking_done; |
7466 | 7480 | __pyx_L5_argtuple_error:; |
7467 | __Pyx_RaiseArgtupleInvalid("list_modes", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7481 | __Pyx_RaiseArgtupleInvalid("list_modes", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7468 | 7482 | __pyx_L3_error:; |
7469 | 7483 | __Pyx_AddTraceback("pygame_sdl2.display.list_modes", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7470 | 7484 | __Pyx_RefNannyFinishContext(); |
7498 | 7512 | int __pyx_clineno = 0; |
7499 | 7513 | __Pyx_RefNannySetupContext("list_modes", 0); |
7500 | 7514 | |
7501 | /* "pygame_sdl2/display.pyx":516 | |
7515 | /* "pygame_sdl2/display.pyx":518 | |
7502 | 7516 | * cdef SDL_DisplayMode mode |
7503 | 7517 | * |
7504 | 7518 | * rv = [ ] # <<<<<<<<<<<<<< |
7505 | 7519 | * |
7506 | 7520 | * num_modes = SDL_GetNumDisplayModes(display) |
7507 | 7521 | */ |
7508 | __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7522 | __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7509 | 7523 | __Pyx_GOTREF(__pyx_t_1); |
7510 | 7524 | __pyx_v_rv = ((PyObject*)__pyx_t_1); |
7511 | 7525 | __pyx_t_1 = 0; |
7512 | 7526 | |
7513 | /* "pygame_sdl2/display.pyx":518 | |
7527 | /* "pygame_sdl2/display.pyx":520 | |
7514 | 7528 | * rv = [ ] |
7515 | 7529 | * |
7516 | 7530 | * num_modes = SDL_GetNumDisplayModes(display) # <<<<<<<<<<<<<< |
7517 | 7531 | * if num_modes < 0: |
7518 | 7532 | * raise error() |
7519 | 7533 | */ |
7520 | __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7534 | __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7521 | 7535 | __pyx_v_num_modes = SDL_GetNumDisplayModes(__pyx_t_2); |
7522 | 7536 | |
7523 | /* "pygame_sdl2/display.pyx":519 | |
7537 | /* "pygame_sdl2/display.pyx":521 | |
7524 | 7538 | * |
7525 | 7539 | * num_modes = SDL_GetNumDisplayModes(display) |
7526 | 7540 | * if num_modes < 0: # <<<<<<<<<<<<<< |
7530 | 7544 | __pyx_t_3 = ((__pyx_v_num_modes < 0) != 0); |
7531 | 7545 | if (__pyx_t_3) { |
7532 | 7546 | |
7533 | /* "pygame_sdl2/display.pyx":520 | |
7547 | /* "pygame_sdl2/display.pyx":522 | |
7534 | 7548 | * num_modes = SDL_GetNumDisplayModes(display) |
7535 | 7549 | * if num_modes < 0: |
7536 | 7550 | * raise error() # <<<<<<<<<<<<<< |
7537 | 7551 | * |
7538 | 7552 | * for 0 <= i < num_modes: |
7539 | 7553 | */ |
7540 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7554 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7541 | 7555 | __Pyx_GOTREF(__pyx_t_4); |
7542 | 7556 | __pyx_t_5 = NULL; |
7543 | 7557 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
7550 | 7564 | } |
7551 | 7565 | } |
7552 | 7566 | if (__pyx_t_5) { |
7553 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7567 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7554 | 7568 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
7555 | 7569 | } else { |
7556 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7570 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7557 | 7571 | } |
7558 | 7572 | __Pyx_GOTREF(__pyx_t_1); |
7559 | 7573 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7560 | 7574 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
7561 | 7575 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7562 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7563 | ||
7564 | /* "pygame_sdl2/display.pyx":519 | |
7576 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7577 | ||
7578 | /* "pygame_sdl2/display.pyx":521 | |
7565 | 7579 | * |
7566 | 7580 | * num_modes = SDL_GetNumDisplayModes(display) |
7567 | 7581 | * if num_modes < 0: # <<<<<<<<<<<<<< |
7570 | 7584 | */ |
7571 | 7585 | } |
7572 | 7586 | |
7573 | /* "pygame_sdl2/display.pyx":522 | |
7587 | /* "pygame_sdl2/display.pyx":524 | |
7574 | 7588 | * raise error() |
7575 | 7589 | * |
7576 | 7590 | * for 0 <= i < num_modes: # <<<<<<<<<<<<<< |
7580 | 7594 | __pyx_t_2 = __pyx_v_num_modes; |
7581 | 7595 | for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { |
7582 | 7596 | |
7583 | /* "pygame_sdl2/display.pyx":523 | |
7597 | /* "pygame_sdl2/display.pyx":525 | |
7584 | 7598 | * |
7585 | 7599 | * for 0 <= i < num_modes: |
7586 | 7600 | * if SDL_GetDisplayMode(display, i, &mode) == 0: # <<<<<<<<<<<<<< |
7587 | 7601 | * t = (mode.w, mode.h) |
7588 | 7602 | * if t not in rv: |
7589 | 7603 | */ |
7590 | __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7604 | __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_display); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7591 | 7605 | __pyx_t_3 = ((SDL_GetDisplayMode(__pyx_t_6, __pyx_v_i, (&__pyx_v_mode)) == 0) != 0); |
7592 | 7606 | if (__pyx_t_3) { |
7593 | 7607 | |
7594 | /* "pygame_sdl2/display.pyx":524 | |
7608 | /* "pygame_sdl2/display.pyx":526 | |
7595 | 7609 | * for 0 <= i < num_modes: |
7596 | 7610 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7597 | 7611 | * t = (mode.w, mode.h) # <<<<<<<<<<<<<< |
7598 | 7612 | * if t not in rv: |
7599 | 7613 | * rv.append(t) |
7600 | 7614 | */ |
7601 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_mode.w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7615 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_mode.w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7602 | 7616 | __Pyx_GOTREF(__pyx_t_1); |
7603 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_mode.h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7617 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_mode.h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7604 | 7618 | __Pyx_GOTREF(__pyx_t_4); |
7605 | __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7619 | __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7606 | 7620 | __Pyx_GOTREF(__pyx_t_5); |
7607 | 7621 | __Pyx_GIVEREF(__pyx_t_1); |
7608 | 7622 | PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); |
7613 | 7627 | __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5); |
7614 | 7628 | __pyx_t_5 = 0; |
7615 | 7629 | |
7616 | /* "pygame_sdl2/display.pyx":525 | |
7630 | /* "pygame_sdl2/display.pyx":527 | |
7617 | 7631 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7618 | 7632 | * t = (mode.w, mode.h) |
7619 | 7633 | * if t not in rv: # <<<<<<<<<<<<<< |
7620 | 7634 | * rv.append(t) |
7621 | 7635 | * |
7622 | 7636 | */ |
7623 | __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_t, __pyx_v_rv, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7637 | __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_t, __pyx_v_rv, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7624 | 7638 | __pyx_t_7 = (__pyx_t_3 != 0); |
7625 | 7639 | if (__pyx_t_7) { |
7626 | 7640 | |
7627 | /* "pygame_sdl2/display.pyx":526 | |
7641 | /* "pygame_sdl2/display.pyx":528 | |
7628 | 7642 | * t = (mode.w, mode.h) |
7629 | 7643 | * if t not in rv: |
7630 | 7644 | * rv.append(t) # <<<<<<<<<<<<<< |
7631 | 7645 | * |
7632 | 7646 | * return rv |
7633 | 7647 | */ |
7634 | __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_v_t); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7635 | ||
7636 | /* "pygame_sdl2/display.pyx":525 | |
7648 | __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_v_t); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7649 | ||
7650 | /* "pygame_sdl2/display.pyx":527 | |
7637 | 7651 | * if SDL_GetDisplayMode(display, i, &mode) == 0: |
7638 | 7652 | * t = (mode.w, mode.h) |
7639 | 7653 | * if t not in rv: # <<<<<<<<<<<<<< |
7642 | 7656 | */ |
7643 | 7657 | } |
7644 | 7658 | |
7645 | /* "pygame_sdl2/display.pyx":523 | |
7659 | /* "pygame_sdl2/display.pyx":525 | |
7646 | 7660 | * |
7647 | 7661 | * for 0 <= i < num_modes: |
7648 | 7662 | * if SDL_GetDisplayMode(display, i, &mode) == 0: # <<<<<<<<<<<<<< |
7652 | 7666 | } |
7653 | 7667 | } |
7654 | 7668 | |
7655 | /* "pygame_sdl2/display.pyx":528 | |
7669 | /* "pygame_sdl2/display.pyx":530 | |
7656 | 7670 | * rv.append(t) |
7657 | 7671 | * |
7658 | 7672 | * return rv # <<<<<<<<<<<<<< |
7664 | 7678 | __pyx_r = __pyx_v_rv; |
7665 | 7679 | goto __pyx_L0; |
7666 | 7680 | |
7667 | /* "pygame_sdl2/display.pyx":506 | |
7681 | /* "pygame_sdl2/display.pyx":508 | |
7668 | 7682 | * |
7669 | 7683 | * |
7670 | 7684 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
7687 | 7701 | return __pyx_r; |
7688 | 7702 | } |
7689 | 7703 | |
7690 | /* "pygame_sdl2/display.pyx":531 | |
7704 | /* "pygame_sdl2/display.pyx":533 | |
7691 | 7705 | * |
7692 | 7706 | * |
7693 | 7707 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
7741 | 7755 | } |
7742 | 7756 | } |
7743 | 7757 | if (unlikely(kw_args > 0)) { |
7744 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_ok") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7758 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_ok") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7745 | 7759 | } |
7746 | 7760 | } else { |
7747 | 7761 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
7758 | 7772 | } |
7759 | 7773 | goto __pyx_L4_argument_unpacking_done; |
7760 | 7774 | __pyx_L5_argtuple_error:; |
7761 | __Pyx_RaiseArgtupleInvalid("mode_ok", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7775 | __Pyx_RaiseArgtupleInvalid("mode_ok", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7762 | 7776 | __pyx_L3_error:; |
7763 | 7777 | __Pyx_AddTraceback("pygame_sdl2.display.mode_ok", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7764 | 7778 | __Pyx_RefNannyFinishContext(); |
7784 | 7798 | int __pyx_clineno = 0; |
7785 | 7799 | __Pyx_RefNannySetupContext("mode_ok", 0); |
7786 | 7800 | |
7787 | /* "pygame_sdl2/display.pyx":536 | |
7801 | /* "pygame_sdl2/display.pyx":538 | |
7788 | 7802 | * """ |
7789 | 7803 | * |
7790 | 7804 | * return tuple(size) in list_modes() # <<<<<<<<<<<<<< |
7792 | 7806 | * def gl_reset_attributes(): |
7793 | 7807 | */ |
7794 | 7808 | __Pyx_XDECREF(__pyx_r); |
7795 | __pyx_t_1 = PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7809 | __pyx_t_1 = PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7796 | 7810 | __Pyx_GOTREF(__pyx_t_1); |
7797 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_modes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7811 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_modes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7798 | 7812 | __Pyx_GOTREF(__pyx_t_3); |
7799 | 7813 | __pyx_t_4 = NULL; |
7800 | 7814 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
7807 | 7821 | } |
7808 | 7822 | } |
7809 | 7823 | if (__pyx_t_4) { |
7810 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7824 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7811 | 7825 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
7812 | 7826 | } else { |
7813 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7827 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7814 | 7828 | } |
7815 | 7829 | __Pyx_GOTREF(__pyx_t_2); |
7816 | 7830 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
7817 | __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7831 | __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7818 | 7832 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7819 | 7833 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7820 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7834 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7821 | 7835 | __Pyx_GOTREF(__pyx_t_2); |
7822 | 7836 | __pyx_r = __pyx_t_2; |
7823 | 7837 | __pyx_t_2 = 0; |
7824 | 7838 | goto __pyx_L0; |
7825 | 7839 | |
7826 | /* "pygame_sdl2/display.pyx":531 | |
7840 | /* "pygame_sdl2/display.pyx":533 | |
7827 | 7841 | * |
7828 | 7842 | * |
7829 | 7843 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
7845 | 7859 | return __pyx_r; |
7846 | 7860 | } |
7847 | 7861 | |
7848 | /* "pygame_sdl2/display.pyx":538 | |
7862 | /* "pygame_sdl2/display.pyx":540 | |
7849 | 7863 | * return tuple(size) in list_modes() |
7850 | 7864 | * |
7851 | 7865 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
7872 | 7886 | __Pyx_RefNannyDeclarations |
7873 | 7887 | __Pyx_RefNannySetupContext("gl_reset_attributes", 0); |
7874 | 7888 | |
7875 | /* "pygame_sdl2/display.pyx":539 | |
7889 | /* "pygame_sdl2/display.pyx":541 | |
7876 | 7890 | * |
7877 | 7891 | * def gl_reset_attributes(): |
7878 | 7892 | * SDL_GL_ResetAttributes() # <<<<<<<<<<<<<< |
7881 | 7895 | */ |
7882 | 7896 | SDL_GL_ResetAttributes(); |
7883 | 7897 | |
7884 | /* "pygame_sdl2/display.pyx":538 | |
7898 | /* "pygame_sdl2/display.pyx":540 | |
7885 | 7899 | * return tuple(size) in list_modes() |
7886 | 7900 | * |
7887 | 7901 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
7896 | 7910 | return __pyx_r; |
7897 | 7911 | } |
7898 | 7912 | |
7899 | /* "pygame_sdl2/display.pyx":541 | |
7913 | /* "pygame_sdl2/display.pyx":543 | |
7900 | 7914 | * SDL_GL_ResetAttributes() |
7901 | 7915 | * |
7902 | 7916 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
7936 | 7950 | case 1: |
7937 | 7951 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; |
7938 | 7952 | else { |
7939 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7953 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7940 | 7954 | } |
7941 | 7955 | } |
7942 | 7956 | if (unlikely(kw_args > 0)) { |
7943 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gl_set_attribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7957 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gl_set_attribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7944 | 7958 | } |
7945 | 7959 | } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { |
7946 | 7960 | goto __pyx_L5_argtuple_error; |
7953 | 7967 | } |
7954 | 7968 | goto __pyx_L4_argument_unpacking_done; |
7955 | 7969 | __pyx_L5_argtuple_error:; |
7956 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7970 | __Pyx_RaiseArgtupleInvalid("gl_set_attribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
7957 | 7971 | __pyx_L3_error:; |
7958 | 7972 | __Pyx_AddTraceback("pygame_sdl2.display.gl_set_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename); |
7959 | 7973 | __Pyx_RefNannyFinishContext(); |
7981 | 7995 | int __pyx_clineno = 0; |
7982 | 7996 | __Pyx_RefNannySetupContext("gl_set_attribute", 0); |
7983 | 7997 | |
7984 | /* "pygame_sdl2/display.pyx":543 | |
7998 | /* "pygame_sdl2/display.pyx":545 | |
7985 | 7999 | * def gl_set_attribute(flag, value): |
7986 | 8000 | * |
7987 | 8001 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
7988 | 8002 | * if ios: |
7989 | 8003 | * return |
7990 | 8004 | */ |
7991 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8005 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7992 | 8006 | __Pyx_GOTREF(__pyx_t_1); |
7993 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8007 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7994 | 8008 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
7995 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8009 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
7996 | 8010 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
7997 | 8011 | if (__pyx_t_3) { |
7998 | 8012 | |
7999 | /* "pygame_sdl2/display.pyx":544 | |
8013 | /* "pygame_sdl2/display.pyx":546 | |
8000 | 8014 | * |
8001 | 8015 | * if flag == GL_SWAP_CONTROL: |
8002 | 8016 | * if ios: # <<<<<<<<<<<<<< |
8003 | 8017 | * return |
8004 | 8018 | * |
8005 | 8019 | */ |
8006 | __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ios); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8020 | __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ios); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8007 | 8021 | __Pyx_GOTREF(__pyx_t_2); |
8008 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8022 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8009 | 8023 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8010 | 8024 | if (__pyx_t_3) { |
8011 | 8025 | |
8012 | /* "pygame_sdl2/display.pyx":545 | |
8026 | /* "pygame_sdl2/display.pyx":547 | |
8013 | 8027 | * if flag == GL_SWAP_CONTROL: |
8014 | 8028 | * if ios: |
8015 | 8029 | * return # <<<<<<<<<<<<<< |
8020 | 8034 | __pyx_r = Py_None; __Pyx_INCREF(Py_None); |
8021 | 8035 | goto __pyx_L0; |
8022 | 8036 | |
8023 | /* "pygame_sdl2/display.pyx":544 | |
8037 | /* "pygame_sdl2/display.pyx":546 | |
8024 | 8038 | * |
8025 | 8039 | * if flag == GL_SWAP_CONTROL: |
8026 | 8040 | * if ios: # <<<<<<<<<<<<<< |
8029 | 8043 | */ |
8030 | 8044 | } |
8031 | 8045 | |
8032 | /* "pygame_sdl2/display.pyx":550 | |
8046 | /* "pygame_sdl2/display.pyx":552 | |
8033 | 8047 | * # to deal with the case where the negative interval isn't |
8034 | 8048 | * # supported. Then give up and carry on. |
8035 | 8049 | * if SDL_GL_SetSwapInterval(value): # <<<<<<<<<<<<<< |
8036 | 8050 | * SDL_GL_SetSwapInterval(-value) |
8037 | 8051 | * |
8038 | 8052 | */ |
8039 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8053 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8040 | 8054 | __pyx_t_3 = (SDL_GL_SetSwapInterval(__pyx_t_4) != 0); |
8041 | 8055 | if (__pyx_t_3) { |
8042 | 8056 | |
8043 | /* "pygame_sdl2/display.pyx":551 | |
8057 | /* "pygame_sdl2/display.pyx":553 | |
8044 | 8058 | * # supported. Then give up and carry on. |
8045 | 8059 | * if SDL_GL_SetSwapInterval(value): |
8046 | 8060 | * SDL_GL_SetSwapInterval(-value) # <<<<<<<<<<<<<< |
8047 | 8061 | * |
8048 | 8062 | * default_swap_control = value |
8049 | 8063 | */ |
8050 | __pyx_t_2 = PyNumber_Negative(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8064 | __pyx_t_2 = PyNumber_Negative(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8051 | 8065 | __Pyx_GOTREF(__pyx_t_2); |
8052 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8066 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8053 | 8067 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8054 | 8068 | SDL_GL_SetSwapInterval(__pyx_t_4); |
8055 | 8069 | |
8056 | /* "pygame_sdl2/display.pyx":550 | |
8070 | /* "pygame_sdl2/display.pyx":552 | |
8057 | 8071 | * # to deal with the case where the negative interval isn't |
8058 | 8072 | * # supported. Then give up and carry on. |
8059 | 8073 | * if SDL_GL_SetSwapInterval(value): # <<<<<<<<<<<<<< |
8062 | 8076 | */ |
8063 | 8077 | } |
8064 | 8078 | |
8065 | /* "pygame_sdl2/display.pyx":553 | |
8079 | /* "pygame_sdl2/display.pyx":555 | |
8066 | 8080 | * SDL_GL_SetSwapInterval(-value) |
8067 | 8081 | * |
8068 | 8082 | * default_swap_control = value # <<<<<<<<<<<<<< |
8072 | 8086 | __Pyx_INCREF(__pyx_v_value); |
8073 | 8087 | __pyx_v_default_swap_control = __pyx_v_value; |
8074 | 8088 | |
8075 | /* "pygame_sdl2/display.pyx":554 | |
8089 | /* "pygame_sdl2/display.pyx":556 | |
8076 | 8090 | * |
8077 | 8091 | * default_swap_control = value |
8078 | 8092 | * return # <<<<<<<<<<<<<< |
8083 | 8097 | __pyx_r = Py_None; __Pyx_INCREF(Py_None); |
8084 | 8098 | goto __pyx_L0; |
8085 | 8099 | |
8086 | /* "pygame_sdl2/display.pyx":543 | |
8100 | /* "pygame_sdl2/display.pyx":545 | |
8087 | 8101 | * def gl_set_attribute(flag, value): |
8088 | 8102 | * |
8089 | 8103 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8092 | 8106 | */ |
8093 | 8107 | } |
8094 | 8108 | |
8095 | /* "pygame_sdl2/display.pyx":556 | |
8109 | /* "pygame_sdl2/display.pyx":558 | |
8096 | 8110 | * return |
8097 | 8111 | * |
8098 | 8112 | * if SDL_GL_SetAttribute(flag, value): # <<<<<<<<<<<<<< |
8099 | 8113 | * raise error() |
8100 | 8114 | * |
8101 | 8115 | */ |
8102 | __pyx_t_5 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8103 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8116 | __pyx_t_5 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8117 | __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8104 | 8118 | __pyx_t_3 = (SDL_GL_SetAttribute(__pyx_t_5, __pyx_t_4) != 0); |
8105 | 8119 | if (__pyx_t_3) { |
8106 | 8120 | |
8107 | /* "pygame_sdl2/display.pyx":557 | |
8121 | /* "pygame_sdl2/display.pyx":559 | |
8108 | 8122 | * |
8109 | 8123 | * if SDL_GL_SetAttribute(flag, value): |
8110 | 8124 | * raise error() # <<<<<<<<<<<<<< |
8111 | 8125 | * |
8112 | 8126 | * def gl_get_attribute(flag): |
8113 | 8127 | */ |
8114 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8128 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8115 | 8129 | __Pyx_GOTREF(__pyx_t_1); |
8116 | 8130 | __pyx_t_6 = NULL; |
8117 | 8131 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { |
8124 | 8138 | } |
8125 | 8139 | } |
8126 | 8140 | if (__pyx_t_6) { |
8127 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8141 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8128 | 8142 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
8129 | 8143 | } else { |
8130 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8144 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8131 | 8145 | } |
8132 | 8146 | __Pyx_GOTREF(__pyx_t_2); |
8133 | 8147 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8134 | 8148 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
8135 | 8149 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8136 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8137 | ||
8138 | /* "pygame_sdl2/display.pyx":556 | |
8150 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8151 | ||
8152 | /* "pygame_sdl2/display.pyx":558 | |
8139 | 8153 | * return |
8140 | 8154 | * |
8141 | 8155 | * if SDL_GL_SetAttribute(flag, value): # <<<<<<<<<<<<<< |
8144 | 8158 | */ |
8145 | 8159 | } |
8146 | 8160 | |
8147 | /* "pygame_sdl2/display.pyx":541 | |
8161 | /* "pygame_sdl2/display.pyx":543 | |
8148 | 8162 | * SDL_GL_ResetAttributes() |
8149 | 8163 | * |
8150 | 8164 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
8168 | 8182 | return __pyx_r; |
8169 | 8183 | } |
8170 | 8184 | |
8171 | /* "pygame_sdl2/display.pyx":559 | |
8185 | /* "pygame_sdl2/display.pyx":561 | |
8172 | 8186 | * raise error() |
8173 | 8187 | * |
8174 | 8188 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
8204 | 8218 | int __pyx_clineno = 0; |
8205 | 8219 | __Pyx_RefNannySetupContext("gl_get_attribute", 0); |
8206 | 8220 | |
8207 | /* "pygame_sdl2/display.pyx":562 | |
8221 | /* "pygame_sdl2/display.pyx":564 | |
8208 | 8222 | * cdef int rv |
8209 | 8223 | * |
8210 | 8224 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8211 | 8225 | * return SDL_GL_GetSwapInterval() |
8212 | 8226 | * |
8213 | 8227 | */ |
8214 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8228 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GL_SWAP_CONTROL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8215 | 8229 | __Pyx_GOTREF(__pyx_t_1); |
8216 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8230 | __pyx_t_2 = PyObject_RichCompare(__pyx_v_flag, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8217 | 8231 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8218 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8232 | __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8219 | 8233 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8220 | 8234 | if (__pyx_t_3) { |
8221 | 8235 | |
8222 | /* "pygame_sdl2/display.pyx":563 | |
8236 | /* "pygame_sdl2/display.pyx":565 | |
8223 | 8237 | * |
8224 | 8238 | * if flag == GL_SWAP_CONTROL: |
8225 | 8239 | * return SDL_GL_GetSwapInterval() # <<<<<<<<<<<<<< |
8227 | 8241 | * if SDL_GL_GetAttribute(flag, &rv): |
8228 | 8242 | */ |
8229 | 8243 | __Pyx_XDECREF(__pyx_r); |
8230 | __pyx_t_2 = __Pyx_PyInt_From_int(SDL_GL_GetSwapInterval()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8244 | __pyx_t_2 = __Pyx_PyInt_From_int(SDL_GL_GetSwapInterval()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8231 | 8245 | __Pyx_GOTREF(__pyx_t_2); |
8232 | 8246 | __pyx_r = __pyx_t_2; |
8233 | 8247 | __pyx_t_2 = 0; |
8234 | 8248 | goto __pyx_L0; |
8235 | 8249 | |
8236 | /* "pygame_sdl2/display.pyx":562 | |
8250 | /* "pygame_sdl2/display.pyx":564 | |
8237 | 8251 | * cdef int rv |
8238 | 8252 | * |
8239 | 8253 | * if flag == GL_SWAP_CONTROL: # <<<<<<<<<<<<<< |
8242 | 8256 | */ |
8243 | 8257 | } |
8244 | 8258 | |
8245 | /* "pygame_sdl2/display.pyx":565 | |
8259 | /* "pygame_sdl2/display.pyx":567 | |
8246 | 8260 | * return SDL_GL_GetSwapInterval() |
8247 | 8261 | * |
8248 | 8262 | * if SDL_GL_GetAttribute(flag, &rv): # <<<<<<<<<<<<<< |
8249 | 8263 | * raise error() |
8250 | 8264 | * |
8251 | 8265 | */ |
8252 | __pyx_t_4 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8266 | __pyx_t_4 = ((SDL_GLattr)__Pyx_PyInt_As_SDL_GLattr(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8253 | 8267 | __pyx_t_3 = (SDL_GL_GetAttribute(__pyx_t_4, (&__pyx_v_rv)) != 0); |
8254 | 8268 | if (__pyx_t_3) { |
8255 | 8269 | |
8256 | /* "pygame_sdl2/display.pyx":566 | |
8270 | /* "pygame_sdl2/display.pyx":568 | |
8257 | 8271 | * |
8258 | 8272 | * if SDL_GL_GetAttribute(flag, &rv): |
8259 | 8273 | * raise error() # <<<<<<<<<<<<<< |
8260 | 8274 | * |
8261 | 8275 | * return rv |
8262 | 8276 | */ |
8263 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8277 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8264 | 8278 | __Pyx_GOTREF(__pyx_t_1); |
8265 | 8279 | __pyx_t_5 = NULL; |
8266 | 8280 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { |
8273 | 8287 | } |
8274 | 8288 | } |
8275 | 8289 | if (__pyx_t_5) { |
8276 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8290 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8277 | 8291 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8278 | 8292 | } else { |
8279 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8293 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8280 | 8294 | } |
8281 | 8295 | __Pyx_GOTREF(__pyx_t_2); |
8282 | 8296 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
8283 | 8297 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
8284 | 8298 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
8285 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8286 | ||
8287 | /* "pygame_sdl2/display.pyx":565 | |
8299 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8300 | ||
8301 | /* "pygame_sdl2/display.pyx":567 | |
8288 | 8302 | * return SDL_GL_GetSwapInterval() |
8289 | 8303 | * |
8290 | 8304 | * if SDL_GL_GetAttribute(flag, &rv): # <<<<<<<<<<<<<< |
8293 | 8307 | */ |
8294 | 8308 | } |
8295 | 8309 | |
8296 | /* "pygame_sdl2/display.pyx":568 | |
8310 | /* "pygame_sdl2/display.pyx":570 | |
8297 | 8311 | * raise error() |
8298 | 8312 | * |
8299 | 8313 | * return rv # <<<<<<<<<<<<<< |
8301 | 8315 | * def gl_load_library(path): |
8302 | 8316 | */ |
8303 | 8317 | __Pyx_XDECREF(__pyx_r); |
8304 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8318 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8305 | 8319 | __Pyx_GOTREF(__pyx_t_2); |
8306 | 8320 | __pyx_r = __pyx_t_2; |
8307 | 8321 | __pyx_t_2 = 0; |
8308 | 8322 | goto __pyx_L0; |
8309 | 8323 | |
8310 | /* "pygame_sdl2/display.pyx":559 | |
8324 | /* "pygame_sdl2/display.pyx":561 | |
8311 | 8325 | * raise error() |
8312 | 8326 | * |
8313 | 8327 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
8328 | 8342 | return __pyx_r; |
8329 | 8343 | } |
8330 | 8344 | |
8331 | /* "pygame_sdl2/display.pyx":570 | |
8345 | /* "pygame_sdl2/display.pyx":572 | |
8332 | 8346 | * return rv |
8333 | 8347 | * |
8334 | 8348 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
8364 | 8378 | int __pyx_clineno = 0; |
8365 | 8379 | __Pyx_RefNannySetupContext("gl_load_library", 0); |
8366 | 8380 | |
8367 | /* "pygame_sdl2/display.pyx":571 | |
8381 | /* "pygame_sdl2/display.pyx":573 | |
8368 | 8382 | * |
8369 | 8383 | * def gl_load_library(path): |
8370 | 8384 | * if path is None: # <<<<<<<<<<<<<< |
8375 | 8389 | __pyx_t_2 = (__pyx_t_1 != 0); |
8376 | 8390 | if (__pyx_t_2) { |
8377 | 8391 | |
8378 | /* "pygame_sdl2/display.pyx":572 | |
8392 | /* "pygame_sdl2/display.pyx":574 | |
8379 | 8393 | * def gl_load_library(path): |
8380 | 8394 | * if path is None: |
8381 | 8395 | * if SDL_GL_LoadLibrary(NULL): # <<<<<<<<<<<<<< |
8385 | 8399 | __pyx_t_2 = (SDL_GL_LoadLibrary(NULL) != 0); |
8386 | 8400 | if (__pyx_t_2) { |
8387 | 8401 | |
8388 | /* "pygame_sdl2/display.pyx":573 | |
8402 | /* "pygame_sdl2/display.pyx":575 | |
8389 | 8403 | * if path is None: |
8390 | 8404 | * if SDL_GL_LoadLibrary(NULL): |
8391 | 8405 | * raise error() # <<<<<<<<<<<<<< |
8392 | 8406 | * else: |
8393 | 8407 | * if SDL_GL_LoadLibrary(path): |
8394 | 8408 | */ |
8395 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8409 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8396 | 8410 | __Pyx_GOTREF(__pyx_t_4); |
8397 | 8411 | __pyx_t_5 = NULL; |
8398 | 8412 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
8405 | 8419 | } |
8406 | 8420 | } |
8407 | 8421 | if (__pyx_t_5) { |
8408 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8422 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8409 | 8423 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8410 | 8424 | } else { |
8411 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8425 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8412 | 8426 | } |
8413 | 8427 | __Pyx_GOTREF(__pyx_t_3); |
8414 | 8428 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8415 | 8429 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
8416 | 8430 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8417 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8418 | ||
8419 | /* "pygame_sdl2/display.pyx":572 | |
8431 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8432 | ||
8433 | /* "pygame_sdl2/display.pyx":574 | |
8420 | 8434 | * def gl_load_library(path): |
8421 | 8435 | * if path is None: |
8422 | 8436 | * if SDL_GL_LoadLibrary(NULL): # <<<<<<<<<<<<<< |
8425 | 8439 | */ |
8426 | 8440 | } |
8427 | 8441 | |
8428 | /* "pygame_sdl2/display.pyx":571 | |
8442 | /* "pygame_sdl2/display.pyx":573 | |
8429 | 8443 | * |
8430 | 8444 | * def gl_load_library(path): |
8431 | 8445 | * if path is None: # <<<<<<<<<<<<<< |
8435 | 8449 | goto __pyx_L3; |
8436 | 8450 | } |
8437 | 8451 | |
8438 | /* "pygame_sdl2/display.pyx":575 | |
8452 | /* "pygame_sdl2/display.pyx":577 | |
8439 | 8453 | * raise error() |
8440 | 8454 | * else: |
8441 | 8455 | * if SDL_GL_LoadLibrary(path): # <<<<<<<<<<<<<< |
8443 | 8457 | * |
8444 | 8458 | */ |
8445 | 8459 | /*else*/ { |
8446 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8460 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8447 | 8461 | __pyx_t_2 = (SDL_GL_LoadLibrary(__pyx_t_6) != 0); |
8448 | 8462 | if (__pyx_t_2) { |
8449 | 8463 | |
8450 | /* "pygame_sdl2/display.pyx":576 | |
8464 | /* "pygame_sdl2/display.pyx":578 | |
8451 | 8465 | * else: |
8452 | 8466 | * if SDL_GL_LoadLibrary(path): |
8453 | 8467 | * raise error() # <<<<<<<<<<<<<< |
8454 | 8468 | * |
8455 | 8469 | * def gl_unload_library(): |
8456 | 8470 | */ |
8457 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8471 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8458 | 8472 | __Pyx_GOTREF(__pyx_t_4); |
8459 | 8473 | __pyx_t_5 = NULL; |
8460 | 8474 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { |
8467 | 8481 | } |
8468 | 8482 | } |
8469 | 8483 | if (__pyx_t_5) { |
8470 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8484 | __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8471 | 8485 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
8472 | 8486 | } else { |
8473 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8487 | __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8474 | 8488 | } |
8475 | 8489 | __Pyx_GOTREF(__pyx_t_3); |
8476 | 8490 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8477 | 8491 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
8478 | 8492 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8479 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8480 | ||
8481 | /* "pygame_sdl2/display.pyx":575 | |
8493 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8494 | ||
8495 | /* "pygame_sdl2/display.pyx":577 | |
8482 | 8496 | * raise error() |
8483 | 8497 | * else: |
8484 | 8498 | * if SDL_GL_LoadLibrary(path): # <<<<<<<<<<<<<< |
8489 | 8503 | } |
8490 | 8504 | __pyx_L3:; |
8491 | 8505 | |
8492 | /* "pygame_sdl2/display.pyx":570 | |
8506 | /* "pygame_sdl2/display.pyx":572 | |
8493 | 8507 | * return rv |
8494 | 8508 | * |
8495 | 8509 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
8512 | 8526 | return __pyx_r; |
8513 | 8527 | } |
8514 | 8528 | |
8515 | /* "pygame_sdl2/display.pyx":578 | |
8529 | /* "pygame_sdl2/display.pyx":580 | |
8516 | 8530 | * raise error() |
8517 | 8531 | * |
8518 | 8532 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
8539 | 8553 | __Pyx_RefNannyDeclarations |
8540 | 8554 | __Pyx_RefNannySetupContext("gl_unload_library", 0); |
8541 | 8555 | |
8542 | /* "pygame_sdl2/display.pyx":579 | |
8556 | /* "pygame_sdl2/display.pyx":581 | |
8543 | 8557 | * |
8544 | 8558 | * def gl_unload_library(): |
8545 | 8559 | * SDL_GL_UnloadLibrary() # <<<<<<<<<<<<<< |
8548 | 8562 | */ |
8549 | 8563 | SDL_GL_UnloadLibrary(); |
8550 | 8564 | |
8551 | /* "pygame_sdl2/display.pyx":578 | |
8565 | /* "pygame_sdl2/display.pyx":580 | |
8552 | 8566 | * raise error() |
8553 | 8567 | * |
8554 | 8568 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
8563 | 8577 | return __pyx_r; |
8564 | 8578 | } |
8565 | 8579 | |
8566 | /* "pygame_sdl2/display.pyx":581 | |
8580 | /* "pygame_sdl2/display.pyx":583 | |
8567 | 8581 | * SDL_GL_UnloadLibrary() |
8568 | 8582 | * |
8569 | 8583 | * def get_active(): # <<<<<<<<<<<<<< |
8597 | 8611 | int __pyx_clineno = 0; |
8598 | 8612 | __Pyx_RefNannySetupContext("get_active", 0); |
8599 | 8613 | |
8600 | /* "pygame_sdl2/display.pyx":582 | |
8614 | /* "pygame_sdl2/display.pyx":584 | |
8601 | 8615 | * |
8602 | 8616 | * def get_active(): |
8603 | 8617 | * if main_window: # <<<<<<<<<<<<<< |
8604 | 8618 | * return main_window.get_active() |
8605 | 8619 | * return False |
8606 | 8620 | */ |
8607 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8621 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8608 | 8622 | if (__pyx_t_1) { |
8609 | 8623 | |
8610 | /* "pygame_sdl2/display.pyx":583 | |
8624 | /* "pygame_sdl2/display.pyx":585 | |
8611 | 8625 | * def get_active(): |
8612 | 8626 | * if main_window: |
8613 | 8627 | * return main_window.get_active() # <<<<<<<<<<<<<< |
8615 | 8629 | * |
8616 | 8630 | */ |
8617 | 8631 | __Pyx_XDECREF(__pyx_r); |
8618 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_active); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8632 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_active); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8619 | 8633 | __Pyx_GOTREF(__pyx_t_3); |
8620 | 8634 | __pyx_t_4 = NULL; |
8621 | 8635 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8628 | 8642 | } |
8629 | 8643 | } |
8630 | 8644 | if (__pyx_t_4) { |
8631 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8645 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8632 | 8646 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8633 | 8647 | } else { |
8634 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8648 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8635 | 8649 | } |
8636 | 8650 | __Pyx_GOTREF(__pyx_t_2); |
8637 | 8651 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8639 | 8653 | __pyx_t_2 = 0; |
8640 | 8654 | goto __pyx_L0; |
8641 | 8655 | |
8642 | /* "pygame_sdl2/display.pyx":582 | |
8656 | /* "pygame_sdl2/display.pyx":584 | |
8643 | 8657 | * |
8644 | 8658 | * def get_active(): |
8645 | 8659 | * if main_window: # <<<<<<<<<<<<<< |
8648 | 8662 | */ |
8649 | 8663 | } |
8650 | 8664 | |
8651 | /* "pygame_sdl2/display.pyx":584 | |
8665 | /* "pygame_sdl2/display.pyx":586 | |
8652 | 8666 | * if main_window: |
8653 | 8667 | * return main_window.get_active() |
8654 | 8668 | * return False # <<<<<<<<<<<<<< |
8660 | 8674 | __pyx_r = Py_False; |
8661 | 8675 | goto __pyx_L0; |
8662 | 8676 | |
8663 | /* "pygame_sdl2/display.pyx":581 | |
8677 | /* "pygame_sdl2/display.pyx":583 | |
8664 | 8678 | * SDL_GL_UnloadLibrary() |
8665 | 8679 | * |
8666 | 8680 | * def get_active(): # <<<<<<<<<<<<<< |
8681 | 8695 | return __pyx_r; |
8682 | 8696 | } |
8683 | 8697 | |
8684 | /* "pygame_sdl2/display.pyx":586 | |
8698 | /* "pygame_sdl2/display.pyx":588 | |
8685 | 8699 | * return False |
8686 | 8700 | * |
8687 | 8701 | * def iconify(): # <<<<<<<<<<<<<< |
8715 | 8729 | int __pyx_clineno = 0; |
8716 | 8730 | __Pyx_RefNannySetupContext("iconify", 0); |
8717 | 8731 | |
8718 | /* "pygame_sdl2/display.pyx":587 | |
8732 | /* "pygame_sdl2/display.pyx":589 | |
8719 | 8733 | * |
8720 | 8734 | * def iconify(): |
8721 | 8735 | * if main_window: # <<<<<<<<<<<<<< |
8722 | 8736 | * return main_window.iconify() |
8723 | 8737 | * |
8724 | 8738 | */ |
8725 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8739 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8726 | 8740 | if (__pyx_t_1) { |
8727 | 8741 | |
8728 | /* "pygame_sdl2/display.pyx":588 | |
8742 | /* "pygame_sdl2/display.pyx":590 | |
8729 | 8743 | * def iconify(): |
8730 | 8744 | * if main_window: |
8731 | 8745 | * return main_window.iconify() # <<<<<<<<<<<<<< |
8733 | 8747 | * return False |
8734 | 8748 | */ |
8735 | 8749 | __Pyx_XDECREF(__pyx_r); |
8736 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_iconify); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8750 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_iconify); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8737 | 8751 | __Pyx_GOTREF(__pyx_t_3); |
8738 | 8752 | __pyx_t_4 = NULL; |
8739 | 8753 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8746 | 8760 | } |
8747 | 8761 | } |
8748 | 8762 | if (__pyx_t_4) { |
8749 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8763 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8750 | 8764 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8751 | 8765 | } else { |
8752 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8766 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8753 | 8767 | } |
8754 | 8768 | __Pyx_GOTREF(__pyx_t_2); |
8755 | 8769 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8757 | 8771 | __pyx_t_2 = 0; |
8758 | 8772 | goto __pyx_L0; |
8759 | 8773 | |
8760 | /* "pygame_sdl2/display.pyx":587 | |
8774 | /* "pygame_sdl2/display.pyx":589 | |
8761 | 8775 | * |
8762 | 8776 | * def iconify(): |
8763 | 8777 | * if main_window: # <<<<<<<<<<<<<< |
8766 | 8780 | */ |
8767 | 8781 | } |
8768 | 8782 | |
8769 | /* "pygame_sdl2/display.pyx":590 | |
8783 | /* "pygame_sdl2/display.pyx":592 | |
8770 | 8784 | * return main_window.iconify() |
8771 | 8785 | * |
8772 | 8786 | * return False # <<<<<<<<<<<<<< |
8778 | 8792 | __pyx_r = Py_False; |
8779 | 8793 | goto __pyx_L0; |
8780 | 8794 | |
8781 | /* "pygame_sdl2/display.pyx":586 | |
8795 | /* "pygame_sdl2/display.pyx":588 | |
8782 | 8796 | * return False |
8783 | 8797 | * |
8784 | 8798 | * def iconify(): # <<<<<<<<<<<<<< |
8799 | 8813 | return __pyx_r; |
8800 | 8814 | } |
8801 | 8815 | |
8802 | /* "pygame_sdl2/display.pyx":592 | |
8816 | /* "pygame_sdl2/display.pyx":594 | |
8803 | 8817 | * return False |
8804 | 8818 | * |
8805 | 8819 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
8833 | 8847 | int __pyx_clineno = 0; |
8834 | 8848 | __Pyx_RefNannySetupContext("toggle_fullscreen", 0); |
8835 | 8849 | |
8836 | /* "pygame_sdl2/display.pyx":593 | |
8850 | /* "pygame_sdl2/display.pyx":595 | |
8837 | 8851 | * |
8838 | 8852 | * def toggle_fullscreen(): |
8839 | 8853 | * if main_window: # <<<<<<<<<<<<<< |
8840 | 8854 | * return main_window.toggle_fullscreen() |
8841 | 8855 | * |
8842 | 8856 | */ |
8843 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8857 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8844 | 8858 | if (__pyx_t_1) { |
8845 | 8859 | |
8846 | /* "pygame_sdl2/display.pyx":594 | |
8860 | /* "pygame_sdl2/display.pyx":596 | |
8847 | 8861 | * def toggle_fullscreen(): |
8848 | 8862 | * if main_window: |
8849 | 8863 | * return main_window.toggle_fullscreen() # <<<<<<<<<<<<<< |
8851 | 8865 | * return True |
8852 | 8866 | */ |
8853 | 8867 | __Pyx_XDECREF(__pyx_r); |
8854 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_toggle_fullscreen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8868 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_toggle_fullscreen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8855 | 8869 | __Pyx_GOTREF(__pyx_t_3); |
8856 | 8870 | __pyx_t_4 = NULL; |
8857 | 8871 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
8864 | 8878 | } |
8865 | 8879 | } |
8866 | 8880 | if (__pyx_t_4) { |
8867 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8881 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8868 | 8882 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
8869 | 8883 | } else { |
8870 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8884 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
8871 | 8885 | } |
8872 | 8886 | __Pyx_GOTREF(__pyx_t_2); |
8873 | 8887 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
8875 | 8889 | __pyx_t_2 = 0; |
8876 | 8890 | goto __pyx_L0; |
8877 | 8891 | |
8878 | /* "pygame_sdl2/display.pyx":593 | |
8892 | /* "pygame_sdl2/display.pyx":595 | |
8879 | 8893 | * |
8880 | 8894 | * def toggle_fullscreen(): |
8881 | 8895 | * if main_window: # <<<<<<<<<<<<<< |
8884 | 8898 | */ |
8885 | 8899 | } |
8886 | 8900 | |
8887 | /* "pygame_sdl2/display.pyx":596 | |
8901 | /* "pygame_sdl2/display.pyx":598 | |
8888 | 8902 | * return main_window.toggle_fullscreen() |
8889 | 8903 | * |
8890 | 8904 | * return True # <<<<<<<<<<<<<< |
8896 | 8910 | __pyx_r = Py_True; |
8897 | 8911 | goto __pyx_L0; |
8898 | 8912 | |
8899 | /* "pygame_sdl2/display.pyx":592 | |
8913 | /* "pygame_sdl2/display.pyx":594 | |
8900 | 8914 | * return False |
8901 | 8915 | * |
8902 | 8916 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
8917 | 8931 | return __pyx_r; |
8918 | 8932 | } |
8919 | 8933 | |
8920 | /* "pygame_sdl2/display.pyx":598 | |
8934 | /* "pygame_sdl2/display.pyx":600 | |
8921 | 8935 | * return True |
8922 | 8936 | * |
8923 | 8937 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
8970 | 8984 | } |
8971 | 8985 | } |
8972 | 8986 | if (unlikely(kw_args > 0)) { |
8973 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8987 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8974 | 8988 | } |
8975 | 8989 | } else { |
8976 | 8990 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
8987 | 9001 | } |
8988 | 9002 | goto __pyx_L4_argument_unpacking_done; |
8989 | 9003 | __pyx_L5_argtuple_error:; |
8990 | __Pyx_RaiseArgtupleInvalid("set_gamma", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9004 | __Pyx_RaiseArgtupleInvalid("set_gamma", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
8991 | 9005 | __pyx_L3_error:; |
8992 | 9006 | __Pyx_AddTraceback("pygame_sdl2.display.set_gamma", __pyx_clineno, __pyx_lineno, __pyx_filename); |
8993 | 9007 | __Pyx_RefNannyFinishContext(); |
9014 | 9028 | int __pyx_clineno = 0; |
9015 | 9029 | __Pyx_RefNannySetupContext("set_gamma", 0); |
9016 | 9030 | |
9017 | /* "pygame_sdl2/display.pyx":599 | |
9031 | /* "pygame_sdl2/display.pyx":601 | |
9018 | 9032 | * |
9019 | 9033 | * def set_gamma(red, green=None, blue=None): |
9020 | 9034 | * if main_window: # <<<<<<<<<<<<<< |
9021 | 9035 | * return main_window.set_gamma(red, green, blue) |
9022 | 9036 | * return False |
9023 | 9037 | */ |
9024 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9038 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9025 | 9039 | if (__pyx_t_1) { |
9026 | 9040 | |
9027 | /* "pygame_sdl2/display.pyx":600 | |
9041 | /* "pygame_sdl2/display.pyx":602 | |
9028 | 9042 | * def set_gamma(red, green=None, blue=None): |
9029 | 9043 | * if main_window: |
9030 | 9044 | * return main_window.set_gamma(red, green, blue) # <<<<<<<<<<<<<< |
9032 | 9046 | * |
9033 | 9047 | */ |
9034 | 9048 | __Pyx_XDECREF(__pyx_r); |
9035 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9049 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9036 | 9050 | __Pyx_GOTREF(__pyx_t_3); |
9037 | 9051 | __pyx_t_4 = NULL; |
9038 | 9052 | __pyx_t_5 = 0; |
9046 | 9060 | __pyx_t_5 = 1; |
9047 | 9061 | } |
9048 | 9062 | } |
9049 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9063 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9050 | 9064 | __Pyx_GOTREF(__pyx_t_6); |
9051 | 9065 | if (__pyx_t_4) { |
9052 | 9066 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; |
9060 | 9074 | __Pyx_INCREF(__pyx_v_blue); |
9061 | 9075 | __Pyx_GIVEREF(__pyx_v_blue); |
9062 | 9076 | PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_blue); |
9063 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9077 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9064 | 9078 | __Pyx_GOTREF(__pyx_t_2); |
9065 | 9079 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9066 | 9080 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9068 | 9082 | __pyx_t_2 = 0; |
9069 | 9083 | goto __pyx_L0; |
9070 | 9084 | |
9071 | /* "pygame_sdl2/display.pyx":599 | |
9085 | /* "pygame_sdl2/display.pyx":601 | |
9072 | 9086 | * |
9073 | 9087 | * def set_gamma(red, green=None, blue=None): |
9074 | 9088 | * if main_window: # <<<<<<<<<<<<<< |
9077 | 9091 | */ |
9078 | 9092 | } |
9079 | 9093 | |
9080 | /* "pygame_sdl2/display.pyx":601 | |
9094 | /* "pygame_sdl2/display.pyx":603 | |
9081 | 9095 | * if main_window: |
9082 | 9096 | * return main_window.set_gamma(red, green, blue) |
9083 | 9097 | * return False # <<<<<<<<<<<<<< |
9089 | 9103 | __pyx_r = Py_False; |
9090 | 9104 | goto __pyx_L0; |
9091 | 9105 | |
9092 | /* "pygame_sdl2/display.pyx":598 | |
9106 | /* "pygame_sdl2/display.pyx":600 | |
9093 | 9107 | * return True |
9094 | 9108 | * |
9095 | 9109 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
9111 | 9125 | return __pyx_r; |
9112 | 9126 | } |
9113 | 9127 | |
9114 | /* "pygame_sdl2/display.pyx":603 | |
9128 | /* "pygame_sdl2/display.pyx":605 | |
9115 | 9129 | * return False |
9116 | 9130 | * |
9117 | 9131 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
9153 | 9167 | case 1: |
9154 | 9168 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_green)) != 0)) kw_args--; |
9155 | 9169 | else { |
9156 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9170 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9157 | 9171 | } |
9158 | 9172 | case 2: |
9159 | 9173 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_blue)) != 0)) kw_args--; |
9160 | 9174 | else { |
9161 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9175 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9162 | 9176 | } |
9163 | 9177 | } |
9164 | 9178 | if (unlikely(kw_args > 0)) { |
9165 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma_ramp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9179 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_gamma_ramp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9166 | 9180 | } |
9167 | 9181 | } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { |
9168 | 9182 | goto __pyx_L5_argtuple_error; |
9177 | 9191 | } |
9178 | 9192 | goto __pyx_L4_argument_unpacking_done; |
9179 | 9193 | __pyx_L5_argtuple_error:; |
9180 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9194 | __Pyx_RaiseArgtupleInvalid("set_gamma_ramp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9181 | 9195 | __pyx_L3_error:; |
9182 | 9196 | __Pyx_AddTraceback("pygame_sdl2.display.set_gamma_ramp", __pyx_clineno, __pyx_lineno, __pyx_filename); |
9183 | 9197 | __Pyx_RefNannyFinishContext(); |
9204 | 9218 | int __pyx_clineno = 0; |
9205 | 9219 | __Pyx_RefNannySetupContext("set_gamma_ramp", 0); |
9206 | 9220 | |
9207 | /* "pygame_sdl2/display.pyx":604 | |
9221 | /* "pygame_sdl2/display.pyx":606 | |
9208 | 9222 | * |
9209 | 9223 | * def set_gamma_ramp(red, green, blue): |
9210 | 9224 | * if main_window: # <<<<<<<<<<<<<< |
9211 | 9225 | * return main_window.set_gamma_ramp(red, green, blue) |
9212 | 9226 | * return False |
9213 | 9227 | */ |
9214 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9228 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9215 | 9229 | if (__pyx_t_1) { |
9216 | 9230 | |
9217 | /* "pygame_sdl2/display.pyx":605 | |
9231 | /* "pygame_sdl2/display.pyx":607 | |
9218 | 9232 | * def set_gamma_ramp(red, green, blue): |
9219 | 9233 | * if main_window: |
9220 | 9234 | * return main_window.set_gamma_ramp(red, green, blue) # <<<<<<<<<<<<<< |
9222 | 9236 | * |
9223 | 9237 | */ |
9224 | 9238 | __Pyx_XDECREF(__pyx_r); |
9225 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma_ramp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9239 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_gamma_ramp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9226 | 9240 | __Pyx_GOTREF(__pyx_t_3); |
9227 | 9241 | __pyx_t_4 = NULL; |
9228 | 9242 | __pyx_t_5 = 0; |
9236 | 9250 | __pyx_t_5 = 1; |
9237 | 9251 | } |
9238 | 9252 | } |
9239 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9253 | __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9240 | 9254 | __Pyx_GOTREF(__pyx_t_6); |
9241 | 9255 | if (__pyx_t_4) { |
9242 | 9256 | __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; |
9250 | 9264 | __Pyx_INCREF(__pyx_v_blue); |
9251 | 9265 | __Pyx_GIVEREF(__pyx_v_blue); |
9252 | 9266 | PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_blue); |
9253 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9267 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9254 | 9268 | __Pyx_GOTREF(__pyx_t_2); |
9255 | 9269 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9256 | 9270 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9258 | 9272 | __pyx_t_2 = 0; |
9259 | 9273 | goto __pyx_L0; |
9260 | 9274 | |
9261 | /* "pygame_sdl2/display.pyx":604 | |
9275 | /* "pygame_sdl2/display.pyx":606 | |
9262 | 9276 | * |
9263 | 9277 | * def set_gamma_ramp(red, green, blue): |
9264 | 9278 | * if main_window: # <<<<<<<<<<<<<< |
9267 | 9281 | */ |
9268 | 9282 | } |
9269 | 9283 | |
9270 | /* "pygame_sdl2/display.pyx":606 | |
9284 | /* "pygame_sdl2/display.pyx":608 | |
9271 | 9285 | * if main_window: |
9272 | 9286 | * return main_window.set_gamma_ramp(red, green, blue) |
9273 | 9287 | * return False # <<<<<<<<<<<<<< |
9279 | 9293 | __pyx_r = Py_False; |
9280 | 9294 | goto __pyx_L0; |
9281 | 9295 | |
9282 | /* "pygame_sdl2/display.pyx":603 | |
9296 | /* "pygame_sdl2/display.pyx":605 | |
9283 | 9297 | * return False |
9284 | 9298 | * |
9285 | 9299 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
9301 | 9315 | return __pyx_r; |
9302 | 9316 | } |
9303 | 9317 | |
9304 | /* "pygame_sdl2/display.pyx":608 | |
9318 | /* "pygame_sdl2/display.pyx":610 | |
9305 | 9319 | * return False |
9306 | 9320 | * |
9307 | 9321 | * def set_icon(surface): # <<<<<<<<<<<<<< |
9338 | 9352 | int __pyx_clineno = 0; |
9339 | 9353 | __Pyx_RefNannySetupContext("set_icon", 0); |
9340 | 9354 | |
9341 | /* "pygame_sdl2/display.pyx":611 | |
9355 | /* "pygame_sdl2/display.pyx":613 | |
9342 | 9356 | * global default_icon |
9343 | 9357 | * |
9344 | 9358 | * default_icon = surface.copy() # <<<<<<<<<<<<<< |
9345 | 9359 | * |
9346 | 9360 | * if main_window is not None: |
9347 | 9361 | */ |
9348 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9362 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9349 | 9363 | __Pyx_GOTREF(__pyx_t_2); |
9350 | 9364 | __pyx_t_3 = NULL; |
9351 | 9365 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
9358 | 9372 | } |
9359 | 9373 | } |
9360 | 9374 | if (__pyx_t_3) { |
9361 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9375 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9362 | 9376 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9363 | 9377 | } else { |
9364 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9378 | __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9365 | 9379 | } |
9366 | 9380 | __Pyx_GOTREF(__pyx_t_1); |
9367 | 9381 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9368 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_icon, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9382 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_icon, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9369 | 9383 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
9370 | 9384 | |
9371 | /* "pygame_sdl2/display.pyx":613 | |
9385 | /* "pygame_sdl2/display.pyx":615 | |
9372 | 9386 | * default_icon = surface.copy() |
9373 | 9387 | * |
9374 | 9388 | * if main_window is not None: # <<<<<<<<<<<<<< |
9379 | 9393 | __pyx_t_5 = (__pyx_t_4 != 0); |
9380 | 9394 | if (__pyx_t_5) { |
9381 | 9395 | |
9382 | /* "pygame_sdl2/display.pyx":614 | |
9396 | /* "pygame_sdl2/display.pyx":616 | |
9383 | 9397 | * |
9384 | 9398 | * if main_window is not None: |
9385 | 9399 | * main_window.set_icon(default_icon) # <<<<<<<<<<<<<< |
9386 | 9400 | * |
9387 | 9401 | * def set_caption(title, icontitle = None): |
9388 | 9402 | */ |
9389 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9403 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9390 | 9404 | __Pyx_GOTREF(__pyx_t_2); |
9391 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_icon); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9405 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_icon); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9392 | 9406 | __Pyx_GOTREF(__pyx_t_3); |
9393 | 9407 | __pyx_t_6 = NULL; |
9394 | 9408 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { |
9401 | 9415 | } |
9402 | 9416 | } |
9403 | 9417 | if (!__pyx_t_6) { |
9404 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9418 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9405 | 9419 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9406 | 9420 | __Pyx_GOTREF(__pyx_t_1); |
9407 | 9421 | } else { |
9408 | __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9422 | __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9409 | 9423 | __Pyx_GOTREF(__pyx_t_7); |
9410 | 9424 | __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; |
9411 | 9425 | __Pyx_GIVEREF(__pyx_t_3); |
9412 | 9426 | PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3); |
9413 | 9427 | __pyx_t_3 = 0; |
9414 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9428 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9415 | 9429 | __Pyx_GOTREF(__pyx_t_1); |
9416 | 9430 | __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; |
9417 | 9431 | } |
9418 | 9432 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9419 | 9433 | __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
9420 | 9434 | |
9421 | /* "pygame_sdl2/display.pyx":613 | |
9435 | /* "pygame_sdl2/display.pyx":615 | |
9422 | 9436 | * default_icon = surface.copy() |
9423 | 9437 | * |
9424 | 9438 | * if main_window is not None: # <<<<<<<<<<<<<< |
9427 | 9441 | */ |
9428 | 9442 | } |
9429 | 9443 | |
9430 | /* "pygame_sdl2/display.pyx":608 | |
9444 | /* "pygame_sdl2/display.pyx":610 | |
9431 | 9445 | * return False |
9432 | 9446 | * |
9433 | 9447 | * def set_icon(surface): # <<<<<<<<<<<<<< |
9452 | 9466 | return __pyx_r; |
9453 | 9467 | } |
9454 | 9468 | |
9455 | /* "pygame_sdl2/display.pyx":616 | |
9469 | /* "pygame_sdl2/display.pyx":618 | |
9456 | 9470 | * main_window.set_icon(default_icon) |
9457 | 9471 | * |
9458 | 9472 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
9497 | 9511 | } |
9498 | 9512 | } |
9499 | 9513 | if (unlikely(kw_args > 0)) { |
9500 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_caption") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9514 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_caption") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9501 | 9515 | } |
9502 | 9516 | } else { |
9503 | 9517 | switch (PyTuple_GET_SIZE(__pyx_args)) { |
9512 | 9526 | } |
9513 | 9527 | goto __pyx_L4_argument_unpacking_done; |
9514 | 9528 | __pyx_L5_argtuple_error:; |
9515 | __Pyx_RaiseArgtupleInvalid("set_caption", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9529 | __Pyx_RaiseArgtupleInvalid("set_caption", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
9516 | 9530 | __pyx_L3_error:; |
9517 | 9531 | __Pyx_AddTraceback("pygame_sdl2.display.set_caption", __pyx_clineno, __pyx_lineno, __pyx_filename); |
9518 | 9532 | __Pyx_RefNannyFinishContext(); |
9539 | 9553 | int __pyx_clineno = 0; |
9540 | 9554 | __Pyx_RefNannySetupContext("set_caption", 0); |
9541 | 9555 | |
9542 | /* "pygame_sdl2/display.pyx":619 | |
9556 | /* "pygame_sdl2/display.pyx":621 | |
9543 | 9557 | * global default_title |
9544 | 9558 | * |
9545 | 9559 | * default_title = title # <<<<<<<<<<<<<< |
9546 | 9560 | * |
9547 | 9561 | * if main_window: |
9548 | 9562 | */ |
9549 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_title, __pyx_v_title) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9550 | ||
9551 | /* "pygame_sdl2/display.pyx":621 | |
9563 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_title, __pyx_v_title) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9564 | ||
9565 | /* "pygame_sdl2/display.pyx":623 | |
9552 | 9566 | * default_title = title |
9553 | 9567 | * |
9554 | 9568 | * if main_window: # <<<<<<<<<<<<<< |
9555 | 9569 | * main_window.set_caption(default_title) |
9556 | 9570 | * |
9557 | 9571 | */ |
9558 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9572 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9559 | 9573 | if (__pyx_t_1) { |
9560 | 9574 | |
9561 | /* "pygame_sdl2/display.pyx":622 | |
9575 | /* "pygame_sdl2/display.pyx":624 | |
9562 | 9576 | * |
9563 | 9577 | * if main_window: |
9564 | 9578 | * main_window.set_caption(default_title) # <<<<<<<<<<<<<< |
9565 | 9579 | * |
9566 | 9580 | * def get_caption(): |
9567 | 9581 | */ |
9568 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_caption); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9582 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_set_caption); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9569 | 9583 | __Pyx_GOTREF(__pyx_t_3); |
9570 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9584 | __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9571 | 9585 | __Pyx_GOTREF(__pyx_t_4); |
9572 | 9586 | __pyx_t_5 = NULL; |
9573 | 9587 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
9580 | 9594 | } |
9581 | 9595 | } |
9582 | 9596 | if (!__pyx_t_5) { |
9583 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9597 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9584 | 9598 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9585 | 9599 | __Pyx_GOTREF(__pyx_t_2); |
9586 | 9600 | } else { |
9587 | __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9601 | __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9588 | 9602 | __Pyx_GOTREF(__pyx_t_6); |
9589 | 9603 | __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; |
9590 | 9604 | __Pyx_GIVEREF(__pyx_t_4); |
9591 | 9605 | PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); |
9592 | 9606 | __pyx_t_4 = 0; |
9593 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9607 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9594 | 9608 | __Pyx_GOTREF(__pyx_t_2); |
9595 | 9609 | __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; |
9596 | 9610 | } |
9597 | 9611 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9598 | 9612 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9599 | 9613 | |
9600 | /* "pygame_sdl2/display.pyx":621 | |
9614 | /* "pygame_sdl2/display.pyx":623 | |
9601 | 9615 | * default_title = title |
9602 | 9616 | * |
9603 | 9617 | * if main_window: # <<<<<<<<<<<<<< |
9606 | 9620 | */ |
9607 | 9621 | } |
9608 | 9622 | |
9609 | /* "pygame_sdl2/display.pyx":616 | |
9623 | /* "pygame_sdl2/display.pyx":618 | |
9610 | 9624 | * main_window.set_icon(default_icon) |
9611 | 9625 | * |
9612 | 9626 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
9631 | 9645 | return __pyx_r; |
9632 | 9646 | } |
9633 | 9647 | |
9634 | /* "pygame_sdl2/display.pyx":624 | |
9648 | /* "pygame_sdl2/display.pyx":626 | |
9635 | 9649 | * main_window.set_caption(default_title) |
9636 | 9650 | * |
9637 | 9651 | * def get_caption(): # <<<<<<<<<<<<<< |
9662 | 9676 | int __pyx_clineno = 0; |
9663 | 9677 | __Pyx_RefNannySetupContext("get_caption", 0); |
9664 | 9678 | |
9665 | /* "pygame_sdl2/display.pyx":625 | |
9679 | /* "pygame_sdl2/display.pyx":627 | |
9666 | 9680 | * |
9667 | 9681 | * def get_caption(): |
9668 | 9682 | * return default_title # <<<<<<<<<<<<<< |
9670 | 9684 | * def get_drawable_size(): |
9671 | 9685 | */ |
9672 | 9686 | __Pyx_XDECREF(__pyx_r); |
9673 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9687 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_title); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9674 | 9688 | __Pyx_GOTREF(__pyx_t_1); |
9675 | 9689 | __pyx_r = __pyx_t_1; |
9676 | 9690 | __pyx_t_1 = 0; |
9677 | 9691 | goto __pyx_L0; |
9678 | 9692 | |
9679 | /* "pygame_sdl2/display.pyx":624 | |
9693 | /* "pygame_sdl2/display.pyx":626 | |
9680 | 9694 | * main_window.set_caption(default_title) |
9681 | 9695 | * |
9682 | 9696 | * def get_caption(): # <<<<<<<<<<<<<< |
9695 | 9709 | return __pyx_r; |
9696 | 9710 | } |
9697 | 9711 | |
9698 | /* "pygame_sdl2/display.pyx":627 | |
9712 | /* "pygame_sdl2/display.pyx":629 | |
9699 | 9713 | * return default_title |
9700 | 9714 | * |
9701 | 9715 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
9729 | 9743 | int __pyx_clineno = 0; |
9730 | 9744 | __Pyx_RefNannySetupContext("get_drawable_size", 0); |
9731 | 9745 | |
9732 | /* "pygame_sdl2/display.pyx":628 | |
9746 | /* "pygame_sdl2/display.pyx":630 | |
9733 | 9747 | * |
9734 | 9748 | * def get_drawable_size(): |
9735 | 9749 | * if main_window: # <<<<<<<<<<<<<< |
9736 | 9750 | * return main_window.get_drawable_size() |
9737 | 9751 | * return None |
9738 | 9752 | */ |
9739 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9753 | __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9740 | 9754 | if (__pyx_t_1) { |
9741 | 9755 | |
9742 | /* "pygame_sdl2/display.pyx":629 | |
9756 | /* "pygame_sdl2/display.pyx":631 | |
9743 | 9757 | * def get_drawable_size(): |
9744 | 9758 | * if main_window: |
9745 | 9759 | * return main_window.get_drawable_size() # <<<<<<<<<<<<<< |
9747 | 9761 | * |
9748 | 9762 | */ |
9749 | 9763 | __Pyx_XDECREF(__pyx_r); |
9750 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_drawable_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9764 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window), __pyx_n_s_get_drawable_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9751 | 9765 | __Pyx_GOTREF(__pyx_t_3); |
9752 | 9766 | __pyx_t_4 = NULL; |
9753 | 9767 | if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { |
9760 | 9774 | } |
9761 | 9775 | } |
9762 | 9776 | if (__pyx_t_4) { |
9763 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9777 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9764 | 9778 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9765 | 9779 | } else { |
9766 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9780 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9767 | 9781 | } |
9768 | 9782 | __Pyx_GOTREF(__pyx_t_2); |
9769 | 9783 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9771 | 9785 | __pyx_t_2 = 0; |
9772 | 9786 | goto __pyx_L0; |
9773 | 9787 | |
9774 | /* "pygame_sdl2/display.pyx":628 | |
9788 | /* "pygame_sdl2/display.pyx":630 | |
9775 | 9789 | * |
9776 | 9790 | * def get_drawable_size(): |
9777 | 9791 | * if main_window: # <<<<<<<<<<<<<< |
9780 | 9794 | */ |
9781 | 9795 | } |
9782 | 9796 | |
9783 | /* "pygame_sdl2/display.pyx":630 | |
9797 | /* "pygame_sdl2/display.pyx":632 | |
9784 | 9798 | * if main_window: |
9785 | 9799 | * return main_window.get_drawable_size() |
9786 | 9800 | * return None # <<<<<<<<<<<<<< |
9792 | 9806 | __pyx_r = Py_None; |
9793 | 9807 | goto __pyx_L0; |
9794 | 9808 | |
9795 | /* "pygame_sdl2/display.pyx":627 | |
9809 | /* "pygame_sdl2/display.pyx":629 | |
9796 | 9810 | * return default_title |
9797 | 9811 | * |
9798 | 9812 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
9813 | 9827 | return __pyx_r; |
9814 | 9828 | } |
9815 | 9829 | |
9816 | /* "pygame_sdl2/display.pyx":632 | |
9830 | /* "pygame_sdl2/display.pyx":634 | |
9817 | 9831 | * return None |
9818 | 9832 | * |
9819 | 9833 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
9848 | 9862 | int __pyx_clineno = 0; |
9849 | 9863 | __Pyx_RefNannySetupContext("get_num_video_displays", 0); |
9850 | 9864 | |
9851 | /* "pygame_sdl2/display.pyx":633 | |
9865 | /* "pygame_sdl2/display.pyx":635 | |
9852 | 9866 | * |
9853 | 9867 | * def get_num_video_displays(): |
9854 | 9868 | * rv = SDL_GetNumVideoDisplays() # <<<<<<<<<<<<<< |
9857 | 9871 | */ |
9858 | 9872 | __pyx_v_rv = SDL_GetNumVideoDisplays(); |
9859 | 9873 | |
9860 | /* "pygame_sdl2/display.pyx":634 | |
9874 | /* "pygame_sdl2/display.pyx":636 | |
9861 | 9875 | * def get_num_video_displays(): |
9862 | 9876 | * rv = SDL_GetNumVideoDisplays() |
9863 | 9877 | * if rv < 0: # <<<<<<<<<<<<<< |
9867 | 9881 | __pyx_t_1 = ((__pyx_v_rv < 0) != 0); |
9868 | 9882 | if (__pyx_t_1) { |
9869 | 9883 | |
9870 | /* "pygame_sdl2/display.pyx":635 | |
9884 | /* "pygame_sdl2/display.pyx":637 | |
9871 | 9885 | * rv = SDL_GetNumVideoDisplays() |
9872 | 9886 | * if rv < 0: |
9873 | 9887 | * raise error() # <<<<<<<<<<<<<< |
9874 | 9888 | * |
9875 | 9889 | * return rv |
9876 | 9890 | */ |
9877 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9891 | __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9878 | 9892 | __Pyx_GOTREF(__pyx_t_3); |
9879 | 9893 | __pyx_t_4 = NULL; |
9880 | 9894 | if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { |
9887 | 9901 | } |
9888 | 9902 | } |
9889 | 9903 | if (__pyx_t_4) { |
9890 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9904 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9891 | 9905 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
9892 | 9906 | } else { |
9893 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9907 | __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9894 | 9908 | } |
9895 | 9909 | __Pyx_GOTREF(__pyx_t_2); |
9896 | 9910 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
9897 | 9911 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
9898 | 9912 | __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
9899 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9900 | ||
9901 | /* "pygame_sdl2/display.pyx":634 | |
9913 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9914 | ||
9915 | /* "pygame_sdl2/display.pyx":636 | |
9902 | 9916 | * def get_num_video_displays(): |
9903 | 9917 | * rv = SDL_GetNumVideoDisplays() |
9904 | 9918 | * if rv < 0: # <<<<<<<<<<<<<< |
9907 | 9921 | */ |
9908 | 9922 | } |
9909 | 9923 | |
9910 | /* "pygame_sdl2/display.pyx":637 | |
9924 | /* "pygame_sdl2/display.pyx":639 | |
9911 | 9925 | * raise error() |
9912 | 9926 | * |
9913 | 9927 | * return rv # <<<<<<<<<<<<<< |
9915 | 9929 | * def get_display_bounds(index): |
9916 | 9930 | */ |
9917 | 9931 | __Pyx_XDECREF(__pyx_r); |
9918 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9932 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9919 | 9933 | __Pyx_GOTREF(__pyx_t_2); |
9920 | 9934 | __pyx_r = __pyx_t_2; |
9921 | 9935 | __pyx_t_2 = 0; |
9922 | 9936 | goto __pyx_L0; |
9923 | 9937 | |
9924 | /* "pygame_sdl2/display.pyx":632 | |
9938 | /* "pygame_sdl2/display.pyx":634 | |
9925 | 9939 | * return None |
9926 | 9940 | * |
9927 | 9941 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
9942 | 9956 | return __pyx_r; |
9943 | 9957 | } |
9944 | 9958 | |
9945 | /* "pygame_sdl2/display.pyx":639 | |
9959 | /* "pygame_sdl2/display.pyx":641 | |
9946 | 9960 | * return rv |
9947 | 9961 | * |
9948 | 9962 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
9980 | 9994 | int __pyx_clineno = 0; |
9981 | 9995 | __Pyx_RefNannySetupContext("get_display_bounds", 0); |
9982 | 9996 | |
9983 | /* "pygame_sdl2/display.pyx":641 | |
9997 | /* "pygame_sdl2/display.pyx":643 | |
9984 | 9998 | * def get_display_bounds(index): |
9985 | 9999 | * cdef SDL_Rect rect |
9986 | 10000 | * rv = SDL_GetDisplayBounds(index, &rect) # <<<<<<<<<<<<<< |
9987 | 10001 | * |
9988 | 10002 | * return (rect.x, rect.y, rect.w, rect.h) |
9989 | 10003 | */ |
9990 | __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10004 | __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
9991 | 10005 | __pyx_v_rv = SDL_GetDisplayBounds(__pyx_t_1, (&__pyx_v_rect)); |
9992 | 10006 | |
9993 | /* "pygame_sdl2/display.pyx":643 | |
10007 | /* "pygame_sdl2/display.pyx":645 | |
9994 | 10008 | * rv = SDL_GetDisplayBounds(index, &rect) |
9995 | 10009 | * |
9996 | 10010 | * return (rect.x, rect.y, rect.w, rect.h) # <<<<<<<<<<<<<< |
9998 | 10012 | * def hint(hint, value): |
9999 | 10013 | */ |
10000 | 10014 | __Pyx_XDECREF(__pyx_r); |
10001 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rect.x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10015 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rect.x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10002 | 10016 | __Pyx_GOTREF(__pyx_t_2); |
10003 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rect.y); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10017 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rect.y); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10004 | 10018 | __Pyx_GOTREF(__pyx_t_3); |
10005 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rect.w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10019 | __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rect.w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10006 | 10020 | __Pyx_GOTREF(__pyx_t_4); |
10007 | __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rect.h); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10021 | __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rect.h); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10008 | 10022 | __Pyx_GOTREF(__pyx_t_5); |
10009 | __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10023 | __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10010 | 10024 | __Pyx_GOTREF(__pyx_t_6); |
10011 | 10025 | __Pyx_GIVEREF(__pyx_t_2); |
10012 | 10026 | PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); |
10024 | 10038 | __pyx_t_6 = 0; |
10025 | 10039 | goto __pyx_L0; |
10026 | 10040 | |
10027 | /* "pygame_sdl2/display.pyx":639 | |
10041 | /* "pygame_sdl2/display.pyx":641 | |
10028 | 10042 | * return rv |
10029 | 10043 | * |
10030 | 10044 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
10047 | 10061 | return __pyx_r; |
10048 | 10062 | } |
10049 | 10063 | |
10050 | /* "pygame_sdl2/display.pyx":645 | |
10064 | /* "pygame_sdl2/display.pyx":647 | |
10051 | 10065 | * return (rect.x, rect.y, rect.w, rect.h) |
10052 | 10066 | * |
10053 | 10067 | * def hint(hint, value): # <<<<<<<<<<<<<< |
10087 | 10101 | case 1: |
10088 | 10102 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; |
10089 | 10103 | else { |
10090 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10104 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10091 | 10105 | } |
10092 | 10106 | } |
10093 | 10107 | if (unlikely(kw_args > 0)) { |
10094 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10108 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10095 | 10109 | } |
10096 | 10110 | } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { |
10097 | 10111 | goto __pyx_L5_argtuple_error; |
10104 | 10118 | } |
10105 | 10119 | goto __pyx_L4_argument_unpacking_done; |
10106 | 10120 | __pyx_L5_argtuple_error:; |
10107 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10121 | __Pyx_RaiseArgtupleInvalid("hint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;} | |
10108 | 10122 | __pyx_L3_error:; |
10109 | 10123 | __Pyx_AddTraceback("pygame_sdl2.display.hint", __pyx_clineno, __pyx_lineno, __pyx_filename); |
10110 | 10124 | __Pyx_RefNannyFinishContext(); |
10133 | 10147 | __Pyx_INCREF(__pyx_v_hint); |
10134 | 10148 | __Pyx_INCREF(__pyx_v_value); |
10135 | 10149 | |
10136 | /* "pygame_sdl2/display.pyx":647 | |
10150 | /* "pygame_sdl2/display.pyx":649 | |
10137 | 10151 | * def hint(hint, value): |
10138 | 10152 | * |
10139 | 10153 | * if not isinstance(hint, bytes): # <<<<<<<<<<<<<< |
10144 | 10158 | __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); |
10145 | 10159 | if (__pyx_t_2) { |
10146 | 10160 | |
10147 | /* "pygame_sdl2/display.pyx":648 | |
10161 | /* "pygame_sdl2/display.pyx":650 | |
10148 | 10162 | * |
10149 | 10163 | * if not isinstance(hint, bytes): |
10150 | 10164 | * hint = hint.encode("utf-8") # <<<<<<<<<<<<<< |
10151 | 10165 | * |
10152 | 10166 | * if not isinstance(value, bytes): |
10153 | 10167 | */ |
10154 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hint, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10168 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hint, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10155 | 10169 | __Pyx_GOTREF(__pyx_t_3); |
10156 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10170 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10157 | 10171 | __Pyx_GOTREF(__pyx_t_4); |
10158 | 10172 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
10159 | 10173 | __Pyx_DECREF_SET(__pyx_v_hint, __pyx_t_4); |
10160 | 10174 | __pyx_t_4 = 0; |
10161 | 10175 | |
10162 | /* "pygame_sdl2/display.pyx":647 | |
10176 | /* "pygame_sdl2/display.pyx":649 | |
10163 | 10177 | * def hint(hint, value): |
10164 | 10178 | * |
10165 | 10179 | * if not isinstance(hint, bytes): # <<<<<<<<<<<<<< |
10168 | 10182 | */ |
10169 | 10183 | } |
10170 | 10184 | |
10171 | /* "pygame_sdl2/display.pyx":650 | |
10185 | /* "pygame_sdl2/display.pyx":652 | |
10172 | 10186 | * hint = hint.encode("utf-8") |
10173 | 10187 | * |
10174 | 10188 | * if not isinstance(value, bytes): # <<<<<<<<<<<<<< |
10179 | 10193 | __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); |
10180 | 10194 | if (__pyx_t_1) { |
10181 | 10195 | |
10182 | /* "pygame_sdl2/display.pyx":651 | |
10196 | /* "pygame_sdl2/display.pyx":653 | |
10183 | 10197 | * |
10184 | 10198 | * if not isinstance(value, bytes): |
10185 | 10199 | * value = value.encode("utf-8") # <<<<<<<<<<<<<< |
10186 | 10200 | * |
10187 | 10201 | * SDL_SetHint(hint, value) |
10188 | 10202 | */ |
10189 | __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10203 | __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10190 | 10204 | __Pyx_GOTREF(__pyx_t_4); |
10191 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10205 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10192 | 10206 | __Pyx_GOTREF(__pyx_t_3); |
10193 | 10207 | __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
10194 | 10208 | __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); |
10195 | 10209 | __pyx_t_3 = 0; |
10196 | 10210 | |
10197 | /* "pygame_sdl2/display.pyx":650 | |
10211 | /* "pygame_sdl2/display.pyx":652 | |
10198 | 10212 | * hint = hint.encode("utf-8") |
10199 | 10213 | * |
10200 | 10214 | * if not isinstance(value, bytes): # <<<<<<<<<<<<<< |
10203 | 10217 | */ |
10204 | 10218 | } |
10205 | 10219 | |
10206 | /* "pygame_sdl2/display.pyx":653 | |
10220 | /* "pygame_sdl2/display.pyx":655 | |
10207 | 10221 | * value = value.encode("utf-8") |
10208 | 10222 | * |
10209 | 10223 | * SDL_SetHint(hint, value) # <<<<<<<<<<<<<< |
10210 | 10224 | * |
10211 | 10225 | * def get_platform(): |
10212 | 10226 | */ |
10213 | __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_hint); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10214 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10227 | __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_hint); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10228 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10215 | 10229 | SDL_SetHint(__pyx_t_5, __pyx_t_6); |
10216 | 10230 | |
10217 | /* "pygame_sdl2/display.pyx":645 | |
10231 | /* "pygame_sdl2/display.pyx":647 | |
10218 | 10232 | * return (rect.x, rect.y, rect.w, rect.h) |
10219 | 10233 | * |
10220 | 10234 | * def hint(hint, value): # <<<<<<<<<<<<<< |
10238 | 10252 | return __pyx_r; |
10239 | 10253 | } |
10240 | 10254 | |
10241 | /* "pygame_sdl2/display.pyx":655 | |
10255 | /* "pygame_sdl2/display.pyx":657 | |
10242 | 10256 | * SDL_SetHint(hint, value) |
10243 | 10257 | * |
10244 | 10258 | * def get_platform(): # <<<<<<<<<<<<<< |
10269 | 10283 | int __pyx_clineno = 0; |
10270 | 10284 | __Pyx_RefNannySetupContext("get_platform", 0); |
10271 | 10285 | |
10272 | /* "pygame_sdl2/display.pyx":656 | |
10286 | /* "pygame_sdl2/display.pyx":658 | |
10273 | 10287 | * |
10274 | 10288 | * def get_platform(): |
10275 | 10289 | * return SDL_GetPlatform() # <<<<<<<<<<<<<< |
10277 | 10291 | * cdef api SDL_Window *PyWindow_AsWindow(window): |
10278 | 10292 | */ |
10279 | 10293 | __Pyx_XDECREF(__pyx_r); |
10280 | __pyx_t_1 = __Pyx_PyBytes_FromString(SDL_GetPlatform()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10294 | __pyx_t_1 = __Pyx_PyBytes_FromString(SDL_GetPlatform()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10281 | 10295 | __Pyx_GOTREF(__pyx_t_1); |
10282 | 10296 | __pyx_r = __pyx_t_1; |
10283 | 10297 | __pyx_t_1 = 0; |
10284 | 10298 | goto __pyx_L0; |
10285 | 10299 | |
10286 | /* "pygame_sdl2/display.pyx":655 | |
10300 | /* "pygame_sdl2/display.pyx":657 | |
10287 | 10301 | * SDL_SetHint(hint, value) |
10288 | 10302 | * |
10289 | 10303 | * def get_platform(): # <<<<<<<<<<<<<< |
10302 | 10316 | return __pyx_r; |
10303 | 10317 | } |
10304 | 10318 | |
10305 | /* "pygame_sdl2/display.pyx":658 | |
10319 | /* "pygame_sdl2/display.pyx":660 | |
10306 | 10320 | * return SDL_GetPlatform() |
10307 | 10321 | * |
10308 | 10322 | * cdef api SDL_Window *PyWindow_AsWindow(window): # <<<<<<<<<<<<<< |
10318 | 10332 | __Pyx_RefNannySetupContext("PyWindow_AsWindow", 0); |
10319 | 10333 | __Pyx_INCREF(__pyx_v_window); |
10320 | 10334 | |
10321 | /* "pygame_sdl2/display.pyx":665 | |
10335 | /* "pygame_sdl2/display.pyx":667 | |
10322 | 10336 | * """ |
10323 | 10337 | * |
10324 | 10338 | * if window is None: # <<<<<<<<<<<<<< |
10329 | 10343 | __pyx_t_2 = (__pyx_t_1 != 0); |
10330 | 10344 | if (__pyx_t_2) { |
10331 | 10345 | |
10332 | /* "pygame_sdl2/display.pyx":666 | |
10346 | /* "pygame_sdl2/display.pyx":668 | |
10333 | 10347 | * |
10334 | 10348 | * if window is None: |
10335 | 10349 | * window = main_window # <<<<<<<<<<<<<< |
10339 | 10353 | __Pyx_INCREF(((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); |
10340 | 10354 | __Pyx_DECREF_SET(__pyx_v_window, ((PyObject *)__pyx_v_11pygame_sdl2_7display_main_window)); |
10341 | 10355 | |
10342 | /* "pygame_sdl2/display.pyx":665 | |
10356 | /* "pygame_sdl2/display.pyx":667 | |
10343 | 10357 | * """ |
10344 | 10358 | * |
10345 | 10359 | * if window is None: # <<<<<<<<<<<<<< |
10348 | 10362 | */ |
10349 | 10363 | } |
10350 | 10364 | |
10351 | /* "pygame_sdl2/display.pyx":668 | |
10365 | /* "pygame_sdl2/display.pyx":670 | |
10352 | 10366 | * window = main_window |
10353 | 10367 | * |
10354 | 10368 | * if window is None: # <<<<<<<<<<<<<< |
10359 | 10373 | __pyx_t_1 = (__pyx_t_2 != 0); |
10360 | 10374 | if (__pyx_t_1) { |
10361 | 10375 | |
10362 | /* "pygame_sdl2/display.pyx":669 | |
10376 | /* "pygame_sdl2/display.pyx":671 | |
10363 | 10377 | * |
10364 | 10378 | * if window is None: |
10365 | 10379 | * return NULL # <<<<<<<<<<<<<< |
10369 | 10383 | __pyx_r = NULL; |
10370 | 10384 | goto __pyx_L0; |
10371 | 10385 | |
10372 | /* "pygame_sdl2/display.pyx":668 | |
10386 | /* "pygame_sdl2/display.pyx":670 | |
10373 | 10387 | * window = main_window |
10374 | 10388 | * |
10375 | 10389 | * if window is None: # <<<<<<<<<<<<<< |
10378 | 10392 | */ |
10379 | 10393 | } |
10380 | 10394 | |
10381 | /* "pygame_sdl2/display.pyx":671 | |
10395 | /* "pygame_sdl2/display.pyx":673 | |
10382 | 10396 | * return NULL |
10383 | 10397 | * |
10384 | 10398 | * return (<Window> window).window # <<<<<<<<<<<<<< |
10386 | 10400 | __pyx_r = ((struct __pyx_obj_11pygame_sdl2_7display_Window *)__pyx_v_window)->window; |
10387 | 10401 | goto __pyx_L0; |
10388 | 10402 | |
10389 | /* "pygame_sdl2/display.pyx":658 | |
10403 | /* "pygame_sdl2/display.pyx":660 | |
10390 | 10404 | * return SDL_GetPlatform() |
10391 | 10405 | * |
10392 | 10406 | * cdef api SDL_Window *PyWindow_AsWindow(window): # <<<<<<<<<<<<<< |
10673 | 10687 | {&__pyx_n_s_rect, __pyx_k_rect, sizeof(__pyx_k_rect), 0, 0, 1, 1}, |
10674 | 10688 | {&__pyx_n_s_rectangles, __pyx_k_rectangles, sizeof(__pyx_k_rectangles), 0, 0, 1, 1}, |
10675 | 10689 | {&__pyx_n_s_red, __pyx_k_red, sizeof(__pyx_k_red), 0, 0, 1, 1}, |
10690 | {&__pyx_n_s_refresh_rate, __pyx_k_refresh_rate, sizeof(__pyx_k_refresh_rate), 0, 0, 1, 1}, | |
10676 | 10691 | {&__pyx_n_s_register_init, __pyx_k_register_init, sizeof(__pyx_k_register_init), 0, 0, 1, 1}, |
10677 | 10692 | {&__pyx_n_s_register_quit, __pyx_k_register_quit, sizeof(__pyx_k_register_quit), 0, 0, 1, 1}, |
10678 | 10693 | {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, |
10792 | 10807 | __Pyx_GOTREF(__pyx_tuple__8); |
10793 | 10808 | __Pyx_GIVEREF(__pyx_tuple__8); |
10794 | 10809 | |
10795 | /* "pygame_sdl2/display.pyx":648 | |
10810 | /* "pygame_sdl2/display.pyx":650 | |
10796 | 10811 | * |
10797 | 10812 | * if not isinstance(hint, bytes): |
10798 | 10813 | * hint = hint.encode("utf-8") # <<<<<<<<<<<<<< |
10799 | 10814 | * |
10800 | 10815 | * if not isinstance(value, bytes): |
10801 | 10816 | */ |
10802 | __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10817 | __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10803 | 10818 | __Pyx_GOTREF(__pyx_tuple__10); |
10804 | 10819 | __Pyx_GIVEREF(__pyx_tuple__10); |
10805 | 10820 | |
10806 | /* "pygame_sdl2/display.pyx":651 | |
10821 | /* "pygame_sdl2/display.pyx":653 | |
10807 | 10822 | * |
10808 | 10823 | * if not isinstance(value, bytes): |
10809 | 10824 | * value = value.encode("utf-8") # <<<<<<<<<<<<<< |
10810 | 10825 | * |
10811 | 10826 | * SDL_SetHint(hint, value) |
10812 | 10827 | */ |
10813 | __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10828 | __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10814 | 10829 | __Pyx_GOTREF(__pyx_tuple__11); |
10815 | 10830 | __Pyx_GIVEREF(__pyx_tuple__11); |
10816 | 10831 | |
10925 | 10940 | __Pyx_GIVEREF(__pyx_tuple__25); |
10926 | 10941 | __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_init_2, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
10927 | 10942 | |
10928 | /* "pygame_sdl2/display.pyx":482 | |
10943 | /* "pygame_sdl2/display.pyx":484 | |
10929 | 10944 | * self.blit_sw_A = False |
10930 | 10945 | * |
10931 | 10946 | * def __repr__(self): # <<<<<<<<<<<<<< |
10932 | 10947 | * return "<Info({!r})>".format(self.__dict__) |
10933 | 10948 | * |
10934 | 10949 | */ |
10935 | __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10950 | __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10936 | 10951 | __Pyx_GOTREF(__pyx_tuple__27); |
10937 | 10952 | __Pyx_GIVEREF(__pyx_tuple__27); |
10938 | __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_repr, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10939 | ||
10940 | /* "pygame_sdl2/display.pyx":486 | |
10953 | __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_repr, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10954 | ||
10955 | /* "pygame_sdl2/display.pyx":488 | |
10941 | 10956 | * |
10942 | 10957 | * |
10943 | 10958 | * def get_wm_info(): # <<<<<<<<<<<<<< |
10944 | 10959 | * if main_window: |
10945 | 10960 | * return main_window.get_wm_info() |
10946 | 10961 | */ |
10947 | __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_wm_info, 486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10948 | ||
10949 | /* "pygame_sdl2/display.pyx":493 | |
10962 | __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_wm_info, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10963 | ||
10964 | /* "pygame_sdl2/display.pyx":495 | |
10950 | 10965 | * |
10951 | 10966 | * |
10952 | 10967 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
10953 | 10968 | * """ |
10954 | 10969 | * Returns the number of video displays connected to the system. |
10955 | 10970 | */ |
10956 | __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10971 | __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10957 | 10972 | __Pyx_GOTREF(__pyx_tuple__30); |
10958 | 10973 | __Pyx_GIVEREF(__pyx_tuple__30); |
10959 | __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10960 | ||
10961 | /* "pygame_sdl2/display.pyx":506 | |
10974 | __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10975 | ||
10976 | /* "pygame_sdl2/display.pyx":508 | |
10962 | 10977 | * |
10963 | 10978 | * |
10964 | 10979 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
10965 | 10980 | * """ |
10966 | 10981 | * Returns a list of possible display modes for the display `display`. |
10967 | 10982 | */ |
10968 | __pyx_tuple__32 = PyTuple_Pack(8, __pyx_n_s_depth, __pyx_n_s_flags, __pyx_n_s_display, __pyx_n_s_num_modes, __pyx_n_s_i, __pyx_n_s_mode, __pyx_n_s_rv, __pyx_n_s_t); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10983 | __pyx_tuple__32 = PyTuple_Pack(8, __pyx_n_s_depth, __pyx_n_s_flags, __pyx_n_s_display, __pyx_n_s_num_modes, __pyx_n_s_i, __pyx_n_s_mode, __pyx_n_s_rv, __pyx_n_s_t); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10969 | 10984 | __Pyx_GOTREF(__pyx_tuple__32); |
10970 | 10985 | __Pyx_GIVEREF(__pyx_tuple__32); |
10971 | __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_list_modes, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10972 | ||
10973 | /* "pygame_sdl2/display.pyx":531 | |
10986 | __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_list_modes, 508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10987 | ||
10988 | /* "pygame_sdl2/display.pyx":533 | |
10974 | 10989 | * |
10975 | 10990 | * |
10976 | 10991 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
10977 | 10992 | * """ |
10978 | 10993 | * Returns true if size is in the result of list_modes(). |
10979 | 10994 | */ |
10980 | __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_flags, __pyx_n_s_depth); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10995 | __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_flags, __pyx_n_s_depth); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10981 | 10996 | __Pyx_GOTREF(__pyx_tuple__34); |
10982 | 10997 | __Pyx_GIVEREF(__pyx_tuple__34); |
10983 | __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_mode_ok, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10984 | ||
10985 | /* "pygame_sdl2/display.pyx":538 | |
10998 | __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_mode_ok, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10999 | ||
11000 | /* "pygame_sdl2/display.pyx":540 | |
10986 | 11001 | * return tuple(size) in list_modes() |
10987 | 11002 | * |
10988 | 11003 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
10989 | 11004 | * SDL_GL_ResetAttributes() |
10990 | 11005 | * |
10991 | 11006 | */ |
10992 | __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_reset_attributes, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
10993 | ||
10994 | /* "pygame_sdl2/display.pyx":541 | |
11007 | __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_reset_attributes, 540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11008 | ||
11009 | /* "pygame_sdl2/display.pyx":543 | |
10995 | 11010 | * SDL_GL_ResetAttributes() |
10996 | 11011 | * |
10997 | 11012 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
10998 | 11013 | * |
10999 | 11014 | * if flag == GL_SWAP_CONTROL: |
11000 | 11015 | */ |
11001 | __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_default_swap_control); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11016 | __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_default_swap_control); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11002 | 11017 | __Pyx_GOTREF(__pyx_tuple__37); |
11003 | 11018 | __Pyx_GIVEREF(__pyx_tuple__37); |
11004 | __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_set_attribute, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11005 | ||
11006 | /* "pygame_sdl2/display.pyx":559 | |
11019 | __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_set_attribute, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11020 | ||
11021 | /* "pygame_sdl2/display.pyx":561 | |
11007 | 11022 | * raise error() |
11008 | 11023 | * |
11009 | 11024 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
11010 | 11025 | * cdef int rv |
11011 | 11026 | * |
11012 | 11027 | */ |
11013 | __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_flag, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11028 | __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_flag, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11014 | 11029 | __Pyx_GOTREF(__pyx_tuple__39); |
11015 | 11030 | __Pyx_GIVEREF(__pyx_tuple__39); |
11016 | __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_get_attribute, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11017 | ||
11018 | /* "pygame_sdl2/display.pyx":570 | |
11031 | __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_get_attribute, 561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11032 | ||
11033 | /* "pygame_sdl2/display.pyx":572 | |
11019 | 11034 | * return rv |
11020 | 11035 | * |
11021 | 11036 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
11022 | 11037 | * if path is None: |
11023 | 11038 | * if SDL_GL_LoadLibrary(NULL): |
11024 | 11039 | */ |
11025 | __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11040 | __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11026 | 11041 | __Pyx_GOTREF(__pyx_tuple__41); |
11027 | 11042 | __Pyx_GIVEREF(__pyx_tuple__41); |
11028 | __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_load_library, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11029 | ||
11030 | /* "pygame_sdl2/display.pyx":578 | |
11043 | __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_load_library, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11044 | ||
11045 | /* "pygame_sdl2/display.pyx":580 | |
11031 | 11046 | * raise error() |
11032 | 11047 | * |
11033 | 11048 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
11034 | 11049 | * SDL_GL_UnloadLibrary() |
11035 | 11050 | * |
11036 | 11051 | */ |
11037 | __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_unload_library, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11038 | ||
11039 | /* "pygame_sdl2/display.pyx":581 | |
11052 | __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_gl_unload_library, 580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11053 | ||
11054 | /* "pygame_sdl2/display.pyx":583 | |
11040 | 11055 | * SDL_GL_UnloadLibrary() |
11041 | 11056 | * |
11042 | 11057 | * def get_active(): # <<<<<<<<<<<<<< |
11043 | 11058 | * if main_window: |
11044 | 11059 | * return main_window.get_active() |
11045 | 11060 | */ |
11046 | __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_active, 581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11047 | ||
11048 | /* "pygame_sdl2/display.pyx":586 | |
11061 | __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_active, 583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11062 | ||
11063 | /* "pygame_sdl2/display.pyx":588 | |
11049 | 11064 | * return False |
11050 | 11065 | * |
11051 | 11066 | * def iconify(): # <<<<<<<<<<<<<< |
11052 | 11067 | * if main_window: |
11053 | 11068 | * return main_window.iconify() |
11054 | 11069 | */ |
11055 | __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_iconify, 586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11056 | ||
11057 | /* "pygame_sdl2/display.pyx":592 | |
11070 | __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_iconify, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11071 | ||
11072 | /* "pygame_sdl2/display.pyx":594 | |
11058 | 11073 | * return False |
11059 | 11074 | * |
11060 | 11075 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
11061 | 11076 | * if main_window: |
11062 | 11077 | * return main_window.toggle_fullscreen() |
11063 | 11078 | */ |
11064 | __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_toggle_fullscreen, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11065 | ||
11066 | /* "pygame_sdl2/display.pyx":598 | |
11079 | __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_toggle_fullscreen, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11080 | ||
11081 | /* "pygame_sdl2/display.pyx":600 | |
11067 | 11082 | * return True |
11068 | 11083 | * |
11069 | 11084 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
11070 | 11085 | * if main_window: |
11071 | 11086 | * return main_window.set_gamma(red, green, blue) |
11072 | 11087 | */ |
11073 | __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11088 | __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11074 | 11089 | __Pyx_GOTREF(__pyx_tuple__47); |
11075 | 11090 | __Pyx_GIVEREF(__pyx_tuple__47); |
11076 | __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11077 | ||
11078 | /* "pygame_sdl2/display.pyx":603 | |
11091 | __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11092 | ||
11093 | /* "pygame_sdl2/display.pyx":605 | |
11079 | 11094 | * return False |
11080 | 11095 | * |
11081 | 11096 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
11082 | 11097 | * if main_window: |
11083 | 11098 | * return main_window.set_gamma_ramp(red, green, blue) |
11084 | 11099 | */ |
11085 | __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11100 | __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11086 | 11101 | __Pyx_GOTREF(__pyx_tuple__49); |
11087 | 11102 | __Pyx_GIVEREF(__pyx_tuple__49); |
11088 | __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma_ramp, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11089 | ||
11090 | /* "pygame_sdl2/display.pyx":608 | |
11103 | __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_gamma_ramp, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11104 | ||
11105 | /* "pygame_sdl2/display.pyx":610 | |
11091 | 11106 | * return False |
11092 | 11107 | * |
11093 | 11108 | * def set_icon(surface): # <<<<<<<<<<<<<< |
11094 | 11109 | * global default_icon |
11095 | 11110 | * |
11096 | 11111 | */ |
11097 | __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11112 | __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11098 | 11113 | __Pyx_GOTREF(__pyx_tuple__51); |
11099 | 11114 | __Pyx_GIVEREF(__pyx_tuple__51); |
11100 | __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_icon, 608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11101 | ||
11102 | /* "pygame_sdl2/display.pyx":616 | |
11115 | __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_icon, 610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11116 | ||
11117 | /* "pygame_sdl2/display.pyx":618 | |
11103 | 11118 | * main_window.set_icon(default_icon) |
11104 | 11119 | * |
11105 | 11120 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
11106 | 11121 | * global default_title |
11107 | 11122 | * |
11108 | 11123 | */ |
11109 | __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_title, __pyx_n_s_icontitle); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11124 | __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_title, __pyx_n_s_icontitle); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11110 | 11125 | __Pyx_GOTREF(__pyx_tuple__53); |
11111 | 11126 | __Pyx_GIVEREF(__pyx_tuple__53); |
11112 | __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_caption, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11113 | ||
11114 | /* "pygame_sdl2/display.pyx":624 | |
11127 | __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_set_caption, 618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11128 | ||
11129 | /* "pygame_sdl2/display.pyx":626 | |
11115 | 11130 | * main_window.set_caption(default_title) |
11116 | 11131 | * |
11117 | 11132 | * def get_caption(): # <<<<<<<<<<<<<< |
11118 | 11133 | * return default_title |
11119 | 11134 | * |
11120 | 11135 | */ |
11121 | __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_caption, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11122 | ||
11123 | /* "pygame_sdl2/display.pyx":627 | |
11136 | __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_caption, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11137 | ||
11138 | /* "pygame_sdl2/display.pyx":629 | |
11124 | 11139 | * return default_title |
11125 | 11140 | * |
11126 | 11141 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
11127 | 11142 | * if main_window: |
11128 | 11143 | * return main_window.get_drawable_size() |
11129 | 11144 | */ |
11130 | __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_drawable_size, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11131 | ||
11132 | /* "pygame_sdl2/display.pyx":632 | |
11145 | __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_drawable_size, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11146 | ||
11147 | /* "pygame_sdl2/display.pyx":634 | |
11133 | 11148 | * return None |
11134 | 11149 | * |
11135 | 11150 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11136 | 11151 | * rv = SDL_GetNumVideoDisplays() |
11137 | 11152 | * if rv < 0: |
11138 | 11153 | */ |
11139 | __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11154 | __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11140 | 11155 | __Pyx_GOTREF(__pyx_tuple__57); |
11141 | 11156 | __Pyx_GIVEREF(__pyx_tuple__57); |
11142 | __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11143 | ||
11144 | /* "pygame_sdl2/display.pyx":639 | |
11157 | __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_num_video_displays, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11158 | ||
11159 | /* "pygame_sdl2/display.pyx":641 | |
11145 | 11160 | * return rv |
11146 | 11161 | * |
11147 | 11162 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
11148 | 11163 | * cdef SDL_Rect rect |
11149 | 11164 | * rv = SDL_GetDisplayBounds(index, &rect) |
11150 | 11165 | */ |
11151 | __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_index, __pyx_n_s_rect, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11166 | __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_index, __pyx_n_s_rect, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11152 | 11167 | __Pyx_GOTREF(__pyx_tuple__59); |
11153 | 11168 | __Pyx_GIVEREF(__pyx_tuple__59); |
11154 | __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_display_bounds, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11155 | ||
11156 | /* "pygame_sdl2/display.pyx":645 | |
11169 | __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_display_bounds, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11170 | ||
11171 | /* "pygame_sdl2/display.pyx":647 | |
11157 | 11172 | * return (rect.x, rect.y, rect.w, rect.h) |
11158 | 11173 | * |
11159 | 11174 | * def hint(hint, value): # <<<<<<<<<<<<<< |
11160 | 11175 | * |
11161 | 11176 | * if not isinstance(hint, bytes): |
11162 | 11177 | */ |
11163 | __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_hint, __pyx_n_s_value); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11178 | __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_hint, __pyx_n_s_value); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11164 | 11179 | __Pyx_GOTREF(__pyx_tuple__61); |
11165 | 11180 | __Pyx_GIVEREF(__pyx_tuple__61); |
11166 | __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_hint, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11167 | ||
11168 | /* "pygame_sdl2/display.pyx":655 | |
11181 | __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_hint, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11182 | ||
11183 | /* "pygame_sdl2/display.pyx":657 | |
11169 | 11184 | * SDL_SetHint(hint, value) |
11170 | 11185 | * |
11171 | 11186 | * def get_platform(): # <<<<<<<<<<<<<< |
11172 | 11187 | * return SDL_GetPlatform() |
11173 | 11188 | * |
11174 | 11189 | */ |
11175 | __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_platform, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11190 | __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_tom_ab_pygame_sdl2_src_pyg, __pyx_n_s_get_platform, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11176 | 11191 | __Pyx_RefNannyFinishContext(); |
11177 | 11192 | return 0; |
11178 | 11193 | __pyx_L1_error:; |
11731 | 11746 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} |
11732 | 11747 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
11733 | 11748 | |
11734 | /* "pygame_sdl2/display.pyx":482 | |
11749 | /* "pygame_sdl2/display.pyx":484 | |
11735 | 11750 | * self.blit_sw_A = False |
11736 | 11751 | * |
11737 | 11752 | * def __repr__(self): # <<<<<<<<<<<<<< |
11738 | 11753 | * return "<Info({!r})>".format(self.__dict__) |
11739 | 11754 | * |
11740 | 11755 | */ |
11741 | __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_4Info_3__repr__, 0, __pyx_n_s_Info___repr, NULL, __pyx_n_s_pygame_sdl2_display, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11756 | __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_4Info_3__repr__, 0, __pyx_n_s_Info___repr, NULL, __pyx_n_s_pygame_sdl2_display, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11742 | 11757 | __Pyx_GOTREF(__pyx_t_5); |
11743 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_repr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11758 | if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_repr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11744 | 11759 | __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
11745 | 11760 | |
11746 | 11761 | /* "pygame_sdl2/display.pyx":423 |
11758 | 11773 | __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; |
11759 | 11774 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11760 | 11775 | |
11761 | /* "pygame_sdl2/display.pyx":486 | |
11776 | /* "pygame_sdl2/display.pyx":488 | |
11762 | 11777 | * |
11763 | 11778 | * |
11764 | 11779 | * def get_wm_info(): # <<<<<<<<<<<<<< |
11765 | 11780 | * if main_window: |
11766 | 11781 | * return main_window.get_wm_info() |
11767 | 11782 | */ |
11768 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_21get_wm_info, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11783 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_21get_wm_info, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11769 | 11784 | __Pyx_GOTREF(__pyx_t_3); |
11770 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_wm_info, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11785 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_wm_info, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11771 | 11786 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11772 | 11787 | |
11773 | /* "pygame_sdl2/display.pyx":493 | |
11788 | /* "pygame_sdl2/display.pyx":495 | |
11774 | 11789 | * |
11775 | 11790 | * |
11776 | 11791 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11777 | 11792 | * """ |
11778 | 11793 | * Returns the number of video displays connected to the system. |
11779 | 11794 | */ |
11780 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_23get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11795 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_23get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11781 | 11796 | __Pyx_GOTREF(__pyx_t_3); |
11782 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11797 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11783 | 11798 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11784 | 11799 | |
11785 | /* "pygame_sdl2/display.pyx":506 | |
11800 | /* "pygame_sdl2/display.pyx":508 | |
11786 | 11801 | * |
11787 | 11802 | * |
11788 | 11803 | * def list_modes(depth=0, flags=0, display=0): # <<<<<<<<<<<<<< |
11789 | 11804 | * """ |
11790 | 11805 | * Returns a list of possible display modes for the display `display`. |
11791 | 11806 | */ |
11792 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_25list_modes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11807 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_25list_modes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11793 | 11808 | __Pyx_GOTREF(__pyx_t_3); |
11794 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_modes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11809 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_modes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11795 | 11810 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11796 | 11811 | |
11797 | /* "pygame_sdl2/display.pyx":531 | |
11812 | /* "pygame_sdl2/display.pyx":533 | |
11798 | 11813 | * |
11799 | 11814 | * |
11800 | 11815 | * def mode_ok(size, flags=0, depth=0): # <<<<<<<<<<<<<< |
11801 | 11816 | * """ |
11802 | 11817 | * Returns true if size is in the result of list_modes(). |
11803 | 11818 | */ |
11804 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_27mode_ok, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11819 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_27mode_ok, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11805 | 11820 | __Pyx_GOTREF(__pyx_t_3); |
11806 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_ok, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11821 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_ok, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11807 | 11822 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11808 | 11823 | |
11809 | /* "pygame_sdl2/display.pyx":538 | |
11824 | /* "pygame_sdl2/display.pyx":540 | |
11810 | 11825 | * return tuple(size) in list_modes() |
11811 | 11826 | * |
11812 | 11827 | * def gl_reset_attributes(): # <<<<<<<<<<<<<< |
11813 | 11828 | * SDL_GL_ResetAttributes() |
11814 | 11829 | * |
11815 | 11830 | */ |
11816 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_29gl_reset_attributes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11831 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_29gl_reset_attributes, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11817 | 11832 | __Pyx_GOTREF(__pyx_t_3); |
11818 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_reset_attributes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11833 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_reset_attributes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11819 | 11834 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11820 | 11835 | |
11821 | /* "pygame_sdl2/display.pyx":541 | |
11836 | /* "pygame_sdl2/display.pyx":543 | |
11822 | 11837 | * SDL_GL_ResetAttributes() |
11823 | 11838 | * |
11824 | 11839 | * def gl_set_attribute(flag, value): # <<<<<<<<<<<<<< |
11825 | 11840 | * |
11826 | 11841 | * if flag == GL_SWAP_CONTROL: |
11827 | 11842 | */ |
11828 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_31gl_set_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11843 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_31gl_set_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11829 | 11844 | __Pyx_GOTREF(__pyx_t_3); |
11830 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_set_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11845 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_set_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11831 | 11846 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11832 | 11847 | |
11833 | /* "pygame_sdl2/display.pyx":559 | |
11848 | /* "pygame_sdl2/display.pyx":561 | |
11834 | 11849 | * raise error() |
11835 | 11850 | * |
11836 | 11851 | * def gl_get_attribute(flag): # <<<<<<<<<<<<<< |
11837 | 11852 | * cdef int rv |
11838 | 11853 | * |
11839 | 11854 | */ |
11840 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_33gl_get_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11855 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_33gl_get_attribute, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11841 | 11856 | __Pyx_GOTREF(__pyx_t_3); |
11842 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_get_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11857 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_get_attribute, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11843 | 11858 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11844 | 11859 | |
11845 | /* "pygame_sdl2/display.pyx":570 | |
11860 | /* "pygame_sdl2/display.pyx":572 | |
11846 | 11861 | * return rv |
11847 | 11862 | * |
11848 | 11863 | * def gl_load_library(path): # <<<<<<<<<<<<<< |
11849 | 11864 | * if path is None: |
11850 | 11865 | * if SDL_GL_LoadLibrary(NULL): |
11851 | 11866 | */ |
11852 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_35gl_load_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11867 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_35gl_load_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11853 | 11868 | __Pyx_GOTREF(__pyx_t_3); |
11854 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_load_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11869 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_load_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11855 | 11870 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11856 | 11871 | |
11857 | /* "pygame_sdl2/display.pyx":578 | |
11872 | /* "pygame_sdl2/display.pyx":580 | |
11858 | 11873 | * raise error() |
11859 | 11874 | * |
11860 | 11875 | * def gl_unload_library(): # <<<<<<<<<<<<<< |
11861 | 11876 | * SDL_GL_UnloadLibrary() |
11862 | 11877 | * |
11863 | 11878 | */ |
11864 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_37gl_unload_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11879 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_37gl_unload_library, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11865 | 11880 | __Pyx_GOTREF(__pyx_t_3); |
11866 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_unload_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11881 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_unload_library, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11867 | 11882 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11868 | 11883 | |
11869 | /* "pygame_sdl2/display.pyx":581 | |
11884 | /* "pygame_sdl2/display.pyx":583 | |
11870 | 11885 | * SDL_GL_UnloadLibrary() |
11871 | 11886 | * |
11872 | 11887 | * def get_active(): # <<<<<<<<<<<<<< |
11873 | 11888 | * if main_window: |
11874 | 11889 | * return main_window.get_active() |
11875 | 11890 | */ |
11876 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_39get_active, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11891 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_39get_active, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11877 | 11892 | __Pyx_GOTREF(__pyx_t_3); |
11878 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_active, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11893 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_active, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11879 | 11894 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11880 | 11895 | |
11881 | /* "pygame_sdl2/display.pyx":586 | |
11896 | /* "pygame_sdl2/display.pyx":588 | |
11882 | 11897 | * return False |
11883 | 11898 | * |
11884 | 11899 | * def iconify(): # <<<<<<<<<<<<<< |
11885 | 11900 | * if main_window: |
11886 | 11901 | * return main_window.iconify() |
11887 | 11902 | */ |
11888 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_41iconify, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11903 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_41iconify, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11889 | 11904 | __Pyx_GOTREF(__pyx_t_3); |
11890 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_iconify, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11905 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_iconify, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11891 | 11906 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11892 | 11907 | |
11893 | /* "pygame_sdl2/display.pyx":592 | |
11908 | /* "pygame_sdl2/display.pyx":594 | |
11894 | 11909 | * return False |
11895 | 11910 | * |
11896 | 11911 | * def toggle_fullscreen(): # <<<<<<<<<<<<<< |
11897 | 11912 | * if main_window: |
11898 | 11913 | * return main_window.toggle_fullscreen() |
11899 | 11914 | */ |
11900 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_43toggle_fullscreen, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11915 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_43toggle_fullscreen, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11901 | 11916 | __Pyx_GOTREF(__pyx_t_3); |
11902 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_toggle_fullscreen, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11917 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_toggle_fullscreen, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11903 | 11918 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11904 | 11919 | |
11905 | /* "pygame_sdl2/display.pyx":598 | |
11920 | /* "pygame_sdl2/display.pyx":600 | |
11906 | 11921 | * return True |
11907 | 11922 | * |
11908 | 11923 | * def set_gamma(red, green=None, blue=None): # <<<<<<<<<<<<<< |
11909 | 11924 | * if main_window: |
11910 | 11925 | * return main_window.set_gamma(red, green, blue) |
11911 | 11926 | */ |
11912 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_45set_gamma, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11927 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_45set_gamma, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11913 | 11928 | __Pyx_GOTREF(__pyx_t_3); |
11914 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11929 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11915 | 11930 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11916 | 11931 | |
11917 | /* "pygame_sdl2/display.pyx":603 | |
11932 | /* "pygame_sdl2/display.pyx":605 | |
11918 | 11933 | * return False |
11919 | 11934 | * |
11920 | 11935 | * def set_gamma_ramp(red, green, blue): # <<<<<<<<<<<<<< |
11921 | 11936 | * if main_window: |
11922 | 11937 | * return main_window.set_gamma_ramp(red, green, blue) |
11923 | 11938 | */ |
11924 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_47set_gamma_ramp, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11939 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_47set_gamma_ramp, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11925 | 11940 | __Pyx_GOTREF(__pyx_t_3); |
11926 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma_ramp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11941 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_gamma_ramp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11927 | 11942 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11928 | 11943 | |
11929 | /* "pygame_sdl2/display.pyx":608 | |
11944 | /* "pygame_sdl2/display.pyx":610 | |
11930 | 11945 | * return False |
11931 | 11946 | * |
11932 | 11947 | * def set_icon(surface): # <<<<<<<<<<<<<< |
11933 | 11948 | * global default_icon |
11934 | 11949 | * |
11935 | 11950 | */ |
11936 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_49set_icon, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11951 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_49set_icon, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11937 | 11952 | __Pyx_GOTREF(__pyx_t_3); |
11938 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_icon, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11953 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_icon, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11939 | 11954 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11940 | 11955 | |
11941 | /* "pygame_sdl2/display.pyx":616 | |
11956 | /* "pygame_sdl2/display.pyx":618 | |
11942 | 11957 | * main_window.set_icon(default_icon) |
11943 | 11958 | * |
11944 | 11959 | * def set_caption(title, icontitle = None): # <<<<<<<<<<<<<< |
11945 | 11960 | * global default_title |
11946 | 11961 | * |
11947 | 11962 | */ |
11948 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_51set_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11963 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_51set_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11949 | 11964 | __Pyx_GOTREF(__pyx_t_3); |
11950 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11965 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11951 | 11966 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11952 | 11967 | |
11953 | /* "pygame_sdl2/display.pyx":624 | |
11968 | /* "pygame_sdl2/display.pyx":626 | |
11954 | 11969 | * main_window.set_caption(default_title) |
11955 | 11970 | * |
11956 | 11971 | * def get_caption(): # <<<<<<<<<<<<<< |
11957 | 11972 | * return default_title |
11958 | 11973 | * |
11959 | 11974 | */ |
11960 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_53get_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11975 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_53get_caption, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11961 | 11976 | __Pyx_GOTREF(__pyx_t_3); |
11962 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11977 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_caption, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11963 | 11978 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11964 | 11979 | |
11965 | /* "pygame_sdl2/display.pyx":627 | |
11980 | /* "pygame_sdl2/display.pyx":629 | |
11966 | 11981 | * return default_title |
11967 | 11982 | * |
11968 | 11983 | * def get_drawable_size(): # <<<<<<<<<<<<<< |
11969 | 11984 | * if main_window: |
11970 | 11985 | * return main_window.get_drawable_size() |
11971 | 11986 | */ |
11972 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_55get_drawable_size, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11987 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_55get_drawable_size, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11973 | 11988 | __Pyx_GOTREF(__pyx_t_3); |
11974 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drawable_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11989 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drawable_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11975 | 11990 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11976 | 11991 | |
11977 | /* "pygame_sdl2/display.pyx":632 | |
11992 | /* "pygame_sdl2/display.pyx":634 | |
11978 | 11993 | * return None |
11979 | 11994 | * |
11980 | 11995 | * def get_num_video_displays(): # <<<<<<<<<<<<<< |
11981 | 11996 | * rv = SDL_GetNumVideoDisplays() |
11982 | 11997 | * if rv < 0: |
11983 | 11998 | */ |
11984 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_57get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11999 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_57get_num_video_displays, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11985 | 12000 | __Pyx_GOTREF(__pyx_t_3); |
11986 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12001 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_num_video_displays, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11987 | 12002 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
11988 | 12003 | |
11989 | /* "pygame_sdl2/display.pyx":639 | |
12004 | /* "pygame_sdl2/display.pyx":641 | |
11990 | 12005 | * return rv |
11991 | 12006 | * |
11992 | 12007 | * def get_display_bounds(index): # <<<<<<<<<<<<<< |
11993 | 12008 | * cdef SDL_Rect rect |
11994 | 12009 | * rv = SDL_GetDisplayBounds(index, &rect) |
11995 | 12010 | */ |
11996 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_59get_display_bounds, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12011 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_59get_display_bounds, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11997 | 12012 | __Pyx_GOTREF(__pyx_t_3); |
11998 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_bounds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12013 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_bounds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
11999 | 12014 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12000 | 12015 | |
12001 | /* "pygame_sdl2/display.pyx":645 | |
12016 | /* "pygame_sdl2/display.pyx":647 | |
12002 | 12017 | * return (rect.x, rect.y, rect.w, rect.h) |
12003 | 12018 | * |
12004 | 12019 | * def hint(hint, value): # <<<<<<<<<<<<<< |
12005 | 12020 | * |
12006 | 12021 | * if not isinstance(hint, bytes): |
12007 | 12022 | */ |
12008 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_61hint, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12023 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_61hint, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12009 | 12024 | __Pyx_GOTREF(__pyx_t_3); |
12010 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_hint, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12025 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_hint, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12011 | 12026 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12012 | 12027 | |
12013 | /* "pygame_sdl2/display.pyx":655 | |
12028 | /* "pygame_sdl2/display.pyx":657 | |
12014 | 12029 | * SDL_SetHint(hint, value) |
12015 | 12030 | * |
12016 | 12031 | * def get_platform(): # <<<<<<<<<<<<<< |
12017 | 12032 | * return SDL_GetPlatform() |
12018 | 12033 | * |
12019 | 12034 | */ |
12020 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_63get_platform, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12035 | __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_11pygame_sdl2_7display_63get_platform, NULL, __pyx_n_s_pygame_sdl2_display); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12021 | 12036 | __Pyx_GOTREF(__pyx_t_3); |
12022 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_platform, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12037 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_platform, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
12023 | 12038 | __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
12024 | 12039 | |
12025 | 12040 | /* "pygame_sdl2/display.pyx":1 |
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: pygame-sdl2 |
2 | Version: 2.1.0-for-renpy-6.99.10 | |
2 | Version: 2.1.0-for-renpy-6.99.11 | |
3 | 3 | Summary: UNKNOWN |
4 | 4 | Home-page: https://github.com/renpy/pygame_sdl2 |
5 | 5 | Author: Tom Rothamel |