From 51033259b762da4268e24eb1e899fc3a1db95e96 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 22 Dec 2021 16:25:13 +0800 Subject: [PATCH] bugfix --- kivyblocks/.toolbar.py.swp | Bin 0 -> 24576 bytes kivyblocks/.udp_widget.py.swp | Bin 0 -> 12288 bytes kivyblocks/blocks.c | 31219 +++++++++++++++++++++++++ kivyblocks/blocks.cp37-win_amd64.pyd | Bin 0 -> 336896 bytes kivyblocks/blocks.pyold | 748 + kivyblocks/dg.c | 23946 +++++++++++++++++++ kivyblocks/imgs/checkbox-off.png | Bin 0 -> 7231 bytes kivyblocks/imgs/checkbox-on.png | Bin 0 -> 16589 bytes kivyblocks/imgs/delete.png | Bin 0 -> 13894 bytes kivyblocks/toolbar.py | 6 +- 10 files changed, 55915 insertions(+), 4 deletions(-) create mode 100644 kivyblocks/.toolbar.py.swp create mode 100644 kivyblocks/.udp_widget.py.swp create mode 100644 kivyblocks/blocks.c create mode 100644 kivyblocks/blocks.cp37-win_amd64.pyd create mode 100644 kivyblocks/blocks.pyold create mode 100644 kivyblocks/dg.c create mode 100644 kivyblocks/imgs/checkbox-off.png create mode 100644 kivyblocks/imgs/checkbox-on.png create mode 100644 kivyblocks/imgs/delete.png diff --git a/kivyblocks/.toolbar.py.swp b/kivyblocks/.toolbar.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..cbcb8e3e382cf3a40916d8f2c5db8ed653a3ee78 GIT binary patch literal 24576 zcmeI4dyr&TS-?9>h&1F45z9Z~-KL~_mfp_p1|f_L7W)V!th+;Y6O#;6Z9i_$bf%|o z=l1RC8CD3vSOJU#u+$=jP!J#lDG_T$0>Mb)ACyR-R32_pQka4SN|X`>#aQ_JzVo=Z zduDc1ScO`3r}EqGd(U^y`ObIF`OdS`+;iPkzZ_gq+gIT4!b0Kb-48b8>ywWc3LC38 z%hxmh9XxdGRmYFc@80*~7w$cH;J~)>2WKxEY+Sa|UEA2*>_x4Wp?pT_4-xR3}EC;!VWkXs

-4MefybLaZ@10vHJPh~3hu{vl9hRUCH^O0< zgXcgI{*w)ee}QkpWAGR78Tf5@BedZqup0un1TKd2;9Pj(nT5hba4(#ISHpAR`^7@x zZ{a?;2kw9nu7Kylcb-uwd;>lWAA~#M1gt{~_QUhxQrH1!!6QFaDEv7*0Pllap$kW# z3jcggq3}5T6`X{3z;$p8ei6=tFR|%z7YyJC?1BP(lg*d=;XQB%tiV;U8!muvvl(*= zJ^^>aGSuNlI1JB+B0NDIKLmHd?J$DFPy?<1qWK$kUmMn!yZt1X3o1vVepn6U-&aZN(F}Vt z?o}u1C!)~Yfn)qz8HT-1O~mS|Wh+%Gio0PyX(Zibib`XjsS46Y;Nv`nTDhtf^-ohX zG&il6pwVwnHoOD9Zfm8{v@MqQdu5}QMDa##G64H!8g@o3^VZ9VBAZ0yrI&E(Zjy2V zNIE-rI!Gn8r7)?K(|6^nd#4R3Zt+69skAyL*54enzePkJ&)CT4rjMz7zp)x-a%qR1 zpwVvEtP&ff1>FeW6@J#TsV2}1Jjp>_yeS<9aO0HAy*Lg2xBPi?*L*r*u#`LdLGyA-~YX1Yx ztOi>tCrXPabpDDPaMoo7b8|uYm1R^GGe>=O5!T94HITAnYocph7cN=ZX5b^Xmb<-n z9B!Y2NunLqhpjm3_3C1^D;wA=Yc|a$l@W_OnKKo@q%TEt&0!BI^PdUuO(>Ddml{ZX znRB?F^Ld1OtjRi#jFgCiS{)7rS;Li?zgq+93tuBcs(Y?zZORXn;jFDtk#T z9dou2*oT0OqjAtkFhz5eghN}PxFg=%C_ajN=8HB{8T(WX_4XR@ zymW}975d2lHBQ0oaAQ))1WGyGqfYWlE=Q}P>X$5sTj?m4Z}l3(A=5{_2wXX)&S<{T zXEKPR>%`G&P)l@f*-gULVbEP2L~-J#oASyE88&Mqb%;MoG8lW1$xmQM@B{#)g z@Bw+q1X4H`^zy+V6ENzo%VZ-{yVjW6j8tn8G1DE}kPgebV=9fMxZCbEHlmTY*(-Q+ zSl>*EHly`PNm|mDf~G^;OkY0S=(lvOG@aZiNz%IAuTT5K<;Ge!iZh~1abvLDZF$RU z!>k6^P|J-z%dm`SkG_M~aHZ9!f~^1F%vyUVYjj!v%bEVSS?hlbz5wrp5yUVLFM&&- z06${Qe+uq{_rk3(h9+DOvNy07&WG=i{weq({0V#rehbFXhbA0?5{NDV7un@jw$U)UXX`$Lvp zt*{bT&3aR}!;8h3eW#AuutcsS+e$^*)Q>y5t8eyZG@V#pPp{-PCJ~LC#5Ug$T{Fi5 z=2`a;i*cBY;=U?1U^|RMgYg`jb-Igqx`J#eplj&ig6!lhlHFL6MU$}>K~DSBFwGHL z%+4U}E=f_4;+x3vk!s4rw3^%7R#lSh^w_2!B|#i^*ezX_WT&ES-W>MoaWrJ=&6Gw> zCMBAYZ4dUkWcOW7Rd4iqYHXWLsZRM$)Kk6{j^}6nr)$0<&hgAcUy(vn!--+CL zfo!0WXQrSU+M3bz|J%60f0FZIS^wY0$3L*P{~SC7e*|(5U>(K~!3}T__QJE^an|?u z!=2E95UvJU|CiyvSj#^NUxqKh!|-u+ogx8+ZurgO9>T;2yXQ8n6eR1OLI@fWLlE*Qbp@bj<(zQ)~vufR!oJG>Qcfa_rvE`y8VY4C5{6ZkIt zBYX)y0e=ebg*U?z{1VK-Mesw~!&gDt#fPPBaS+GwxQ)<4ag;cKhuLM}s;tm>VkY$&M4E zxM-shGc%0IghXm}$F`j92ZDHYY1Q2BJlwL;PtxTsKG zT-dYd^52|}^8i*0iDLY~mTLKKqD|aCd9_f%wv)-GxZV4-PSpWwB$t@916L$>_8h#x zb`*Cw&5J#?%PAIBFH`YNDTog+U3TgwMtU^9`7Xwks5>vggnAiXs) z&r$j0wFx_kK28!6ILlSIa#e3sNQc<&{shwa1}u_2xU8Ibozwz<>Fow}fkD}7!vzQR zhJ40yeNXR0IPK>)U7;|M?bQbHMYbBIPFgE+AH&~FuvLa4HevhC#itS&n|ygq%=Bbk zj8MUgW;;)JIA|oTWxcp!?xIv#XC?JDQ`~XQb^yQfNw3osecX4pN2_%+WX?(5CR}={ zl+BCsmcly1XJqwxQq;}4GIxZv7PEOvKlC#+r?2)-D}^y+L`XYCT8Rr|*(Z^Up2lRE znU@+(I)qjfT_+Q^t|_l?HA~FYh!qlhlSxG?KwpuW`z)&R=6dnos@(N5fAU%{b_!-y%?jFEN*7t9N5Uzj=;CztZ2|Na01X=5U0B(VG7(*Ri0q4RGQT7M$HTWug z1s;Ik2U*+S3^&3&9ED#1S?8Yv|IT{;8}KN67Cr#)hdbdda0~nz^q>jX!?iFEyWyGe zcdYk64ex{7VFeCA34RuSz#9J%cn`=PzzQ4#*#kHmPO-+nA3h21fZu>+Sc1bKzZ-Y~ zTnPWfdjF&Fhwyet;3hZ#mx9|1_+!@kYcPT~9D+;Xd#vdnhChHe!5d%^X5q!K1I~iS z?7II`e0~Jp4ex~Cf!9L=eig2UeQ+Vj?+X4JJ_&cjt*{6*J-?LH4&vus6YEM1$``5| zwS1x4$-2bJCZmo_UuC?eKHC{l-MLr)(#;w3g=)I*lP^^5W`Ora_DmpOsQP~7Cn1@c zN4`+a7pnfEdA?B17pm;)V!Z literal 0 HcmV?d00001 diff --git a/kivyblocks/.udp_widget.py.swp b/kivyblocks/.udp_widget.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..3b029d1cf53c2f999fb50d0ad69e3573f9473d77 GIT binary patch literal 12288 zcmeI2O^6&t6vr#(Lr3#v1TRXc7(&l%W;-(*W0t`QlHEPT7!%M$VO-jt?wZ}s%yhTi zHJe>Tl;j{HQGz)No+OBPP$Q^0co323A)ZtsdJsK$5hS35;K%<}SI_k9M}&AX^uTYX zyFTCh*Q-~(NjEFU4jkg+<`~0gGh^3I{`xdsKDd{$h3+$S`LCbJsmBgJe)!1f*xviA zlM@pwwx6u+3Kw>@y}5|Np0d1Gu({ zv7f>B;45$mdOfdgO)l)wh? z!+OR(1aE*gI1UbiQLr7X23PN3>>Kbk_yC*%FMlgH7O<+Zg)37TLGRKZ4YWi4Yrf%D*f z@G6)CZEy@60{4Ks!4~kx8peJHm%%yk3OEhAU_apCFT}ui;4-)fR7~6?aeh;{Q7FWs z(=zE*85!Ar90rjzV;O|S5-Yf(#nm;nDb*NTzP0e(qFd&+>qh8Q2qVvzMI)x-Qq3sy zP>9I#(89H)O)aP;uk&KRqHhCDPc2+jt3v7`d?#>4WQMlW9`w8i8-Y z9KM4)U6=YrLiQpbS6+*X`Z1;6MYEis+l8euVkpzJ(8}%`bZk+53&X3}@O&TgrygQZ zGMdJQ(hb8gAa1(ZQk`Ho%&%*iGE-r2KakvuJwKMV?+BXN^&ClIJ=_kq$NbU27pi92 zo!Il$UR)C9q7x^*26AW;grfoK zX$o>0mpXy;GUmjr z*AZM+`93a56C|$TPcIyy;cTl@icpb~T@@-+89<+PLt|s9 z$;+NURH`ka#Iur3rX7ZK_);5KJ=peS$x2yJZPDx5rn9BC>bf>f&|AM|?92+c*AZ4g znN4Z8oWx~5MpiCYpKJ(K6NwpYChVl-gpmuO=pP`;Nt}$fl$mvSP-~fyDSJ$)h|V7O$pgdSlqbCnS)_7$($nJ)rO^HY4J|tv-JqCO zGo~`3FuhEx(xFk6UQ$&r#4`e>Po681c}u2cdA=ttt2i>!KB3mCP*9gT^7{2OYq>vQ zeb1gsrBddOh@{m*!qf>MwWZ#eE;FZN$1!=FOj(?w$CXL_Kq4aAQLGgOU5*`eL}hw2 zyBJ=V1j??+;@0FI&B%3AOf`Yqq#3;tZ#uL$(rUF)GL +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +#define __PYX_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__kivyblocks__blocks +#define __PYX_HAVE_API__kivyblocks__blocks +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "kivyblocks\\blocks.pyx", +}; + +/*--- Type declarations ---*/ +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction; +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction; +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild; +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById; +struct __pyx_defaults; +typedef struct __pyx_defaults __pyx_defaults; +struct __pyx_defaults1; +typedef struct __pyx_defaults1 __pyx_defaults1; +struct __pyx_defaults2; +typedef struct __pyx_defaults2 __pyx_defaults2; +struct __pyx_defaults3; +typedef struct __pyx_defaults3 __pyx_defaults3; +struct __pyx_defaults4; +typedef struct __pyx_defaults4 __pyx_defaults4; +struct __pyx_defaults { + PyObject *__pyx_arg_params; + PyObject *__pyx_arg_files; +}; +struct __pyx_defaults1 { + PyObject *__pyx_arg_localnamespace; +}; +struct __pyx_defaults2 { + PyObject *__pyx_arg_localnamespace; +}; +struct __pyx_defaults3 { + PyObject *__pyx_arg_localnamespace; +}; +struct __pyx_defaults4 { + PyObject *__pyx_arg_localnamespace; +}; + +/* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction { + PyObject_HEAD + PyObject *__pyx_v_desc; +}; + + +/* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction { + PyObject_HEAD + PyObject *__pyx_v_desc; +}; + + +/* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild { + PyObject_HEAD + PyObject *__pyx_v_self; +}; + + +/* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ +struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById { + PyObject_HEAD + PyObject *__pyx_v_find_widget_by_id; +}; + + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* Globals.proto */ +static PyObject* __Pyx_Globals(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod1.proto */ +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* bytes_tailmatch.proto */ +static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, + Py_ssize_t start, Py_ssize_t end, int direction); +static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction); + +/* unicode_tailmatch.proto */ +static int __Pyx_PyUnicode_Tailmatch( + PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); + +/* str_tailmatch.proto */ +static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, + Py_ssize_t end, int direction); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return __Pyx_PyObject_GetAttrStr(obj, attr_name); +#endif + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#else +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ + (likely(is_tuple || PyTuple_Check(tuple)) ?\ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ + (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* MergeKeywords.proto */ +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* py_dict_items.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallUnboundCMethod0.proto */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CallUnboundCMethod0(cfunc, self)\ + (likely((cfunc)->func) ?\ + (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ + (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ + (PY_VERSION_HEX >= 0x030700A0 ?\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)) +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif PY_MAJOR_VERSION < 3 + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/* CythonFunction.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) +static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* ClassMethod.proto */ +#include "descrobject.h" +static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* Print.proto */ +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* PrintOne.proto */ +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CStringEquals.proto */ +static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'kivyblocks.blocks' */ +static PyTypeObject *__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct__blocksAction = 0; +static PyTypeObject *__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction = 0; +static PyTypeObject *__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild = 0; +static PyTypeObject *__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById = 0; +#define __Pyx_MODULE_NAME "kivyblocks.blocks" +extern int __pyx_module_is_main_kivyblocks__blocks; +int __pyx_module_is_main_kivyblocks__blocks = 0; + +/* Implementation of 'kivyblocks.blocks' */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_eval; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_enumerate; +static const char __pyx_k_[] = ":"; +static const char __pyx_k_a[] = "a"; +static const char __pyx_k_b[] = "b"; +static const char __pyx_k_c[] = "c"; +static const char __pyx_k_d[] = "d"; +static const char __pyx_k_e[] = "e"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_g[] = "g"; +static const char __pyx_k_i[] = "i"; +static const char __pyx_k_k[] = "k"; +static const char __pyx_k_l[] = "l"; +static const char __pyx_k_m[] = "m"; +static const char __pyx_k_o[] = "o"; +static const char __pyx_k_p[] = "p"; +static const char __pyx_k_r[] = "r"; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k_t[] = "t"; +static const char __pyx_k_v[] = "v"; +static const char __pyx_k_w[] = "w"; +static const char __pyx_k__4[] = ""; +static const char __pyx_k__8[] = "."; +static const char __pyx_k_aw[] = "aw"; +static const char __pyx_k_dg[] = "dg"; +static const char __pyx_k_dp[] = "dp"; +static const char __pyx_k_hc[] = "hc"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_kw[] = "kw"; +static const char __pyx_k_mm[] = "mm"; +static const char __pyx_k_ns[] = "ns"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_py[] = "py::"; +static const char __pyx_k_rf[] = "rf"; +static const char __pyx_k_rt[] = "rt"; +static const char __pyx_k_sp[] = "sp"; +static const char __pyx_k_sw[] = "sw"; +static const char __pyx_k_App[] = "App"; +static const char __pyx_k_GET[] = "GET"; +static const char __pyx_k__24[] = "-"; +static const char __pyx_k__28[] = "*"; +static const char __pyx_k_app[] = "app."; +static const char __pyx_k_arr[] = "arr"; +static const char __pyx_k_dic[] = "dic"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_end[] = "end"; +static const char __pyx_k_env[] = "env"; +static const char __pyx_k_fid[] = "fid"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_ids[] = "ids"; +static const char __pyx_k_obj[] = "obj"; +static const char __pyx_k_pos[] = "pos"; +static const char __pyx_k_ret[] = "ret="; +static const char __pyx_k_set[] = "set"; +static const char __pyx_k_str[] = "__str__"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_url[] = "url"; +static const char __pyx_k_wid[] = "wid"; +static const char __pyx_k_Form[] = "Form"; +static const char __pyx_k_Tree[] = "Tree"; +static const char __pyx_k_args[] = "args"; +static const char __pyx_k_bind[] = "bind"; +static const char __pyx_k_copy[] = "copy"; +static const char __pyx_k_data[] = "data"; +static const char __pyx_k_desc[] = "desc"; +static const char __pyx_k_dict[] = "dict"; +static const char __pyx_k_doit[] = "doit"; +static const char __pyx_k_eval[] = "eval"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_expr[] = "__expr__"; +static const char __pyx_k_file[] = "file://"; +static const char __pyx_k_form[] = "form"; +static const char __pyx_k_func[] = "func"; +static const char __pyx_k_http[] = "http://"; +static const char __pyx_k_info[] = "info"; +static const char __pyx_k_init[] = "__init__"; +static const char __pyx_k_json[] = "json"; +static const char __pyx_k_kivy[] = "kivy"; +static const char __pyx_k_list[] = "list"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mode[] = "mode"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_open[] = "open"; +static const char __pyx_k_opts[] = "opts"; +static const char __pyx_k_read[] = "read"; +static const char __pyx_k_resp[] = "resp"; +static const char __pyx_k_root[] = "root."; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_tree[] = "tree"; +static const char __pyx_k_Error[] = "Error:"; +static const char __pyx_k_Video[] = "Video"; +static const char __pyx_k_addon[] = "addon"; +static const char __pyx_k_alert[] = "alert"; +static const char __pyx_k_app_2[] = "app"; +static const char __pyx_k_binds[] = "binds"; +static const char __pyx_k_desc1[] = "desc1"; +static const char __pyx_k_doerr[] = "doerr"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_error[] = "error"; +static const char __pyx_k_event[] = "event"; +static const char __pyx_k_files[] = "files"; +static const char __pyx_k_https[] = "https://"; +static const char __pyx_k_idstr[] = "idstr"; +static const char __pyx_k_items[] = "items"; +static const char __pyx_k_klass[] = "klass"; +static const char __pyx_k_kname[] = "kname"; +static const char __pyx_k_loads[] = "loads"; +static const char __pyx_k_mname[] = "mname"; +static const char __pyx_k_print[] = "print"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_ready[] = "ready"; +static const char __pyx_k_ret_2[] = "ret"; +static const char __pyx_k_split[] = "split"; +static const char __pyx_k_str_2[] = "str"; +static const char __pyx_k_super[] = "super"; +static const char __pyx_k_title[] = "title"; +static const char __pyx_k_ujson[] = "ujson"; +static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_utils[] = "utils"; +static const char __pyx_k_Blocks[] = "Blocks"; +static const char __pyx_k_Config[] = "Config"; +static const char __pyx_k_Layout[] = "Layout"; +static const char __pyx_k_Logger[] = "Logger"; +static const char __pyx_k_Widget[] = "Widget"; +static const char __pyx_k_Window[] = "Window"; +static const char __pyx_k_blocks[] = "blocks"; +static const char __pyx_k_codecs[] = "codecs"; +static const char __pyx_k_config[] = "config"; +static const char __pyx_k_extend[] = "extend"; +static const char __pyx_k_file_2[] = "file"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_kwargs[] = "kwargs"; +static const char __pyx_k_method[] = "method"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_mydesc[] = "mydesc"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_params[] = "params"; +static const char __pyx_k_parent[] = "parent"; +static const char __pyx_k_return[] = "return"; +static const char __pyx_k_rfname[] = "rfname"; +static const char __pyx_k_root_2[] = "root"; +static const char __pyx_k_rtdata[] = "rtdata"; +static const char __pyx_k_rtdesc[] = "rtdesc"; +static const char __pyx_k_script[] = "script="; +static const char __pyx_k_self_2[] = "/self"; +static const char __pyx_k_target[] = "target"; +static const char __pyx_k_uihome[] = "uihome"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_widget[] = "widget"; +static const char __pyx_k_Conform[] = "Conform"; +static const char __pyx_k_Factory[] = "Factory"; +static const char __pyx_k_VPlayer[] = "VPlayer"; +static const char __pyx_k_actions[] = "actions"; +static const char __pyx_k_acttype[] = "acttype"; +static const char __pyx_k_conform[] = "conform"; +static const char __pyx_k_errback[] = "errback"; +static const char __pyx_k_error_2[] = " error"; +static const char __pyx_k_options[] = "options"; +static const char __pyx_k_partial[] = "partial"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_replace[] = "replace"; +static const char __pyx_k_to_dict[] = "to_dict"; +static const char __pyx_k_toolbar[] = "toolbar"; +static const char __pyx_k_vplayer[] = "vplayer"; +static const char __pyx_k_w_build[] = "w_build"; +static const char __pyx_k_DataGrid[] = "DataGrid"; +static const char __pyx_k_InputBox[] = "InputBox"; +static const char __pyx_k_TextTree[] = "TextTree"; +static const char __pyx_k_add_mode[] = "add_mode"; +static const char __pyx_k_argument[] = "argument"; +static const char __pyx_k_callback[] = "callback"; +static const char __pyx_k_children[] = "children"; +static const char __pyx_k_dispatch[] = "dispatch"; +static const char __pyx_k_excludes[] = "excludes"; +static const char __pyx_k_filename[] = "filename"; +static const char __pyx_k_getValue[] = "getValue"; +static const char __pyx_k_kivy_app[] = "kivy.app"; +static const char __pyx_k_miss_url[] = "miss url"; +static const char __pyx_k_multiple[] = "multiple"; +static const char __pyx_k_new_desc[] = "new_desc"; +static const char __pyx_k_newvideo[] = "newvideo"; +static const char __pyx_k_on_built[] = "on_built"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_register[] = "register"; +static const char __pyx_k_script_2[] = "script"; +static const char __pyx_k_widget_2[] = "widget="; +static const char __pyx_k_Block_s_s[] = "Block: %s %s"; +static const char __pyx_k_BoxViewer[] = "BoxViewer"; +static const char __pyx_k_Exception[] = "Exception .... "; +static const char __pyx_k_GlobalEnv[] = "GlobalEnv"; +static const char __pyx_k_action_id[] = "action_id"; +static const char __pyx_k_boxViewer[] = "boxViewer"; +static const char __pyx_k_buildBind[] = "buildBind"; +static const char __pyx_k_classname[] = "__classname__"; +static const char __pyx_k_datacript[] = "datacript"; +static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_forbidens[] = "forbidens"; +static const char __pyx_k_fs_widget[] = "fs_widget"; +static const char __pyx_k_functools[] = "functools"; +static const char __pyx_k_getConfig[] = "getConfig"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_not_found[] = "not found ...."; +static const char __pyx_k_on_failed[] = "on_failed"; +static const char __pyx_k_print_exc[] = "print_exc"; +static const char __pyx_k_traceback[] = "traceback"; +static const char __pyx_k_uniaction[] = "uniaction"; +static const char __pyx_k_urlwidget[] = "urlwidget"; +static const char __pyx_k_valueExpr[] = "valueExpr"; +static const char __pyx_k_widget_id[] = "widget_id"; +static const char __pyx_k_Blocks_set[] = "Blocks.set"; +static const char __pyx_k_DictObject[] = "DictObject"; +static const char __pyx_k_HttpClient[] = "HttpClient"; +static const char __pyx_k_WindowBase[] = "WindowBase"; +static const char __pyx_k_actiontype[] = "actiontype"; +static const char __pyx_k_add_widget[] = "add_widget"; +static const char __pyx_k_baseWidget[] = "baseWidget"; +static const char __pyx_k_build_desc[] = "build_desc"; +static const char __pyx_k_build_rest[] = "build_rest"; +static const char __pyx_k_datakwargs[] = "datakwargs"; +static const char __pyx_k_datamethod[] = "datamethod"; +static const char __pyx_k_datascript[] = "datascript"; +static const char __pyx_k_datawidget[] = "datawidget"; +static const char __pyx_k_dictExtend[] = "dictExtend"; +static const char __pyx_k_fullscreen[] = "fullscreen"; +static const char __pyx_k_getUrlData[] = "getUrlData"; +static const char __pyx_k_get_rtdata[] = "get_rtdata"; +static const char __pyx_k_get_target[] = "get_target"; +static const char __pyx_k_keyMapping[] = "keyMapping"; +static const char __pyx_k_keymapping[] = "keymapping"; +static const char __pyx_k_on_conform[] = "on_conform"; +static const char __pyx_k_startswith[] = "startswith"; +static const char __pyx_k_subwidgets[] = "subwidgets"; +static const char __pyx_k_threadcall[] = "threadcall"; +static const char __pyx_k_widgettype[] = "widgettype"; +static const char __pyx_k_Blocks_eval[] = "Blocks.eval"; +static const char __pyx_k_ProgramPath[] = "ProgramPath"; +static const char __pyx_k_buildAction[] = "buildAction"; +static const char __pyx_k_eventAction[] = "eventAction"; +static const char __pyx_k_from_widget[] = "from_widget"; +static const char __pyx_k_kivy_config[] = "kivy.config"; +static const char __pyx_k_kivy_logger[] = "kivy.logger"; +static const char __pyx_k_url_is_None[] = "url is None"; +static const char __pyx_k_widgetBuild[] = "widgetBuild"; +static const char __pyx_k_widgetClass[] = "widgetClass"; +static const char __pyx_k_widget_name[] = "widget_name"; +static const char __pyx_k_blocksAction[] = "blocksAction"; +static const char __pyx_k_build_rtdesc[] = "build_rtdesc"; +static const char __pyx_k_conform_desc[] = "conform_desc"; +static const char __pyx_k_kivy_factory[] = "kivy.factory"; +static const char __pyx_k_kivy_metrics[] = "kivy.metrics"; +static const char __pyx_k_methodAction[] = "methodAction"; +static const char __pyx_k_scriptAction[] = "scriptAction"; +static const char __pyx_k_strValueExpr[] = "strValueExpr"; +static const char __pyx_k_ArgumentError[] = "ArgumentError"; +static const char __pyx_k_Blocks___init[] = "Blocks.__init__"; +static const char __pyx_k_StrSearchForm[] = "StrSearchForm"; +static const char __pyx_k_clear_widgets[] = "clear_widgets"; +static const char __pyx_k_dictValueExpr[] = "dictValueExpr"; +static const char __pyx_k_getActionData[] = "getActionData"; +static const char __pyx_k_getWidgetById[] = "getWidgetById"; +static const char __pyx_k_Blocks_w_build[] = "Blocks.w_build"; +static const char __pyx_k_arrayValueExpr[] = "arrayValueExpr"; +static const char __pyx_k_conform_action[] = "conform_action"; +static const char __pyx_k_dispatch_event[] = "dispatch_event"; +static const char __pyx_k_kivy_uix_video[] = "kivy.uix.video"; +static const char __pyx_k_localnamespace[] = "localnamespace"; +static const char __pyx_k_multipleAction[] = "multipleAction"; +static const char __pyx_k_registerWidget[] = "registerWidget"; +static const char __pyx_k_BGColorBehavior[] = "BGColorBehavior"; +static const char __pyx_k_Blocks_on_built[] = "Blocks.on_built"; +static const char __pyx_k_BooleanProperty[] = "BooleanProperty"; +static const char __pyx_k_EventDispatcher[] = "EventDispatcher"; +static const char __pyx_k_NotExistsObject[] = "NotExistsObject"; +static const char __pyx_k_bgcolorbehavior[] = "bgcolorbehavior"; +static const char __pyx_k_get_running_app[] = "get_running_app"; +static const char __pyx_k_kivy_properties[] = "kivy.properties"; +static const char __pyx_k_kivy_uix_widget[] = "kivy.uix.widget"; +static const char __pyx_k_register_widget[] = "register_widget"; +static const char __pyx_k_subwidget_total[] = "subwidget_total"; +static const char __pyx_k_urlwidgetAction[] = "urlwidgetAction"; +static const char __pyx_k_Blocks_buildBind[] = "Blocks.buildBind"; +static const char __pyx_k_Blocks_on_failed[] = "Blocks.on_failed"; +static const char __pyx_k_Blocks_uniaction[] = "Blocks.uniaction"; +static const char __pyx_k_Blocks_valueExpr[] = "Blocks.valueExpr"; +static const char __pyx_k_RegisterFunction[] = "RegisterFunction"; +static const char __pyx_k_build_attributes[] = "build_attributes"; +static const char __pyx_k_contructon_error[] = "contructon error"; +static const char __pyx_k_kivy_core_window[] = "kivy.core.window"; +static const char __pyx_k_registedfunction[] = "registedfunction"; +static const char __pyx_k_Blocks_build_rest[] = "Blocks.build_rest"; +static const char __pyx_k_Blocks_getUrlData[] = "Blocks.getUrlData"; +static const char __pyx_k_Blocks_get_rtdata[] = "Blocks.get_rtdata"; +static const char __pyx_k_Blocks_get_target[] = "Blocks.get_target"; +static const char __pyx_k_NotRegistedWidget[] = "NotRegistedWidget"; +static const char __pyx_k_OrientationLayout[] = "OrientationLayout"; +static const char __pyx_k_ServerImageViewer[] = "ServerImageViewer"; +static const char __pyx_k_appPublic_dictExt[] = "appPublic.dictExt"; +static const char __pyx_k_find_widget_by_id[] = "find_widget_by_id"; +static const char __pyx_k_kivyblocks_blocks[] = "kivyblocks.blocks"; +static const char __pyx_k_orientationlayout[] = "orientationlayout"; +static const char __pyx_k_serverImageViewer[] = "serverImageViewer"; +static const char __pyx_k_Blocks_buildAction[] = "Blocks.buildAction"; +static const char __pyx_k_Blocks_eventAction[] = "Blocks.eventAction"; +static const char __pyx_k_Blocks_widgetBuild[] = "Blocks.widgetBuild"; +static const char __pyx_k_SingletonDecorator[] = "SingletonDecorator"; +static const char __pyx_k_WidgetNotFoundById[] = "WidgetNotFoundById"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_rfname_s_not_found[] = "rfname(%s) not found"; +static const char __pyx_k_s_method_not_found[] = "%s method not found"; +static const char __pyx_k_ArgumentError___str[] = "ArgumentError.__str__"; +static const char __pyx_k_Blocks_blocksAction[] = "Blocks.blocksAction"; +static const char __pyx_k_Blocks_build_rtdesc[] = "Blocks.build_rtdesc"; +static const char __pyx_k_Blocks_methodAction[] = "Blocks.methodAction"; +static const char __pyx_k_Blocks_scriptAction[] = "Blocks.scriptAction"; +static const char __pyx_k_Blocks_strValueExpr[] = "Blocks.strValueExpr"; +static const char __pyx_k_ClassMethodNotFound[] = "ClassMethodNotFound"; +static const char __pyx_k_appPublic_Singleton[] = "appPublic.Singleton"; +static const char __pyx_k_argument_s_missed_s[] = "argument(%s) missed:%s"; +static const char __pyx_k_not_exists_widget_s[] = "not exists widget(%s)"; +static const char __pyx_k_register_event_type[] = "register_event_type"; +static const char __pyx_k_ArgumentError___expr[] = "ArgumentError.__expr__"; +static const char __pyx_k_ArgumentError___init[] = "ArgumentError.__init__"; +static const char __pyx_k_Blocks_dictValueExpr[] = "Blocks.dictValueExpr"; +static const char __pyx_k_Blocks_getActionData[] = "Blocks.getActionData"; +static const char __pyx_k_Blocks_getWidgetById[] = "Blocks.getWidgetById"; +static const char __pyx_k_actiontype_s_invalid[] = "actiontype(%s) invalid"; +static const char __pyx_k_appPublic_dictObject[] = "appPublic.dictObject"; +static const char __pyx_k_find_widget_by_id_id[] = "find_widget_by_id(), id="; +static const char __pyx_k_get_rtdata_w_is_None[] = "get_rtdata():w is None"; +static const char __pyx_k_Blocks_arrayValueExpr[] = "Blocks.arrayValueExpr"; +static const char __pyx_k_Blocks_conform_action[] = "Blocks.conform_action"; +static const char __pyx_k_Blocks_multipleAction[] = "Blocks.multipleAction"; +static const char __pyx_k_NotExistsObject___str[] = "NotExistsObject.__str__"; +static const char __pyx_k_appPublic_datamapping[] = "appPublic.datamapping"; +static const char __pyx_k_appPublic_folderUtils[] = "appPublic.folderUtils"; +static const char __pyx_k_kivyblocks_blocks_pyx[] = "kivyblocks\\blocks.pyx"; +static const char __pyx_k_not_reigsted_widget_s[] = "not reigsted widget(%s)"; +static const char __pyx_k_Blocks_register_widget[] = "Blocks.register_widget"; +static const char __pyx_k_Blocks_urlwidgetAction[] = "Blocks.urlwidgetAction"; +static const char __pyx_k_NotExistsObject___expr[] = "NotExistsObject.__expr__"; +static const char __pyx_k_NotExistsObject___init[] = "NotExistsObject.__init__"; +static const char __pyx_k_Widget_not_found_by_id[] = "Widget not found by id:"; +static const char __pyx_k_registedfunctionAction[] = "registedfunctionAction"; +static const char __pyx_k_Blocks_build_attributes[] = "Blocks.build_attributes"; +static const char __pyx_k_NotRegistedWidget___str[] = "NotRegistedWidget.__str__"; +static const char __pyx_k_get_rtdata_desc_is_None[] = "get_rtdata():desc is None"; +static const char __pyx_k_NotRegistedWidget___expr[] = "NotRegistedWidget.__expr__"; +static const char __pyx_k_NotRegistedWidget___init[] = "NotRegistedWidget.__init__"; +static const char __pyx_k_WidgetNotFoundById___str[] = "WidgetNotFoundById.__str__"; +static const char __pyx_k_ClassMethodNotFound___str[] = "ClassMethodNotFound.__str__"; +static const char __pyx_k_WidgetNotFoundById___expr[] = "WidgetNotFoundById.__expr__"; +static const char __pyx_k_WidgetNotFoundById___init[] = "WidgetNotFoundById.__init__"; +static const char __pyx_k_get_rtdata_method_is_None[] = "get_rtdata():method is None"; +static const char __pyx_k_Block_eventAction_dispatch[] = "Block: eventAction():dispatch "; +static const char __pyx_k_Block_w_build_desc_invalid[] = "Block: w_build(), desc invalid"; +static const char __pyx_k_ClassMethodNotFound___expr[] = "ClassMethodNotFound.__expr__"; +static const char __pyx_k_ClassMethodNotFound___init[] = "ClassMethodNotFound.__init__"; +static const char __pyx_k_appPublic_registerfunction[] = "appPublic.registerfunction"; +static const char __pyx_k_Block_get_a_null_function_s[] = "Block: get a null function,%s"; +static const char __pyx_k_widget_id_s_can_not_contain[] = "widget id(%s) can not contain \".\""; +static const char __pyx_k_Block_uniaction_called_desc_s[] = "Block: uniaction() called, desc=%s"; +static const char __pyx_k_Blocks_registedfunctionAction[] = "Blocks.registedfunctionAction"; +static const char __pyx_k_Method_s_not_found_in_class_s[] = "Method(%s) not found in class(%s)"; +static const char __pyx_k_Blocks_widgetBuild_locals_doit[] = "Blocks.widgetBuild..doit"; +static const char __pyx_k_Block_desc_s_rfname_s_not_found[] = "Block: desc=%s rfname(%s) not found"; +static const char __pyx_k_Blocks_blocksAction_locals_doit[] = "Blocks.blocksAction..doit"; +static const char __pyx_k_get_rtdata_method_return_is_not[] = "get_rtdata():method return is not dict"; +static const char __pyx_k_Block2_desc_must_be_a_dict_objec[] = "Block2: desc must be a dict object"; +static const char __pyx_k_Block3_desc_must_be_a_dict_objec[] = "Block3: desc must be a dict object not None"; +static const char __pyx_k_Block_binds_desc_miss_event_desc[] = "Block: binds desc miss event, desc=%s"; +static const char __pyx_k_Block_blocksAction_desc_s_widget[] = "Block: blocksAction(): desc=%s widgetBuild error"; +static const char __pyx_k_Block_desc_s_must_be_a_dict_obje[] = "Block: desc(%s) must be a dict object(%s)"; +static const char __pyx_k_Block_eventAction_desc_s_miss_di[] = "Block: eventAction():desc(%s) miss dispatch_event"; +static const char __pyx_k_Block_methodAction_desc_s_method[] = "Block: methodAction():desc(%s) method not found"; +static const char __pyx_k_Block_methodAction_desc_s_target[] = "Block: methodAction():desc(%s) target not found"; +static const char __pyx_k_Block_scriptAction_desc_s_target[] = "Block: scriptAction():desc(%s) target not found"; +static const char __pyx_k_Block_urlwidgetAction_desc_s_wid[] = "Block: urlwidgetAction(): desc=%s widgetBuild error"; +static const char __pyx_k_Blocks_blocksAction_locals_doerr[] = "Blocks.blocksAction..doerr"; +static const char __pyx_k_Blocks_getWidgetById_locals_find[] = "Blocks.getWidgetById..find_widget_by_id"; +static const char __pyx_k_Blocks_urlwidgetAction_locals_do[] = "Blocks.urlwidgetAction..doit"; +static const char __pyx_k_not_found_via_Blocks_getWidgetBy[] = "not found via Blocks.getWidgetById()"; +static const char __pyx_k_widgetBuild1_desc_must_be_a_dict[] = "widgetBuild1: desc must be a dict object"; +static const char __pyx_k_Blocks_urlwidgetAction_locals_do_2[] = "Blocks.urlwidgetAction..doerr"; +static PyObject *__pyx_kp_s_; +static PyObject *__pyx_n_s_App; +static PyObject *__pyx_n_s_ArgumentError; +static PyObject *__pyx_n_s_ArgumentError___expr; +static PyObject *__pyx_n_s_ArgumentError___init; +static PyObject *__pyx_n_s_ArgumentError___str; +static PyObject *__pyx_n_s_BGColorBehavior; +static PyObject *__pyx_kp_s_Block2_desc_must_be_a_dict_objec; +static PyObject *__pyx_kp_s_Block3_desc_must_be_a_dict_objec; +static PyObject *__pyx_kp_s_Block_binds_desc_miss_event_desc; +static PyObject *__pyx_kp_s_Block_blocksAction_desc_s_widget; +static PyObject *__pyx_kp_s_Block_desc_s_must_be_a_dict_obje; +static PyObject *__pyx_kp_s_Block_desc_s_rfname_s_not_found; +static PyObject *__pyx_kp_s_Block_eventAction_desc_s_miss_di; +static PyObject *__pyx_kp_u_Block_eventAction_dispatch; +static PyObject *__pyx_kp_s_Block_get_a_null_function_s; +static PyObject *__pyx_kp_s_Block_methodAction_desc_s_method; +static PyObject *__pyx_kp_s_Block_methodAction_desc_s_target; +static PyObject *__pyx_kp_s_Block_s_s; +static PyObject *__pyx_kp_s_Block_scriptAction_desc_s_target; +static PyObject *__pyx_kp_s_Block_uniaction_called_desc_s; +static PyObject *__pyx_kp_s_Block_urlwidgetAction_desc_s_wid; +static PyObject *__pyx_kp_s_Block_w_build_desc_invalid; +static PyObject *__pyx_n_s_Blocks; +static PyObject *__pyx_n_s_Blocks___init; +static PyObject *__pyx_n_s_Blocks_arrayValueExpr; +static PyObject *__pyx_n_s_Blocks_blocksAction; +static PyObject *__pyx_n_s_Blocks_blocksAction_locals_doerr; +static PyObject *__pyx_n_s_Blocks_blocksAction_locals_doit; +static PyObject *__pyx_n_s_Blocks_buildAction; +static PyObject *__pyx_n_s_Blocks_buildBind; +static PyObject *__pyx_n_s_Blocks_build_attributes; +static PyObject *__pyx_n_s_Blocks_build_rest; +static PyObject *__pyx_n_s_Blocks_build_rtdesc; +static PyObject *__pyx_n_s_Blocks_conform_action; +static PyObject *__pyx_n_s_Blocks_dictValueExpr; +static PyObject *__pyx_n_s_Blocks_eval; +static PyObject *__pyx_n_s_Blocks_eventAction; +static PyObject *__pyx_n_s_Blocks_getActionData; +static PyObject *__pyx_n_s_Blocks_getUrlData; +static PyObject *__pyx_n_s_Blocks_getWidgetById; +static PyObject *__pyx_n_s_Blocks_getWidgetById_locals_find; +static PyObject *__pyx_n_s_Blocks_get_rtdata; +static PyObject *__pyx_n_s_Blocks_get_target; +static PyObject *__pyx_n_s_Blocks_methodAction; +static PyObject *__pyx_n_s_Blocks_multipleAction; +static PyObject *__pyx_n_s_Blocks_on_built; +static PyObject *__pyx_n_s_Blocks_on_failed; +static PyObject *__pyx_n_s_Blocks_registedfunctionAction; +static PyObject *__pyx_n_s_Blocks_register_widget; +static PyObject *__pyx_n_s_Blocks_scriptAction; +static PyObject *__pyx_n_s_Blocks_set; +static PyObject *__pyx_n_s_Blocks_strValueExpr; +static PyObject *__pyx_n_s_Blocks_uniaction; +static PyObject *__pyx_n_s_Blocks_urlwidgetAction; +static PyObject *__pyx_n_s_Blocks_urlwidgetAction_locals_do; +static PyObject *__pyx_n_s_Blocks_urlwidgetAction_locals_do_2; +static PyObject *__pyx_n_s_Blocks_valueExpr; +static PyObject *__pyx_n_s_Blocks_w_build; +static PyObject *__pyx_n_s_Blocks_widgetBuild; +static PyObject *__pyx_n_s_Blocks_widgetBuild_locals_doit; +static PyObject *__pyx_n_s_BooleanProperty; +static PyObject *__pyx_n_s_BoxViewer; +static PyObject *__pyx_n_s_ClassMethodNotFound; +static PyObject *__pyx_n_s_ClassMethodNotFound___expr; +static PyObject *__pyx_n_s_ClassMethodNotFound___init; +static PyObject *__pyx_n_s_ClassMethodNotFound___str; +static PyObject *__pyx_n_s_Config; +static PyObject *__pyx_n_s_Conform; +static PyObject *__pyx_n_s_DataGrid; +static PyObject *__pyx_n_s_DictObject; +static PyObject *__pyx_kp_s_Error; +static PyObject *__pyx_n_s_EventDispatcher; +static PyObject *__pyx_kp_s_Exception; +static PyObject *__pyx_n_s_Factory; +static PyObject *__pyx_n_s_Form; +static PyObject *__pyx_n_s_GET; +static PyObject *__pyx_n_s_GlobalEnv; +static PyObject *__pyx_n_s_HttpClient; +static PyObject *__pyx_n_s_InputBox; +static PyObject *__pyx_n_s_Layout; +static PyObject *__pyx_n_s_Logger; +static PyObject *__pyx_kp_s_Method_s_not_found_in_class_s; +static PyObject *__pyx_n_s_NotExistsObject; +static PyObject *__pyx_n_s_NotExistsObject___expr; +static PyObject *__pyx_n_s_NotExistsObject___init; +static PyObject *__pyx_n_s_NotExistsObject___str; +static PyObject *__pyx_n_s_NotRegistedWidget; +static PyObject *__pyx_n_s_NotRegistedWidget___expr; +static PyObject *__pyx_n_s_NotRegistedWidget___init; +static PyObject *__pyx_n_s_NotRegistedWidget___str; +static PyObject *__pyx_n_s_OrientationLayout; +static PyObject *__pyx_n_s_ProgramPath; +static PyObject *__pyx_n_s_RegisterFunction; +static PyObject *__pyx_n_s_ServerImageViewer; +static PyObject *__pyx_n_s_SingletonDecorator; +static PyObject *__pyx_n_s_StrSearchForm; +static PyObject *__pyx_n_s_TextTree; +static PyObject *__pyx_n_s_Tree; +static PyObject *__pyx_n_s_VPlayer; +static PyObject *__pyx_n_s_Video; +static PyObject *__pyx_n_s_Widget; +static PyObject *__pyx_n_s_WidgetNotFoundById; +static PyObject *__pyx_n_s_WidgetNotFoundById___expr; +static PyObject *__pyx_n_s_WidgetNotFoundById___init; +static PyObject *__pyx_n_s_WidgetNotFoundById___str; +static PyObject *__pyx_kp_s_Widget_not_found_by_id; +static PyObject *__pyx_n_s_Window; +static PyObject *__pyx_n_s_WindowBase; +static PyObject *__pyx_kp_s__24; +static PyObject *__pyx_n_s__28; +static PyObject *__pyx_kp_s__4; +static PyObject *__pyx_kp_s__8; +static PyObject *__pyx_n_s_a; +static PyObject *__pyx_n_s_action_id; +static PyObject *__pyx_n_s_actions; +static PyObject *__pyx_n_s_actiontype; +static PyObject *__pyx_kp_s_actiontype_s_invalid; +static PyObject *__pyx_n_s_acttype; +static PyObject *__pyx_n_s_add_mode; +static PyObject *__pyx_n_s_add_widget; +static PyObject *__pyx_n_s_addon; +static PyObject *__pyx_n_s_alert; +static PyObject *__pyx_kp_s_app; +static PyObject *__pyx_n_s_appPublic_Singleton; +static PyObject *__pyx_n_s_appPublic_datamapping; +static PyObject *__pyx_n_s_appPublic_dictExt; +static PyObject *__pyx_n_s_appPublic_dictObject; +static PyObject *__pyx_n_s_appPublic_folderUtils; +static PyObject *__pyx_n_s_appPublic_registerfunction; +static PyObject *__pyx_n_s_app_2; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_argument; +static PyObject *__pyx_kp_s_argument_s_missed_s; +static PyObject *__pyx_n_s_arr; +static PyObject *__pyx_n_s_arrayValueExpr; +static PyObject *__pyx_n_s_aw; +static PyObject *__pyx_n_s_b; +static PyObject *__pyx_n_s_baseWidget; +static PyObject *__pyx_n_s_bgcolorbehavior; +static PyObject *__pyx_n_s_bind; +static PyObject *__pyx_n_s_binds; +static PyObject *__pyx_n_s_blocks; +static PyObject *__pyx_n_s_blocksAction; +static PyObject *__pyx_n_s_boxViewer; +static PyObject *__pyx_n_s_buildAction; +static PyObject *__pyx_n_s_buildBind; +static PyObject *__pyx_n_s_build_attributes; +static PyObject *__pyx_n_s_build_desc; +static PyObject *__pyx_n_s_build_rest; +static PyObject *__pyx_n_s_build_rtdesc; +static PyObject *__pyx_n_s_c; +static PyObject *__pyx_n_s_callback; +static PyObject *__pyx_n_s_children; +static PyObject *__pyx_n_s_classname; +static PyObject *__pyx_n_s_clear_widgets; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_codecs; +static PyObject *__pyx_n_s_config; +static PyObject *__pyx_n_s_conform; +static PyObject *__pyx_n_s_conform_action; +static PyObject *__pyx_n_s_conform_desc; +static PyObject *__pyx_kp_s_contructon_error; +static PyObject *__pyx_n_s_copy; +static PyObject *__pyx_n_s_d; +static PyObject *__pyx_n_s_data; +static PyObject *__pyx_n_s_datacript; +static PyObject *__pyx_n_s_datakwargs; +static PyObject *__pyx_n_s_datamethod; +static PyObject *__pyx_n_s_datascript; +static PyObject *__pyx_n_s_datawidget; +static PyObject *__pyx_n_s_desc; +static PyObject *__pyx_n_s_desc1; +static PyObject *__pyx_n_s_dg; +static PyObject *__pyx_n_s_dic; +static PyObject *__pyx_n_u_dict; +static PyObject *__pyx_n_s_dictExtend; +static PyObject *__pyx_n_s_dictValueExpr; +static PyObject *__pyx_n_s_dispatch; +static PyObject *__pyx_n_s_dispatch_event; +static PyObject *__pyx_n_s_doc; +static PyObject *__pyx_n_s_doerr; +static PyObject *__pyx_n_s_doit; +static PyObject *__pyx_n_s_dp; +static PyObject *__pyx_n_s_e; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_enter; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_env; +static PyObject *__pyx_n_s_errback; +static PyObject *__pyx_n_s_error; +static PyObject *__pyx_kp_u_error_2; +static PyObject *__pyx_n_s_eval; +static PyObject *__pyx_n_s_event; +static PyObject *__pyx_n_s_eventAction; +static PyObject *__pyx_n_s_excludes; +static PyObject *__pyx_n_s_exit; +static PyObject *__pyx_n_s_expr; +static PyObject *__pyx_n_s_extend; +static PyObject *__pyx_n_s_f; +static PyObject *__pyx_n_s_fid; +static PyObject *__pyx_kp_s_file; +static PyObject *__pyx_n_s_file_2; +static PyObject *__pyx_n_s_filename; +static PyObject *__pyx_n_s_files; +static PyObject *__pyx_n_s_find_widget_by_id; +static PyObject *__pyx_kp_s_find_widget_by_id_id; +static PyObject *__pyx_n_s_forbidens; +static PyObject *__pyx_n_s_form; +static PyObject *__pyx_n_s_from_widget; +static PyObject *__pyx_n_s_fs_widget; +static PyObject *__pyx_n_s_fullscreen; +static PyObject *__pyx_n_s_func; +static PyObject *__pyx_n_s_functools; +static PyObject *__pyx_n_s_g; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_s_getActionData; +static PyObject *__pyx_n_s_getConfig; +static PyObject *__pyx_n_s_getUrlData; +static PyObject *__pyx_n_s_getValue; +static PyObject *__pyx_n_s_getWidgetById; +static PyObject *__pyx_n_s_get_rtdata; +static PyObject *__pyx_kp_s_get_rtdata_desc_is_None; +static PyObject *__pyx_kp_s_get_rtdata_method_is_None; +static PyObject *__pyx_kp_s_get_rtdata_method_return_is_not; +static PyObject *__pyx_kp_s_get_rtdata_w_is_None; +static PyObject *__pyx_n_s_get_running_app; +static PyObject *__pyx_n_s_get_target; +static PyObject *__pyx_n_s_hc; +static PyObject *__pyx_kp_s_http; +static PyObject *__pyx_kp_s_https; +static PyObject *__pyx_n_s_i; +static PyObject *__pyx_n_s_id; +static PyObject *__pyx_n_s_ids; +static PyObject *__pyx_n_s_idstr; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_info; +static PyObject *__pyx_n_s_init; +static PyObject *__pyx_n_s_items; +static PyObject *__pyx_n_s_json; +static PyObject *__pyx_n_s_k; +static PyObject *__pyx_n_s_keyMapping; +static PyObject *__pyx_n_s_keymapping; +static PyObject *__pyx_n_s_kivy; +static PyObject *__pyx_n_s_kivy_app; +static PyObject *__pyx_n_s_kivy_config; +static PyObject *__pyx_n_s_kivy_core_window; +static PyObject *__pyx_n_s_kivy_factory; +static PyObject *__pyx_n_s_kivy_logger; +static PyObject *__pyx_n_s_kivy_metrics; +static PyObject *__pyx_n_s_kivy_properties; +static PyObject *__pyx_n_s_kivy_uix_video; +static PyObject *__pyx_n_s_kivy_uix_widget; +static PyObject *__pyx_n_s_kivyblocks_blocks; +static PyObject *__pyx_kp_s_kivyblocks_blocks_pyx; +static PyObject *__pyx_n_s_klass; +static PyObject *__pyx_n_s_kname; +static PyObject *__pyx_n_s_kw; +static PyObject *__pyx_n_s_kwargs; +static PyObject *__pyx_n_s_l; +static PyObject *__pyx_n_u_list; +static PyObject *__pyx_n_s_loads; +static PyObject *__pyx_n_s_localnamespace; +static PyObject *__pyx_n_s_m; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_metaclass; +static PyObject *__pyx_n_s_method; +static PyObject *__pyx_n_s_methodAction; +static PyObject *__pyx_kp_s_miss_url; +static PyObject *__pyx_n_s_mm; +static PyObject *__pyx_n_s_mname; +static PyObject *__pyx_n_s_mode; +static PyObject *__pyx_n_s_module; +static PyObject *__pyx_n_s_multiple; +static PyObject *__pyx_n_s_multipleAction; +static PyObject *__pyx_n_s_mydesc; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_name_2; +static PyObject *__pyx_n_s_new_desc; +static PyObject *__pyx_n_s_newvideo; +static PyObject *__pyx_kp_s_not_exists_widget_s; +static PyObject *__pyx_kp_s_not_found; +static PyObject *__pyx_kp_s_not_found_via_Blocks_getWidgetBy; +static PyObject *__pyx_kp_s_not_reigsted_widget_s; +static PyObject *__pyx_n_s_ns; +static PyObject *__pyx_n_s_o; +static PyObject *__pyx_n_s_obj; +static PyObject *__pyx_n_s_on_built; +static PyObject *__pyx_n_s_on_conform; +static PyObject *__pyx_n_s_on_failed; +static PyObject *__pyx_n_s_open; +static PyObject *__pyx_n_s_options; +static PyObject *__pyx_n_s_opts; +static PyObject *__pyx_n_s_orientationlayout; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_p; +static PyObject *__pyx_n_s_params; +static PyObject *__pyx_n_s_parent; +static PyObject *__pyx_n_s_partial; +static PyObject *__pyx_n_s_pos; +static PyObject *__pyx_n_s_prepare; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_print_exc; +static PyObject *__pyx_kp_s_py; +static PyObject *__pyx_n_s_qualname; +static PyObject *__pyx_n_s_r; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_read; +static PyObject *__pyx_n_s_ready; +static PyObject *__pyx_n_s_registedfunction; +static PyObject *__pyx_n_s_registedfunctionAction; +static PyObject *__pyx_n_s_register; +static PyObject *__pyx_n_s_registerWidget; +static PyObject *__pyx_n_s_register_event_type; +static PyObject *__pyx_n_s_register_widget; +static PyObject *__pyx_n_s_replace; +static PyObject *__pyx_n_s_resp; +static PyObject *__pyx_kp_s_ret; +static PyObject *__pyx_n_s_ret_2; +static PyObject *__pyx_n_s_return; +static PyObject *__pyx_n_s_rf; +static PyObject *__pyx_n_s_rfname; +static PyObject *__pyx_kp_s_rfname_s_not_found; +static PyObject *__pyx_kp_s_root; +static PyObject *__pyx_n_s_root_2; +static PyObject *__pyx_n_s_rt; +static PyObject *__pyx_n_s_rtdata; +static PyObject *__pyx_n_s_rtdesc; +static PyObject *__pyx_n_s_s; +static PyObject *__pyx_kp_s_s_method_not_found; +static PyObject *__pyx_kp_s_script; +static PyObject *__pyx_n_s_scriptAction; +static PyObject *__pyx_n_s_script_2; +static PyObject *__pyx_n_s_self; +static PyObject *__pyx_kp_s_self_2; +static PyObject *__pyx_n_s_serverImageViewer; +static PyObject *__pyx_n_s_set; +static PyObject *__pyx_n_s_sp; +static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_startswith; +static PyObject *__pyx_n_s_str; +static PyObject *__pyx_n_s_strValueExpr; +static PyObject *__pyx_n_u_str_2; +static PyObject *__pyx_n_s_subwidget_total; +static PyObject *__pyx_n_s_subwidgets; +static PyObject *__pyx_n_s_super; +static PyObject *__pyx_n_s_sw; +static PyObject *__pyx_n_s_sys; +static PyObject *__pyx_n_s_t; +static PyObject *__pyx_n_s_target; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_threadcall; +static PyObject *__pyx_n_s_title; +static PyObject *__pyx_n_s_to_dict; +static PyObject *__pyx_n_s_toolbar; +static PyObject *__pyx_n_s_traceback; +static PyObject *__pyx_n_s_tree; +static PyObject *__pyx_n_s_uihome; +static PyObject *__pyx_n_s_ujson; +static PyObject *__pyx_n_s_uniaction; +static PyObject *__pyx_n_s_update; +static PyObject *__pyx_n_s_url; +static PyObject *__pyx_kp_s_url_is_None; +static PyObject *__pyx_n_s_urlwidget; +static PyObject *__pyx_n_s_urlwidgetAction; +static PyObject *__pyx_kp_s_utf_8; +static PyObject *__pyx_n_s_utils; +static PyObject *__pyx_n_s_v; +static PyObject *__pyx_n_s_valueExpr; +static PyObject *__pyx_n_s_vplayer; +static PyObject *__pyx_n_s_w; +static PyObject *__pyx_n_s_w_build; +static PyObject *__pyx_n_s_wid; +static PyObject *__pyx_n_s_widget; +static PyObject *__pyx_n_s_widgetBuild; +static PyObject *__pyx_kp_s_widgetBuild1_desc_must_be_a_dict; +static PyObject *__pyx_n_s_widgetClass; +static PyObject *__pyx_kp_s_widget_2; +static PyObject *__pyx_n_s_widget_id; +static PyObject *__pyx_kp_s_widget_id_s_can_not_contain; +static PyObject *__pyx_n_s_widget_name; +static PyObject *__pyx_n_s_widgettype; +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_m); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_argument, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_registerWidget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_2set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_v); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_4register_widget(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_6buildAction(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_8eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_l); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_10getUrlData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_url, PyObject *__pyx_v_method, PyObject *__pyx_v_params, PyObject *__pyx_v_files, CYTHON_UNUSED PyObject *__pyx_v_callback, PyObject *__pyx_v_errback, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12strValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_localnamespace); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_14arrayValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_localnamespace); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_16dictValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dic, PyObject *__pyx_v_localnamespace); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_18valueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_localnamespace); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_20w_build(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_22build_attributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_24build_rest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_26buildBind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_28multipleAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_30conform_action(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_32uniaction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_34eventAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_36get_target(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_add_mode, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_w); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_2doerr(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_e); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_38blocksAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_add_mode, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_w); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_2doerr(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_e); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_40urlwidgetAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_42getActionData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_44registedfunctionAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_46scriptAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_48build_rtdesc(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_50get_rtdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_52methodAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_11widgetBuild_doit(PyObject *__pyx_self, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_54widgetBuild(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_13getWidgetById_find_widget_by_id(PyObject *__pyx_self, PyObject *__pyx_v_id, PyObject *__pyx_v_from_widget); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_56getWidgetById(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_from_widget); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_58on_built(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_v); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_60on_failed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_e); /* proto */ +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_update = {0, &__pyx_n_s_update, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_split = {0, &__pyx_n_s_split, 0, 0, 0}; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_4; +static PyObject *__pyx_int_5; +static PyObject *__pyx_slice__6; +static PyObject *__pyx_slice__7; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_slice__25; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__23; +static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__39; +static PyObject *__pyx_tuple__41; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__51; +static PyObject *__pyx_tuple__53; +static PyObject *__pyx_tuple__55; +static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__59; +static PyObject *__pyx_tuple__61; +static PyObject *__pyx_tuple__63; +static PyObject *__pyx_tuple__65; +static PyObject *__pyx_tuple__67; +static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__71; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__83; +static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__86; +static PyObject *__pyx_tuple__88; +static PyObject *__pyx_tuple__89; +static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__95; +static PyObject *__pyx_tuple__97; +static PyObject *__pyx_tuple__99; +static PyObject *__pyx_tuple__101; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__111; +static PyObject *__pyx_tuple__113; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__121; +static PyObject *__pyx_tuple__122; +static PyObject *__pyx_tuple__124; +static PyObject *__pyx_tuple__125; +static PyObject *__pyx_tuple__127; +static PyObject *__pyx_codeobj__12; +static PyObject *__pyx_codeobj__14; +static PyObject *__pyx_codeobj__16; +static PyObject *__pyx_codeobj__18; +static PyObject *__pyx_codeobj__22; +static PyObject *__pyx_codeobj__27; +static PyObject *__pyx_codeobj__30; +static PyObject *__pyx_codeobj__32; +static PyObject *__pyx_codeobj__34; +static PyObject *__pyx_codeobj__36; +static PyObject *__pyx_codeobj__38; +static PyObject *__pyx_codeobj__40; +static PyObject *__pyx_codeobj__42; +static PyObject *__pyx_codeobj__44; +static PyObject *__pyx_codeobj__46; +static PyObject *__pyx_codeobj__48; +static PyObject *__pyx_codeobj__50; +static PyObject *__pyx_codeobj__52; +static PyObject *__pyx_codeobj__54; +static PyObject *__pyx_codeobj__56; +static PyObject *__pyx_codeobj__58; +static PyObject *__pyx_codeobj__60; +static PyObject *__pyx_codeobj__62; +static PyObject *__pyx_codeobj__64; +static PyObject *__pyx_codeobj__66; +static PyObject *__pyx_codeobj__68; +static PyObject *__pyx_codeobj__70; +static PyObject *__pyx_codeobj__72; +static PyObject *__pyx_codeobj__74; +static PyObject *__pyx_codeobj__76; +static PyObject *__pyx_codeobj__78; +static PyObject *__pyx_codeobj__80; +static PyObject *__pyx_codeobj__82; +static PyObject *__pyx_codeobj__84; +static PyObject *__pyx_codeobj__87; +static PyObject *__pyx_codeobj__90; +static PyObject *__pyx_codeobj__92; +static PyObject *__pyx_codeobj__94; +static PyObject *__pyx_codeobj__96; +static PyObject *__pyx_codeobj__98; +static PyObject *__pyx_codeobj__100; +static PyObject *__pyx_codeobj__102; +static PyObject *__pyx_codeobj__104; +static PyObject *__pyx_codeobj__106; +static PyObject *__pyx_codeobj__108; +static PyObject *__pyx_codeobj__110; +static PyObject *__pyx_codeobj__112; +static PyObject *__pyx_codeobj__114; +static PyObject *__pyx_codeobj__116; +static PyObject *__pyx_codeobj__118; +static PyObject *__pyx_codeobj__120; +static PyObject *__pyx_codeobj__123; +static PyObject *__pyx_codeobj__126; +/* Late includes */ + +/* "kivyblocks/blocks.pyx":42 + * + * class WidgetNotFoundById(Exception): + * def __init__(self, id): # <<<<<<<<<<<<<< + * super().__init__() + * self.idstr = id + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 42, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 42, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_id = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 42, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.WidgetNotFoundById.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById___init__(__pyx_self, __pyx_v_self, __pyx_v_id); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":43 + * class WidgetNotFoundById(Exception): + * def __init__(self, id): + * super().__init__() # <<<<<<<<<<<<<< + * self.idstr = id + * + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 43, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":44 + * def __init__(self, id): + * super().__init__() + * self.idstr = id # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_idstr, __pyx_v_id) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":42 + * + * class WidgetNotFoundById(Exception): + * def __init__(self, id): # <<<<<<<<<<<<<< + * super().__init__() + * self.idstr = id + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.WidgetNotFoundById.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":46 + * self.idstr = id + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "Widget not found by id:" + self.idstr + ':' + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_3__str__ = {"__str__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_3__str__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "kivyblocks/blocks.pyx":47 + * + * def __str__(self): + * return "Widget not found by id:" + self.idstr + ':' # <<<<<<<<<<<<<< + * + * def __expr__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(__pyx_kp_s_Widget_not_found_by_id, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":46 + * self.idstr = id + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "Widget not found by id:" + self.idstr + ':' + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.WidgetNotFoundById.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":49 + * return "Widget not found by id:" + self.idstr + ':' + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return str(self) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_5__expr__ = {"__expr__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_5__expr__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_18WidgetNotFoundById_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__expr__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_4__expr__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_18WidgetNotFoundById_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__expr__", 0); + + /* "kivyblocks/blocks.pyx":50 + * + * def __expr__(self): + * return str(self) # <<<<<<<<<<<<<< + * + * class ClassMethodNotFound(Exception): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":49 + * return "Widget not found by id:" + self.idstr + ':' + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return str(self) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("kivyblocks.blocks.WidgetNotFoundById.__expr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":53 + * + * class ClassMethodNotFound(Exception): + * def __init__(self,k,m): # <<<<<<<<<<<<<< + * super().__init__() + * self.kname = k + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_k = 0; + PyObject *__pyx_v_m = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_k,&__pyx_n_s_m,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 53, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 53, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 53, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_k = values[1]; + __pyx_v_m = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 53, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.ClassMethodNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound___init__(__pyx_self, __pyx_v_self, __pyx_v_k, __pyx_v_m); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_m) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":54 + * class ClassMethodNotFound(Exception): + * def __init__(self,k,m): + * super().__init__() # <<<<<<<<<<<<<< + * self.kname = k + * self.mname = m + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 54, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":55 + * def __init__(self,k,m): + * super().__init__() + * self.kname = k # <<<<<<<<<<<<<< + * self.mname = m + * + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kname, __pyx_v_k) < 0) __PYX_ERR(0, 55, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":56 + * super().__init__() + * self.kname = k + * self.mname = m # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mname, __pyx_v_m) < 0) __PYX_ERR(0, 56, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":53 + * + * class ClassMethodNotFound(Exception): + * def __init__(self,k,m): # <<<<<<<<<<<<<< + * super().__init__() + * self.kname = k + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ClassMethodNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":58 + * self.mname = m + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_3__str__ = {"__str__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_3__str__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "kivyblocks/blocks.pyx":59 + * + * def __str__(self): + * s = 'Method(%s) not found in class(%s)' % (self.mname, # <<<<<<<<<<<<<< + * str(self.kname.__classname__)) + * return s + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "kivyblocks/blocks.pyx":60 + * def __str__(self): + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) # <<<<<<<<<<<<<< + * return s + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_classname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":59 + * + * def __str__(self): + * s = 'Method(%s) not found in class(%s)' % (self.mname, # <<<<<<<<<<<<<< + * str(self.kname.__classname__)) + * return s + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Method_s_not_found_in_class_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_s = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":61 + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) + * return s # <<<<<<<<<<<<<< + * + * def __expr__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":58 + * self.mname = m + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ClassMethodNotFound.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":63 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_5__expr__ = {"__expr__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_5__expr__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_19ClassMethodNotFound_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__expr__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_4__expr__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_19ClassMethodNotFound_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__expr__", 0); + + /* "kivyblocks/blocks.pyx":64 + * + * def __expr__(self): + * return self.__str__() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":63 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ClassMethodNotFound.__expr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":68 + * + * class NotExistsObject(Exception): + * def __init__(self,name): # <<<<<<<<<<<<<< + * super().__init__() + * self.name = name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 68, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 68, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_name = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 68, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.NotExistsObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_15NotExistsObject___init__(__pyx_self, __pyx_v_self, __pyx_v_name); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":69 + * class NotExistsObject(Exception): + * def __init__(self,name): + * super().__init__() # <<<<<<<<<<<<<< + * self.name = name + * + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 69, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":70 + * def __init__(self,name): + * super().__init__() + * self.name = name # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":68 + * + * class NotExistsObject(Exception): + * def __init__(self,name): # <<<<<<<<<<<<<< + * super().__init__() + * self.name = name + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.NotExistsObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":72 + * self.name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not exists widget(%s)' % self.name + * return s + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_3__str__ = {"__str__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_3__str__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_15NotExistsObject_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "kivyblocks/blocks.pyx":73 + * + * def __str__(self): + * s = 'not exists widget(%s)' % self.name # <<<<<<<<<<<<<< + * return s + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_not_exists_widget_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_s = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":74 + * def __str__(self): + * s = 'not exists widget(%s)' % self.name + * return s # <<<<<<<<<<<<<< + * + * def __expr__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":72 + * self.name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not exists widget(%s)' % self.name + * return s + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.NotExistsObject.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":76 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_5__expr__ = {"__expr__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_5__expr__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_15NotExistsObject_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__expr__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_15NotExistsObject_4__expr__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_15NotExistsObject_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__expr__", 0); + + /* "kivyblocks/blocks.pyx":77 + * + * def __expr__(self): + * return self.__str__() # <<<<<<<<<<<<<< + * + * class ArgumentError(Exception): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":76 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.NotExistsObject.__expr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":80 + * + * class ArgumentError(Exception): + * def __init__(self,argument,desc): # <<<<<<<<<<<<<< + * super().__init__() + * self.argument = argument + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_13ArgumentError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_13ArgumentError_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_argument = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_argument,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_argument)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 80, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 80, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 80, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_argument = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 80, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.ArgumentError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_13ArgumentError___init__(__pyx_self, __pyx_v_self, __pyx_v_argument, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_argument, PyObject *__pyx_v_desc) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":81 + * class ArgumentError(Exception): + * def __init__(self,argument,desc): + * super().__init__() # <<<<<<<<<<<<<< + * self.argument = argument + * self.desc = desc + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 81, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":82 + * def __init__(self,argument,desc): + * super().__init__() + * self.argument = argument # <<<<<<<<<<<<<< + * self.desc = desc + * + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argument, __pyx_v_argument) < 0) __PYX_ERR(0, 82, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":83 + * super().__init__() + * self.argument = argument + * self.desc = desc # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_desc, __pyx_v_desc) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":80 + * + * class ArgumentError(Exception): + * def __init__(self,argument,desc): # <<<<<<<<<<<<<< + * super().__init__() + * self.argument = argument + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ArgumentError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":85 + * self.desc = desc + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) + * return s + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_13ArgumentError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_13ArgumentError_3__str__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_13ArgumentError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "kivyblocks/blocks.pyx":86 + * + * def __str__(self): + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) # <<<<<<<<<<<<<< + * return s + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_argument_s_missed_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_s = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":87 + * def __str__(self): + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) + * return s # <<<<<<<<<<<<<< + * + * def __expr__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":85 + * self.desc = desc + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) + * return s + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ArgumentError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":89 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_13ArgumentError_5__expr__ = {"__expr__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_13ArgumentError_5__expr__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_13ArgumentError_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__expr__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_13ArgumentError_4__expr__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_13ArgumentError_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__expr__", 0); + + /* "kivyblocks/blocks.pyx":90 + * + * def __expr__(self): + * return self.__str__() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":89 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.ArgumentError.__expr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":94 + * + * class NotRegistedWidget(Exception): + * def __init__(self, name:str): # <<<<<<<<<<<<<< + * super().__init__() + * self.widget_name = name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 94, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 94, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_name = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 94, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.NotRegistedWidget.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget___init__(__pyx_self, __pyx_v_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":95 + * class NotRegistedWidget(Exception): + * def __init__(self, name:str): + * super().__init__() # <<<<<<<<<<<<<< + * self.widget_name = name + * + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 95, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":96 + * def __init__(self, name:str): + * super().__init__() + * self.widget_name = name # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_widget_name, __pyx_v_name) < 0) __PYX_ERR(0, 96, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":94 + * + * class NotRegistedWidget(Exception): + * def __init__(self, name:str): # <<<<<<<<<<<<<< + * super().__init__() + * self.widget_name = name + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.NotRegistedWidget.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":98 + * self.widget_name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not reigsted widget(%s)' % self.name + * return s + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_3__str__ = {"__str__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_3__str__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "kivyblocks/blocks.pyx":99 + * + * def __str__(self): + * s = 'not reigsted widget(%s)' % self.name # <<<<<<<<<<<<<< + * return s + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_not_reigsted_widget_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_s = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":100 + * def __str__(self): + * s = 'not reigsted widget(%s)' % self.name + * return s # <<<<<<<<<<<<<< + * + * def __expr__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":98 + * self.widget_name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not reigsted widget(%s)' % self.name + * return s + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.NotRegistedWidget.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":102 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_5__expr__ = {"__expr__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_5__expr__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_17NotRegistedWidget_5__expr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__expr__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_4__expr__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_17NotRegistedWidget_4__expr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__expr__", 0); + + /* "kivyblocks/blocks.pyx":103 + * + * def __expr__(self): + * return self.__str__() # <<<<<<<<<<<<<< + * + * def registerWidget(name:str,widget): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":102 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.NotRegistedWidget.__expr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":105 + * return self.__str__() + * + * def registerWidget(name:str,widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_1registerWidget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_1registerWidget = {"registerWidget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_1registerWidget, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_1registerWidget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("registerWidget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("registerWidget", 1, 2, 2, 1); __PYX_ERR(0, 105, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "registerWidget") < 0)) __PYX_ERR(0, 105, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_name = ((PyObject*)values[0]); + __pyx_v_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("registerWidget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.registerWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_registerWidget(__pyx_self, __pyx_v_name, __pyx_v_widget); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_registerWidget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("registerWidget", 0); + + /* "kivyblocks/blocks.pyx":106 + * + * def registerWidget(name:str,widget): + * globals()[name] = widget # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_widget) < 0)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":105 + * return self.__str__() + * + * def registerWidget(name:str,widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("kivyblocks.blocks.registerWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":110 + * + * class Blocks(EventDispatcher): + * def __init__(self): # <<<<<<<<<<<<<< + * EventDispatcher.__init__(self) + * self.action_id = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_1__init__ = {"__init__", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_6Blocks_1__init__, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks___init__(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/blocks.pyx":111 + * class Blocks(EventDispatcher): + * def __init__(self): + * EventDispatcher.__init__(self) # <<<<<<<<<<<<<< + * self.action_id = 0 + * self.register_event_type('on_built') + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EventDispatcher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":112 + * def __init__(self): + * EventDispatcher.__init__(self) + * self.action_id = 0 # <<<<<<<<<<<<<< + * self.register_event_type('on_built') + * self.register_event_type('on_failed') + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_action_id, __pyx_int_0) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":113 + * EventDispatcher.__init__(self) + * self.action_id = 0 + * self.register_event_type('on_built') # <<<<<<<<<<<<<< + * self.register_event_type('on_failed') + * self.env = GlobalEnv() + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_register_event_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_on_built) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_on_built); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":114 + * self.action_id = 0 + * self.register_event_type('on_built') + * self.register_event_type('on_failed') # <<<<<<<<<<<<<< + * self.env = GlobalEnv() + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_register_event_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_on_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_on_failed); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":115 + * self.register_event_type('on_built') + * self.register_event_type('on_failed') + * self.env = GlobalEnv() # <<<<<<<<<<<<<< + * + * def set(self, k:str, v): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_GlobalEnv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_env, __pyx_t_1) < 0) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":110 + * + * class Blocks(EventDispatcher): + * def __init__(self): # <<<<<<<<<<<<<< + * EventDispatcher.__init__(self) + * self.action_id = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":117 + * self.env = GlobalEnv() + * + * def set(self, k:str, v): # <<<<<<<<<<<<<< + * self.env[k] = v + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_3set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_3set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_3set, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_3set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_k = 0; + PyObject *__pyx_v_v = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_k,&__pyx_n_s_v,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, 1); __PYX_ERR(0, 117, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, 2); __PYX_ERR(0, 117, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 117, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_k = ((PyObject*)values[1]); + __pyx_v_v = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_k), (&PyString_Type), 1, "k", 1))) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_2set(__pyx_self, __pyx_v_self, __pyx_v_k, __pyx_v_v); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_2set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("set", 0); + + /* "kivyblocks/blocks.pyx":118 + * + * def set(self, k:str, v): + * self.env[k] = v # <<<<<<<<<<<<<< + * + * def register_widget(self, name:str, widget:Widget): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_env); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":117 + * self.env = GlobalEnv() + * + * def set(self, k:str, v): # <<<<<<<<<<<<<< + * self.env[k] = v + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":120 + * self.env[k] = v + * + * def register_widget(self, name:str, widget:Widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_5register_widget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_5register_widget = {"register_widget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_5register_widget, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_5register_widget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("register_widget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_widget,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("register_widget", 1, 3, 3, 1); __PYX_ERR(0, 120, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("register_widget", 1, 3, 3, 2); __PYX_ERR(0, 120, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_widget") < 0)) __PYX_ERR(0, 120, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_name = ((PyObject*)values[1]); + __pyx_v_widget = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("register_widget", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 120, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.register_widget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_4register_widget(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_widget); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_4register_widget(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("register_widget", 0); + + /* "kivyblocks/blocks.pyx":121 + * + * def register_widget(self, name:str, widget:Widget): + * globals()[name] = widget # <<<<<<<<<<<<<< + * + * def buildAction(self, widget:Widget, desc): + */ + __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_widget) < 0)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":120 + * self.env[k] = v + * + * def register_widget(self, name:str, widget:Widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.register_widget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":123 + * globals()[name] = widget + * + * def buildAction(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_7buildAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_7buildAction = {"buildAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_7buildAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_7buildAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("buildAction (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("buildAction", 1, 3, 3, 1); __PYX_ERR(0, 123, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("buildAction", 1, 3, 3, 2); __PYX_ERR(0, 123, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "buildAction") < 0)) __PYX_ERR(0, 123, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("buildAction", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 123, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.buildAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_6buildAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_6buildAction(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc) { + PyObject *__pyx_v_conform_desc = NULL; + PyObject *__pyx_v_blocks = NULL; + PyObject *__pyx_v_func = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("buildAction", 0); + + /* "kivyblocks/blocks.pyx":124 + * + * def buildAction(self, widget:Widget, desc): + * conform_desc = desc.get('conform') # <<<<<<<<<<<<<< + * blocks = Blocks() + * if not conform_desc: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_conform) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_conform); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_conform_desc = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":125 + * def buildAction(self, widget:Widget, desc): + * conform_desc = desc.get('conform') + * blocks = Blocks() # <<<<<<<<<<<<<< + * if not conform_desc: + * return partial(blocks.uniaction, widget, desc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_blocks = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":126 + * conform_desc = desc.get('conform') + * blocks = Blocks() + * if not conform_desc: # <<<<<<<<<<<<<< + * return partial(blocks.uniaction, widget, desc) + * func =partial(blocks.conform_action,widget, desc) + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_conform_desc); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":127 + * blocks = Blocks() + * if not conform_desc: + * return partial(blocks.uniaction, widget, desc) # <<<<<<<<<<<<<< + * func =partial(blocks.conform_action,widget, desc) + * return func + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_uniaction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_desc); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":126 + * conform_desc = desc.get('conform') + * blocks = Blocks() + * if not conform_desc: # <<<<<<<<<<<<<< + * return partial(blocks.uniaction, widget, desc) + * func =partial(blocks.conform_action,widget, desc) + */ + } + + /* "kivyblocks/blocks.pyx":128 + * if not conform_desc: + * return partial(blocks.uniaction, widget, desc) + * func =partial(blocks.conform_action,widget, desc) # <<<<<<<<<<<<<< + * return func + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_conform_action); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_8); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_desc); + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_func = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":129 + * return partial(blocks.uniaction, widget, desc) + * func =partial(blocks.conform_action,widget, desc) + * return func # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func); + __pyx_r = __pyx_v_func; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":123 + * globals()[name] = widget + * + * def buildAction(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.buildAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_conform_desc); + __Pyx_XDECREF(__pyx_v_blocks); + __Pyx_XDECREF(__pyx_v_func); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":132 + * + * + * def eval(self, s:str, l:dict): # <<<<<<<<<<<<<< + * g = {} + * forbidens = [ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_9eval(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_9eval = {"eval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_9eval, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_9eval(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_s = 0; + PyObject *__pyx_v_l = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("eval (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_s,&__pyx_n_s_l,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("eval", 1, 3, 3, 1); __PYX_ERR(0, 132, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("eval", 1, 3, 3, 2); __PYX_ERR(0, 132, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "eval") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_s = ((PyObject*)values[1]); + __pyx_v_l = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("eval", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 132, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.eval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyString_Type), 1, "s", 1))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l), (&PyDict_Type), 1, "l", 1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_8eval(__pyx_self, __pyx_v_self, __pyx_v_s, __pyx_v_l); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_8eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_l) { + PyObject *__pyx_v_g = NULL; + PyObject *__pyx_v_forbidens = NULL; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_t_10; + __Pyx_RefNannySetupContext("eval", 0); + + /* "kivyblocks/blocks.pyx":133 + * + * def eval(self, s:str, l:dict): + * g = {} # <<<<<<<<<<<<<< + * forbidens = [ + * "os", + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_g = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":134 + * def eval(self, s:str, l:dict): + * g = {} + * forbidens = [ # <<<<<<<<<<<<<< + * "os", + * "sys", + */ + __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_os); + __Pyx_GIVEREF(__pyx_n_s_os); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_os); + __Pyx_INCREF(__pyx_n_s_sys); + __Pyx_GIVEREF(__pyx_n_s_sys); + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_sys); + __Pyx_INCREF(__pyx_n_s_codecs); + __Pyx_GIVEREF(__pyx_n_s_codecs); + PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_codecs); + __Pyx_INCREF(__pyx_n_s_json); + __Pyx_GIVEREF(__pyx_n_s_json); + PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_json); + __pyx_v_forbidens = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":141 + * ] + * + * for k,v in globals().copy().items(): # <<<<<<<<<<<<<< + * if k not in forbidens: + * g[k] = v + */ + __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 141, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 141, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 141, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 141, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":142 + * + * for k,v in globals().copy().items(): + * if k not in forbidens: # <<<<<<<<<<<<<< + * g[k] = v + * + */ + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_k, __pyx_v_forbidens, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_10 = (__pyx_t_9 != 0); + if (__pyx_t_10) { + + /* "kivyblocks/blocks.pyx":143 + * for k,v in globals().copy().items(): + * if k not in forbidens: + * g[k] = v # <<<<<<<<<<<<<< + * + * """ + */ + if (unlikely(PyDict_SetItem(__pyx_v_g, __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(0, 143, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":142 + * + * for k,v in globals().copy().items(): + * if k not in forbidens: # <<<<<<<<<<<<<< + * g[k] = v + * + */ + } + + /* "kivyblocks/blocks.pyx":141 + * ] + * + * for k,v in globals().copy().items(): # <<<<<<<<<<<<<< + * if k not in forbidens: + * g[k] = v + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":151 + * g['__builtins__']['open'] = None + * """ + * g.update(self.env) # <<<<<<<<<<<<<< + * return eval(s,g,l) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_env); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_g, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":152 + * """ + * g.update(self.env) + * return eval(s,g,l) # <<<<<<<<<<<<<< + * + * def getUrlData(self, url:str, method:str='GET', + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_s); + __Pyx_GIVEREF(__pyx_v_s); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s); + __Pyx_INCREF(__pyx_v_g); + __Pyx_GIVEREF(__pyx_v_g); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_g); + __Pyx_INCREF(__pyx_v_l); + __Pyx_GIVEREF(__pyx_v_l); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_l); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":132 + * + * + * def eval(self, s:str, l:dict): # <<<<<<<<<<<<<< + * g = {} + * forbidens = [ + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.eval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_g); + __Pyx_XDECREF(__pyx_v_forbidens); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":154 + * return eval(s,g,l) + * + * def getUrlData(self, url:str, method:str='GET', # <<<<<<<<<<<<<< + * params:dict={}, files:dict={}, + * callback=None, + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + + /* "kivyblocks/blocks.pyx":157 + * params:dict={}, files:dict={}, + * callback=None, + * errback=None,**kw): # <<<<<<<<<<<<<< + * + * if url is None: + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject*)__pyx_n_s_GET)); + __Pyx_GIVEREF(((PyObject*)__pyx_n_s_GET)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_n_s_GET)); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_params); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_params); + PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_params); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_files); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_files); + PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_files); + __Pyx_INCREF(((PyObject *)Py_None)); + __Pyx_GIVEREF(((PyObject *)Py_None)); + PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None)); + __Pyx_INCREF(((PyObject *)Py_None)); + __Pyx_GIVEREF(((PyObject *)Py_None)); + PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_None)); + + /* "kivyblocks/blocks.pyx":154 + * return eval(s,g,l) + * + * def getUrlData(self, url:str, method:str='GET', # <<<<<<<<<<<<<< + * params:dict={}, files:dict={}, + * callback=None, + */ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_11getUrlData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_11getUrlData = {"getUrlData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_11getUrlData, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_11getUrlData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_url = 0; + PyObject *__pyx_v_method = 0; + PyObject *__pyx_v_params = 0; + PyObject *__pyx_v_files = 0; + CYTHON_UNUSED PyObject *__pyx_v_callback = 0; + PyObject *__pyx_v_errback = 0; + PyObject *__pyx_v_kw = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getUrlData (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_url,&__pyx_n_s_method,&__pyx_n_s_params,&__pyx_n_s_files,&__pyx_n_s_callback,&__pyx_n_s_errback,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self); + values[2] = ((PyObject*)((PyObject*)__pyx_n_s_GET)); + values[3] = __pyx_dynamic_args->__pyx_arg_params; + values[4] = __pyx_dynamic_args->__pyx_arg_files; + values[5] = ((PyObject *)((PyObject *)Py_None)); + values[6] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_url)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getUrlData", 0, 2, 7, 1); __PYX_ERR(0, 154, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_params); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_files); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback); + if (value) { values[5] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errback); + if (value) { values[6] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "getUrlData") < 0)) __PYX_ERR(0, 154, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_url = ((PyObject*)values[1]); + __pyx_v_method = ((PyObject*)values[2]); + __pyx_v_params = ((PyObject*)values[3]); + __pyx_v_files = ((PyObject*)values[4]); + __pyx_v_callback = values[5]; + __pyx_v_errback = values[6]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getUrlData", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 154, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getUrlData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_url), (&PyString_Type), 1, "url", 1))) __PYX_ERR(0, 154, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method), (&PyString_Type), 1, "method", 1))) __PYX_ERR(0, 154, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), (&PyDict_Type), 1, "params", 1))) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_files), (&PyDict_Type), 1, "files", 1))) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_10getUrlData(__pyx_self, __pyx_v_self, __pyx_v_url, __pyx_v_method, __pyx_v_params, __pyx_v_files, __pyx_v_callback, __pyx_v_errback, __pyx_v_kw); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_10getUrlData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_url, PyObject *__pyx_v_method, PyObject *__pyx_v_params, PyObject *__pyx_v_files, CYTHON_UNUSED PyObject *__pyx_v_callback, PyObject *__pyx_v_errback, PyObject *__pyx_v_kw) { + PyObject *__pyx_v_filename = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_v_dic = NULL; + PyObject *__pyx_v_hc = NULL; + PyObject *__pyx_v_resp = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_config = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + __Pyx_RefNannySetupContext("getUrlData", 0); + __Pyx_INCREF(__pyx_v_url); + + /* "kivyblocks/blocks.pyx":159 + * errback=None,**kw): + * + * if url is None: # <<<<<<<<<<<<<< + * if errback: + * errback(None,Exception('url is None')) + */ + __pyx_t_1 = (__pyx_v_url == ((PyObject*)Py_None)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":160 + * + * if url is None: + * if errback: # <<<<<<<<<<<<<< + * errback(None,Exception('url is None')) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_errback); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 160, __pyx_L1_error) + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":161 + * if url is None: + * if errback: + * errback(None,Exception('url is None')) # <<<<<<<<<<<<<< + * else: + * return None + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_errback); + __pyx_t_5 = __pyx_v_errback; __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, Py_None, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, Py_None, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, Py_None); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":160 + * + * if url is None: + * if errback: # <<<<<<<<<<<<<< + * errback(None,Exception('url is None')) + * else: + */ + goto __pyx_L4; + } + + /* "kivyblocks/blocks.pyx":163 + * errback(None,Exception('url is None')) + * else: + * return None # <<<<<<<<<<<<<< + * + * if url.startswith('file://'): + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + } + __pyx_L4:; + + /* "kivyblocks/blocks.pyx":159 + * errback=None,**kw): + * + * if url is None: # <<<<<<<<<<<<<< + * if errback: + * errback(None,Exception('url is None')) + */ + } + + /* "kivyblocks/blocks.pyx":165 + * return None + * + * if url.startswith('file://'): # <<<<<<<<<<<<<< + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: + */ + if (unlikely(__pyx_v_url == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith"); + __PYX_ERR(0, 165, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_url, __pyx_kp_s_file, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L1_error) + if ((__pyx_t_2 != 0)) { + + /* "kivyblocks/blocks.pyx":166 + * + * if url.startswith('file://'): + * filename = url[7:] # <<<<<<<<<<<<<< + * with codecs.open(filename,'r','utf-8') as f: + * b = f.read() + */ + if (unlikely(__pyx_v_url == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 166, __pyx_L1_error) + } + __pyx_t_3 = PySequence_GetSlice(__pyx_v_url, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_filename = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":167 + * if url.startswith('file://'): + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: # <<<<<<<<<<<<<< + * b = f.read() + * dic = json.loads(b) + */ + /*with:*/ { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_codecs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_open); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_filename, __pyx_n_s_r, __pyx_kp_s_utf_8}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_filename, __pyx_n_s_r, __pyx_kp_s_utf_8}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_filename); + __Pyx_GIVEREF(__pyx_v_filename); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_filename); + __Pyx_INCREF(__pyx_n_s_r); + __Pyx_GIVEREF(__pyx_n_s_r); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_n_s_r); + __Pyx_INCREF(__pyx_kp_s_utf_8); + __Pyx_GIVEREF(__pyx_kp_s_utf_8); + PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_kp_s_utf_8); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 167, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + __pyx_v_f = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":168 + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: + * b = f.read() # <<<<<<<<<<<<<< + * dic = json.loads(b) + * return dic + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_b = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":169 + * with codecs.open(filename,'r','utf-8') as f: + * b = f.read() + * dic = json.loads(b) # <<<<<<<<<<<<<< + * return dic + * elif url.startswith('http://') or url.startswith('https://'): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loads); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_v_b) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_b); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_dic = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":170 + * b = f.read() + * dic = json.loads(b) + * return dic # <<<<<<<<<<<<<< + * elif url.startswith('http://') or url.startswith('https://'): + * try: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_dic); + __pyx_r = __pyx_v_dic; + goto __pyx_L14_try_return; + + /* "kivyblocks/blocks.pyx":167 + * if url.startswith('file://'): + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: # <<<<<<<<<<<<<< + * b = f.read() + * dic = json.loads(b) + */ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getUrlData", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 167, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 167, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_2 < 0) __PYX_ERR(0, 167, __pyx_L12_except_error) + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_8, __pyx_t_3); + __pyx_t_4 = 0; __pyx_t_8 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 167, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_9) { + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_12 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_9) { + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __pyx_r = __pyx_t_12; + __pyx_t_12 = 0; + goto __pyx_L0; + } + __pyx_L9:; + } + goto __pyx_L19; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L1_error; + __pyx_L19:; + } + + /* "kivyblocks/blocks.pyx":165 + * return None + * + * if url.startswith('file://'): # <<<<<<<<<<<<<< + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: + */ + goto __pyx_L5; + } + + /* "kivyblocks/blocks.pyx":171 + * dic = json.loads(b) + * return dic + * elif url.startswith('http://') or url.startswith('https://'): # <<<<<<<<<<<<<< + * try: + * hc = HttpClient() + */ + if (unlikely(__pyx_v_url == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith"); + __PYX_ERR(0, 171, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_url, __pyx_kp_s_http, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 171, __pyx_L1_error) + if (!(__pyx_t_2 != 0)) { + } else { + __pyx_t_1 = (__pyx_t_2 != 0); + goto __pyx_L20_bool_binop_done; + } + if (unlikely(__pyx_v_url == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith"); + __PYX_ERR(0, 171, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_url, __pyx_kp_s_https, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_L20_bool_binop_done:; + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":172 + * return dic + * elif url.startswith('http://') or url.startswith('https://'): + * try: # <<<<<<<<<<<<<< + * hc = HttpClient() + * resp=hc(url,method=method,params=params,files=files) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_12, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":173 + * elif url.startswith('http://') or url.startswith('https://'): + * try: + * hc = HttpClient() # <<<<<<<<<<<<<< + * resp=hc(url,method=method,params=params,files=files) + * # print('Blocks.py :resp=',resp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_HttpClient); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 173, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_hc = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":174 + * try: + * hc = HttpClient() + * resp=hc(url,method=method,params=params,files=files) # <<<<<<<<<<<<<< + * # print('Blocks.py :resp=',resp) + * return resp + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_url); + __Pyx_GIVEREF(__pyx_v_url); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_url); + __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_method, __pyx_v_method) < 0) __PYX_ERR(0, 174, __pyx_L22_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_params, __pyx_v_params) < 0) __PYX_ERR(0, 174, __pyx_L22_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_files, __pyx_v_files) < 0) __PYX_ERR(0, 174, __pyx_L22_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_hc, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_resp = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":176 + * resp=hc(url,method=method,params=params,files=files) + * # print('Blocks.py :resp=',resp) + * return resp # <<<<<<<<<<<<<< + * except Exception as e: + * print_exc() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_resp); + __pyx_r = __pyx_v_resp; + goto __pyx_L26_try_return; + + /* "kivyblocks/blocks.pyx":172 + * return dic + * elif url.startswith('http://') or url.startswith('https://'): + * try: # <<<<<<<<<<<<<< + * hc = HttpClient() + * resp=hc(url,method=method,params=params,files=files) + */ + } + __pyx_L22_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":177 + * # print('Blocks.py :resp=',resp) + * return resp + * except Exception as e: # <<<<<<<<<<<<<< + * print_exc() + * if errback: + */ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_7) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getUrlData", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 177, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __pyx_v_e = __pyx_t_8; + + /* "kivyblocks/blocks.pyx":178 + * return resp + * except Exception as e: + * print_exc() # <<<<<<<<<<<<<< + * if errback: + * return errback(None,e) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":179 + * except Exception as e: + * print_exc() + * if errback: # <<<<<<<<<<<<<< + * return errback(None,e) + * return None + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errback); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 179, __pyx_L24_except_error) + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":180 + * print_exc() + * if errback: + * return errback(None,e) # <<<<<<<<<<<<<< + * return None + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_errback); + __pyx_t_6 = __pyx_v_errback; __pyx_t_14 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, Py_None, __pyx_v_e}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L24_except_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, Py_None, __pyx_v_e}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L24_except_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 180, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_15); + if (__pyx_t_14) { + __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; + } + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, Py_None); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_v_e); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L25_except_return; + + /* "kivyblocks/blocks.pyx":179 + * except Exception as e: + * print_exc() + * if errback: # <<<<<<<<<<<<<< + * return errback(None,e) + * return None + */ + } + + /* "kivyblocks/blocks.pyx":181 + * if errback: + * return errback(None,e) + * return None # <<<<<<<<<<<<<< + * else: + * config = getConfig() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L25_except_return; + } + goto __pyx_L24_except_error; + __pyx_L24_except_error:; + + /* "kivyblocks/blocks.pyx":172 + * return dic + * elif url.startswith('http://') or url.startswith('https://'): + * try: # <<<<<<<<<<<<<< + * hc = HttpClient() + * resp=hc(url,method=method,params=params,files=files) + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_12, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L26_try_return:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_12, __pyx_t_11); + goto __pyx_L0; + __pyx_L25_except_return:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_12, __pyx_t_11); + goto __pyx_L0; + } + + /* "kivyblocks/blocks.pyx":171 + * dic = json.loads(b) + * return dic + * elif url.startswith('http://') or url.startswith('https://'): # <<<<<<<<<<<<<< + * try: + * hc = HttpClient() + */ + } + + /* "kivyblocks/blocks.pyx":183 + * return None + * else: + * config = getConfig() # <<<<<<<<<<<<<< + * url = config.uihome + url + * return self.getUrlData(url,method=method, + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_getConfig); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_config = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":184 + * else: + * config = getConfig() + * url = config.uihome + url # <<<<<<<<<<<<<< + * return self.getUrlData(url,method=method, + * params=params, + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_uihome); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_url); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_url, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":185 + * config = getConfig() + * url = config.uihome + url + * return self.getUrlData(url,method=method, # <<<<<<<<<<<<<< + * params=params, + * files=files, + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getUrlData); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_url); + __Pyx_GIVEREF(__pyx_v_url); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_url); + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_method, __pyx_v_method) < 0) __PYX_ERR(0, 185, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":186 + * url = config.uihome + url + * return self.getUrlData(url,method=method, + * params=params, # <<<<<<<<<<<<<< + * files=files, + * **kw) + */ + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_params, __pyx_v_params) < 0) __PYX_ERR(0, 185, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":187 + * return self.getUrlData(url,method=method, + * params=params, + * files=files, # <<<<<<<<<<<<<< + * **kw) + * + */ + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_files, __pyx_v_files) < 0) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":188 + * params=params, + * files=files, + * **kw) # <<<<<<<<<<<<<< + * + * def strValueExpr(self,s:str,localnamespace:dict={}): + */ + if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kw) < 0) __PYX_ERR(0, 188, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":185 + * config = getConfig() + * url = config.uihome + url + * return self.getUrlData(url,method=method, # <<<<<<<<<<<<<< + * params=params, + * files=files, + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L5:; + + /* "kivyblocks/blocks.pyx":154 + * return eval(s,g,l) + * + * def getUrlData(self, url:str, method:str='GET', # <<<<<<<<<<<<<< + * params:dict={}, files:dict={}, + * callback=None, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getUrlData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_filename); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XDECREF(__pyx_v_dic); + __Pyx_XDECREF(__pyx_v_hc); + __Pyx_XDECREF(__pyx_v_resp); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_config); + __Pyx_XDECREF(__pyx_v_url); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":190 + * **kw) + * + * def strValueExpr(self,s:str,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if not s.startswith('py::'): + * return s + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_localnamespace); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_localnamespace); + PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_localnamespace); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_13strValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_13strValueExpr = {"strValueExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_13strValueExpr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_13strValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_s = 0; + PyObject *__pyx_v_localnamespace = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("strValueExpr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_s,&__pyx_n_s_localnamespace,0}; + PyObject* values[3] = {0,0,0}; + __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self); + values[2] = __pyx_dynamic_args->__pyx_arg_localnamespace; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("strValueExpr", 0, 2, 3, 1); __PYX_ERR(0, 190, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_localnamespace); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "strValueExpr") < 0)) __PYX_ERR(0, 190, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_s = ((PyObject*)values[1]); + __pyx_v_localnamespace = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("strValueExpr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 190, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.strValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyString_Type), 1, "s", 1))) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_localnamespace), (&PyDict_Type), 1, "localnamespace", 1))) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_12strValueExpr(__pyx_self, __pyx_v_self, __pyx_v_s, __pyx_v_localnamespace); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12strValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_localnamespace) { + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + __Pyx_RefNannySetupContext("strValueExpr", 0); + __Pyx_INCREF(__pyx_v_s); + + /* "kivyblocks/blocks.pyx":191 + * + * def strValueExpr(self,s:str,localnamespace:dict={}): + * if not s.startswith('py::'): # <<<<<<<<<<<<<< + * return s + * s = s[4:] + */ + if (unlikely(__pyx_v_s == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith"); + __PYX_ERR(0, 191, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_s, __pyx_kp_s_py, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":192 + * def strValueExpr(self,s:str,localnamespace:dict={}): + * if not s.startswith('py::'): + * return s # <<<<<<<<<<<<<< + * s = s[4:] + * try: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":191 + * + * def strValueExpr(self,s:str,localnamespace:dict={}): + * if not s.startswith('py::'): # <<<<<<<<<<<<<< + * return s + * s = s[4:] + */ + } + + /* "kivyblocks/blocks.pyx":193 + * if not s.startswith('py::'): + * return s + * s = s[4:] # <<<<<<<<<<<<<< + * try: + * v = self.eval(s,localnamespace) + */ + if (unlikely(__pyx_v_s == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 193, __pyx_L1_error) + } + __pyx_t_3 = PySequence_GetSlice(__pyx_v_s, 4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":194 + * return s + * s = s[4:] + * try: # <<<<<<<<<<<<<< + * v = self.eval(s,localnamespace) + * return v + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":195 + * s = s[4:] + * try: + * v = self.eval(s,localnamespace) # <<<<<<<<<<<<<< + * return v + * except Exception as e: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_s, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L4_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_s, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L4_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 195, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_s); + __Pyx_GIVEREF(__pyx_v_s); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_s); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_localnamespace); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_v = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":196 + * try: + * v = self.eval(s,localnamespace) + * return v # <<<<<<<<<<<<<< + * except Exception as e: + * print('Exception .... ',e,'script=',s) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_v); + __pyx_r = __pyx_v_v; + goto __pyx_L8_try_return; + + /* "kivyblocks/blocks.pyx":194 + * return s + * s = s[4:] + * try: # <<<<<<<<<<<<<< + * v = self.eval(s,localnamespace) + * return v + */ + } + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":197 + * v = self.eval(s,localnamespace) + * return v + * except Exception as e: # <<<<<<<<<<<<<< + * print('Exception .... ',e,'script=',s) + * print_exc() + */ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_9) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.strValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_10) < 0) __PYX_ERR(0, 197, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_7); + __pyx_v_e = __pyx_t_7; + + /* "kivyblocks/blocks.pyx":198 + * return v + * except Exception as e: + * print('Exception .... ',e,'script=',s) # <<<<<<<<<<<<<< + * print_exc() + * return s + */ + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_s_Exception); + __Pyx_GIVEREF(__pyx_kp_s_Exception); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_s_Exception); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_e); + __Pyx_INCREF(__pyx_kp_s_script); + __Pyx_GIVEREF(__pyx_kp_s_script); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_s_script); + __Pyx_INCREF(__pyx_v_s); + __Pyx_GIVEREF(__pyx_v_s); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_s); + if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 198, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":199 + * except Exception as e: + * print('Exception .... ',e,'script=',s) + * print_exc() # <<<<<<<<<<<<<< + * return s + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_8 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":200 + * print('Exception .... ',e,'script=',s) + * print_exc() + * return s # <<<<<<<<<<<<<< + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_s); + __pyx_r = __pyx_v_s; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L7_except_return; + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "kivyblocks/blocks.pyx":194 + * return s + * s = s[4:] + * try: # <<<<<<<<<<<<<< + * v = self.eval(s,localnamespace) + * return v + */ + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L8_try_return:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L0; + __pyx_L7_except_return:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L0; + } + + /* "kivyblocks/blocks.pyx":190 + * **kw) + * + * def strValueExpr(self,s:str,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if not s.startswith('py::'): + * return s + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.strValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":202 + * return s + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: # <<<<<<<<<<<<<< + * d = [] + * for v in arr: + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_localnamespace); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_localnamespace); + PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_localnamespace); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15arrayValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_15arrayValueExpr = {"arrayValueExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_15arrayValueExpr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15arrayValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_arr = 0; + PyObject *__pyx_v_localnamespace = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("arrayValueExpr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,&__pyx_n_s_localnamespace,0}; + PyObject* values[3] = {0,0,0}; + __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self); + values[2] = __pyx_dynamic_args->__pyx_arg_localnamespace; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("arrayValueExpr", 0, 2, 3, 1); __PYX_ERR(0, 202, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_localnamespace); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrayValueExpr") < 0)) __PYX_ERR(0, 202, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_arr = ((PyObject*)values[1]); + __pyx_v_localnamespace = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("arrayValueExpr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 202, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.arrayValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), (&PyList_Type), 1, "arr", 1))) __PYX_ERR(0, 202, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_localnamespace), (&PyDict_Type), 1, "localnamespace", 1))) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_14arrayValueExpr(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_localnamespace); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_14arrayValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_localnamespace) { + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + __Pyx_RefNannySetupContext("arrayValueExpr", 0); + + /* "kivyblocks/blocks.pyx":203 + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: + * d = [] # <<<<<<<<<<<<<< + * for v in arr: + * if type(v) == type(''): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_d = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":204 + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: + * d = [] + * for v in arr: # <<<<<<<<<<<<<< + * if type(v) == type(''): + * d.append(self.strValueExpr(v,localnamespace)) + */ + if (unlikely(__pyx_v_arr == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 204, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_arr; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 204, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":205 + * d = [] + * for v in arr: + * if type(v) == type(''): # <<<<<<<<<<<<<< + * d.append(self.strValueExpr(v,localnamespace)) + * continue + */ + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_kp_s__4)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":206 + * for v in arr: + * if type(v) == type(''): + * d.append(self.strValueExpr(v,localnamespace)) # <<<<<<<<<<<<<< + * continue + * if type(v) == type([]): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strValueExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_localnamespace); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":207 + * if type(v) == type(''): + * d.append(self.strValueExpr(v,localnamespace)) + * continue # <<<<<<<<<<<<<< + * if type(v) == type([]): + * d.append(self.arrayValueExpr(v,localnamespace)) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":205 + * d = [] + * for v in arr: + * if type(v) == type(''): # <<<<<<<<<<<<<< + * d.append(self.strValueExpr(v,localnamespace)) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":208 + * d.append(self.strValueExpr(v,localnamespace)) + * continue + * if type(v) == type([]): # <<<<<<<<<<<<<< + * d.append(self.arrayValueExpr(v,localnamespace)) + * continue + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_3)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":209 + * continue + * if type(v) == type([]): + * d.append(self.arrayValueExpr(v,localnamespace)) # <<<<<<<<<<<<<< + * continue + * if type(v) == type({}): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arrayValueExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_localnamespace); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":210 + * if type(v) == type([]): + * d.append(self.arrayValueExpr(v,localnamespace)) + * continue # <<<<<<<<<<<<<< + * if type(v) == type({}): + * d.append(self.dictValueExpr(v,localnamespace)) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":208 + * d.append(self.strValueExpr(v,localnamespace)) + * continue + * if type(v) == type([]): # <<<<<<<<<<<<<< + * d.append(self.arrayValueExpr(v,localnamespace)) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":211 + * d.append(self.arrayValueExpr(v,localnamespace)) + * continue + * if type(v) == type({}): # <<<<<<<<<<<<<< + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_5)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":212 + * continue + * if type(v) == type({}): + * d.append(self.dictValueExpr(v,localnamespace)) # <<<<<<<<<<<<<< + * continue + * if type(v) == type(DictObject): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_localnamespace); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":213 + * if type(v) == type({}): + * d.append(self.dictValueExpr(v,localnamespace)) + * continue # <<<<<<<<<<<<<< + * if type(v) == type(DictObject): + * d.append(self.dictValueExpr(v,localnamespace)) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":211 + * d.append(self.arrayValueExpr(v,localnamespace)) + * continue + * if type(v) == type({}): # <<<<<<<<<<<<<< + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":214 + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + * if type(v) == type(DictObject): # <<<<<<<<<<<<<< + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_3)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":215 + * continue + * if type(v) == type(DictObject): + * d.append(self.dictValueExpr(v,localnamespace)) # <<<<<<<<<<<<<< + * continue + * d.append(v) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_localnamespace); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":216 + * if type(v) == type(DictObject): + * d.append(self.dictValueExpr(v,localnamespace)) + * continue # <<<<<<<<<<<<<< + * d.append(v) + * return d + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":214 + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + * if type(v) == type(DictObject): # <<<<<<<<<<<<<< + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":217 + * d.append(self.dictValueExpr(v,localnamespace)) + * continue + * d.append(v) # <<<<<<<<<<<<<< + * return d + * + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_d, __pyx_v_v); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 217, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":204 + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: + * d = [] + * for v in arr: # <<<<<<<<<<<<<< + * if type(v) == type(''): + * d.append(self.strValueExpr(v,localnamespace)) + */ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":218 + * continue + * d.append(v) + * return d # <<<<<<<<<<<<<< + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_d); + __pyx_r = __pyx_v_d; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":202 + * return s + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: # <<<<<<<<<<<<<< + * d = [] + * for v in arr: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.arrayValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":220 + * return d + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: # <<<<<<<<<<<<<< + * d = {} + * for k,v in dic.items(): + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_localnamespace); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_localnamespace); + PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_localnamespace); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_17dictValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_17dictValueExpr = {"dictValueExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_17dictValueExpr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_17dictValueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_dic = 0; + PyObject *__pyx_v_localnamespace = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("dictValueExpr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dic,&__pyx_n_s_localnamespace,0}; + PyObject* values[3] = {0,0,0}; + __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self); + values[2] = __pyx_dynamic_args->__pyx_arg_localnamespace; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dic)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("dictValueExpr", 0, 2, 3, 1); __PYX_ERR(0, 220, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_localnamespace); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dictValueExpr") < 0)) __PYX_ERR(0, 220, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_dic = ((PyObject*)values[1]); + __pyx_v_localnamespace = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("dictValueExpr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 220, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.dictValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dic), (&PyDict_Type), 1, "dic", 1))) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_localnamespace), (&PyDict_Type), 1, "localnamespace", 1))) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_16dictValueExpr(__pyx_self, __pyx_v_self, __pyx_v_dic, __pyx_v_localnamespace); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_16dictValueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dic, PyObject *__pyx_v_localnamespace) { + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_t_10; + __Pyx_RefNannySetupContext("dictValueExpr", 0); + + /* "kivyblocks/blocks.pyx":221 + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: + * d = {} # <<<<<<<<<<<<<< + * for k,v in dic.items(): + * if type(v) == type(''): + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_d = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":222 + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: + * d = {} + * for k,v in dic.items(): # <<<<<<<<<<<<<< + * if type(v) == type(''): + * d[k] = self.strValueExpr(v,localnamespace) + */ + if (unlikely(__pyx_v_dic == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 222, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_dic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 222, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 222, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":223 + * d = {} + * for k,v in dic.items(): + * if type(v) == type(''): # <<<<<<<<<<<<<< + * d[k] = self.strValueExpr(v,localnamespace) + * continue + */ + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_kp_s__4)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { + + /* "kivyblocks/blocks.pyx":224 + * for k,v in dic.items(): + * if type(v) == type(''): + * d[k] = self.strValueExpr(v,localnamespace) # <<<<<<<<<<<<<< + * continue + * if type(v) == type([]): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strValueExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_localnamespace); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_1) < 0)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":225 + * if type(v) == type(''): + * d[k] = self.strValueExpr(v,localnamespace) + * continue # <<<<<<<<<<<<<< + * if type(v) == type([]): + * d[k] = self.arrayValueExpr(v,localnamespace) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":223 + * d = {} + * for k,v in dic.items(): + * if type(v) == type(''): # <<<<<<<<<<<<<< + * d[k] = self.strValueExpr(v,localnamespace) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":226 + * d[k] = self.strValueExpr(v,localnamespace) + * continue + * if type(v) == type([]): # <<<<<<<<<<<<<< + * d[k] = self.arrayValueExpr(v,localnamespace) + * continue + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_1)), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_9) { + + /* "kivyblocks/blocks.pyx":227 + * continue + * if type(v) == type([]): + * d[k] = self.arrayValueExpr(v,localnamespace) # <<<<<<<<<<<<<< + * continue + * if type(v) == type({}): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arrayValueExpr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_localnamespace); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_6) < 0)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":228 + * if type(v) == type([]): + * d[k] = self.arrayValueExpr(v,localnamespace) + * continue # <<<<<<<<<<<<<< + * if type(v) == type({}): + * d[k] = self.dictValueExpr(v,localnamespace) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":226 + * d[k] = self.strValueExpr(v,localnamespace) + * continue + * if type(v) == type([]): # <<<<<<<<<<<<<< + * d[k] = self.arrayValueExpr(v,localnamespace) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":229 + * d[k] = self.arrayValueExpr(v,localnamespace) + * continue + * if type(v) == type({}): # <<<<<<<<<<<<<< + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_6)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { + + /* "kivyblocks/blocks.pyx":230 + * continue + * if type(v) == type({}): + * d[k] = self.dictValueExpr(v,localnamespace) # <<<<<<<<<<<<<< + * continue + * if type(v) == type(DictObject): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_localnamespace); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_1) < 0)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":231 + * if type(v) == type({}): + * d[k] = self.dictValueExpr(v,localnamespace) + * continue # <<<<<<<<<<<<<< + * if type(v) == type(DictObject): + * d[k] = self.dictValueExpr(v,localnamespace) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":229 + * d[k] = self.arrayValueExpr(v,localnamespace) + * continue + * if type(v) == type({}): # <<<<<<<<<<<<<< + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":232 + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + * if type(v) == type(DictObject): # <<<<<<<<<<<<<< + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), ((PyObject *)Py_TYPE(__pyx_t_1)), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_9) { + + /* "kivyblocks/blocks.pyx":233 + * continue + * if type(v) == type(DictObject): + * d[k] = self.dictValueExpr(v,localnamespace) # <<<<<<<<<<<<<< + * continue + * d[k] = v + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_v, __pyx_v_localnamespace}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_v); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_localnamespace); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_6) < 0)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":234 + * if type(v) == type(DictObject): + * d[k] = self.dictValueExpr(v,localnamespace) + * continue # <<<<<<<<<<<<<< + * d[k] = v + * return d + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":232 + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + * if type(v) == type(DictObject): # <<<<<<<<<<<<<< + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":235 + * d[k] = self.dictValueExpr(v,localnamespace) + * continue + * d[k] = v # <<<<<<<<<<<<<< + * return d + * def valueExpr(self,obj,localnamespace:dict={}): + */ + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(0, 235, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":222 + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: + * d = {} + * for k,v in dic.items(): # <<<<<<<<<<<<<< + * if type(v) == type(''): + * d[k] = self.strValueExpr(v,localnamespace) + */ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":236 + * continue + * d[k] = v + * return d # <<<<<<<<<<<<<< + * def valueExpr(self,obj,localnamespace:dict={}): + * if type(obj) == type(''): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_d); + __pyx_r = __pyx_v_d; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":220 + * return d + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: # <<<<<<<<<<<<<< + * d = {} + * for k,v in dic.items(): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.dictValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":237 + * d[k] = v + * return d + * def valueExpr(self,obj,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_localnamespace); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_localnamespace); + PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_localnamespace); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.blocks.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_19valueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_19valueExpr = {"valueExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_19valueExpr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_19valueExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_obj = 0; + PyObject *__pyx_v_localnamespace = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("valueExpr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,&__pyx_n_s_localnamespace,0}; + PyObject* values[3] = {0,0,0}; + __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self); + values[2] = __pyx_dynamic_args->__pyx_arg_localnamespace; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("valueExpr", 0, 2, 3, 1); __PYX_ERR(0, 237, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_localnamespace); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "valueExpr") < 0)) __PYX_ERR(0, 237, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_obj = values[1]; + __pyx_v_localnamespace = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("valueExpr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 237, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.valueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_localnamespace), (&PyDict_Type), 1, "localnamespace", 1))) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_18valueExpr(__pyx_self, __pyx_v_self, __pyx_v_obj, __pyx_v_localnamespace); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_18valueExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_localnamespace) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("valueExpr", 0); + + /* "kivyblocks/blocks.pyx":238 + * return d + * def valueExpr(self,obj,localnamespace:dict={}): + * if type(obj) == type(''): # <<<<<<<<<<<<<< + * return self.strValueExpr(obj,localnamespace) + * if type(obj) == type([]): + */ + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)Py_TYPE(__pyx_kp_s__4)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":239 + * def valueExpr(self,obj,localnamespace:dict={}): + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) # <<<<<<<<<<<<<< + * if type(obj) == type([]): + * return self.arrayValueExpr(obj,localnamespace) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strValueExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_localnamespace); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":238 + * return d + * def valueExpr(self,obj,localnamespace:dict={}): + * if type(obj) == type(''): # <<<<<<<<<<<<<< + * return self.strValueExpr(obj,localnamespace) + * if type(obj) == type([]): + */ + } + + /* "kivyblocks/blocks.pyx":240 + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + * if type(obj) == type([]): # <<<<<<<<<<<<<< + * return self.arrayValueExpr(obj,localnamespace) + * if type(obj) == type({}): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)Py_TYPE(__pyx_t_1)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":241 + * return self.strValueExpr(obj,localnamespace) + * if type(obj) == type([]): + * return self.arrayValueExpr(obj,localnamespace) # <<<<<<<<<<<<<< + * if type(obj) == type({}): + * return self.dictValueExpr(obj,localnamespace) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arrayValueExpr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_obj); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_localnamespace); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":240 + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + * if type(obj) == type([]): # <<<<<<<<<<<<<< + * return self.arrayValueExpr(obj,localnamespace) + * if type(obj) == type({}): + */ + } + + /* "kivyblocks/blocks.pyx":242 + * if type(obj) == type([]): + * return self.arrayValueExpr(obj,localnamespace) + * if type(obj) == type({}): # <<<<<<<<<<<<<< + * return self.dictValueExpr(obj,localnamespace) + * if isinstance(obj,DictObject): + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)Py_TYPE(__pyx_t_3)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":243 + * return self.arrayValueExpr(obj,localnamespace) + * if type(obj) == type({}): + * return self.dictValueExpr(obj,localnamespace) # <<<<<<<<<<<<<< + * if isinstance(obj,DictObject): + * return self.dictValueExpr(obj,localnamespace) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_localnamespace); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":242 + * if type(obj) == type([]): + * return self.arrayValueExpr(obj,localnamespace) + * if type(obj) == type({}): # <<<<<<<<<<<<<< + * return self.dictValueExpr(obj,localnamespace) + * if isinstance(obj,DictObject): + */ + } + + /* "kivyblocks/blocks.pyx":244 + * if type(obj) == type({}): + * return self.dictValueExpr(obj,localnamespace) + * if isinstance(obj,DictObject): # <<<<<<<<<<<<<< + * return self.dictValueExpr(obj,localnamespace) + * return obj + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":245 + * return self.dictValueExpr(obj,localnamespace) + * if isinstance(obj,DictObject): + * return self.dictValueExpr(obj,localnamespace) # <<<<<<<<<<<<<< + * return obj + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dictValueExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_obj, __pyx_v_localnamespace}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_obj); + __Pyx_INCREF(__pyx_v_localnamespace); + __Pyx_GIVEREF(__pyx_v_localnamespace); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_localnamespace); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":244 + * if type(obj) == type({}): + * return self.dictValueExpr(obj,localnamespace) + * if isinstance(obj,DictObject): # <<<<<<<<<<<<<< + * return self.dictValueExpr(obj,localnamespace) + * return obj + */ + } + + /* "kivyblocks/blocks.pyx":246 + * if isinstance(obj,DictObject): + * return self.dictValueExpr(obj,localnamespace) + * return obj # <<<<<<<<<<<<<< + * + * def w_build(self,desc) -> Widget: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_obj); + __pyx_r = __pyx_v_obj; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":237 + * d[k] = v + * return d + * def valueExpr(self,obj,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.valueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":248 + * return obj + * + * def w_build(self,desc) -> Widget: # <<<<<<<<<<<<<< + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_21w_build(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_21w_build = {"w_build", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_21w_build, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_21w_build(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("w_build (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_desc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("w_build", 1, 2, 2, 1); __PYX_ERR(0, 248, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "w_build") < 0)) __PYX_ERR(0, 248, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_desc = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("w_build", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 248, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.w_build", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_20w_build(__pyx_self, __pyx_v_self, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_20w_build(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_desc) { + PyObject *__pyx_v_widgetClass = NULL; + PyObject *__pyx_v_opts = NULL; + PyObject *__pyx_v_widget = NULL; + PyObject *__pyx_v_klass = NULL; + CYTHON_UNUSED PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_id = NULL; + PyObject *__pyx_v_app = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + __Pyx_RefNannySetupContext("w_build", 0); + + /* "kivyblocks/blocks.pyx":250 + * def w_build(self,desc) -> Widget: + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) # <<<<<<<<<<<<<< + * if not widgetClass: + * Logger.info("Block: w_build(), desc invalid", desc) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_widgetClass = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":251 + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + * if not widgetClass: # <<<<<<<<<<<<<< + * Logger.info("Block: w_build(), desc invalid", desc) + * raise Exception(desc) + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_widgetClass); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_4 = ((!__pyx_t_3) != 0); + if (unlikely(__pyx_t_4)) { + + /* "kivyblocks/blocks.pyx":252 + * widgetClass = desc.get('widgettype',None) + * if not widgetClass: + * Logger.info("Block: w_build(), desc invalid", desc) # <<<<<<<<<<<<<< + * raise Exception(desc) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_Block_w_build_desc_invalid, __pyx_v_desc}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_Block_w_build_desc_invalid, __pyx_v_desc}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_w_build_desc_invalid); + __Pyx_GIVEREF(__pyx_kp_s_Block_w_build_desc_invalid); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Block_w_build_desc_invalid); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_desc); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":253 + * if not widgetClass: + * Logger.info("Block: w_build(), desc invalid", desc) + * raise Exception(desc) # <<<<<<<<<<<<<< + * + * widgetClass = desc['widgettype'] + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 253, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":251 + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + * if not widgetClass: # <<<<<<<<<<<<<< + * Logger.info("Block: w_build(), desc invalid", desc) + * raise Exception(desc) + */ + } + + /* "kivyblocks/blocks.pyx":255 + * raise Exception(desc) + * + * widgetClass = desc['widgettype'] # <<<<<<<<<<<<<< + * opts = self.valueExpr(desc.get('options',{}).copy()) + * widget = None + */ + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_widgettype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_widgetClass, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":256 + * + * widgetClass = desc['widgettype'] + * opts = self.valueExpr(desc.get('options',{}).copy()) # <<<<<<<<<<<<<< + * widget = None + * try: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valueExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_s_options, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_s_options, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_n_s_options); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_opts = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":257 + * widgetClass = desc['widgettype'] + * opts = self.valueExpr(desc.get('options',{}).copy()) + * widget = None # <<<<<<<<<<<<<< + * try: + * klass = Factory.get(widgetClass) + */ + __Pyx_INCREF(Py_None); + __pyx_v_widget = Py_None; + + /* "kivyblocks/blocks.pyx":258 + * opts = self.valueExpr(desc.get('options',{}).copy()) + * widget = None + * try: # <<<<<<<<<<<<<< + * klass = Factory.get(widgetClass) + * widget = klass(**opts) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":259 + * widget = None + * try: + * klass = Factory.get(widgetClass) # <<<<<<<<<<<<<< + * widget = klass(**opts) + * except Exception as e: + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Factory); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_widgetClass) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_widgetClass); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_klass = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":260 + * try: + * klass = Factory.get(widgetClass) + * widget = klass(**opts) # <<<<<<<<<<<<<< + * except Exception as e: + * print('Error:',widgetClass,'contructon error') + */ + if (unlikely(__pyx_v_opts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 260, __pyx_L4_error) + } + if (likely(PyDict_CheckExact(__pyx_v_opts))) { + __pyx_t_2 = PyDict_Copy(__pyx_v_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_opts, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_klass, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_widget, __pyx_t_7); + __pyx_t_7 = 0; + + /* "kivyblocks/blocks.pyx":258 + * opts = self.valueExpr(desc.get('options',{}).copy()) + * widget = None + * try: # <<<<<<<<<<<<<< + * klass = Factory.get(widgetClass) + * widget = klass(**opts) + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "kivyblocks/blocks.pyx":261 + * klass = Factory.get(widgetClass) + * widget = klass(**opts) + * except Exception as e: # <<<<<<<<<<<<<< + * print('Error:',widgetClass,'contructon error') + * print_exc() + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_6) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.w_build", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 261, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + + /* "kivyblocks/blocks.pyx":262 + * widget = klass(**opts) + * except Exception as e: + * print('Error:',widgetClass,'contructon error') # <<<<<<<<<<<<<< + * print_exc() + * raise NotExistsObject(widgetClass) + */ + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_s_Error); + __Pyx_GIVEREF(__pyx_kp_s_Error); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_s_Error); + __Pyx_INCREF(__pyx_v_widgetClass); + __Pyx_GIVEREF(__pyx_v_widgetClass); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_widgetClass); + __Pyx_INCREF(__pyx_kp_s_contructon_error); + __Pyx_GIVEREF(__pyx_kp_s_contructon_error); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_s_contructon_error); + if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 262, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":263 + * except Exception as e: + * print('Error:',widgetClass,'contructon error') + * print_exc() # <<<<<<<<<<<<<< + * raise NotExistsObject(widgetClass) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 263, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":264 + * print('Error:',widgetClass,'contructon error') + * print_exc() + * raise NotExistsObject(widgetClass) # <<<<<<<<<<<<<< + * + * if desc.get('id'): + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NotExistsObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_v_widgetClass) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_widgetClass); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 264, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(0, 264, __pyx_L6_except_error) + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "kivyblocks/blocks.pyx":258 + * opts = self.valueExpr(desc.get('options',{}).copy()) + * widget = None + * try: # <<<<<<<<<<<<<< + * klass = Factory.get(widgetClass) + * widget = klass(**opts) + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L9_try_end:; + } + + /* "kivyblocks/blocks.pyx":266 + * raise NotExistsObject(widgetClass) + * + * if desc.get('id'): # <<<<<<<<<<<<<< + * id = desc.get('id') + * if id.startswith('app.'): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_n_s_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_id); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":267 + * + * if desc.get('id'): + * id = desc.get('id') # <<<<<<<<<<<<<< + * if id.startswith('app.'): + * app = App.get_running_app() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_n_s_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_id); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_id = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":268 + * if desc.get('id'): + * id = desc.get('id') + * if id.startswith('app.'): # <<<<<<<<<<<<<< + * app = App.get_running_app() + * id = id[4:] + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_id, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_kp_s_app) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_app); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":269 + * id = desc.get('id') + * if id.startswith('app.'): + * app = App.get_running_app() # <<<<<<<<<<<<<< + * id = id[4:] + * setattr(app, id, widget) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_App); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_running_app); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_app = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":270 + * if id.startswith('app.'): + * app = App.get_running_app() + * id = id[4:] # <<<<<<<<<<<<<< + * setattr(app, id, widget) + * if id.startswith('root.'): + */ + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_id, 4, 0, NULL, NULL, &__pyx_slice__6, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_id, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":271 + * app = App.get_running_app() + * id = id[4:] + * setattr(app, id, widget) # <<<<<<<<<<<<<< + * if id.startswith('root.'): + * app = App.get_running_app() + */ + __pyx_t_15 = PyObject_SetAttr(__pyx_v_app, __pyx_v_id, __pyx_v_widget); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 271, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":268 + * if desc.get('id'): + * id = desc.get('id') + * if id.startswith('app.'): # <<<<<<<<<<<<<< + * app = App.get_running_app() + * id = id[4:] + */ + } + + /* "kivyblocks/blocks.pyx":272 + * id = id[4:] + * setattr(app, id, widget) + * if id.startswith('root.'): # <<<<<<<<<<<<<< + * app = App.get_running_app() + * id = id[5:] + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_id, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_kp_s_root) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_root); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":273 + * setattr(app, id, widget) + * if id.startswith('root.'): + * app = App.get_running_app() # <<<<<<<<<<<<<< + * id = id[5:] + * setattr(app.root, id, widget) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_App); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get_running_app); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_app, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":274 + * if id.startswith('root.'): + * app = App.get_running_app() + * id = id[5:] # <<<<<<<<<<<<<< + * setattr(app.root, id, widget) + * + */ + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_id, 5, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_id, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":275 + * app = App.get_running_app() + * id = id[5:] + * setattr(app.root, id, widget) # <<<<<<<<<<<<<< + * + * if '.' in id: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_root_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = PyObject_SetAttr(__pyx_t_5, __pyx_v_id, __pyx_v_widget); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":272 + * id = id[4:] + * setattr(app, id, widget) + * if id.startswith('root.'): # <<<<<<<<<<<<<< + * app = App.get_running_app() + * id = id[5:] + */ + } + + /* "kivyblocks/blocks.pyx":277 + * setattr(app.root, id, widget) + * + * if '.' in id: # <<<<<<<<<<<<<< + * Logger.info('widget id(%s) can not contain "."', id) + * else: + */ + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__8, __pyx_v_id, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":278 + * + * if '.' in id: + * Logger.info('widget id(%s) can not contain "."', id) # <<<<<<<<<<<<<< + * else: + * widget.widget_id = id + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_widget_id_s_can_not_contain, __pyx_v_id}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_widget_id_s_can_not_contain, __pyx_v_id}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_widget_id_s_can_not_contain); + __Pyx_GIVEREF(__pyx_kp_s_widget_id_s_can_not_contain); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_kp_s_widget_id_s_can_not_contain); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_v_id); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":277 + * setattr(app.root, id, widget) + * + * if '.' in id: # <<<<<<<<<<<<<< + * Logger.info('widget id(%s) can not contain "."', id) + * else: + */ + goto __pyx_L15; + } + + /* "kivyblocks/blocks.pyx":280 + * Logger.info('widget id(%s) can not contain "."', id) + * else: + * widget.widget_id = id # <<<<<<<<<<<<<< + * + * widget.build_desc = desc + */ + /*else*/ { + if (__Pyx_PyObject_SetAttrStr(__pyx_v_widget, __pyx_n_s_widget_id, __pyx_v_id) < 0) __PYX_ERR(0, 280, __pyx_L1_error) + } + __pyx_L15:; + + /* "kivyblocks/blocks.pyx":266 + * raise NotExistsObject(widgetClass) + * + * if desc.get('id'): # <<<<<<<<<<<<<< + * id = desc.get('id') + * if id.startswith('app.'): + */ + } + + /* "kivyblocks/blocks.pyx":282 + * widget.widget_id = id + * + * widget.build_desc = desc # <<<<<<<<<<<<<< + * self.build_attributes(widget,desc) + * self.build_rest(widget,desc) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_widget, __pyx_n_s_build_desc, __pyx_v_desc) < 0) __PYX_ERR(0, 282, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":283 + * + * widget.build_desc = desc + * self.build_attributes(widget,desc) # <<<<<<<<<<<<<< + * self.build_rest(widget,desc) + * return widget + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_attributes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_desc); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":284 + * widget.build_desc = desc + * self.build_attributes(widget,desc) + * self.build_rest(widget,desc) # <<<<<<<<<<<<<< + * return widget + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_rest); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_v_desc); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":285 + * self.build_attributes(widget,desc) + * self.build_rest(widget,desc) + * return widget # <<<<<<<<<<<<<< + * + * def build_attributes(self, widget:Widget,desc,t=None): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_widget); + __pyx_r = __pyx_v_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":248 + * return obj + * + * def w_build(self,desc) -> Widget: # <<<<<<<<<<<<<< + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.w_build", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_widgetClass); + __Pyx_XDECREF(__pyx_v_opts); + __Pyx_XDECREF(__pyx_v_widget); + __Pyx_XDECREF(__pyx_v_klass); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XDECREF(__pyx_v_app); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":287 + * return widget + * + * def build_attributes(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_23build_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_23build_attributes = {"build_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_23build_attributes, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_23build_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("build_attributes (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,&__pyx_n_s_t,0}; + PyObject* values[4] = {0,0,0,0}; + values[3] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_attributes", 0, 3, 4, 1); __PYX_ERR(0, 287, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_attributes", 0, 3, 4, 2); __PYX_ERR(0, 287, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_attributes") < 0)) __PYX_ERR(0, 287, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + __pyx_v_t = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("build_attributes", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 287, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_22build_attributes(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_22build_attributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_t) { + PyObject *__pyx_v_excludes = NULL; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_aw = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + __Pyx_RefNannySetupContext("build_attributes", 0); + + /* "kivyblocks/blocks.pyx":288 + * + * def build_attributes(self, widget:Widget,desc,t=None): + * excludes = ['widgettype','options','subwidgets','binds'] # <<<<<<<<<<<<<< + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + * if isinstance(v,dict) and v.get('widgettype'): + */ + __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_widgettype); + __Pyx_GIVEREF(__pyx_n_s_widgettype); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_widgettype); + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_options); + __Pyx_INCREF(__pyx_n_s_subwidgets); + __Pyx_GIVEREF(__pyx_n_s_subwidgets); + PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_subwidgets); + __Pyx_INCREF(__pyx_n_s_binds); + __Pyx_GIVEREF(__pyx_n_s_binds); + PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_binds); + __pyx_v_excludes = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":289 + * def build_attributes(self, widget:Widget,desc,t=None): + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: # <<<<<<<<<<<<<< + * if isinstance(v,dict) and v.get('widgettype'): + * b = Blocks() + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 289, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 289, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_k, __pyx_v_excludes, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_11 = (__pyx_t_10 != 0); + if (__pyx_t_11) { + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_k); + __Pyx_GIVEREF(__pyx_v_k); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k); + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 289, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L11_unpacking_done; + __pyx_L10_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_L11_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; + + /* "kivyblocks/blocks.pyx":290 + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + * if isinstance(v,dict) and v.get('widgettype'): # <<<<<<<<<<<<<< + * b = Blocks() + * v = self.valueExpr(v, localnamespace={'self':widget}) + */ + __pyx_t_10 = PyDict_Check(__pyx_v_v); + __pyx_t_12 = (__pyx_t_10 != 0); + if (__pyx_t_12) { + } else { + __pyx_t_11 = __pyx_t_12; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_n_s_widgettype) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_s_widgettype); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = __pyx_t_12; + __pyx_L13_bool_binop_done:; + if (__pyx_t_11) { + + /* "kivyblocks/blocks.pyx":291 + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + * if isinstance(v,dict) and v.get('widgettype'): + * b = Blocks() # <<<<<<<<<<<<<< + * v = self.valueExpr(v, localnamespace={'self':widget}) + * w = b.w_build(v) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":292 + * if isinstance(v,dict) and v.get('widgettype'): + * b = Blocks() + * v = self.valueExpr(v, localnamespace={'self':widget}) # <<<<<<<<<<<<<< + * w = b.w_build(v) + * if hasattr(widget,k): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valueExpr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_v); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_self, __pyx_v_widget) < 0) __PYX_ERR(0, 292, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_localnamespace, __pyx_t_4) < 0) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":293 + * b = Blocks() + * v = self.valueExpr(v, localnamespace={'self':widget}) + * w = b.w_build(v) # <<<<<<<<<<<<<< + * if hasattr(widget,k): + * aw = getattr(widget,k) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_w_build); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_v); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":294 + * v = self.valueExpr(v, localnamespace={'self':widget}) + * w = b.w_build(v) + * if hasattr(widget,k): # <<<<<<<<<<<<<< + * aw = getattr(widget,k) + * if isinstance(aw,Layout): + */ + __pyx_t_11 = __Pyx_HasAttr(__pyx_v_widget, __pyx_v_k); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_12 = (__pyx_t_11 != 0); + if (__pyx_t_12) { + + /* "kivyblocks/blocks.pyx":295 + * w = b.w_build(v) + * if hasattr(widget,k): + * aw = getattr(widget,k) # <<<<<<<<<<<<<< + * if isinstance(aw,Layout): + * aw.add_widget(w) + */ + __pyx_t_4 = __Pyx_GetAttr(__pyx_v_widget, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_aw, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":296 + * if hasattr(widget,k): + * aw = getattr(widget,k) + * if isinstance(aw,Layout): # <<<<<<<<<<<<<< + * aw.add_widget(w) + * continue + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Layout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PyObject_IsInstance(__pyx_v_aw, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = (__pyx_t_12 != 0); + if (__pyx_t_11) { + + /* "kivyblocks/blocks.pyx":297 + * aw = getattr(widget,k) + * if isinstance(aw,Layout): + * aw.add_widget(w) # <<<<<<<<<<<<<< + * continue + * setattr(widget,k,w) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_aw, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":298 + * if isinstance(aw,Layout): + * aw.add_widget(w) + * continue # <<<<<<<<<<<<<< + * setattr(widget,k,w) + * continue + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":296 + * if hasattr(widget,k): + * aw = getattr(widget,k) + * if isinstance(aw,Layout): # <<<<<<<<<<<<<< + * aw.add_widget(w) + * continue + */ + } + + /* "kivyblocks/blocks.pyx":294 + * v = self.valueExpr(v, localnamespace={'self':widget}) + * w = b.w_build(v) + * if hasattr(widget,k): # <<<<<<<<<<<<<< + * aw = getattr(widget,k) + * if isinstance(aw,Layout): + */ + } + + /* "kivyblocks/blocks.pyx":299 + * aw.add_widget(w) + * continue + * setattr(widget,k,w) # <<<<<<<<<<<<<< + * continue + * setattr(widget,k,self.valueExpr(v,\ + */ + __pyx_t_13 = PyObject_SetAttr(__pyx_v_widget, __pyx_v_k, __pyx_v_w); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 299, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":300 + * continue + * setattr(widget,k,w) + * continue # <<<<<<<<<<<<<< + * setattr(widget,k,self.valueExpr(v,\ + * localnamespace={'self':widget})) + */ + goto __pyx_L3_continue; + + /* "kivyblocks/blocks.pyx":290 + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + * if isinstance(v,dict) and v.get('widgettype'): # <<<<<<<<<<<<<< + * b = Blocks() + * v = self.valueExpr(v, localnamespace={'self':widget}) + */ + } + + /* "kivyblocks/blocks.pyx":301 + * setattr(widget,k,w) + * continue + * setattr(widget,k,self.valueExpr(v,\ # <<<<<<<<<<<<<< + * localnamespace={'self':widget})) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valueExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v); + + /* "kivyblocks/blocks.pyx":302 + * continue + * setattr(widget,k,self.valueExpr(v,\ + * localnamespace={'self':widget})) # <<<<<<<<<<<<<< + * + * def build_rest(self, widget:Widget,desc,t=None): + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_self, __pyx_v_widget) < 0) __PYX_ERR(0, 302, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_localnamespace, __pyx_t_1) < 0) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":301 + * setattr(widget,k,w) + * continue + * setattr(widget,k,self.valueExpr(v,\ # <<<<<<<<<<<<<< + * localnamespace={'self':widget})) + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_13 = PyObject_SetAttr(__pyx_v_widget, __pyx_v_k, __pyx_t_1); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":289 + * def build_attributes(self, widget:Widget,desc,t=None): + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: # <<<<<<<<<<<<<< + * if isinstance(v,dict) and v.get('widgettype'): + * b = Blocks() + */ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":287 + * return widget + * + * def build_attributes(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_excludes); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_aw); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":304 + * localnamespace={'self':widget})) + * + * def build_rest(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_25build_rest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_25build_rest = {"build_rest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_25build_rest, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_25build_rest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("build_rest (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,&__pyx_n_s_t,0}; + PyObject* values[4] = {0,0,0,0}; + values[3] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_rest", 0, 3, 4, 1); __PYX_ERR(0, 304, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_rest", 0, 3, 4, 2); __PYX_ERR(0, 304, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_rest") < 0)) __PYX_ERR(0, 304, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + __pyx_v_t = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("build_rest", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 304, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_rest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_24build_rest(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_24build_rest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_t) { + CYTHON_UNUSED int __pyx_v_pos; + PyObject *__pyx_v_sw = NULL; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_v_kw = NULL; + PyObject *__pyx_v_w = NULL; + CYTHON_UNUSED PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + __Pyx_RefNannySetupContext("build_rest", 0); + + /* "kivyblocks/blocks.pyx":305 + * + * def build_rest(self, widget:Widget,desc,t=None): + * self.subwidget_total = len(desc.get('subwidgets',[])) # <<<<<<<<<<<<<< + * self.subwidgets = [ None for i in range(self.subwidget_total)] + * cdef int pos = 0 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_subwidgets, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_subwidgets, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_n_s_subwidgets); + __Pyx_GIVEREF(__pyx_n_s_subwidgets); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_subwidgets); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_subwidget_total, __pyx_t_1) < 0) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":306 + * def build_rest(self, widget:Widget,desc,t=None): + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] # <<<<<<<<<<<<<< + * cdef int pos = 0 + * for pos,sw in enumerate(desc.get('subwidgets',[])): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_subwidget_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_8(__pyx_t_2); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 306, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)Py_None))) __PYX_ERR(0, 306, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_subwidgets, __pyx_t_1) < 0) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":307 + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] + * cdef int pos = 0 # <<<<<<<<<<<<<< + * for pos,sw in enumerate(desc.get('subwidgets',[])): + * b = Blocks() + */ + __pyx_v_pos = 0; + + /* "kivyblocks/blocks.pyx":308 + * self.subwidgets = [ None for i in range(self.subwidget_total)] + * cdef int pos = 0 + * for pos,sw in enumerate(desc.get('subwidgets',[])): # <<<<<<<<<<<<<< + * b = Blocks() + * kw = self.valueExpr(sw.copy(), + */ + __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_subwidgets, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_subwidgets, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_n_s_subwidgets); + __Pyx_GIVEREF(__pyx_n_s_subwidgets); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_n_s_subwidgets); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_8(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 308, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_sw, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_v_pos = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "kivyblocks/blocks.pyx":309 + * cdef int pos = 0 + * for pos,sw in enumerate(desc.get('subwidgets',[])): + * b = Blocks() # <<<<<<<<<<<<<< + * kw = self.valueExpr(sw.copy(), + * localnamespace={'self':widget}) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":310 + * for pos,sw in enumerate(desc.get('subwidgets',[])): + * b = Blocks() + * kw = self.valueExpr(sw.copy(), # <<<<<<<<<<<<<< + * localnamespace={'self':widget}) + * w = b.widgetBuild(kw) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valueExpr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sw, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":311 + * b = Blocks() + * kw = self.valueExpr(sw.copy(), + * localnamespace={'self':widget}) # <<<<<<<<<<<<<< + * w = b.widgetBuild(kw) + * widget.add_widget(w) + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_self, __pyx_v_widget) < 0) __PYX_ERR(0, 311, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_localnamespace, __pyx_t_3) < 0) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":310 + * for pos,sw in enumerate(desc.get('subwidgets',[])): + * b = Blocks() + * kw = self.valueExpr(sw.copy(), # <<<<<<<<<<<<<< + * localnamespace={'self':widget}) + * w = b.widgetBuild(kw) + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":312 + * kw = self.valueExpr(sw.copy(), + * localnamespace={'self':widget}) + * w = b.widgetBuild(kw) # <<<<<<<<<<<<<< + * widget.add_widget(w) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_kw) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_kw); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":313 + * localnamespace={'self':widget}) + * w = b.widgetBuild(kw) + * widget.add_widget(w) # <<<<<<<<<<<<<< + * + * for b in desc.get('binds',[]): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_widget, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":308 + * self.subwidgets = [ None for i in range(self.subwidget_total)] + * cdef int pos = 0 + * for pos,sw in enumerate(desc.get('subwidgets',[])): # <<<<<<<<<<<<<< + * b = Blocks() + * kw = self.valueExpr(sw.copy(), + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":315 + * widget.add_widget(w) + * + * for b in desc.get('binds',[]): # <<<<<<<<<<<<<< + * kw = self.valueExpr(b.copy(), \ + * localnamespace={'self':widget}) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_binds, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_binds, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_1 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_binds); + __Pyx_GIVEREF(__pyx_n_s_binds); + PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_n_s_binds); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 315, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 315, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 315, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 315, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":316 + * + * for b in desc.get('binds',[]): + * kw = self.valueExpr(b.copy(), \ # <<<<<<<<<<<<<< + * localnamespace={'self':widget}) + * self.buildBind(widget,kw) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valueExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":317 + * for b in desc.get('binds',[]): + * kw = self.valueExpr(b.copy(), \ + * localnamespace={'self':widget}) # <<<<<<<<<<<<<< + * self.buildBind(widget,kw) + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_self, __pyx_v_widget) < 0) __PYX_ERR(0, 317, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_localnamespace, __pyx_t_6) < 0) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":316 + * + * for b in desc.get('binds',[]): + * kw = self.valueExpr(b.copy(), \ # <<<<<<<<<<<<<< + * localnamespace={'self':widget}) + * self.buildBind(widget,kw) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_6); + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":318 + * kw = self.valueExpr(b.copy(), \ + * localnamespace={'self':widget}) + * self.buildBind(widget,kw) # <<<<<<<<<<<<<< + * + * def buildBind(self, widget:Widget, desc): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_buildBind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_widget, __pyx_v_kw}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_widget, __pyx_v_kw}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_kw); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":315 + * widget.add_widget(w) + * + * for b in desc.get('binds',[]): # <<<<<<<<<<<<<< + * kw = self.valueExpr(b.copy(), \ + * localnamespace={'self':widget}) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":304 + * localnamespace={'self':widget})) + * + * def build_rest(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_rest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sw); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":320 + * self.buildBind(widget,kw) + * + * def buildBind(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_27buildBind(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_27buildBind = {"buildBind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_27buildBind, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_27buildBind(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("buildBind (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("buildBind", 1, 3, 3, 1); __PYX_ERR(0, 320, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("buildBind", 1, 3, 3, 2); __PYX_ERR(0, 320, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "buildBind") < 0)) __PYX_ERR(0, 320, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("buildBind", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 320, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.buildBind", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_26buildBind(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_26buildBind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc) { + CYTHON_UNUSED PyObject *__pyx_v_wid = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_event = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("buildBind", 0); + + /* "kivyblocks/blocks.pyx":321 + * + * def buildBind(self, widget:Widget, desc): + * wid = desc.get('wid','self') # <<<<<<<<<<<<<< + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + * if not w: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_wid = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":322 + * def buildBind(self, widget:Widget, desc): + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) # <<<<<<<<<<<<<< + * if not w: + * Logger.info('Block: %s %s',desc.get('wid','self'), + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getWidgetById); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_from_widget, __pyx_v_widget) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_w = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":323 + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + * if not w: # <<<<<<<<<<<<<< + * Logger.info('Block: %s %s',desc.get('wid','self'), + * 'not found via Blocks.getWidgetById()') + */ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_w); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_6 = ((!__pyx_t_5) != 0); + if (__pyx_t_6) { + + /* "kivyblocks/blocks.pyx":324 + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + * if not w: + * Logger.info('Block: %s %s',desc.get('wid','self'), # <<<<<<<<<<<<<< + * 'not found via Blocks.getWidgetById()') + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s_Block_s_s, __pyx_t_1, __pyx_kp_s_not_found_via_Blocks_getWidgetBy}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s_Block_s_s, __pyx_t_1, __pyx_kp_s_not_found_via_Blocks_getWidgetBy}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_s_s); + __Pyx_GIVEREF(__pyx_kp_s_Block_s_s); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Block_s_s); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_s_not_found_via_Blocks_getWidgetBy); + __Pyx_GIVEREF(__pyx_kp_s_not_found_via_Blocks_getWidgetBy); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_s_not_found_via_Blocks_getWidgetBy); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":326 + * Logger.info('Block: %s %s',desc.get('wid','self'), + * 'not found via Blocks.getWidgetById()') + * return # <<<<<<<<<<<<<< + * event = desc.get('event') + * if event is None: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":323 + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + * if not w: # <<<<<<<<<<<<<< + * Logger.info('Block: %s %s',desc.get('wid','self'), + * 'not found via Blocks.getWidgetById()') + */ + } + + /* "kivyblocks/blocks.pyx":327 + * 'not found via Blocks.getWidgetById()') + * return + * event = desc.get('event') # <<<<<<<<<<<<<< + * if event is None: + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_n_s_event) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_event); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_event = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":328 + * return + * event = desc.get('event') + * if event is None: # <<<<<<<<<<<<<< + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + * return + */ + __pyx_t_6 = (__pyx_v_event == Py_None); + __pyx_t_5 = (__pyx_t_6 != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":329 + * event = desc.get('event') + * if event is None: + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) # <<<<<<<<<<<<<< + * return + * f = self.buildAction(widget,desc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_Block_binds_desc_miss_event_desc, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_Block_binds_desc_miss_event_desc, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_binds_desc_miss_event_desc); + __Pyx_GIVEREF(__pyx_kp_s_Block_binds_desc_miss_event_desc); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_kp_s_Block_binds_desc_miss_event_desc); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":330 + * if event is None: + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + * return # <<<<<<<<<<<<<< + * f = self.buildAction(widget,desc) + * if f is None: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":328 + * return + * event = desc.get('event') + * if event is None: # <<<<<<<<<<<<<< + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + * return + */ + } + + /* "kivyblocks/blocks.pyx":331 + * Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + * return + * f = self.buildAction(widget,desc) # <<<<<<<<<<<<<< + * if f is None: + * Logger.info('Block: get a null function,%s',str(desc)) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_buildAction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_desc); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_f = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":332 + * return + * f = self.buildAction(widget,desc) + * if f is None: # <<<<<<<<<<<<<< + * Logger.info('Block: get a null function,%s',str(desc)) + * return + */ + __pyx_t_5 = (__pyx_v_f == Py_None); + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { + + /* "kivyblocks/blocks.pyx":333 + * f = self.buildAction(widget,desc) + * if f is None: + * Logger.info('Block: get a null function,%s',str(desc)) # <<<<<<<<<<<<<< + * return + * w.bind(**{event:f}) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_get_a_null_function_s, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_get_a_null_function_s, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_get_a_null_function_s); + __Pyx_GIVEREF(__pyx_kp_s_Block_get_a_null_function_s); + PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_kp_s_Block_get_a_null_function_s); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":334 + * if f is None: + * Logger.info('Block: get a null function,%s',str(desc)) + * return # <<<<<<<<<<<<<< + * w.bind(**{event:f}) + * # Logger.info('Block: %s bind built', str(desc)) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":332 + * return + * f = self.buildAction(widget,desc) + * if f is None: # <<<<<<<<<<<<<< + * Logger.info('Block: get a null function,%s',str(desc)) + * return + */ + } + + /* "kivyblocks/blocks.pyx":335 + * Logger.info('Block: get a null function,%s',str(desc)) + * return + * w.bind(**{event:f}) # <<<<<<<<<<<<<< + * # Logger.info('Block: %s bind built', str(desc)) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_w, __pyx_n_s_bind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(PyDict_Contains(__pyx_t_2, __pyx_v_event))) { + __Pyx_RaiseDoubleKeywordsError("function", __pyx_v_event); __PYX_ERR(0, 335, __pyx_L1_error) + } else { + if (PyDict_SetItem(__pyx_t_2, __pyx_v_event, __pyx_v_f) < 0) __PYX_ERR(0, 335, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":320 + * self.buildBind(widget,kw) + * + * def buildBind(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.buildBind", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wid); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_event); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":338 + * # Logger.info('Block: %s bind built', str(desc)) + * + * def multipleAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_29multipleAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_29multipleAction = {"multipleAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_29multipleAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_29multipleAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("multipleAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("multipleAction", 0, 3, 3, 1); __PYX_ERR(0, 338, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("multipleAction", 0, 3, 3, 2); __PYX_ERR(0, 338, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "multipleAction") < 0)) __PYX_ERR(0, 338, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("multipleAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 338, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.multipleAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_28multipleAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_28multipleAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_desc1 = NULL; + PyObject *__pyx_v_mydesc = NULL; + PyObject *__pyx_v_a = NULL; + PyObject *__pyx_v_new_desc = NULL; + PyObject *__pyx_7genexpr__pyx_v_k = NULL; + PyObject *__pyx_7genexpr__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + __Pyx_RefNannySetupContext("multipleAction", 0); + + /* "kivyblocks/blocks.pyx":339 + * + * def multipleAction(self, widget:Widget, desc, *args): + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} # <<<<<<<<<<<<<< + * mydesc = desc1.copy() + * for a in desc['actions']: + */ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 339, __pyx_L5_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 339, __pyx_L5_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 339, __pyx_L5_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 339, __pyx_L5_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 339, __pyx_L5_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 339, __pyx_L5_error) + __pyx_L9_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_7genexpr__pyx_v_k, __pyx_n_s_actions, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 339, __pyx_L5_error) + if (__pyx_t_10) { + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 339, __pyx_L5_error) + } + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; + goto __pyx_L11_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L11_exit_scope:; + } /* exit inner scope */ + __pyx_v_desc1 = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":340 + * def multipleAction(self, widget:Widget, desc, *args): + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() # <<<<<<<<<<<<<< + * for a in desc['actions']: + * new_desc = mydesc.copy() + */ + __pyx_t_1 = PyDict_Copy(__pyx_v_desc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_mydesc = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":341 + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + * for a in desc['actions']: # <<<<<<<<<<<<<< + * new_desc = mydesc.copy() + * new_desc.update(a) + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_actions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 341, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 341, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 341, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":342 + * mydesc = desc1.copy() + * for a in desc['actions']: + * new_desc = mydesc.copy() # <<<<<<<<<<<<<< + * new_desc.update(a) + * self.uniaction(widget,new_desc, *args) + */ + if (unlikely(__pyx_v_mydesc == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); + __PYX_ERR(0, 342, __pyx_L1_error) + } + __pyx_t_1 = PyDict_Copy(__pyx_v_mydesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_new_desc, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":343 + * for a in desc['actions']: + * new_desc = mydesc.copy() + * new_desc.update(a) # <<<<<<<<<<<<<< + * self.uniaction(widget,new_desc, *args) + * + */ + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_new_desc, __pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":344 + * new_desc = mydesc.copy() + * new_desc.update(a) + * self.uniaction(widget,new_desc, *args) # <<<<<<<<<<<<<< + * + * def conform_action(self, widget:Widget, desc, *args): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_uniaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_new_desc); + __Pyx_GIVEREF(__pyx_v_new_desc); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_new_desc); + __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":341 + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + * for a in desc['actions']: # <<<<<<<<<<<<<< + * new_desc = mydesc.copy() + * new_desc.update(a) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":338 + * # Logger.info('Block: %s bind built', str(desc)) + * + * def multipleAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.multipleAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_desc1); + __Pyx_XDECREF(__pyx_v_mydesc); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XDECREF(__pyx_v_new_desc); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":346 + * self.uniaction(widget,new_desc, *args) + * + * def conform_action(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_31conform_action(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_31conform_action = {"conform_action", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_31conform_action, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_31conform_action(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("conform_action (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("conform_action", 0, 3, 3, 1); __PYX_ERR(0, 346, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("conform_action", 0, 3, 3, 2); __PYX_ERR(0, 346, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "conform_action") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("conform_action", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 346, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.conform_action", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_30conform_action(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_30conform_action(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_conform_desc = NULL; + PyObject *__pyx_v_blocks = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("conform_action", 0); + + /* "kivyblocks/blocks.pyx":347 + * + * def conform_action(self, widget:Widget, desc, *args): + * conform_desc = desc.get('conform') # <<<<<<<<<<<<<< + * blocks = Blocks() + * if not conform_desc: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_conform) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_conform); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_conform_desc = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":348 + * def conform_action(self, widget:Widget, desc, *args): + * conform_desc = desc.get('conform') + * blocks = Blocks() # <<<<<<<<<<<<<< + * if not conform_desc: + * blocks.uniaction(widget, desc,*args, **kw) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_blocks = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":349 + * conform_desc = desc.get('conform') + * blocks = Blocks() + * if not conform_desc: # <<<<<<<<<<<<<< + * blocks.uniaction(widget, desc,*args, **kw) + * return + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_conform_desc); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":350 + * blocks = Blocks() + * if not conform_desc: + * blocks.uniaction(widget, desc,*args, **kw) # <<<<<<<<<<<<<< + * return + * w = blocks.widgetBuild({ + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_uniaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_desc); + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_kw); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_t_6 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 350, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_6))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":351 + * if not conform_desc: + * blocks.uniaction(widget, desc,*args, **kw) + * return # <<<<<<<<<<<<<< + * w = blocks.widgetBuild({ + * "widgettype":"Conform", + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":349 + * conform_desc = desc.get('conform') + * blocks = Blocks() + * if not conform_desc: # <<<<<<<<<<<<<< + * blocks.uniaction(widget, desc,*args, **kw) + * return + */ + } + + /* "kivyblocks/blocks.pyx":352 + * blocks.uniaction(widget, desc,*args, **kw) + * return + * w = blocks.widgetBuild({ # <<<<<<<<<<<<<< + * "widgettype":"Conform", + * "options":conform_desc + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "kivyblocks/blocks.pyx":353 + * return + * w = blocks.widgetBuild({ + * "widgettype":"Conform", # <<<<<<<<<<<<<< + * "options":conform_desc + * }) + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_widgettype, __pyx_n_s_Conform) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":354 + * w = blocks.widgetBuild({ + * "widgettype":"Conform", + * "options":conform_desc # <<<<<<<<<<<<<< + * }) + * w.bind(on_conform=partial(blocks.uniaction, widget, desc)) + */ + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_options, __pyx_v_conform_desc) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_w = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":356 + * "options":conform_desc + * }) + * w.bind(on_conform=partial(blocks.uniaction, widget, desc)) # <<<<<<<<<<<<<< + * w.open() + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_w, __pyx_n_s_bind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_uniaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_desc); + __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_conform, __pyx_t_3) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":357 + * }) + * w.bind(on_conform=partial(blocks.uniaction, widget, desc)) + * w.open() # <<<<<<<<<<<<<< + * + * def uniaction(self, widget:Widget, desc, *args): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_w, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":346 + * self.uniaction(widget,new_desc, *args) + * + * def conform_action(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.conform_action", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_conform_desc); + __Pyx_XDECREF(__pyx_v_blocks); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":359 + * w.open() + * + * def uniaction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_33uniaction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_33uniaction = {"uniaction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_33uniaction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_33uniaction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("uniaction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("uniaction", 0, 3, 3, 1); __PYX_ERR(0, 359, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("uniaction", 0, 3, 3, 2); __PYX_ERR(0, 359, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "uniaction") < 0)) __PYX_ERR(0, 359, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("uniaction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 359, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.uniaction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_32uniaction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_32uniaction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_acttype = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("uniaction", 0); + + /* "kivyblocks/blocks.pyx":360 + * + * def uniaction(self, widget:Widget, desc, *args): + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) # <<<<<<<<<<<<<< + * + * acttype = desc.get('actiontype') + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_uniaction_called_desc_s, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_uniaction_called_desc_s, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_uniaction_called_desc_s); + __Pyx_GIVEREF(__pyx_kp_s_Block_uniaction_called_desc_s); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_s_Block_uniaction_called_desc_s); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":362 + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) + * + * acttype = desc.get('actiontype') # <<<<<<<<<<<<<< + * if acttype=='blocks': + * return self.blocksAction(widget,desc, *args) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_n_s_actiontype) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_actiontype); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_acttype = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":363 + * + * acttype = desc.get('actiontype') + * if acttype=='blocks': # <<<<<<<<<<<<<< + * return self.blocksAction(widget,desc, *args) + * if acttype=='urlwidget': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_blocks, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 363, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":364 + * acttype = desc.get('actiontype') + * if acttype=='blocks': + * return self.blocksAction(widget,desc, *args) # <<<<<<<<<<<<<< + * if acttype=='urlwidget': + * return self.urlwidgetAction(widget,desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_blocksAction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_desc); + __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":363 + * + * acttype = desc.get('actiontype') + * if acttype=='blocks': # <<<<<<<<<<<<<< + * return self.blocksAction(widget,desc, *args) + * if acttype=='urlwidget': + */ + } + + /* "kivyblocks/blocks.pyx":365 + * if acttype=='blocks': + * return self.blocksAction(widget,desc, *args) + * if acttype=='urlwidget': # <<<<<<<<<<<<<< + * return self.urlwidgetAction(widget,desc, *args) + * if acttype == 'registedfunction': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_urlwidget, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 365, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":366 + * return self.blocksAction(widget,desc, *args) + * if acttype=='urlwidget': + * return self.urlwidgetAction(widget,desc, *args) # <<<<<<<<<<<<<< + * if acttype == 'registedfunction': + * return self.registedfunctionAction(widget,desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_urlwidgetAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_desc); + __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":365 + * if acttype=='blocks': + * return self.blocksAction(widget,desc, *args) + * if acttype=='urlwidget': # <<<<<<<<<<<<<< + * return self.urlwidgetAction(widget,desc, *args) + * if acttype == 'registedfunction': + */ + } + + /* "kivyblocks/blocks.pyx":367 + * if acttype=='urlwidget': + * return self.urlwidgetAction(widget,desc, *args) + * if acttype == 'registedfunction': # <<<<<<<<<<<<<< + * return self.registedfunctionAction(widget,desc, *args) + * if acttype == 'script': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_registedfunction, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 367, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":368 + * return self.urlwidgetAction(widget,desc, *args) + * if acttype == 'registedfunction': + * return self.registedfunctionAction(widget,desc, *args) # <<<<<<<<<<<<<< + * if acttype == 'script': + * return self.scriptAction(widget, desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_registedfunctionAction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_desc); + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":367 + * if acttype=='urlwidget': + * return self.urlwidgetAction(widget,desc, *args) + * if acttype == 'registedfunction': # <<<<<<<<<<<<<< + * return self.registedfunctionAction(widget,desc, *args) + * if acttype == 'script': + */ + } + + /* "kivyblocks/blocks.pyx":369 + * if acttype == 'registedfunction': + * return self.registedfunctionAction(widget,desc, *args) + * if acttype == 'script': # <<<<<<<<<<<<<< + * return self.scriptAction(widget, desc, *args) + * if acttype == 'method': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_script_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":370 + * return self.registedfunctionAction(widget,desc, *args) + * if acttype == 'script': + * return self.scriptAction(widget, desc, *args) # <<<<<<<<<<<<<< + * if acttype == 'method': + * return self.methodAction(widget, desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scriptAction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_desc); + __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":369 + * if acttype == 'registedfunction': + * return self.registedfunctionAction(widget,desc, *args) + * if acttype == 'script': # <<<<<<<<<<<<<< + * return self.scriptAction(widget, desc, *args) + * if acttype == 'method': + */ + } + + /* "kivyblocks/blocks.pyx":371 + * if acttype == 'script': + * return self.scriptAction(widget, desc, *args) + * if acttype == 'method': # <<<<<<<<<<<<<< + * return self.methodAction(widget, desc, *args) + * if acttype == 'event': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_method, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":372 + * return self.scriptAction(widget, desc, *args) + * if acttype == 'method': + * return self.methodAction(widget, desc, *args) # <<<<<<<<<<<<<< + * if acttype == 'event': + * return self.eventAction(widget, desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_methodAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_desc); + __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":371 + * if acttype == 'script': + * return self.scriptAction(widget, desc, *args) + * if acttype == 'method': # <<<<<<<<<<<<<< + * return self.methodAction(widget, desc, *args) + * if acttype == 'event': + */ + } + + /* "kivyblocks/blocks.pyx":373 + * if acttype == 'method': + * return self.methodAction(widget, desc, *args) + * if acttype == 'event': # <<<<<<<<<<<<<< + * return self.eventAction(widget, desc, *args) + * if acttype == 'multiple': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_event, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 373, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":374 + * return self.methodAction(widget, desc, *args) + * if acttype == 'event': + * return self.eventAction(widget, desc, *args) # <<<<<<<<<<<<<< + * if acttype == 'multiple': + * return self.multipleAction(widget, desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eventAction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_desc); + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":373 + * if acttype == 'method': + * return self.methodAction(widget, desc, *args) + * if acttype == 'event': # <<<<<<<<<<<<<< + * return self.eventAction(widget, desc, *args) + * if acttype == 'multiple': + */ + } + + /* "kivyblocks/blocks.pyx":375 + * if acttype == 'event': + * return self.eventAction(widget, desc, *args) + * if acttype == 'multiple': # <<<<<<<<<<<<<< + * return self.multipleAction(widget, desc, *args) + * + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_acttype, __pyx_n_s_multiple, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 375, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":376 + * return self.eventAction(widget, desc, *args) + * if acttype == 'multiple': + * return self.multipleAction(widget, desc, *args) # <<<<<<<<<<<<<< + * + * alert("actiontype(%s) invalid" % acttype,title='error') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_multipleAction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_desc); + __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":375 + * if acttype == 'event': + * return self.eventAction(widget, desc, *args) + * if acttype == 'multiple': # <<<<<<<<<<<<<< + * return self.multipleAction(widget, desc, *args) + * + */ + } + + /* "kivyblocks/blocks.pyx":378 + * return self.multipleAction(widget, desc, *args) + * + * alert("actiontype(%s) invalid" % acttype,title='error') # <<<<<<<<<<<<<< + * + * def eventAction(self, widget:Widget, desc, *args): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_alert); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_actiontype_s_invalid, __pyx_v_acttype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_title, __pyx_n_s_error) < 0) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":359 + * w.open() + * + * def uniaction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.uniaction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_acttype); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":380 + * alert("actiontype(%s) invalid" % acttype,title='error') + * + * def eventAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_35eventAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_35eventAction = {"eventAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_35eventAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_35eventAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("eventAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("eventAction", 0, 3, 3, 1); __PYX_ERR(0, 380, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("eventAction", 0, 3, 3, 2); __PYX_ERR(0, 380, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "eventAction") < 0)) __PYX_ERR(0, 380, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("eventAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 380, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.eventAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_34eventAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_34eventAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_event = NULL; + PyObject *__pyx_v_params = NULL; + PyObject *__pyx_v_d = NULL; + CYTHON_UNUSED PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + Py_ssize_t __pyx_t_13; + Py_UCS4 __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + __Pyx_RefNannySetupContext("eventAction", 0); + + /* "kivyblocks/blocks.pyx":381 + * + * def eventAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * event = desc.get('dispatch_event') + * if not event: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":382 + * def eventAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') # <<<<<<<<<<<<<< + * if not event: + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_n_s_dispatch_event) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_dispatch_event); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_event = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":383 + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + * if not event: # <<<<<<<<<<<<<< + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + * str(desc)) + */ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_event); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_7 = ((!__pyx_t_6) != 0); + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":384 + * event = desc.get('dispatch_event') + * if not event: + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', # <<<<<<<<<<<<<< + * str(desc)) + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":385 + * if not event: + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + * str(desc)) # <<<<<<<<<<<<<< + * return + * params = desc.get('params',{}) + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_eventAction_desc_s_miss_di, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_eventAction_desc_s_miss_di, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_eventAction_desc_s_miss_di); + __Pyx_GIVEREF(__pyx_kp_s_Block_eventAction_desc_s_miss_di); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_kp_s_Block_eventAction_desc_s_miss_di); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":386 + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + * str(desc)) + * return # <<<<<<<<<<<<<< + * params = desc.get('params',{}) + * d = self.getActionData(widget,desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":383 + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + * if not event: # <<<<<<<<<<<<<< + * Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + * str(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":387 + * str(desc)) + * return + * params = desc.get('params',{}) # <<<<<<<<<<<<<< + * d = self.getActionData(widget,desc, *args) + * if d: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_params, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_params, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_n_s_params); + __Pyx_GIVEREF(__pyx_n_s_params); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_n_s_params); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_params = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":388 + * return + * params = desc.get('params',{}) + * d = self.getActionData(widget,desc, *args) # <<<<<<<<<<<<<< + * if d: + * params.update(d) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_desc); + __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_d = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":389 + * params = desc.get('params',{}) + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * params.update(d) + * try: + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 389, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":390 + * d = self.getActionData(widget,desc, *args) + * if d: + * params.update(d) # <<<<<<<<<<<<<< + * try: + * target.dispatch(event, params) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":389 + * params = desc.get('params',{}) + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * params.update(d) + * try: + */ + } + + /* "kivyblocks/blocks.pyx":391 + * if d: + * params.update(d) + * try: # <<<<<<<<<<<<<< + * target.dispatch(event, params) + * except Exception as e: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":392 + * params.update(d) + * try: + * target.dispatch(event, params) # <<<<<<<<<<<<<< + * except Exception as e: + * Logger.info(f'Block: eventAction():dispatch {event} error') + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_event, __pyx_v_params}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_event, __pyx_v_params}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 392, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_event); + __Pyx_GIVEREF(__pyx_v_event); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_v_event); + __Pyx_INCREF(__pyx_v_params); + __Pyx_GIVEREF(__pyx_v_params); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_params); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":391 + * if d: + * params.update(d) + * try: # <<<<<<<<<<<<<< + * target.dispatch(event, params) + * except Exception as e: + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L10_try_end; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":393 + * try: + * target.dispatch(event, params) + * except Exception as e: # <<<<<<<<<<<<<< + * Logger.info(f'Block: eventAction():dispatch {event} error') + * print_exc() + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.eventAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(0, 393, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_e = __pyx_t_3; + + /* "kivyblocks/blocks.pyx":394 + * target.dispatch(event, params) + * except Exception as e: + * Logger.info(f'Block: eventAction():dispatch {event} error') # <<<<<<<<<<<<<< + * print_exc() + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = 0; + __pyx_t_14 = 127; + __Pyx_INCREF(__pyx_kp_u_Block_eventAction_dispatch); + __pyx_t_13 += 30; + __Pyx_GIVEREF(__pyx_kp_u_Block_eventAction_dispatch); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Block_eventAction_dispatch); + __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_event, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14; + __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15); + __pyx_t_15 = 0; + __Pyx_INCREF(__pyx_kp_u_error_2); + __pyx_t_13 += 6; + __Pyx_GIVEREF(__pyx_kp_u_error_2); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_error_2); + __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_2, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_15); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":395 + * except Exception as e: + * Logger.info(f'Block: eventAction():dispatch {event} error') + * print_exc() # <<<<<<<<<<<<<< + * return + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 395, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_15 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":396 + * Logger.info(f'Block: eventAction():dispatch {event} error') + * print_exc() + * return # <<<<<<<<<<<<<< + * + * def get_target(self, widget:Widget, desc): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L8_except_return; + } + goto __pyx_L7_except_error; + __pyx_L7_except_error:; + + /* "kivyblocks/blocks.pyx":391 + * if d: + * params.update(d) + * try: # <<<<<<<<<<<<<< + * target.dispatch(event, params) + * except Exception as e: + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L8_except_return:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L0; + __pyx_L10_try_end:; + } + + /* "kivyblocks/blocks.pyx":380 + * alert("actiontype(%s) invalid" % acttype,title='error') + * + * def eventAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.eventAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_event); + __Pyx_XDECREF(__pyx_v_params); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":398 + * return + * + * def get_target(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * if not desc.get('target'): + * return None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_37get_target(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_37get_target = {"get_target", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_37get_target, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_37get_target(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_target (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_target", 1, 3, 3, 1); __PYX_ERR(0, 398, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_target", 1, 3, 3, 2); __PYX_ERR(0, 398, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_target") < 0)) __PYX_ERR(0, 398, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_target", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 398, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.get_target", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_36get_target(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_36get_target(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("get_target", 0); + + /* "kivyblocks/blocks.pyx":399 + * + * def get_target(self, widget:Widget, desc): + * if not desc.get('target'): # <<<<<<<<<<<<<< + * return None + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_target) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_target); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":400 + * def get_target(self, widget:Widget, desc): + * if not desc.get('target'): + * return None # <<<<<<<<<<<<<< + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":399 + * + * def get_target(self, widget:Widget, desc): + * if not desc.get('target'): # <<<<<<<<<<<<<< + * return None + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + */ + } + + /* "kivyblocks/blocks.pyx":401 + * if not desc.get('target'): + * return None + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) # <<<<<<<<<<<<<< + * + * def blocksAction(self, widget:Widget, desc, *args): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getWidgetById); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_n_s_target) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_target); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_from_widget, __pyx_v_widget) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":398 + * return + * + * def get_target(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * if not desc.get('target'): + * return None + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.get_target", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_39blocksAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_39blocksAction = {"blocksAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_39blocksAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_39blocksAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("blocksAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("blocksAction", 0, 3, 3, 1); __PYX_ERR(0, 403, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("blocksAction", 0, 3, 3, 2); __PYX_ERR(0, 403, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "blocksAction") < 0)) __PYX_ERR(0, 403, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("blocksAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 403, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_38blocksAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":412 + * p.update(d) + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_1doit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_12blocksAction_1doit = {"doit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_1doit, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_1doit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_target = 0; + PyObject *__pyx_v_add_mode = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + PyObject *__pyx_v_w = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("doit (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_add_mode,&__pyx_n_s_o,&__pyx_n_s_w,0}; + PyObject* values[4] = {0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_add_mode)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 1); __PYX_ERR(0, 412, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 2); __PYX_ERR(0, 412, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 3); __PYX_ERR(0, 412, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "doit") < 0)) __PYX_ERR(0, 412, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_target = values[0]; + __pyx_v_add_mode = ((PyObject*)values[1]); + __pyx_v_o = values[2]; + __pyx_v_w = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_add_mode), (&PyString_Type), 1, "add_mode", 1))) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_doit(__pyx_self, __pyx_v_target, __pyx_v_add_mode, __pyx_v_o, __pyx_v_w); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_add_mode, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_w) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("doit", 0); + + /* "kivyblocks/blocks.pyx":413 + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: # <<<<<<<<<<<<<< + * if add_mode == 'replace': + * target.clear_widgets() + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 413, __pyx_L1_error) + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":414 + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: + * if add_mode == 'replace': # <<<<<<<<<<<<<< + * target.clear_widgets() + * target.add_widget(w) + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_add_mode, __pyx_n_s_replace, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":415 + * if target: + * if add_mode == 'replace': + * target.clear_widgets() # <<<<<<<<<<<<<< + * target.add_widget(w) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_clear_widgets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":414 + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: + * if add_mode == 'replace': # <<<<<<<<<<<<<< + * target.clear_widgets() + * target.add_widget(w) + */ + } + + /* "kivyblocks/blocks.pyx":416 + * if add_mode == 'replace': + * target.clear_widgets() + * target.add_widget(w) # <<<<<<<<<<<<<< + * + * def doerr(o,e): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":413 + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: # <<<<<<<<<<<<<< + * if add_mode == 'replace': + * target.clear_widgets() + */ + } + + /* "kivyblocks/blocks.pyx":412 + * p.update(d) + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":418 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_3doerr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_12blocksAction_3doerr = {"doerr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_3doerr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_12blocksAction_3doerr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + PyObject *__pyx_v_e = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("doerr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_o,&__pyx_n_s_e,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doerr", 1, 2, 2, 1); __PYX_ERR(0, 418, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "doerr") < 0)) __PYX_ERR(0, 418, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_o = values[0]; + __pyx_v_e = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("doerr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 418, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction.doerr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_2doerr(__pyx_self, __pyx_v_o, __pyx_v_e); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_12blocksAction_2doerr(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_e) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *__pyx_cur_scope; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("doerr", 0); + __pyx_outer_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "kivyblocks/blocks.pyx":419 + * + * def doerr(o,e): + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' # <<<<<<<<<<<<<< + * ,str(desc)) + * raise e + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":420 + * def doerr(o,e): + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) # <<<<<<<<<<<<<< + * raise e + * + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_desc)) { __Pyx_RaiseClosureNameError("desc"); __PYX_ERR(0, 420, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_blocksAction_desc_s_widget, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_blocksAction_desc_s_widget, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_blocksAction_desc_s_widget); + __Pyx_GIVEREF(__pyx_kp_s_Block_blocksAction_desc_s_widget); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_s_Block_blocksAction_desc_s_widget); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":421 + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) + * raise e # <<<<<<<<<<<<<< + * + * b = Blocks() + */ + __Pyx_Raise(__pyx_v_e, 0, 0, 0); + __PYX_ERR(0, 421, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":418 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction.doerr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_38blocksAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *__pyx_cur_scope; + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_add_mode = NULL; + PyObject *__pyx_v_opts = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_v_doit = 0; + PyObject *__pyx_v_doerr = 0; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + __Pyx_RefNannySetupContext("blocksAction", 0); + __pyx_cur_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct__blocksAction, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 403, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_desc = __pyx_v_desc; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + + /* "kivyblocks/blocks.pyx":404 + * + * def blocksAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_cur_scope->__pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_cur_scope->__pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_widget); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":405 + * def blocksAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') # <<<<<<<<<<<<<< + * opts = desc.get('options').copy() + * d = self.getActionData(widget,desc, *args) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_add_mode = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":406 + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() # <<<<<<<<<<<<<< + * d = self.getActionData(widget,desc, *args) + * p = opts.get('options',{}).copy() + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_n_s_options) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_options); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_opts = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":407 + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() + * d = self.getActionData(widget,desc, *args) # <<<<<<<<<<<<<< + * p = opts.get('options',{}).copy() + * if d: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_desc); + __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_d = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":408 + * opts = desc.get('options').copy() + * d = self.getActionData(widget,desc, *args) + * p = opts.get('options',{}).copy() # <<<<<<<<<<<<<< + * if d: + * p.update(d) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_options, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_options, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_n_s_options); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_p = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":409 + * d = self.getActionData(widget,desc, *args) + * p = opts.get('options',{}).copy() + * if d: # <<<<<<<<<<<<<< + * p.update(d) + * opts['options'] = p + */ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 409, __pyx_L1_error) + if (__pyx_t_8) { + + /* "kivyblocks/blocks.pyx":410 + * p = opts.get('options',{}).copy() + * if d: + * p.update(d) # <<<<<<<<<<<<<< + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":409 + * d = self.getActionData(widget,desc, *args) + * p = opts.get('options',{}).copy() + * if d: # <<<<<<<<<<<<<< + * p.update(d) + * opts['options'] = p + */ + } + + /* "kivyblocks/blocks.pyx":411 + * if d: + * p.update(d) + * opts['options'] = p # <<<<<<<<<<<<<< + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: + */ + if (unlikely(PyObject_SetItem(__pyx_v_opts, __pyx_n_s_options, __pyx_v_p) < 0)) __PYX_ERR(0, 411, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":412 + * p.update(d) + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_target, __pyx_t_2) < 0) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_add_mode, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_w, __pyx_t_2) < 0) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_12blocksAction_1doit, 0, __pyx_n_s_Blocks_blocksAction_locals_doit, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_doit = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":418 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_12blocksAction_3doerr, 0, __pyx_n_s_Blocks_blocksAction_locals_doerr, ((PyObject*)__pyx_cur_scope), __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_doerr = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":423 + * raise e + * + * b = Blocks() # <<<<<<<<<<<<<< + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_b = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":424 + * + * b = Blocks() + * b.bind(on_built=partial(doit,target,add_mode)) # <<<<<<<<<<<<<< + * b.bind(on_failed=doerr) + * b.widgetBuild(opts) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_bind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_doit, __pyx_v_target, __pyx_v_add_mode}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_doit, __pyx_v_target, __pyx_v_add_mode}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_6 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_doit); + __Pyx_GIVEREF(__pyx_v_doit); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_doit); + __Pyx_INCREF(__pyx_v_target); + __Pyx_GIVEREF(__pyx_v_target); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_target); + __Pyx_INCREF(__pyx_v_add_mode); + __Pyx_GIVEREF(__pyx_v_add_mode); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_4, __pyx_v_add_mode); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_on_built, __pyx_t_1) < 0) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":425 + * b = Blocks() + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) # <<<<<<<<<<<<<< + * b.widgetBuild(opts) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_bind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_on_failed, __pyx_v_doerr) < 0) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":426 + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) + * b.widgetBuild(opts) # <<<<<<<<<<<<<< + * + * def urlwidgetAction(self, widget:Widget, desc, *args): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_opts) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_opts); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.blocksAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_add_mode); + __Pyx_XDECREF(__pyx_v_opts); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_v_doit); + __Pyx_XDECREF(__pyx_v_doerr); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_41urlwidgetAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_41urlwidgetAction = {"urlwidgetAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_41urlwidgetAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_41urlwidgetAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("urlwidgetAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("urlwidgetAction", 0, 3, 3, 1); __PYX_ERR(0, 428, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("urlwidgetAction", 0, 3, 3, 2); __PYX_ERR(0, 428, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "urlwidgetAction") < 0)) __PYX_ERR(0, 428, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("urlwidgetAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 428, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_40urlwidgetAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":444 + * } + * + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_1doit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_1doit = {"doit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_1doit, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_1doit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_target = 0; + PyObject *__pyx_v_add_mode = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + PyObject *__pyx_v_w = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("doit (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_add_mode,&__pyx_n_s_o,&__pyx_n_s_w,0}; + PyObject* values[4] = {0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_add_mode)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 1); __PYX_ERR(0, 444, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 2); __PYX_ERR(0, 444, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, 3); __PYX_ERR(0, 444, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "doit") < 0)) __PYX_ERR(0, 444, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_target = values[0]; + __pyx_v_add_mode = ((PyObject*)values[1]); + __pyx_v_o = values[2]; + __pyx_v_w = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("doit", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 444, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_add_mode), (&PyString_Type), 1, "add_mode", 1))) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_doit(__pyx_self, __pyx_v_target, __pyx_v_add_mode, __pyx_v_o, __pyx_v_w); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_add_mode, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_w) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("doit", 0); + + /* "kivyblocks/blocks.pyx":445 + * + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: # <<<<<<<<<<<<<< + * if add_mode == 'replace': + * target.clear_widgets() + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 445, __pyx_L1_error) + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":446 + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: + * if add_mode == 'replace': # <<<<<<<<<<<<<< + * target.clear_widgets() + * target.add_widget(w) + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_add_mode, __pyx_n_s_replace, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":447 + * if target: + * if add_mode == 'replace': + * target.clear_widgets() # <<<<<<<<<<<<<< + * target.add_widget(w) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_clear_widgets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":446 + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: + * if add_mode == 'replace': # <<<<<<<<<<<<<< + * target.clear_widgets() + * target.add_widget(w) + */ + } + + /* "kivyblocks/blocks.pyx":448 + * if add_mode == 'replace': + * target.clear_widgets() + * target.add_widget(w) # <<<<<<<<<<<<<< + * + * def doerr(o,e): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":445 + * + * def doit(target:Widget, add_mode:str, o, w:Widget): + * if target: # <<<<<<<<<<<<<< + * if add_mode == 'replace': + * target.clear_widgets() + */ + } + + /* "kivyblocks/blocks.pyx":444 + * } + * + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":450 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_3doerr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_3doerr = {"doerr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_3doerr, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_3doerr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + CYTHON_UNUSED PyObject *__pyx_v_e = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("doerr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_o,&__pyx_n_s_e,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("doerr", 1, 2, 2, 1); __PYX_ERR(0, 450, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "doerr") < 0)) __PYX_ERR(0, 450, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_o = values[0]; + __pyx_v_e = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("doerr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 450, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction.doerr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_2doerr(__pyx_self, __pyx_v_o, __pyx_v_e); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_2doerr(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_e) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *__pyx_cur_scope; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("doerr", 0); + __pyx_outer_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "kivyblocks/blocks.pyx":451 + * + * def doerr(o,e): + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' # <<<<<<<<<<<<<< + * ,str(desc)) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":452 + * def doerr(o,e): + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + * ,str(desc)) # <<<<<<<<<<<<<< + * + * b = Blocks() + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_desc)) { __Pyx_RaiseClosureNameError("desc"); __PYX_ERR(0, 452, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_urlwidgetAction_desc_s_wid, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_Block_urlwidgetAction_desc_s_wid, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_urlwidgetAction_desc_s_wid); + __Pyx_GIVEREF(__pyx_kp_s_Block_urlwidgetAction_desc_s_wid); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_s_Block_urlwidgetAction_desc_s_wid); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":450 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction.doerr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_40urlwidgetAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *__pyx_cur_scope; + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_add_mode = NULL; + PyObject *__pyx_v_opts = NULL; + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_doit = 0; + PyObject *__pyx_v_doerr = 0; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("urlwidgetAction", 0); + __pyx_cur_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 428, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_desc = __pyx_v_desc; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + + /* "kivyblocks/blocks.pyx":429 + * + * def urlwidgetAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_cur_scope->__pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_cur_scope->__pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_widget); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":430 + * def urlwidgetAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') # <<<<<<<<<<<<<< + * opts = desc.get('options').copy() + * p = opts.get('params',{}).copy() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_add_mode = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":431 + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() # <<<<<<<<<<<<<< + * p = opts.get('params',{}).copy() + * if len(args) >= 1 and isinstance(args[0],dict): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_n_s_options) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_options); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_opts = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":432 + * add_mode = desc.get('mode','replace') + * opts = desc.get('options').copy() + * p = opts.get('params',{}).copy() # <<<<<<<<<<<<<< + * if len(args) >= 1 and isinstance(args[0],dict): + * p.update(args[0]) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_params, __pyx_t_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_params, __pyx_t_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_params); + __Pyx_GIVEREF(__pyx_n_s_params); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_n_s_params); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_p = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":433 + * opts = desc.get('options').copy() + * p = opts.get('params',{}).copy() + * if len(args) >= 1 and isinstance(args[0],dict): # <<<<<<<<<<<<<< + * p.update(args[0]) + * d = self.getActionData(widget, desc, *args) + */ + __pyx_t_9 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_10 = ((__pyx_t_9 >= 1) != 0); + if (__pyx_t_10) { + } else { + __pyx_t_8 = __pyx_t_10; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyDict_Check(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__pyx_t_10 != 0); + __pyx_t_8 = __pyx_t_11; + __pyx_L4_bool_binop_done:; + if (__pyx_t_8) { + + /* "kivyblocks/blocks.pyx":434 + * p = opts.get('params',{}).copy() + * if len(args) >= 1 and isinstance(args[0],dict): + * p.update(args[0]) # <<<<<<<<<<<<<< + * d = self.getActionData(widget, desc, *args) + * if d: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":433 + * opts = desc.get('options').copy() + * p = opts.get('params',{}).copy() + * if len(args) >= 1 and isinstance(args[0],dict): # <<<<<<<<<<<<<< + * p.update(args[0]) + * d = self.getActionData(widget, desc, *args) + */ + } + + /* "kivyblocks/blocks.pyx":435 + * if len(args) >= 1 and isinstance(args[0],dict): + * p.update(args[0]) + * d = self.getActionData(widget, desc, *args) # <<<<<<<<<<<<<< + * if d: + * p.update(d) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_desc); + __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_d = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":436 + * p.update(args[0]) + * d = self.getActionData(widget, desc, *args) + * if d: # <<<<<<<<<<<<<< + * p.update(d) + * opts['params'] = p + */ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 436, __pyx_L1_error) + if (__pyx_t_8) { + + /* "kivyblocks/blocks.pyx":437 + * d = self.getActionData(widget, desc, *args) + * if d: + * p.update(d) # <<<<<<<<<<<<<< + * opts['params'] = p + * d = { + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":436 + * p.update(args[0]) + * d = self.getActionData(widget, desc, *args) + * if d: # <<<<<<<<<<<<<< + * p.update(d) + * opts['params'] = p + */ + } + + /* "kivyblocks/blocks.pyx":438 + * if d: + * p.update(d) + * opts['params'] = p # <<<<<<<<<<<<<< + * d = { + * 'widgettype' : 'urlwidget', + */ + if (unlikely(PyObject_SetItem(__pyx_v_opts, __pyx_n_s_params, __pyx_v_p) < 0)) __PYX_ERR(0, 438, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":440 + * opts['params'] = p + * d = { + * 'widgettype' : 'urlwidget', # <<<<<<<<<<<<<< + * 'options': opts + * } + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_widgettype, __pyx_n_s_urlwidget) < 0) __PYX_ERR(0, 440, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":441 + * d = { + * 'widgettype' : 'urlwidget', + * 'options': opts # <<<<<<<<<<<<<< + * } + * + */ + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_options, __pyx_v_opts) < 0) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_d, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":444 + * } + * + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Widget); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_target, __pyx_t_5) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_add_mode, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Widget); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_w, __pyx_t_5) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_1doit, 0, __pyx_n_s_Blocks_urlwidgetAction_locals_do, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_doit = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":450 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_15urlwidgetAction_3doerr, 0, __pyx_n_s_Blocks_urlwidgetAction_locals_do_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_doerr = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":454 + * ,str(desc)) + * + * b = Blocks() # <<<<<<<<<<<<<< + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_b = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":455 + * + * b = Blocks() + * b.bind(on_built=partial(doit,target,add_mode)) # <<<<<<<<<<<<<< + * b.bind(on_failed=doerr) + * b.widgetBuild(d) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_bind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_doit, __pyx_v_target, __pyx_v_add_mode}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_doit, __pyx_v_target, __pyx_v_add_mode}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_6 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_doit); + __Pyx_GIVEREF(__pyx_v_doit); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_doit); + __Pyx_INCREF(__pyx_v_target); + __Pyx_GIVEREF(__pyx_v_target); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_target); + __Pyx_INCREF(__pyx_v_add_mode); + __Pyx_GIVEREF(__pyx_v_add_mode); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_4, __pyx_v_add_mode); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_on_built, __pyx_t_2) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":456 + * b = Blocks() + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) # <<<<<<<<<<<<<< + * b.widgetBuild(d) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_bind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_on_failed, __pyx_v_doerr) < 0) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":457 + * b.bind(on_built=partial(doit,target,add_mode)) + * b.bind(on_failed=doerr) + * b.widgetBuild(d) # <<<<<<<<<<<<<< + * + * def getActionData(self, widget:Widget, desc,*args): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.urlwidgetAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_add_mode); + __Pyx_XDECREF(__pyx_v_opts); + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_doit); + __Pyx_XDECREF(__pyx_v_doerr); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":459 + * b.widgetBuild(d) + * + * def getActionData(self, widget:Widget, desc,*args): # <<<<<<<<<<<<<< + * data = {} + * rtdesc = self.build_rtdesc(desc) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_43getActionData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_43getActionData = {"getActionData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_43getActionData, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_43getActionData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getActionData (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getActionData", 0, 3, 3, 1); __PYX_ERR(0, 459, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getActionData", 0, 3, 3, 2); __PYX_ERR(0, 459, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getActionData") < 0)) __PYX_ERR(0, 459, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getActionData", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 459, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getActionData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_42getActionData(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_42getActionData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_v_rtdesc = NULL; + PyObject *__pyx_v_rt = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("getActionData", 0); + + /* "kivyblocks/blocks.pyx":460 + * + * def getActionData(self, widget:Widget, desc,*args): + * data = {} # <<<<<<<<<<<<<< + * rtdesc = self.build_rtdesc(desc) + * rt = self.get_rtdata(widget, rtdesc, *args) + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":461 + * def getActionData(self, widget:Widget, desc,*args): + * data = {} + * rtdesc = self.build_rtdesc(desc) # <<<<<<<<<<<<<< + * rt = self.get_rtdata(widget, rtdesc, *args) + * data.update(rt) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_rtdesc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_rtdesc = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":462 + * data = {} + * rtdesc = self.build_rtdesc(desc) + * rt = self.get_rtdata(widget, rtdesc, *args) # <<<<<<<<<<<<<< + * data.update(rt) + * if desc.get('keymapping'): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_rtdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_rtdesc); + __Pyx_GIVEREF(__pyx_v_rtdesc); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_rtdesc); + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_rt = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":463 + * rtdesc = self.build_rtdesc(desc) + * rt = self.get_rtdata(widget, rtdesc, *args) + * data.update(rt) # <<<<<<<<<<<<<< + * if desc.get('keymapping'): + * data = keyMapping(data, desc.get('keymapping')) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_rt) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rt); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":464 + * rt = self.get_rtdata(widget, rtdesc, *args) + * data.update(rt) + * if desc.get('keymapping'): # <<<<<<<<<<<<<< + * data = keyMapping(data, desc.get('keymapping')) + * return data + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_n_s_keymapping) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_keymapping); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":465 + * data.update(rt) + * if desc.get('keymapping'): + * data = keyMapping(data, desc.get('keymapping')) # <<<<<<<<<<<<<< + * return data + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_keyMapping); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_keymapping) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_keymapping); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_data); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":464 + * rt = self.get_rtdata(widget, rtdesc, *args) + * data.update(rt) + * if desc.get('keymapping'): # <<<<<<<<<<<<<< + * data = keyMapping(data, desc.get('keymapping')) + * return data + */ + } + + /* "kivyblocks/blocks.pyx":466 + * if desc.get('keymapping'): + * data = keyMapping(data, desc.get('keymapping')) + * return data # <<<<<<<<<<<<<< + * + * def registedfunctionAction(self, widget:Widget, desc, *args): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":459 + * b.widgetBuild(d) + * + * def getActionData(self, widget:Widget, desc,*args): # <<<<<<<<<<<<<< + * data = {} + * rtdesc = self.build_rtdesc(desc) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getActionData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XDECREF(__pyx_v_rtdesc); + __Pyx_XDECREF(__pyx_v_rt); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":468 + * return data + * + * def registedfunctionAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * rf = RegisterFunction() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_45registedfunctionAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_45registedfunctionAction = {"registedfunctionAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_45registedfunctionAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_45registedfunctionAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("registedfunctionAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("registedfunctionAction", 0, 3, 3, 1); __PYX_ERR(0, 468, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("registedfunctionAction", 0, 3, 3, 2); __PYX_ERR(0, 468, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "registedfunctionAction") < 0)) __PYX_ERR(0, 468, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("registedfunctionAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 468, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.registedfunctionAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_44registedfunctionAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_44registedfunctionAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_rf = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_func = NULL; + PyObject *__pyx_v_params = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("registedfunctionAction", 0); + + /* "kivyblocks/blocks.pyx":469 + * + * def registedfunctionAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * rf = RegisterFunction() + * name = desc.get('rfname') + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":470 + * def registedfunctionAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) + * rf = RegisterFunction() # <<<<<<<<<<<<<< + * name = desc.get('rfname') + * func = rf.get(name) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RegisterFunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_rf = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":471 + * target = self.get_target(widget, desc) + * rf = RegisterFunction() + * name = desc.get('rfname') # <<<<<<<<<<<<<< + * func = rf.get(name) + * if func is None: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_n_s_rfname) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_rfname); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":472 + * rf = RegisterFunction() + * name = desc.get('rfname') + * func = rf.get(name) # <<<<<<<<<<<<<< + * if func is None: + * Logger.info('Block: desc=%s rfname(%s) not found', + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_func = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":473 + * name = desc.get('rfname') + * func = rf.get(name) + * if func is None: # <<<<<<<<<<<<<< + * Logger.info('Block: desc=%s rfname(%s) not found', + * str(desc), name) + */ + __pyx_t_6 = (__pyx_v_func == Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (unlikely(__pyx_t_7)) { + + /* "kivyblocks/blocks.pyx":474 + * func = rf.get(name) + * if func is None: + * Logger.info('Block: desc=%s rfname(%s) not found', # <<<<<<<<<<<<<< + * str(desc), name) + * raise Exception('rfname(%s) not found' % name) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":475 + * if func is None: + * Logger.info('Block: desc=%s rfname(%s) not found', + * str(desc), name) # <<<<<<<<<<<<<< + * raise Exception('rfname(%s) not found' % name) + * + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s_Block_desc_s_rfname_s_not_found, __pyx_t_2, __pyx_v_name}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s_Block_desc_s_rfname_s_not_found, __pyx_t_2, __pyx_v_name}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_desc_s_rfname_s_not_found); + __Pyx_GIVEREF(__pyx_kp_s_Block_desc_s_rfname_s_not_found); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_kp_s_Block_desc_s_rfname_s_not_found); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_2); + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_4, __pyx_v_name); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":476 + * Logger.info('Block: desc=%s rfname(%s) not found', + * str(desc), name) + * raise Exception('rfname(%s) not found' % name) # <<<<<<<<<<<<<< + * + * params = desc.get('params',{}).copy() + */ + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_rfname_s_not_found, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 476, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":473 + * name = desc.get('rfname') + * func = rf.get(name) + * if func is None: # <<<<<<<<<<<<<< + * Logger.info('Block: desc=%s rfname(%s) not found', + * str(desc), name) + */ + } + + /* "kivyblocks/blocks.pyx":478 + * raise Exception('rfname(%s) not found' % name) + * + * params = desc.get('params',{}).copy() # <<<<<<<<<<<<<< + * d = self.getActionData(widget,desc, *args) + * if d: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_params, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_params, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_n_s_params); + __Pyx_GIVEREF(__pyx_n_s_params); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_4, __pyx_n_s_params); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_4, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_params = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":479 + * + * params = desc.get('params',{}).copy() + * d = self.getActionData(widget,desc, *args) # <<<<<<<<<<<<<< + * if d: + * params.update(d) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_desc); + __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_d = __pyx_t_8; + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":480 + * params = desc.get('params',{}).copy() + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * params.update(d) + * func(target, *args, **params) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 480, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":481 + * d = self.getActionData(widget,desc, *args) + * if d: + * params.update(d) # <<<<<<<<<<<<<< + * func(target, *args, **params) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":480 + * params = desc.get('params',{}).copy() + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * params.update(d) + * func(target, *args, **params) + */ + } + + /* "kivyblocks/blocks.pyx":482 + * if d: + * params.update(d) + * func(target, *args, **params) # <<<<<<<<<<<<<< + * + * def scriptAction(self, widget:Widget, desc, *args): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_target); + __Pyx_GIVEREF(__pyx_v_target); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_target); + __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(__pyx_v_params == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 482, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_params))) { + __pyx_t_8 = PyDict_Copy(__pyx_v_params); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } else { + __pyx_t_8 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_params, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":468 + * return data + * + * def registedfunctionAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * rf = RegisterFunction() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.registedfunctionAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_rf); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_func); + __Pyx_XDECREF(__pyx_v_params); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":484 + * func(target, *args, **params) + * + * def scriptAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * script = desc.get('script') + * if not script: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_47scriptAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_47scriptAction = {"scriptAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_47scriptAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_47scriptAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("scriptAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("scriptAction", 0, 3, 3, 1); __PYX_ERR(0, 484, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("scriptAction", 0, 3, 3, 2); __PYX_ERR(0, 484, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "scriptAction") < 0)) __PYX_ERR(0, 484, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("scriptAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 484, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.scriptAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_46scriptAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_46scriptAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_script = NULL; + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_ns = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + __Pyx_RefNannySetupContext("scriptAction", 0); + + /* "kivyblocks/blocks.pyx":485 + * + * def scriptAction(self, widget:Widget, desc, *args): + * script = desc.get('script') # <<<<<<<<<<<<<< + * if not script: + * Logger.info('Block: scriptAction():desc(%s) target not found', + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_script_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_script_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_script = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":486 + * def scriptAction(self, widget:Widget, desc, *args): + * script = desc.get('script') + * if not script: # <<<<<<<<<<<<<< + * Logger.info('Block: scriptAction():desc(%s) target not found', + * str(desc)) + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_script); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":487 + * script = desc.get('script') + * if not script: + * Logger.info('Block: scriptAction():desc(%s) target not found', # <<<<<<<<<<<<<< + * str(desc)) + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":488 + * if not script: + * Logger.info('Block: scriptAction():desc(%s) target not found', + * str(desc)) # <<<<<<<<<<<<<< + * return + * target = self.get_target(widget, desc) + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Block_scriptAction_desc_s_target, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Block_scriptAction_desc_s_target, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_scriptAction_desc_s_target); + __Pyx_GIVEREF(__pyx_kp_s_Block_scriptAction_desc_s_target); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Block_scriptAction_desc_s_target); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":489 + * Logger.info('Block: scriptAction():desc(%s) target not found', + * str(desc)) + * return # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * d = self.getActionData(widget,desc, *args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":486 + * def scriptAction(self, widget:Widget, desc, *args): + * script = desc.get('script') + * if not script: # <<<<<<<<<<<<<< + * Logger.info('Block: scriptAction():desc(%s) target not found', + * str(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":490 + * str(desc)) + * return + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * d = self.getActionData(widget,desc, *args) + * ns = { + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":491 + * return + * target = self.get_target(widget, desc) + * d = self.getActionData(widget,desc, *args) # <<<<<<<<<<<<<< + * ns = { + * "self":target, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_desc); + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_d = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":493 + * d = self.getActionData(widget,desc, *args) + * ns = { + * "self":target, # <<<<<<<<<<<<<< + * "args":args + * } + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_self, __pyx_v_target) < 0) __PYX_ERR(0, 493, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":494 + * ns = { + * "self":target, + * "args":args # <<<<<<<<<<<<<< + * } + * if d: + */ + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_v_ns = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":496 + * "args":args + * } + * if d: # <<<<<<<<<<<<<< + * ns.update(d) + * try: + */ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 496, __pyx_L1_error) + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":497 + * } + * if d: + * ns.update(d) # <<<<<<<<<<<<<< + * try: + * self.eval(script, ns) + */ + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_ns, __pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":496 + * "args":args + * } + * if d: # <<<<<<<<<<<<<< + * ns.update(d) + * try: + */ + } + + /* "kivyblocks/blocks.pyx":498 + * if d: + * ns.update(d) + * try: # <<<<<<<<<<<<<< + * self.eval(script, ns) + * except Exception as e: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":499 + * ns.update(d) + * try: + * self.eval(script, ns) # <<<<<<<<<<<<<< + * except Exception as e: + * print_exc() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_script, __pyx_v_ns}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_script, __pyx_v_ns}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_script); + __Pyx_GIVEREF(__pyx_v_script); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_script); + __Pyx_INCREF(__pyx_v_ns); + __Pyx_GIVEREF(__pyx_v_ns); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ns); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":498 + * if d: + * ns.update(d) + * try: # <<<<<<<<<<<<<< + * self.eval(script, ns) + * except Exception as e: + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L10_try_end; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":500 + * try: + * self.eval(script, ns) + * except Exception as e: # <<<<<<<<<<<<<< + * print_exc() + * print(e) + */ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_7) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.scriptAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 500, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + + /* "kivyblocks/blocks.pyx":501 + * self.eval(script, ns) + * except Exception as e: + * print_exc() # <<<<<<<<<<<<<< + * print(e) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":502 + * except Exception as e: + * print_exc() + * print(e) # <<<<<<<<<<<<<< + * + * def build_rtdesc(self, desc): + */ + if (__Pyx_PrintOne(0, __pyx_v_e) < 0) __PYX_ERR(0, 502, __pyx_L7_except_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L6_exception_handled; + } + goto __pyx_L7_except_error; + __pyx_L7_except_error:; + + /* "kivyblocks/blocks.pyx":498 + * if d: + * ns.update(d) + * try: # <<<<<<<<<<<<<< + * self.eval(script, ns) + * except Exception as e: + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L6_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L10_try_end:; + } + + /* "kivyblocks/blocks.pyx":484 + * func(target, *args, **params) + * + * def scriptAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * script = desc.get('script') + * if not script: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.scriptAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_script); + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_ns); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":504 + * print(e) + * + * def build_rtdesc(self, desc): # <<<<<<<<<<<<<< + * rtdesc = desc.get('rtdata') + * if not rtdesc: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_49build_rtdesc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_49build_rtdesc = {"build_rtdesc", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_49build_rtdesc, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_49build_rtdesc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("build_rtdesc (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_desc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_rtdesc", 1, 2, 2, 1); __PYX_ERR(0, 504, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_rtdesc") < 0)) __PYX_ERR(0, 504, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_desc = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("build_rtdesc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 504, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_rtdesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_48build_rtdesc(__pyx_self, __pyx_v_self, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_48build_rtdesc(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_desc) { + PyObject *__pyx_v_rtdesc = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("build_rtdesc", 0); + + /* "kivyblocks/blocks.pyx":505 + * + * def build_rtdesc(self, desc): + * rtdesc = desc.get('rtdata') # <<<<<<<<<<<<<< + * if not rtdesc: + * if desc.get('datawidget'): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_rtdata) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_rtdata); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_rtdesc = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":506 + * def build_rtdesc(self, desc): + * rtdesc = desc.get('rtdata') + * if not rtdesc: # <<<<<<<<<<<<<< + * if desc.get('datawidget'): + * rtdesc = {} + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_rtdesc); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":507 + * rtdesc = desc.get('rtdata') + * if not rtdesc: + * if desc.get('datawidget'): # <<<<<<<<<<<<<< + * rtdesc = {} + * rtdesc['target'] = desc['datawidget'] + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_datawidget) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_datawidget); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":508 + * if not rtdesc: + * if desc.get('datawidget'): + * rtdesc = {} # <<<<<<<<<<<<<< + * rtdesc['target'] = desc['datawidget'] + * if desc.get('datascript'): + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_rtdesc, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":509 + * if desc.get('datawidget'): + * rtdesc = {} + * rtdesc['target'] = desc['datawidget'] # <<<<<<<<<<<<<< + * if desc.get('datascript'): + * rtdesc['script'] = desc.get('datacript') + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_datawidget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_v_rtdesc, __pyx_n_s_target, __pyx_t_1) < 0)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":510 + * rtdesc = {} + * rtdesc['target'] = desc['datawidget'] + * if desc.get('datascript'): # <<<<<<<<<<<<<< + * rtdesc['script'] = desc.get('datacript') + * else: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_datascript) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_datascript); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":511 + * rtdesc['target'] = desc['datawidget'] + * if desc.get('datascript'): + * rtdesc['script'] = desc.get('datacript') # <<<<<<<<<<<<<< + * else: + * rtdesc['method'] = desc.get('datamethod', 'getValue') + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_datacript) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_datacript); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyObject_SetItem(__pyx_v_rtdesc, __pyx_n_s_script_2, __pyx_t_1) < 0)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":510 + * rtdesc = {} + * rtdesc['target'] = desc['datawidget'] + * if desc.get('datascript'): # <<<<<<<<<<<<<< + * rtdesc['script'] = desc.get('datacript') + * else: + */ + goto __pyx_L5; + } + + /* "kivyblocks/blocks.pyx":513 + * rtdesc['script'] = desc.get('datacript') + * else: + * rtdesc['method'] = desc.get('datamethod', 'getValue') # <<<<<<<<<<<<<< + * rtdesc['kwargs'] = desc.get('datakwargs', {}) + * else: + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyObject_SetItem(__pyx_v_rtdesc, __pyx_n_s_method, __pyx_t_2) < 0)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L5:; + + /* "kivyblocks/blocks.pyx":514 + * else: + * rtdesc['method'] = desc.get('datamethod', 'getValue') + * rtdesc['kwargs'] = desc.get('datakwargs', {}) # <<<<<<<<<<<<<< + * else: + * return {} + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_datakwargs, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_datakwargs, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_datakwargs); + __Pyx_GIVEREF(__pyx_n_s_datakwargs); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_s_datakwargs); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyObject_SetItem(__pyx_v_rtdesc, __pyx_n_s_kwargs, __pyx_t_2) < 0)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":507 + * rtdesc = desc.get('rtdata') + * if not rtdesc: + * if desc.get('datawidget'): # <<<<<<<<<<<<<< + * rtdesc = {} + * rtdesc['target'] = desc['datawidget'] + */ + goto __pyx_L4; + } + + /* "kivyblocks/blocks.pyx":516 + * rtdesc['kwargs'] = desc.get('datakwargs', {}) + * else: + * return {} # <<<<<<<<<<<<<< + * return rtdesc + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + __pyx_L4:; + + /* "kivyblocks/blocks.pyx":506 + * def build_rtdesc(self, desc): + * rtdesc = desc.get('rtdata') + * if not rtdesc: # <<<<<<<<<<<<<< + * if desc.get('datawidget'): + * rtdesc = {} + */ + } + + /* "kivyblocks/blocks.pyx":517 + * else: + * return {} + * return rtdesc # <<<<<<<<<<<<<< + * + * def get_rtdata(self, widget:Widget, desc, *args): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_rtdesc); + __pyx_r = __pyx_v_rtdesc; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":504 + * print(e) + * + * def build_rtdesc(self, desc): # <<<<<<<<<<<<<< + * rtdesc = desc.get('rtdata') + * if not rtdesc: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.build_rtdesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_rtdesc); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":519 + * return rtdesc + * + * def get_rtdata(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * """ + * desc descript follow attributes + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_51get_rtdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10kivyblocks_6blocks_6Blocks_50get_rtdata[] = "\n\t\tdesc descript follow attributes\n\t\t{\n\t\t\t\"target\", a target name from widget\n\t\t\t\"method\", a method name, default is 'getValue',\n\t\t\t\"script\", script to handle the data\n\t\t\t\"kwargs\":\" a dict arguments, default is {}\n\t\t}\n\t\t"; +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_51get_rtdata = {"get_rtdata", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_51get_rtdata, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10kivyblocks_6blocks_6Blocks_50get_rtdata}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_51get_rtdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_rtdata (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_rtdata", 0, 3, 3, 1); __PYX_ERR(0, 519, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_rtdata", 0, 3, 3, 2); __PYX_ERR(0, 519, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "get_rtdata") < 0)) __PYX_ERR(0, 519, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_rtdata", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 519, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.get_rtdata", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_50get_rtdata(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_50get_rtdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_script = NULL; + PyObject *__pyx_v_ns = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_method = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_r = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + __Pyx_RefNannySetupContext("get_rtdata", 0); + + /* "kivyblocks/blocks.pyx":530 + * """ + * + * if desc is None or desc == {}: # <<<<<<<<<<<<<< + * print('get_rtdata():desc is None') + * return {} + */ + __pyx_t_2 = (__pyx_v_desc == Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_desc, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":531 + * + * if desc is None or desc == {}: + * print('get_rtdata():desc is None') # <<<<<<<<<<<<<< + * return {} + * kwargs = desc.get('kwargs', {}) + */ + if (__Pyx_PrintOne(0, __pyx_kp_s_get_rtdata_desc_is_None) < 0) __PYX_ERR(0, 531, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":532 + * if desc is None or desc == {}: + * print('get_rtdata():desc is None') + * return {} # <<<<<<<<<<<<<< + * kwargs = desc.get('kwargs', {}) + * if not isinstance(kwargs, dict): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":530 + * """ + * + * if desc is None or desc == {}: # <<<<<<<<<<<<<< + * print('get_rtdata():desc is None') + * return {} + */ + } + + /* "kivyblocks/blocks.pyx":533 + * print('get_rtdata():desc is None') + * return {} + * kwargs = desc.get('kwargs', {}) # <<<<<<<<<<<<<< + * if not isinstance(kwargs, dict): + * kwargs = {} + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_kwargs, __pyx_t_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_kwargs, __pyx_t_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_n_s_kwargs); + __Pyx_GIVEREF(__pyx_n_s_kwargs); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_s_kwargs); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_kwargs = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":534 + * return {} + * kwargs = desc.get('kwargs', {}) + * if not isinstance(kwargs, dict): # <<<<<<<<<<<<<< + * kwargs = {} + * w = None + */ + __pyx_t_1 = PyDict_Check(__pyx_v_kwargs); + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":535 + * kwargs = desc.get('kwargs', {}) + * if not isinstance(kwargs, dict): + * kwargs = {} # <<<<<<<<<<<<<< + * w = None + * if len(args) > 0: + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":534 + * return {} + * kwargs = desc.get('kwargs', {}) + * if not isinstance(kwargs, dict): # <<<<<<<<<<<<<< + * kwargs = {} + * w = None + */ + } + + /* "kivyblocks/blocks.pyx":536 + * if not isinstance(kwargs, dict): + * kwargs = {} + * w = None # <<<<<<<<<<<<<< + * if len(args) > 0: + * w = args[0] + */ + __Pyx_INCREF(Py_None); + __pyx_v_w = Py_None; + + /* "kivyblocks/blocks.pyx":537 + * kwargs = {} + * w = None + * if len(args) > 0: # <<<<<<<<<<<<<< + * w = args[0] + * target = desc.get('target') + */ + __pyx_t_10 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_10 > 0) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":538 + * w = None + * if len(args) > 0: + * w = args[0] # <<<<<<<<<<<<<< + * target = desc.get('target') + * if target: + */ + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_w, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":537 + * kwargs = {} + * w = None + * if len(args) > 0: # <<<<<<<<<<<<<< + * w = args[0] + * target = desc.get('target') + */ + } + + /* "kivyblocks/blocks.pyx":539 + * if len(args) > 0: + * w = args[0] + * target = desc.get('target') # <<<<<<<<<<<<<< + * if target: + * w = self.getWidgetById(target, from_widget=widget) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_n_s_target) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_target); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_target = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":540 + * w = args[0] + * target = desc.get('target') + * if target: # <<<<<<<<<<<<<< + * w = self.getWidgetById(target, from_widget=widget) + * if w is None: + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 540, __pyx_L1_error) + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":541 + * target = desc.get('target') + * if target: + * w = self.getWidgetById(target, from_widget=widget) # <<<<<<<<<<<<<< + * if w is None: + * print('get_rtdata():w is None', desc) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getWidgetById); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_target); + __Pyx_GIVEREF(__pyx_v_target); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_target); + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_from_widget, __pyx_v_widget) < 0) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_w, __pyx_t_6); + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":540 + * w = args[0] + * target = desc.get('target') + * if target: # <<<<<<<<<<<<<< + * w = self.getWidgetById(target, from_widget=widget) + * if w is None: + */ + } + + /* "kivyblocks/blocks.pyx":542 + * if target: + * w = self.getWidgetById(target, from_widget=widget) + * if w is None: # <<<<<<<<<<<<<< + * print('get_rtdata():w is None', desc) + * return {} + */ + __pyx_t_3 = (__pyx_v_w == Py_None); + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":543 + * w = self.getWidgetById(target, from_widget=widget) + * if w is None: + * print('get_rtdata():w is None', desc) # <<<<<<<<<<<<<< + * return {} + * script = desc.get('script') + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_get_rtdata_w_is_None); + __Pyx_GIVEREF(__pyx_kp_s_get_rtdata_w_is_None); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_get_rtdata_w_is_None); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_desc); + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":544 + * if w is None: + * print('get_rtdata():w is None', desc) + * return {} # <<<<<<<<<<<<<< + * script = desc.get('script') + * if script: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":542 + * if target: + * w = self.getWidgetById(target, from_widget=widget) + * if w is None: # <<<<<<<<<<<<<< + * print('get_rtdata():w is None', desc) + * return {} + */ + } + + /* "kivyblocks/blocks.pyx":545 + * print('get_rtdata():w is None', desc) + * return {} + * script = desc.get('script') # <<<<<<<<<<<<<< + * if script: + * ns = { + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_n_s_script_2) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_script_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_script = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":546 + * return {} + * script = desc.get('script') + * if script: # <<<<<<<<<<<<<< + * ns = { + * "self":w, + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_script); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 546, __pyx_L1_error) + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":548 + * if script: + * ns = { + * "self":w, # <<<<<<<<<<<<<< + * "args":args, + * "kwargs":kwargs + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_self, __pyx_v_w) < 0) __PYX_ERR(0, 548, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":549 + * ns = { + * "self":w, + * "args":args, # <<<<<<<<<<<<<< + * "kwargs":kwargs + * } + */ + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 548, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":550 + * "self":w, + * "args":args, + * "kwargs":kwargs # <<<<<<<<<<<<<< + * } + * d = self.eval(script, ns) + */ + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_kwargs, __pyx_v_kwargs) < 0) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_v_ns = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":552 + * "kwargs":kwargs + * } + * d = self.eval(script, ns) # <<<<<<<<<<<<<< + * return d + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_script, __pyx_v_ns}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_script, __pyx_v_ns}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_script); + __Pyx_GIVEREF(__pyx_v_script); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_v_script); + __Pyx_INCREF(__pyx_v_ns); + __Pyx_GIVEREF(__pyx_v_ns); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_ns); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_d = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":553 + * } + * d = self.eval(script, ns) + * return d # <<<<<<<<<<<<<< + * + * method = desc.get('method', 'getValue') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_d); + __pyx_r = __pyx_v_d; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":546 + * return {} + * script = desc.get('script') + * if script: # <<<<<<<<<<<<<< + * ns = { + * "self":w, + */ + } + + /* "kivyblocks/blocks.pyx":555 + * return d + * + * method = desc.get('method', 'getValue') # <<<<<<<<<<<<<< + * if not hasattr(w, method): + * print('get_rtdata():method is None', desc, type(w)) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_method = __pyx_t_9; + __pyx_t_9 = 0; + + /* "kivyblocks/blocks.pyx":556 + * + * method = desc.get('method', 'getValue') + * if not hasattr(w, method): # <<<<<<<<<<<<<< + * print('get_rtdata():method is None', desc, type(w)) + * return {} + */ + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_w, __pyx_v_method); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":557 + * method = desc.get('method', 'getValue') + * if not hasattr(w, method): + * print('get_rtdata():method is None', desc, type(w)) # <<<<<<<<<<<<<< + * return {} + * f = getattr(w, method) + */ + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_s_get_rtdata_method_is_None); + __Pyx_GIVEREF(__pyx_kp_s_get_rtdata_method_is_None); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_s_get_rtdata_method_is_None); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_desc); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_w))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_w))); + PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)Py_TYPE(__pyx_v_w))); + if (__Pyx_PrintOne(0, __pyx_t_9) < 0) __PYX_ERR(0, 557, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "kivyblocks/blocks.pyx":558 + * if not hasattr(w, method): + * print('get_rtdata():method is None', desc, type(w)) + * return {} # <<<<<<<<<<<<<< + * f = getattr(w, method) + * try: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":556 + * + * method = desc.get('method', 'getValue') + * if not hasattr(w, method): # <<<<<<<<<<<<<< + * print('get_rtdata():method is None', desc, type(w)) + * return {} + */ + } + + /* "kivyblocks/blocks.pyx":559 + * print('get_rtdata():method is None', desc, type(w)) + * return {} + * f = getattr(w, method) # <<<<<<<<<<<<<< + * try: + * r = f(**kwargs) + */ + __pyx_t_9 = __Pyx_GetAttr(__pyx_v_w, __pyx_v_method); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_v_f = __pyx_t_9; + __pyx_t_9 = 0; + + /* "kivyblocks/blocks.pyx":560 + * return {} + * f = getattr(w, method) + * try: # <<<<<<<<<<<<<< + * r = f(**kwargs) + * if isinstance(r, dict): + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":561 + * f = getattr(w, method) + * try: + * r = f(**kwargs) # <<<<<<<<<<<<<< + * if isinstance(r, dict): + * return r + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 561, __pyx_L12_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { + __pyx_t_9 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + } else { + __pyx_t_9 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_f, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_r = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":562 + * try: + * r = f(**kwargs) + * if isinstance(r, dict): # <<<<<<<<<<<<<< + * return r + * if isinstance(r, DictObject): + */ + __pyx_t_3 = PyDict_Check(__pyx_v_r); + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":563 + * r = f(**kwargs) + * if isinstance(r, dict): + * return r # <<<<<<<<<<<<<< + * if isinstance(r, DictObject): + * return r.to_dict() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_r); + __pyx_r = __pyx_v_r; + goto __pyx_L16_try_return; + + /* "kivyblocks/blocks.pyx":562 + * try: + * r = f(**kwargs) + * if isinstance(r, dict): # <<<<<<<<<<<<<< + * return r + * if isinstance(r, DictObject): + */ + } + + /* "kivyblocks/blocks.pyx":564 + * if isinstance(r, dict): + * return r + * if isinstance(r, DictObject): # <<<<<<<<<<<<<< + * return r.to_dict() + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyObject_IsInstance(__pyx_v_r, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 564, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":565 + * return r + * if isinstance(r, DictObject): + * return r.to_dict() # <<<<<<<<<<<<<< + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + * return {} + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L16_try_return; + + /* "kivyblocks/blocks.pyx":564 + * if isinstance(r, dict): + * return r + * if isinstance(r, DictObject): # <<<<<<<<<<<<<< + * return r.to_dict() + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + */ + } + + /* "kivyblocks/blocks.pyx":566 + * if isinstance(r, DictObject): + * return r.to_dict() + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) # <<<<<<<<<<<<<< + * return {} + * except: + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_get_rtdata_method_return_is_not); + __Pyx_GIVEREF(__pyx_kp_s_get_rtdata_method_return_is_not); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_get_rtdata_method_return_is_not); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_desc); + __Pyx_INCREF(__pyx_kp_s_ret); + __Pyx_GIVEREF(__pyx_kp_s_ret); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_s_ret); + __Pyx_INCREF(__pyx_v_r); + __Pyx_GIVEREF(__pyx_v_r); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_r); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_r))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_r))); + PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)Py_TYPE(__pyx_v_r))); + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 566, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":567 + * return r.to_dict() + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + * return {} # <<<<<<<<<<<<<< + * except: + * print_exc() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L16_try_return; + + /* "kivyblocks/blocks.pyx":560 + * return {} + * f = getattr(w, method) + * try: # <<<<<<<<<<<<<< + * r = f(**kwargs) + * if isinstance(r, dict): + */ + } + __pyx_L12_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "kivyblocks/blocks.pyx":568 + * print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + * return {} + * except: # <<<<<<<<<<<<<< + * print_exc() + * return {} + */ + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.get_rtdata", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_5) < 0) __PYX_ERR(0, 568, __pyx_L14_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_5); + + /* "kivyblocks/blocks.pyx":569 + * return {} + * except: + * print_exc() # <<<<<<<<<<<<<< + * return {} + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L14_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L14_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":570 + * except: + * print_exc() + * return {} # <<<<<<<<<<<<<< + * + * def methodAction(self, widget:Widget, desc, *args): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L14_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L15_except_return; + } + __pyx_L14_except_error:; + + /* "kivyblocks/blocks.pyx":560 + * return {} + * f = getattr(w, method) + * try: # <<<<<<<<<<<<<< + * r = f(**kwargs) + * if isinstance(r, dict): + */ + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L16_try_return:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L0; + __pyx_L15_except_return:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L0; + } + + /* "kivyblocks/blocks.pyx":519 + * return rtdesc + * + * def get_rtdata(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * """ + * desc descript follow attributes + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.get_rtdata", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_script); + __Pyx_XDECREF(__pyx_v_ns); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_method); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_r); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":572 + * return {} + * + * def methodAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * method = desc.get('method') + * target = self.get_target(widget, desc) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_53methodAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_53methodAction = {"methodAction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_53methodAction, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_53methodAction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("methodAction (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 3) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_widget,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("methodAction", 0, 3, 3, 1); __PYX_ERR(0, 572, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("methodAction", 0, 3, 3, 2); __PYX_ERR(0, 572, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "methodAction") < 0)) __PYX_ERR(0, 572, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_widget = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("methodAction", 0, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 572, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.methodAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_52methodAction(__pyx_self, __pyx_v_self, __pyx_v_widget, __pyx_v_desc, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_52methodAction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_widget, PyObject *__pyx_v_desc, PyObject *__pyx_v_args) { + PyObject *__pyx_v_method = NULL; + PyObject *__pyx_v_target = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("methodAction", 0); + + /* "kivyblocks/blocks.pyx":573 + * + * def methodAction(self, widget:Widget, desc, *args): + * method = desc.get('method') # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * if target is None: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_method) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_method); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_method = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":574 + * def methodAction(self, widget:Widget, desc, *args): + * method = desc.get('method') + * target = self.get_target(widget, desc) # <<<<<<<<<<<<<< + * if target is None: + * Logger.info('Block: methodAction():desc(%s) target not found', + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_widget, __pyx_v_desc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_desc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_target = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":575 + * method = desc.get('method') + * target = self.get_target(widget, desc) + * if target is None: # <<<<<<<<<<<<<< + * Logger.info('Block: methodAction():desc(%s) target not found', + * str(desc)) + */ + __pyx_t_6 = (__pyx_v_target == Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":576 + * target = self.get_target(widget, desc) + * if target is None: + * Logger.info('Block: methodAction():desc(%s) target not found', # <<<<<<<<<<<<<< + * str(desc)) + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":577 + * if target is None: + * Logger.info('Block: methodAction():desc(%s) target not found', + * str(desc)) # <<<<<<<<<<<<<< + * return + * if method is None: + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_methodAction_desc_s_target, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_Block_methodAction_desc_s_target, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_methodAction_desc_s_target); + __Pyx_GIVEREF(__pyx_kp_s_Block_methodAction_desc_s_target); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_kp_s_Block_methodAction_desc_s_target); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":578 + * Logger.info('Block: methodAction():desc(%s) target not found', + * str(desc)) + * return # <<<<<<<<<<<<<< + * if method is None: + * Logger.info('Block: methodAction():desc(%s) method not found', + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":575 + * method = desc.get('method') + * target = self.get_target(widget, desc) + * if target is None: # <<<<<<<<<<<<<< + * Logger.info('Block: methodAction():desc(%s) target not found', + * str(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":579 + * str(desc)) + * return + * if method is None: # <<<<<<<<<<<<<< + * Logger.info('Block: methodAction():desc(%s) method not found', + * str(desc)) + */ + __pyx_t_7 = (__pyx_v_method == Py_None); + __pyx_t_6 = (__pyx_t_7 != 0); + if (__pyx_t_6) { + + /* "kivyblocks/blocks.pyx":580 + * return + * if method is None: + * Logger.info('Block: methodAction():desc(%s) method not found', # <<<<<<<<<<<<<< + * str(desc)) + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":581 + * if method is None: + * Logger.info('Block: methodAction():desc(%s) method not found', + * str(desc)) # <<<<<<<<<<<<<< + * return + * if hasattr(target,method): + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_desc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_Block_methodAction_desc_s_method, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_Block_methodAction_desc_s_method, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_methodAction_desc_s_method); + __Pyx_GIVEREF(__pyx_kp_s_Block_methodAction_desc_s_method); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_kp_s_Block_methodAction_desc_s_method); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":582 + * Logger.info('Block: methodAction():desc(%s) method not found', + * str(desc)) + * return # <<<<<<<<<<<<<< + * if hasattr(target,method): + * f = getattr(target, method) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":579 + * str(desc)) + * return + * if method is None: # <<<<<<<<<<<<<< + * Logger.info('Block: methodAction():desc(%s) method not found', + * str(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":583 + * str(desc)) + * return + * if hasattr(target,method): # <<<<<<<<<<<<<< + * f = getattr(target, method) + * kwargs = desc.get('options',{}).copy() + */ + __pyx_t_6 = __Pyx_HasAttr(__pyx_v_target, __pyx_v_method); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":584 + * return + * if hasattr(target,method): + * f = getattr(target, method) # <<<<<<<<<<<<<< + * kwargs = desc.get('options',{}).copy() + * d = self.getActionData(widget,desc, *args) + */ + __pyx_t_1 = __Pyx_GetAttr(__pyx_v_target, __pyx_v_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":585 + * if hasattr(target,method): + * f = getattr(target, method) + * kwargs = desc.get('options',{}).copy() # <<<<<<<<<<<<<< + * d = self.getActionData(widget,desc, *args) + * if d: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_options, __pyx_t_5}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_options, __pyx_t_5}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_4, __pyx_n_s_options); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_4, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_kwargs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":586 + * f = getattr(target, method) + * kwargs = desc.get('options',{}).copy() + * d = self.getActionData(widget,desc, *args) # <<<<<<<<<<<<<< + * if d: + * kwargs.update(d) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getActionData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_widget); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_desc); + __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_d = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":587 + * kwargs = desc.get('options',{}).copy() + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * kwargs.update(d) + * f(*args, **kwargs) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/blocks.pyx":588 + * d = self.getActionData(widget,desc, *args) + * if d: + * kwargs.update(d) # <<<<<<<<<<<<<< + * f(*args, **kwargs) + * else: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_v_d) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_d); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":587 + * kwargs = desc.get('options',{}).copy() + * d = self.getActionData(widget,desc, *args) + * if d: # <<<<<<<<<<<<<< + * kwargs.update(d) + * f(*args, **kwargs) + */ + } + + /* "kivyblocks/blocks.pyx":589 + * if d: + * kwargs.update(d) + * f(*args, **kwargs) # <<<<<<<<<<<<<< + * else: + * alert('%s method not found' % method) + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 589, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { + __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_f, __pyx_v_args, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":583 + * str(desc)) + * return + * if hasattr(target,method): # <<<<<<<<<<<<<< + * f = getattr(target, method) + * kwargs = desc.get('options',{}).copy() + */ + goto __pyx_L5; + } + + /* "kivyblocks/blocks.pyx":591 + * f(*args, **kwargs) + * else: + * alert('%s method not found' % method) # <<<<<<<<<<<<<< + * + * def widgetBuild(self, desc): + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_alert); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_method_not_found, __pyx_v_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_L5:; + + /* "kivyblocks/blocks.pyx":572 + * return {} + * + * def methodAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * method = desc.get('method') + * target = self.get_target(widget, desc) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.methodAction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_method); + __Pyx_XDECREF(__pyx_v_target); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_55widgetBuild(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10kivyblocks_6blocks_6Blocks_54widgetBuild[] = "\n\t\tdesc format:\n\t\t{\n\t\t\twidgettype:,\n\t\t\tid:widget id,\n\t\t\toptions:{}\n\t\t\tsubwidgets:[\n\t\t\t]\n\t\t\tbinds:[\n\t\t\t]\n\t\t}\n\t\t"; +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_55widgetBuild = {"widgetBuild", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_55widgetBuild, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10kivyblocks_6blocks_6Blocks_54widgetBuild}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_55widgetBuild(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("widgetBuild (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_desc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("widgetBuild", 1, 2, 2, 1); __PYX_ERR(0, 593, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "widgetBuild") < 0)) __PYX_ERR(0, 593, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_desc = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("widgetBuild", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 593, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.widgetBuild", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_54widgetBuild(__pyx_self, __pyx_v_self, __pyx_v_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":606 + * } + * """ + * def doit(desc): # <<<<<<<<<<<<<< + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_11widgetBuild_1doit(PyObject *__pyx_self, PyObject *__pyx_v_desc); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_11widgetBuild_1doit = {"doit", (PyCFunction)__pyx_pw_10kivyblocks_6blocks_6Blocks_11widgetBuild_1doit, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_11widgetBuild_1doit(PyObject *__pyx_self, PyObject *__pyx_v_desc) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("doit (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_11widgetBuild_doit(__pyx_self, ((PyObject *)__pyx_v_desc)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_11widgetBuild_doit(PyObject *__pyx_self, PyObject *__pyx_v_desc) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *__pyx_cur_scope; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *__pyx_outer_scope; + PyObject *__pyx_v_widget = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + __Pyx_RefNannySetupContext("doit", 0); + __pyx_outer_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_INCREF(__pyx_v_desc); + + /* "kivyblocks/blocks.pyx":607 + * """ + * def doit(desc): + * if isinstance(desc,DictObject): # <<<<<<<<<<<<<< + * desc = desc.to_dict() + * if not isinstance(desc,dict): + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_desc, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":608 + * def doit(desc): + * if isinstance(desc,DictObject): + * desc = desc.to_dict() # <<<<<<<<<<<<<< + * if not isinstance(desc,dict): + * Logger.info('Block: desc(%s) must be a dict object(%s)', + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":607 + * """ + * def doit(desc): + * if isinstance(desc,DictObject): # <<<<<<<<<<<<<< + * desc = desc.to_dict() + * if not isinstance(desc,dict): + */ + } + + /* "kivyblocks/blocks.pyx":609 + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + * if not isinstance(desc,dict): # <<<<<<<<<<<<<< + * Logger.info('Block: desc(%s) must be a dict object(%s)', + * desc,type(desc)) + */ + __pyx_t_3 = PyDict_Check(__pyx_v_desc); + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":610 + * desc = desc.to_dict() + * if not isinstance(desc,dict): + * Logger.info('Block: desc(%s) must be a dict object(%s)', # <<<<<<<<<<<<<< + * desc,type(desc)) + * return None + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":611 + * if not isinstance(desc,dict): + * Logger.info('Block: desc(%s) must be a dict object(%s)', + * desc,type(desc)) # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_4 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_s_Block_desc_s_must_be_a_dict_obje, __pyx_v_desc, ((PyObject *)Py_TYPE(__pyx_v_desc))}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_s_Block_desc_s_must_be_a_dict_obje, __pyx_v_desc, ((PyObject *)Py_TYPE(__pyx_v_desc))}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_kp_s_Block_desc_s_must_be_a_dict_obje); + __Pyx_GIVEREF(__pyx_kp_s_Block_desc_s_must_be_a_dict_obje); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Block_desc_s_must_be_a_dict_obje); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_desc); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)Py_TYPE(__pyx_v_desc))); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":612 + * Logger.info('Block: desc(%s) must be a dict object(%s)', + * desc,type(desc)) + * return None # <<<<<<<<<<<<<< + * + * # desc = self.valueExpr(desc) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":609 + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + * if not isinstance(desc,dict): # <<<<<<<<<<<<<< + * Logger.info('Block: desc(%s) must be a dict object(%s)', + * desc,type(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":615 + * + * # desc = self.valueExpr(desc) + * try: # <<<<<<<<<<<<<< + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "kivyblocks/blocks.pyx":616 + * # desc = self.valueExpr(desc) + * try: + * widget = self.w_build(desc) # <<<<<<<<<<<<<< + * self.dispatch('on_built',widget) + * if hasattr(widget,'ready'): + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 616, __pyx_L5_error) } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_w_build); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 616, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_desc); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_widget = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":617 + * try: + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) # <<<<<<<<<<<<<< + * if hasattr(widget,'ready'): + * widget.ready = True + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 617, __pyx_L5_error) } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_on_built, __pyx_v_widget}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_on_built, __pyx_v_widget}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L5_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_built); + __Pyx_GIVEREF(__pyx_n_s_on_built); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_n_s_on_built); + __Pyx_INCREF(__pyx_v_widget); + __Pyx_GIVEREF(__pyx_v_widget); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_widget); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":618 + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) + * if hasattr(widget,'ready'): # <<<<<<<<<<<<<< + * widget.ready = True + * return widget + */ + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_widget, __pyx_n_s_ready); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 618, __pyx_L5_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":619 + * self.dispatch('on_built',widget) + * if hasattr(widget,'ready'): + * widget.ready = True # <<<<<<<<<<<<<< + * return widget + * except Exception as e: + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_widget, __pyx_n_s_ready, Py_True) < 0) __PYX_ERR(0, 619, __pyx_L5_error) + + /* "kivyblocks/blocks.pyx":618 + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) + * if hasattr(widget,'ready'): # <<<<<<<<<<<<<< + * widget.ready = True + * return widget + */ + } + + /* "kivyblocks/blocks.pyx":620 + * if hasattr(widget,'ready'): + * widget.ready = True + * return widget # <<<<<<<<<<<<<< + * except Exception as e: + * print_exc() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_widget); + __pyx_r = __pyx_v_widget; + goto __pyx_L9_try_return; + + /* "kivyblocks/blocks.pyx":615 + * + * # desc = self.valueExpr(desc) + * try: # <<<<<<<<<<<<<< + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) + */ + } + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/blocks.pyx":621 + * widget.ready = True + * return widget + * except Exception as e: # <<<<<<<<<<<<<< + * print_exc() + * self.dispatch('on_failed',e) + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_6) { + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.widgetBuild.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 621, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_e = __pyx_t_5; + + /* "kivyblocks/blocks.pyx":622 + * return widget + * except Exception as e: + * print_exc() # <<<<<<<<<<<<<< + * self.dispatch('on_failed',e) + * return None + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 622, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/blocks.pyx":623 + * except Exception as e: + * print_exc() + * self.dispatch('on_failed',e) # <<<<<<<<<<<<<< + * return None + * + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 623, __pyx_L7_except_error) } + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 623, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_n_s_on_failed, __pyx_v_e}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L7_except_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_7); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_n_s_on_failed, __pyx_v_e}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L7_except_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_7); + } else + #endif + { + __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 623, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_12) { + __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_n_s_on_failed); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_n_s_on_failed); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_v_e); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/blocks.pyx":624 + * print_exc() + * self.dispatch('on_failed',e) + * return None # <<<<<<<<<<<<<< + * + * if isinstance(desc,DictObject): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L8_except_return; + } + goto __pyx_L7_except_error; + __pyx_L7_except_error:; + + /* "kivyblocks/blocks.pyx":615 + * + * # desc = self.valueExpr(desc) + * try: # <<<<<<<<<<<<<< + * widget = self.w_build(desc) + * self.dispatch('on_built',widget) + */ + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L9_try_return:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L0; + __pyx_L8_except_return:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L0; + } + + /* "kivyblocks/blocks.pyx":606 + * } + * """ + * def doit(desc): # <<<<<<<<<<<<<< + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.widgetBuild.doit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_widget); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_desc); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_54widgetBuild(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_desc) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *__pyx_cur_scope; + PyObject *__pyx_v_doit = 0; + PyObject *__pyx_v_widgettype = NULL; + PyObject *__pyx_v_opts = NULL; + CYTHON_UNUSED PyObject *__pyx_v_extend = NULL; + PyObject *__pyx_v_addon = NULL; + PyObject *__pyx_v_url = NULL; + PyObject *__pyx_v_rtdesc = NULL; + PyObject *__pyx_v_rtdata = NULL; + PyObject *__pyx_v_params = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + __Pyx_RefNannySetupContext("widgetBuild", 0); + __pyx_cur_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 593, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); + __Pyx_INCREF(__pyx_v_desc); + + /* "kivyblocks/blocks.pyx":606 + * } + * """ + * def doit(desc): # <<<<<<<<<<<<<< + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + */ + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_11widgetBuild_1doit, 0, __pyx_n_s_Blocks_widgetBuild_locals_doit, ((PyObject*)__pyx_cur_scope), __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_doit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":626 + * return None + * + * if isinstance(desc,DictObject): # <<<<<<<<<<<<<< + * desc = desc.to_dict() + * if not isinstance(desc, dict): + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_desc, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":627 + * + * if isinstance(desc,DictObject): + * desc = desc.to_dict() # <<<<<<<<<<<<<< + * if not isinstance(desc, dict): + * print('widgetBuild1: desc must be a dict object', + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":626 + * return None + * + * if isinstance(desc,DictObject): # <<<<<<<<<<<<<< + * desc = desc.to_dict() + * if not isinstance(desc, dict): + */ + } + + /* "kivyblocks/blocks.pyx":628 + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + * if not isinstance(desc, dict): # <<<<<<<<<<<<<< + * print('widgetBuild1: desc must be a dict object', + * desc,type(desc)) + */ + __pyx_t_3 = PyDict_Check(__pyx_v_desc); + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":629 + * desc = desc.to_dict() + * if not isinstance(desc, dict): + * print('widgetBuild1: desc must be a dict object', # <<<<<<<<<<<<<< + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) + */ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_s_widgetBuild1_desc_must_be_a_dict); + __Pyx_GIVEREF(__pyx_kp_s_widgetBuild1_desc_must_be_a_dict); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_widgetBuild1_desc_must_be_a_dict); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_desc); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_TYPE(__pyx_v_desc))); + if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":631 + * print('widgetBuild1: desc must be a dict object', + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_on_failed, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_on_failed, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_n_s_on_failed); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":632 + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) + * return # <<<<<<<<<<<<<< + * + * widgettype = desc.get('widgettype') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":628 + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + * if not isinstance(desc, dict): # <<<<<<<<<<<<<< + * print('widgetBuild1: desc must be a dict object', + * desc,type(desc)) + */ + } + + /* "kivyblocks/blocks.pyx":634 + * return + * + * widgettype = desc.get('widgettype') # <<<<<<<<<<<<<< + * while widgettype == "urlwidget": + * opts = desc.get('options',{}).copy() + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_n_s_widgettype) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_widgettype); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_widgettype = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":635 + * + * widgettype = desc.get('widgettype') + * while widgettype == "urlwidget": # <<<<<<<<<<<<<< + * opts = desc.get('options',{}).copy() + * extend = desc.get('extend') + */ + while (1) { + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_widgettype, __pyx_n_s_urlwidget, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 635, __pyx_L1_error) + if (!__pyx_t_2) break; + + /* "kivyblocks/blocks.pyx":636 + * widgettype = desc.get('widgettype') + * while widgettype == "urlwidget": + * opts = desc.get('options',{}).copy() # <<<<<<<<<<<<<< + * extend = desc.get('extend') + * addon = None + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_options, __pyx_t_5}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_options, __pyx_t_5}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_n_s_options); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_opts, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":637 + * while widgettype == "urlwidget": + * opts = desc.get('options',{}).copy() + * extend = desc.get('extend') # <<<<<<<<<<<<<< + * addon = None + * if desc.get('extend'): + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_n_s_extend) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_n_s_extend); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_extend, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":638 + * opts = desc.get('options',{}).copy() + * extend = desc.get('extend') + * addon = None # <<<<<<<<<<<<<< + * if desc.get('extend'): + * addon = desc.get('extend').copy() + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_addon, Py_None); + + /* "kivyblocks/blocks.pyx":639 + * extend = desc.get('extend') + * addon = None + * if desc.get('extend'): # <<<<<<<<<<<<<< + * addon = desc.get('extend').copy() + * url = opts.get('url') + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_n_s_extend) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_n_s_extend); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":640 + * addon = None + * if desc.get('extend'): + * addon = desc.get('extend').copy() # <<<<<<<<<<<<<< + * url = opts.get('url') + * if url is None: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_n_s_extend) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_extend); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_addon, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":639 + * extend = desc.get('extend') + * addon = None + * if desc.get('extend'): # <<<<<<<<<<<<<< + * addon = desc.get('extend').copy() + * url = opts.get('url') + */ + } + + /* "kivyblocks/blocks.pyx":641 + * if desc.get('extend'): + * addon = desc.get('extend').copy() + * url = opts.get('url') # <<<<<<<<<<<<<< + * if url is None: + * self.dispatch('on_failed',Exception('miss url')) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_n_s_url) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_url); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_url, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":642 + * addon = desc.get('extend').copy() + * url = opts.get('url') + * if url is None: # <<<<<<<<<<<<<< + * self.dispatch('on_failed',Exception('miss url')) + * return + */ + __pyx_t_2 = (__pyx_v_url == Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":643 + * url = opts.get('url') + * if url is None: + * self.dispatch('on_failed',Exception('miss url')) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_s_on_failed, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_s_on_failed, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_n_s_on_failed); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":644 + * if url is None: + * self.dispatch('on_failed',Exception('miss url')) + * return # <<<<<<<<<<<<<< + * + * if opts.get('url'): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":642 + * addon = desc.get('extend').copy() + * url = opts.get('url') + * if url is None: # <<<<<<<<<<<<<< + * self.dispatch('on_failed',Exception('miss url')) + * return + */ + } + + /* "kivyblocks/blocks.pyx":646 + * return + * + * if opts.get('url'): # <<<<<<<<<<<<<< + * del opts['url'] + * rtdesc = self.build_rtdesc(opts) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_s_url) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_url); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":647 + * + * if opts.get('url'): + * del opts['url'] # <<<<<<<<<<<<<< + * rtdesc = self.build_rtdesc(opts) + * if rtdesc: + */ + if (unlikely(PyObject_DelItem(__pyx_v_opts, __pyx_n_s_url) < 0)) __PYX_ERR(0, 647, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":646 + * return + * + * if opts.get('url'): # <<<<<<<<<<<<<< + * del opts['url'] + * rtdesc = self.build_rtdesc(opts) + */ + } + + /* "kivyblocks/blocks.pyx":648 + * if opts.get('url'): + * del opts['url'] + * rtdesc = self.build_rtdesc(opts) # <<<<<<<<<<<<<< + * if rtdesc: + * rtdata = self.get_rtdata(None, rtdesc) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_build_rtdesc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_opts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_opts); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_rtdesc, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":649 + * del opts['url'] + * rtdesc = self.build_rtdesc(opts) + * if rtdesc: # <<<<<<<<<<<<<< + * rtdata = self.get_rtdata(None, rtdesc) + * params = opts.get('params', {}) + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_rtdesc); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 649, __pyx_L1_error) + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":650 + * rtdesc = self.build_rtdesc(opts) + * if rtdesc: + * rtdata = self.get_rtdata(None, rtdesc) # <<<<<<<<<<<<<< + * params = opts.get('params', {}) + * params.update(rtdata) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_get_rtdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, Py_None, __pyx_v_rtdesc}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, Py_None, __pyx_v_rtdesc}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, Py_None); + __Pyx_INCREF(__pyx_v_rtdesc); + __Pyx_GIVEREF(__pyx_v_rtdesc); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_rtdesc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_rtdata, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":651 + * if rtdesc: + * rtdata = self.get_rtdata(None, rtdesc) + * params = opts.get('params', {}) # <<<<<<<<<<<<<< + * params.update(rtdata) + * opts['params'] = params + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_params, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_params, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_n_s_params); + __Pyx_GIVEREF(__pyx_n_s_params); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_n_s_params); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":652 + * rtdata = self.get_rtdata(None, rtdesc) + * params = opts.get('params', {}) + * params.update(rtdata) # <<<<<<<<<<<<<< + * opts['params'] = params + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_rtdata) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_rtdata); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":653 + * params = opts.get('params', {}) + * params.update(rtdata) + * opts['params'] = params # <<<<<<<<<<<<<< + * + * desc = self.getUrlData(url,**opts) + */ + if (unlikely(PyObject_SetItem(__pyx_v_opts, __pyx_n_s_params, __pyx_v_params) < 0)) __PYX_ERR(0, 653, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":649 + * del opts['url'] + * rtdesc = self.build_rtdesc(opts) + * if rtdesc: # <<<<<<<<<<<<<< + * rtdata = self.get_rtdata(None, rtdesc) + * params = opts.get('params', {}) + */ + } + + /* "kivyblocks/blocks.pyx":655 + * opts['params'] = params + * + * desc = self.getUrlData(url,**opts) # <<<<<<<<<<<<<< + * if not (isinstance(desc, DictObject) or \ + * isinstance(desc, dict)): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getUrlData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_url); + __Pyx_GIVEREF(__pyx_v_url); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_url); + if (unlikely(__pyx_v_opts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 655, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_opts))) { + __pyx_t_9 = PyDict_Copy(__pyx_v_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } else { + __pyx_t_9 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_opts, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_8); + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":656 + * + * desc = self.getUrlData(url,**opts) + * if not (isinstance(desc, DictObject) or \ # <<<<<<<<<<<<<< + * isinstance(desc, dict)): + * print('Block2: desc must be a dict object', + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_desc, __pyx_t_8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = (__pyx_t_2 != 0); + if (!__pyx_t_10) { + } else { + __pyx_t_3 = __pyx_t_10; + goto __pyx_L12_bool_binop_done; + } + + /* "kivyblocks/blocks.pyx":657 + * desc = self.getUrlData(url,**opts) + * if not (isinstance(desc, DictObject) or \ + * isinstance(desc, dict)): # <<<<<<<<<<<<<< + * print('Block2: desc must be a dict object', + * desc,type(desc)) + */ + __pyx_t_10 = PyDict_Check(__pyx_v_desc); + __pyx_t_2 = (__pyx_t_10 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L12_bool_binop_done:; + + /* "kivyblocks/blocks.pyx":656 + * + * desc = self.getUrlData(url,**opts) + * if not (isinstance(desc, DictObject) or \ # <<<<<<<<<<<<<< + * isinstance(desc, dict)): + * print('Block2: desc must be a dict object', + */ + __pyx_t_2 = ((!__pyx_t_3) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":658 + * if not (isinstance(desc, DictObject) or \ + * isinstance(desc, dict)): + * print('Block2: desc must be a dict object', # <<<<<<<<<<<<<< + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) + */ + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_s_Block2_desc_must_be_a_dict_objec); + __Pyx_GIVEREF(__pyx_kp_s_Block2_desc_must_be_a_dict_objec); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_s_Block2_desc_must_be_a_dict_objec); + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_desc); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_desc))); + PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)Py_TYPE(__pyx_v_desc))); + if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":660 + * print('Block2: desc must be a dict object', + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_on_failed, __pyx_t_4}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_on_failed, __pyx_t_4}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_n_s_on_failed); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_on_failed); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":661 + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) + * return # <<<<<<<<<<<<<< + * + * if addon: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":656 + * + * desc = self.getUrlData(url,**opts) + * if not (isinstance(desc, DictObject) or \ # <<<<<<<<<<<<<< + * isinstance(desc, dict)): + * print('Block2: desc must be a dict object', + */ + } + + /* "kivyblocks/blocks.pyx":663 + * return + * + * if addon: # <<<<<<<<<<<<<< + * desc = dictExtend(desc,addon) + * widgettype = desc.get('widgettype') + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_addon); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 663, __pyx_L1_error) + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":664 + * + * if addon: + * desc = dictExtend(desc,addon) # <<<<<<<<<<<<<< + * widgettype = desc.get('widgettype') + * if widgettype is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_dictExtend); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_desc, __pyx_v_addon}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_desc, __pyx_v_addon}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_desc); + __Pyx_INCREF(__pyx_v_addon); + __Pyx_GIVEREF(__pyx_v_addon); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_addon); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_8); + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":663 + * return + * + * if addon: # <<<<<<<<<<<<<< + * desc = dictExtend(desc,addon) + * widgettype = desc.get('widgettype') + */ + } + + /* "kivyblocks/blocks.pyx":665 + * if addon: + * desc = dictExtend(desc,addon) + * widgettype = desc.get('widgettype') # <<<<<<<<<<<<<< + * if widgettype is None: + * print('Block3: desc must be a dict object not None') + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_n_s_widgettype) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_widgettype); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_widgettype, __pyx_t_8); + __pyx_t_8 = 0; + } + + /* "kivyblocks/blocks.pyx":666 + * desc = dictExtend(desc,addon) + * widgettype = desc.get('widgettype') + * if widgettype is None: # <<<<<<<<<<<<<< + * print('Block3: desc must be a dict object not None') + * return None + */ + __pyx_t_2 = (__pyx_v_widgettype == Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/blocks.pyx":667 + * widgettype = desc.get('widgettype') + * if widgettype is None: + * print('Block3: desc must be a dict object not None') # <<<<<<<<<<<<<< + * return None + * return doit(desc) + */ + if (__Pyx_PrintOne(0, __pyx_kp_s_Block3_desc_must_be_a_dict_objec) < 0) __PYX_ERR(0, 667, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":668 + * if widgettype is None: + * print('Block3: desc must be a dict object not None') + * return None # <<<<<<<<<<<<<< + * return doit(desc) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":666 + * desc = dictExtend(desc,addon) + * widgettype = desc.get('widgettype') + * if widgettype is None: # <<<<<<<<<<<<<< + * print('Block3: desc must be a dict object not None') + * return None + */ + } + + /* "kivyblocks/blocks.pyx":669 + * print('Block3: desc must be a dict object not None') + * return None + * return doit(desc) # <<<<<<<<<<<<<< + * + * @classmethod + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_pf_10kivyblocks_6blocks_6Blocks_11widgetBuild_doit(__pyx_v_doit, __pyx_v_desc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.widgetBuild", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_doit); + __Pyx_XDECREF(__pyx_v_widgettype); + __Pyx_XDECREF(__pyx_v_opts); + __Pyx_XDECREF(__pyx_v_extend); + __Pyx_XDECREF(__pyx_v_addon); + __Pyx_XDECREF(__pyx_v_url); + __Pyx_XDECREF(__pyx_v_rtdesc); + __Pyx_XDECREF(__pyx_v_rtdata); + __Pyx_XDECREF(__pyx_v_params); + __Pyx_XDECREF(__pyx_v_desc); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_57getWidgetById(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_57getWidgetById = {"getWidgetById", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_57getWidgetById, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_57getWidgetById(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + PyObject *__pyx_v_from_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWidgetById (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,&__pyx_n_s_from_widget,0}; + PyObject* values[3] = {0,0,0}; + values[2] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getWidgetById", 0, 2, 3, 1); __PYX_ERR(0, 672, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from_widget); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getWidgetById") < 0)) __PYX_ERR(0, 672, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_id = ((PyObject*)values[1]); + __pyx_v_from_widget = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getWidgetById", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 672, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getWidgetById", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_id), (&PyString_Type), 1, "id", 1))) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_56getWidgetById(__pyx_self, __pyx_v_self, __pyx_v_id, __pyx_v_from_widget); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":673 + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): # <<<<<<<<<<<<<< + * if id=='self': + * return from_widget + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_13getWidgetById_1find_widget_by_id(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_13getWidgetById_1find_widget_by_id = {"find_widget_by_id", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_13getWidgetById_1find_widget_by_id, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_13getWidgetById_1find_widget_by_id(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_id = 0; + PyObject *__pyx_v_from_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("find_widget_by_id (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_id,&__pyx_n_s_from_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("find_widget_by_id", 1, 2, 2, 1); __PYX_ERR(0, 673, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_widget_by_id") < 0)) __PYX_ERR(0, 673, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_id = values[0]; + __pyx_v_from_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("find_widget_by_id", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 673, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getWidgetById.find_widget_by_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_13getWidgetById_find_widget_by_id(__pyx_self, __pyx_v_id, __pyx_v_from_widget); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_13getWidgetById_find_widget_by_id(PyObject *__pyx_self, PyObject *__pyx_v_id, PyObject *__pyx_v_from_widget) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *__pyx_cur_scope; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *__pyx_outer_scope; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_c = NULL; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("find_widget_by_id", 0); + __pyx_outer_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "kivyblocks/blocks.pyx":674 + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): + * if id=='self': # <<<<<<<<<<<<<< + * return from_widget + * if hasattr(from_widget,'widget_id'): + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_id, __pyx_n_s_self, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 674, __pyx_L1_error) + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":675 + * def find_widget_by_id(id, from_widget): + * if id=='self': + * return from_widget # <<<<<<<<<<<<<< + * if hasattr(from_widget,'widget_id'): + * if from_widget.widget_id == id: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_from_widget); + __pyx_r = __pyx_v_from_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":674 + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): + * if id=='self': # <<<<<<<<<<<<<< + * return from_widget + * if hasattr(from_widget,'widget_id'): + */ + } + + /* "kivyblocks/blocks.pyx":676 + * if id=='self': + * return from_widget + * if hasattr(from_widget,'widget_id'): # <<<<<<<<<<<<<< + * if from_widget.widget_id == id: + * return from_widget + */ + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_from_widget, __pyx_n_s_widget_id); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":677 + * return from_widget + * if hasattr(from_widget,'widget_id'): + * if from_widget.widget_id == id: # <<<<<<<<<<<<<< + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_widget, __pyx_n_s_widget_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_id, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":678 + * if hasattr(from_widget,'widget_id'): + * if from_widget.widget_id == id: + * return from_widget # <<<<<<<<<<<<<< + * if id[0] == '-' and from_widget.widget_id == id[1:]: + * return from_widget + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_from_widget); + __pyx_r = __pyx_v_from_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":677 + * return from_widget + * if hasattr(from_widget,'widget_id'): + * if from_widget.widget_id == id: # <<<<<<<<<<<<<< + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: + */ + } + + /* "kivyblocks/blocks.pyx":679 + * if from_widget.widget_id == id: + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: # <<<<<<<<<<<<<< + * return from_widget + * if hasattr(from_widget, id): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_id, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_widget, __pyx_n_s_widget_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_id, 1, 0, NULL, NULL, &__pyx_slice__25, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":680 + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: + * return from_widget # <<<<<<<<<<<<<< + * if hasattr(from_widget, id): + * w = getattr(from_widget,id) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_from_widget); + __pyx_r = __pyx_v_from_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":679 + * if from_widget.widget_id == id: + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: # <<<<<<<<<<<<<< + * return from_widget + * if hasattr(from_widget, id): + */ + } + + /* "kivyblocks/blocks.pyx":676 + * if id=='self': + * return from_widget + * if hasattr(from_widget,'widget_id'): # <<<<<<<<<<<<<< + * if from_widget.widget_id == id: + * return from_widget + */ + } + + /* "kivyblocks/blocks.pyx":681 + * if id[0] == '-' and from_widget.widget_id == id[1:]: + * return from_widget + * if hasattr(from_widget, id): # <<<<<<<<<<<<<< + * w = getattr(from_widget,id) + * return w + */ + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_from_widget, __pyx_v_id); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":682 + * return from_widget + * if hasattr(from_widget, id): + * w = getattr(from_widget,id) # <<<<<<<<<<<<<< + * return w + * + */ + __pyx_t_5 = __Pyx_GetAttr(__pyx_v_from_widget, __pyx_v_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_w = __pyx_t_5; + __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":683 + * if hasattr(from_widget, id): + * w = getattr(from_widget,id) + * return w # <<<<<<<<<<<<<< + * + * if id[0] == '-': + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_w); + __pyx_r = __pyx_v_w; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":681 + * if id[0] == '-' and from_widget.widget_id == id[1:]: + * return from_widget + * if hasattr(from_widget, id): # <<<<<<<<<<<<<< + * w = getattr(from_widget,id) + * return w + */ + } + + /* "kivyblocks/blocks.pyx":685 + * return w + * + * if id[0] == '-': # <<<<<<<<<<<<<< + * print('find_widget_by_id(), id=', id, + * 'widget=', from_widget) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_id, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "kivyblocks/blocks.pyx":686 + * + * if id[0] == '-': + * print('find_widget_by_id(), id=', id, # <<<<<<<<<<<<<< + * 'widget=', from_widget) + * if isinstance(from_widget, WindowBase): + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_s_find_widget_by_id_id); + __Pyx_GIVEREF(__pyx_kp_s_find_widget_by_id_id); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_find_widget_by_id_id); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_id); + __Pyx_INCREF(__pyx_kp_s_widget_2); + __Pyx_GIVEREF(__pyx_kp_s_widget_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_s_widget_2); + __Pyx_INCREF(__pyx_v_from_widget); + __Pyx_GIVEREF(__pyx_v_from_widget); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_from_widget); + if (__Pyx_PrintOne(0, __pyx_t_5) < 0) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":688 + * print('find_widget_by_id(), id=', id, + * 'widget=', from_widget) + * if isinstance(from_widget, WindowBase): # <<<<<<<<<<<<<< + * return None + * if from_widget.parent: + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_WindowBase); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_IsInstance(__pyx_v_from_widget, __pyx_t_5); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":689 + * 'widget=', from_widget) + * if isinstance(from_widget, WindowBase): + * return None # <<<<<<<<<<<<<< + * if from_widget.parent: + * return find_widget_by_id(id, + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":688 + * print('find_widget_by_id(), id=', id, + * 'widget=', from_widget) + * if isinstance(from_widget, WindowBase): # <<<<<<<<<<<<<< + * return None + * if from_widget.parent: + */ + } + + /* "kivyblocks/blocks.pyx":690 + * if isinstance(from_widget, WindowBase): + * return None + * if from_widget.parent: # <<<<<<<<<<<<<< + * return find_widget_by_id(id, + * from_widget=from_widget.parent) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_widget, __pyx_n_s_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":691 + * return None + * if from_widget.parent: + * return find_widget_by_id(id, # <<<<<<<<<<<<<< + * from_widget=from_widget.parent) + * return None + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_find_widget_by_id)) { __Pyx_RaiseClosureNameError("find_widget_by_id"); __PYX_ERR(0, 691, __pyx_L1_error) } + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_id); + + /* "kivyblocks/blocks.pyx":692 + * if from_widget.parent: + * return find_widget_by_id(id, + * from_widget=from_widget.parent) # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_widget, __pyx_n_s_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_from_widget, __pyx_t_4) < 0) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":691 + * return None + * if from_widget.parent: + * return find_widget_by_id(id, # <<<<<<<<<<<<<< + * from_widget=from_widget.parent) + * return None + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_find_widget_by_id, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":690 + * if isinstance(from_widget, WindowBase): + * return None + * if from_widget.parent: # <<<<<<<<<<<<<< + * return find_widget_by_id(id, + * from_widget=from_widget.parent) + */ + } + + /* "kivyblocks/blocks.pyx":693 + * return find_widget_by_id(id, + * from_widget=from_widget.parent) + * return None # <<<<<<<<<<<<<< + * else: + * for c in from_widget.children: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":685 + * return w + * + * if id[0] == '-': # <<<<<<<<<<<<<< + * print('find_widget_by_id(), id=', id, + * 'widget=', from_widget) + */ + } + + /* "kivyblocks/blocks.pyx":695 + * return None + * else: + * for c in from_widget.children: # <<<<<<<<<<<<<< + * ret = find_widget_by_id(id,from_widget=c) + * if ret: + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_widget, __pyx_n_s_children); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 695, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":696 + * else: + * for c in from_widget.children: + * ret = find_widget_by_id(id,from_widget=c) # <<<<<<<<<<<<<< + * if ret: + * return ret + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_find_widget_by_id)) { __Pyx_RaiseClosureNameError("find_widget_by_id"); __PYX_ERR(0, 696, __pyx_L1_error) } + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_id); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_from_widget, __pyx_v_c) < 0) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_find_widget_by_id, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_8); + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":697 + * for c in from_widget.children: + * ret = find_widget_by_id(id,from_widget=c) + * if ret: # <<<<<<<<<<<<<< + * return ret + * return None + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ret); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 697, __pyx_L1_error) + if (__pyx_t_2) { + + /* "kivyblocks/blocks.pyx":698 + * ret = find_widget_by_id(id,from_widget=c) + * if ret: + * return ret # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ret); + __pyx_r = __pyx_v_ret; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":697 + * for c in from_widget.children: + * ret = find_widget_by_id(id,from_widget=c) + * if ret: # <<<<<<<<<<<<<< + * return ret + * return None + */ + } + + /* "kivyblocks/blocks.pyx":695 + * return None + * else: + * for c in from_widget.children: # <<<<<<<<<<<<<< + * ret = find_widget_by_id(id,from_widget=c) + * if ret: + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "kivyblocks/blocks.pyx":699 + * if ret: + * return ret + * return None # <<<<<<<<<<<<<< + * + * ids = id.split('.') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":673 + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): # <<<<<<<<<<<<<< + * if id=='self': + * return from_widget + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getWidgetById.find_widget_by_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_c); + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_56getWidgetById(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_from_widget) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *__pyx_cur_scope; + PyObject *__pyx_v_ids = NULL; + PyObject *__pyx_v_app = NULL; + PyObject *__pyx_v_fid = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + __Pyx_RefNannySetupContext("getWidgetById", 0); + __pyx_cur_scope = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(__pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 672, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __Pyx_INCREF(__pyx_v_id); + __Pyx_INCREF(__pyx_v_from_widget); + + /* "kivyblocks/blocks.pyx":673 + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): # <<<<<<<<<<<<<< + * if id=='self': + * return from_widget + */ + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_13getWidgetById_1find_widget_by_id, 0, __pyx_n_s_Blocks_getWidgetById_locals_find, ((PyObject*)__pyx_cur_scope), __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_find_widget_by_id = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":701 + * return None + * + * ids = id.split('.') # <<<<<<<<<<<<<< + * app = App.get_running_app() + * fid = ids[0] + */ + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_split, __pyx_v_id, __pyx_kp_s__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ids = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":702 + * + * ids = id.split('.') + * app = App.get_running_app() # <<<<<<<<<<<<<< + * fid = ids[0] + * if fid == '/self' or fid == 'root': + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_App); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_running_app); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_app = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":703 + * ids = id.split('.') + * app = App.get_running_app() + * fid = ids[0] # <<<<<<<<<<<<<< + * if fid == '/self' or fid == 'root': + * from_widget = app.root + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ids, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_fid = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":704 + * app = App.get_running_app() + * fid = ids[0] + * if fid == '/self' or fid == 'root': # <<<<<<<<<<<<<< + * from_widget = app.root + * if len(ids) == 1: + */ + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_fid, __pyx_kp_s_self_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 704, __pyx_L1_error) + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_fid, __pyx_n_s_root_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":705 + * fid = ids[0] + * if fid == '/self' or fid == 'root': + * from_widget = app.root # <<<<<<<<<<<<<< + * if len(ids) == 1: + * return from_widget + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_root_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_from_widget, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":706 + * if fid == '/self' or fid == 'root': + * from_widget = app.root + * if len(ids) == 1: # <<<<<<<<<<<<<< + * return from_widget + * ids = ids[1:] + */ + __pyx_t_6 = PyObject_Length(__pyx_v_ids); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_6 == 1) != 0); + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":707 + * from_widget = app.root + * if len(ids) == 1: + * return from_widget # <<<<<<<<<<<<<< + * ids = ids[1:] + * if fid == 'Window': + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_from_widget); + __pyx_r = __pyx_v_from_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":706 + * if fid == '/self' or fid == 'root': + * from_widget = app.root + * if len(ids) == 1: # <<<<<<<<<<<<<< + * return from_widget + * ids = ids[1:] + */ + } + + /* "kivyblocks/blocks.pyx":708 + * if len(ids) == 1: + * return from_widget + * ids = ids[1:] # <<<<<<<<<<<<<< + * if fid == 'Window': + * from_widget == Window + */ + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ids, 1, 0, NULL, NULL, &__pyx_slice__25, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_ids, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":704 + * app = App.get_running_app() + * fid = ids[0] + * if fid == '/self' or fid == 'root': # <<<<<<<<<<<<<< + * from_widget = app.root + * if len(ids) == 1: + */ + } + + /* "kivyblocks/blocks.pyx":709 + * return from_widget + * ids = ids[1:] + * if fid == 'Window': # <<<<<<<<<<<<<< + * from_widget == Window + * if len(ids) == 1: + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_fid, __pyx_n_s_Window, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error) + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":710 + * ids = ids[1:] + * if fid == 'Window': + * from_widget == Window # <<<<<<<<<<<<<< + * if len(ids) == 1: + * return from_widget + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_from_widget, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":711 + * if fid == 'Window': + * from_widget == Window + * if len(ids) == 1: # <<<<<<<<<<<<<< + * return from_widget + * ids = ids[1:] + */ + __pyx_t_6 = PyObject_Length(__pyx_v_ids); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_6 == 1) != 0); + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":712 + * from_widget == Window + * if len(ids) == 1: + * return from_widget # <<<<<<<<<<<<<< + * ids = ids[1:] + * if fid == 'app': + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_from_widget); + __pyx_r = __pyx_v_from_widget; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":711 + * if fid == 'Window': + * from_widget == Window + * if len(ids) == 1: # <<<<<<<<<<<<<< + * return from_widget + * ids = ids[1:] + */ + } + + /* "kivyblocks/blocks.pyx":713 + * if len(ids) == 1: + * return from_widget + * ids = ids[1:] # <<<<<<<<<<<<<< + * if fid == 'app': + * return app + */ + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_ids, 1, 0, NULL, NULL, &__pyx_slice__25, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_ids, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":709 + * return from_widget + * ids = ids[1:] + * if fid == 'Window': # <<<<<<<<<<<<<< + * from_widget == Window + * if len(ids) == 1: + */ + } + + /* "kivyblocks/blocks.pyx":714 + * return from_widget + * ids = ids[1:] + * if fid == 'app': # <<<<<<<<<<<<<< + * return app + * + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_fid, __pyx_n_s_app_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 714, __pyx_L1_error) + if (__pyx_t_4) { + + /* "kivyblocks/blocks.pyx":715 + * ids = ids[1:] + * if fid == 'app': + * return app # <<<<<<<<<<<<<< + * + * if from_widget is None: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_app); + __pyx_r = __pyx_v_app; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":714 + * return from_widget + * ids = ids[1:] + * if fid == 'app': # <<<<<<<<<<<<<< + * return app + * + */ + } + + /* "kivyblocks/blocks.pyx":717 + * return app + * + * if from_widget is None: # <<<<<<<<<<<<<< + * from_widget = app.root + * for id in ids: + */ + __pyx_t_4 = (__pyx_v_from_widget == Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":718 + * + * if from_widget is None: + * from_widget = app.root # <<<<<<<<<<<<<< + * for id in ids: + * w = find_widget_by_id(id,from_widget=from_widget) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_root_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_from_widget, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":717 + * return app + * + * if from_widget is None: # <<<<<<<<<<<<<< + * from_widget = app.root + * for id in ids: + */ + } + + /* "kivyblocks/blocks.pyx":719 + * if from_widget is None: + * from_widget = app.root + * for id in ids: # <<<<<<<<<<<<<< + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ + */ + if (likely(PyList_CheckExact(__pyx_v_ids)) || PyTuple_CheckExact(__pyx_v_ids)) { + __pyx_t_3 = __pyx_v_ids; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 719, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 719, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 719, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_id, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":720 + * from_widget = app.root + * for id in ids: + * w = find_widget_by_id(id,from_widget=from_widget) # <<<<<<<<<<<<<< + * if w is None \ + * and id == ids[0] \ + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_id); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_from_widget, __pyx_v_from_widget) < 0) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_find_widget_by_id, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_8); + __pyx_t_8 = 0; + + /* "kivyblocks/blocks.pyx":721 + * for id in ids: + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ # <<<<<<<<<<<<<< + * and id == ids[0] \ + * and Window.fullscreen == True \ + */ + __pyx_t_4 = (__pyx_v_w == Py_None); + __pyx_t_9 = (__pyx_t_4 != 0); + if (__pyx_t_9) { + } else { + __pyx_t_5 = __pyx_t_9; + goto __pyx_L14_bool_binop_done; + } + + /* "kivyblocks/blocks.pyx":722 + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ + * and id == ids[0] \ # <<<<<<<<<<<<<< + * and Window.fullscreen == True \ + * and app.root != app.fs_widget: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_ids, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_id, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 722, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { + } else { + __pyx_t_5 = __pyx_t_9; + goto __pyx_L14_bool_binop_done; + } + + /* "kivyblocks/blocks.pyx":723 + * if w is None \ + * and id == ids[0] \ + * and Window.fullscreen == True \ # <<<<<<<<<<<<<< + * and app.root != app.fs_widget: + * w = find_widget_by_id(id, app.fs_widget) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Window); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fullscreen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { + } else { + __pyx_t_5 = __pyx_t_9; + goto __pyx_L14_bool_binop_done; + } + + /* "kivyblocks/blocks.pyx":724 + * and id == ids[0] \ + * and Window.fullscreen == True \ + * and app.root != app.fs_widget: # <<<<<<<<<<<<<< + * w = find_widget_by_id(id, app.fs_widget) + * if w is None: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_root_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_fs_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_t_9; + __pyx_L14_bool_binop_done:; + + /* "kivyblocks/blocks.pyx":721 + * for id in ids: + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ # <<<<<<<<<<<<<< + * and id == ids[0] \ + * and Window.fullscreen == True \ + */ + if (__pyx_t_5) { + + /* "kivyblocks/blocks.pyx":725 + * and Window.fullscreen == True \ + * and app.root != app.fs_widget: + * w = find_widget_by_id(id, app.fs_widget) # <<<<<<<<<<<<<< + * if w is None: + * print(id, 'not found ....') + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_app, __pyx_n_s_fs_widget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_pf_10kivyblocks_6blocks_6Blocks_13getWidgetById_find_widget_by_id(__pyx_cur_scope->__pyx_v_find_widget_by_id, __pyx_v_id, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_w, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":721 + * for id in ids: + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ # <<<<<<<<<<<<<< + * and id == ids[0] \ + * and Window.fullscreen == True \ + */ + } + + /* "kivyblocks/blocks.pyx":726 + * and app.root != app.fs_widget: + * w = find_widget_by_id(id, app.fs_widget) + * if w is None: # <<<<<<<<<<<<<< + * print(id, 'not found ....') + * return None + */ + __pyx_t_5 = (__pyx_v_w == Py_None); + __pyx_t_9 = (__pyx_t_5 != 0); + if (__pyx_t_9) { + + /* "kivyblocks/blocks.pyx":727 + * w = find_widget_by_id(id, app.fs_widget) + * if w is None: + * print(id, 'not found ....') # <<<<<<<<<<<<<< + * return None + * from_widget = w + */ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_id); + __Pyx_INCREF(__pyx_kp_s_not_found); + __Pyx_GIVEREF(__pyx_kp_s_not_found); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_not_found); + if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":728 + * if w is None: + * print(id, 'not found ....') + * return None # <<<<<<<<<<<<<< + * from_widget = w + * return w + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":726 + * and app.root != app.fs_widget: + * w = find_widget_by_id(id, app.fs_widget) + * if w is None: # <<<<<<<<<<<<<< + * print(id, 'not found ....') + * return None + */ + } + + /* "kivyblocks/blocks.pyx":729 + * print(id, 'not found ....') + * return None + * from_widget = w # <<<<<<<<<<<<<< + * return w + * + */ + __Pyx_INCREF(__pyx_v_w); + __Pyx_DECREF_SET(__pyx_v_from_widget, __pyx_v_w); + + /* "kivyblocks/blocks.pyx":719 + * if from_widget is None: + * from_widget = app.root + * for id in ids: # <<<<<<<<<<<<<< + * w = find_widget_by_id(id,from_widget=from_widget) + * if w is None \ + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/blocks.pyx":730 + * return None + * from_widget = w + * return w # <<<<<<<<<<<<<< + * + * def on_built(self,v=None): + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_w)) { __Pyx_RaiseUnboundLocalError("w"); __PYX_ERR(0, 730, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_w); + __pyx_r = __pyx_v_w; + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.getWidgetById", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ids); + __Pyx_XDECREF(__pyx_v_app); + __Pyx_XDECREF(__pyx_v_fid); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XDECREF(__pyx_v_from_widget); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":732 + * return w + * + * def on_built(self,v=None): # <<<<<<<<<<<<<< + * return + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_59on_built(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_59on_built = {"on_built", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_59on_built, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_59on_built(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_v = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_built (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_v,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_built") < 0)) __PYX_ERR(0, 732, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_v = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_built", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 732, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.on_built", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_58on_built(__pyx_self, __pyx_v_self, __pyx_v_v); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_58on_built(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_built", 0); + + /* "kivyblocks/blocks.pyx":733 + * + * def on_built(self,v=None): + * return # <<<<<<<<<<<<<< + * + * def on_failed(self,e=None): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":732 + * return w + * + * def on_built(self,v=None): # <<<<<<<<<<<<<< + * return + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/blocks.pyx":735 + * return + * + * def on_failed(self,e=None): # <<<<<<<<<<<<<< + * return + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_61on_failed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_6blocks_6Blocks_61on_failed = {"on_failed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_6blocks_6Blocks_61on_failed, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_6blocks_6Blocks_61on_failed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_e = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_failed (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_failed") < 0)) __PYX_ERR(0, 735, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_e = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_failed", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 735, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.blocks.Blocks.on_failed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_6blocks_6Blocks_60on_failed(__pyx_self, __pyx_v_self, __pyx_v_e); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_6blocks_6Blocks_60on_failed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_failed", 0); + + /* "kivyblocks/blocks.pyx":736 + * + * def on_failed(self,e=None): + * return # <<<<<<<<<<<<<< + * + * Factory.register('Blocks',Blocks) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/blocks.pyx":735 + * return + * + * def on_failed(self,e=None): # <<<<<<<<<<<<<< + * return + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct__blocksAction[8]; +static int __pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct__blocksAction = 0; + +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct__blocksAction > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction)))) { + o = (PyObject*)__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct__blocksAction[--__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct__blocksAction]; + memset(o, 0, sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(PyObject *o) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_desc); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct__blocksAction < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction)))) { + __pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct__blocksAction[__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct__blocksAction++] = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)o; + if (p->__pyx_v_desc) { + e = (*v)(p->__pyx_v_desc, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct__blocksAction(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction *)o; + tmp = ((PyObject*)p->__pyx_v_desc); + p->__pyx_v_desc = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction = { + PyVarObject_HEAD_INIT(0, 0) + "kivyblocks.blocks.__pyx_scope_struct__blocksAction", /*tp_name*/ + sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct__blocksAction), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct__blocksAction, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct__blocksAction, /*tp_traverse*/ + __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct__blocksAction, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct__blocksAction, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction[8]; +static int __pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction = 0; + +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction)))) { + o = (PyObject*)__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction[--__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction]; + memset(o, 0, sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(PyObject *o) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_desc); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction)))) { + __pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction[__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction++] = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)o; + if (p->__pyx_v_desc) { + e = (*v)(p->__pyx_v_desc, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction *)o; + tmp = ((PyObject*)p->__pyx_v_desc); + p->__pyx_v_desc = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction = { + PyVarObject_HEAD_INIT(0, 0) + "kivyblocks.blocks.__pyx_scope_struct_1_urlwidgetAction", /*tp_name*/ + sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction, /*tp_traverse*/ + __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild[8]; +static int __pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild = 0; + +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild)))) { + o = (PyObject*)__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild[--__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild]; + memset(o, 0, sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(PyObject *o) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild)))) { + __pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild[__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild++] = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)o; + if (p->__pyx_v_self) { + e = (*v)(p->__pyx_v_self, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild = { + PyVarObject_HEAD_INIT(0, 0) + "kivyblocks.blocks.__pyx_scope_struct_2_widgetBuild", /*tp_name*/ + sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild, /*tp_traverse*/ + __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById[8]; +static int __pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById = 0; + +static PyObject *__pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById)))) { + o = (PyObject*)__pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById[--__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById]; + memset(o, 0, sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(PyObject *o) { + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_find_widget_by_id); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById)))) { + __pyx_freelist_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById[__pyx_freecount_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById++] = ((struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)o; + if (p->__pyx_v_find_widget_by_id) { + e = (*v)(p->__pyx_v_find_widget_by_id, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *p = (struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById *)o; + tmp = ((PyObject*)p->__pyx_v_find_widget_by_id); + p->__pyx_v_find_widget_by_id = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById = { + PyVarObject_HEAD_INIT(0, 0) + "kivyblocks.blocks.__pyx_scope_struct_3_getWidgetById", /*tp_name*/ + sizeof(struct __pyx_obj_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById, /*tp_traverse*/ + __pyx_tp_clear_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) { + static const char* internal_type_names[] = { + "__pyx_scope_struct_1_urlwidgetAction", + "__pyx_scope_struct_2_widgetBuild", + "__pyx_scope_struct_3_getWidgetById", + "__pyx_scope_struct__blocksAction", + 0 + }; + const char** type_name = internal_type_names; + while (*type_name) { + if (__Pyx_StrEq(name, *type_name)) { + PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name); + goto bad; + } + type_name++; + } + if (0); + else { + if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad; + } + return 0; + bad: + return -1; +} + +static int +__Pyx_import_all_from(PyObject *locals, PyObject *v) +{ + PyObject *all = PyObject_GetAttrString(v, "__all__"); + PyObject *dict, *name, *value; + int skip_leading_underscores = 0; + int pos, err; + if (all == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_Clear(); + dict = PyObject_GetAttrString(v, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_SetString(PyExc_ImportError, + "from-import-* object has no __dict__ and no __all__"); + return -1; + } +#if PY_MAJOR_VERSION < 3 + all = PyObject_CallMethod(dict, (char *)"keys", NULL); +#else + all = PyMapping_Keys(dict); +#endif + Py_DECREF(dict); + if (all == NULL) + return -1; + skip_leading_underscores = 1; + } + for (pos = 0, err = 0; ; pos++) { + name = PySequence_GetItem(all, pos); + if (name == NULL) { + if (!PyErr_ExceptionMatches(PyExc_IndexError)) + err = -1; + else + PyErr_Clear(); + break; + } + if (skip_leading_underscores && +#if PY_MAJOR_VERSION < 3 + PyString_Check(name) && + PyString_AS_STRING(name)[0] == '_') +#else + PyUnicode_Check(name) && + PyUnicode_AS_UNICODE(name)[0] == '_') +#endif + { + Py_DECREF(name); + continue; + } + value = PyObject_GetAttr(v, name); + if (value == NULL) + err = -1; + else if (PyDict_CheckExact(locals)) + err = PyDict_SetItem(locals, name, value); + else + err = PyObject_SetItem(locals, name, value); + Py_DECREF(name); + Py_XDECREF(value); + if (err != 0) + break; + } + Py_DECREF(all); + return err; +} +static int __pyx_import_star(PyObject* m) { + int i; + int ret = -1; + char* s; + PyObject *locals = 0; + PyObject *list = 0; +#if PY_MAJOR_VERSION >= 3 + PyObject *utf8_name = 0; +#endif + PyObject *name; + PyObject *item; + locals = PyDict_New(); if (!locals) goto bad; + if (__Pyx_import_all_from(locals, m) < 0) goto bad; + list = PyDict_Items(locals); if (!list) goto bad; + for(i=0; i= 3 + utf8_name = PyUnicode_AsUTF8String(name); + if (!utf8_name) goto bad; + s = PyBytes_AS_STRING(utf8_name); + if (__pyx_import_star_set(item, name, s) < 0) goto bad; + Py_DECREF(utf8_name); utf8_name = 0; +#else + s = PyString_AsString(name); + if (!s) goto bad; + if (__pyx_import_star_set(item, name, s) < 0) goto bad; +#endif + } + ret = 0; +bad: + Py_XDECREF(locals); + Py_XDECREF(list); +#if PY_MAJOR_VERSION >= 3 + Py_XDECREF(utf8_name); +#endif + return ret; +} + + + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_blocks(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_blocks}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "blocks", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, + {&__pyx_n_s_App, __pyx_k_App, sizeof(__pyx_k_App), 0, 0, 1, 1}, + {&__pyx_n_s_ArgumentError, __pyx_k_ArgumentError, sizeof(__pyx_k_ArgumentError), 0, 0, 1, 1}, + {&__pyx_n_s_ArgumentError___expr, __pyx_k_ArgumentError___expr, sizeof(__pyx_k_ArgumentError___expr), 0, 0, 1, 1}, + {&__pyx_n_s_ArgumentError___init, __pyx_k_ArgumentError___init, sizeof(__pyx_k_ArgumentError___init), 0, 0, 1, 1}, + {&__pyx_n_s_ArgumentError___str, __pyx_k_ArgumentError___str, sizeof(__pyx_k_ArgumentError___str), 0, 0, 1, 1}, + {&__pyx_n_s_BGColorBehavior, __pyx_k_BGColorBehavior, sizeof(__pyx_k_BGColorBehavior), 0, 0, 1, 1}, + {&__pyx_kp_s_Block2_desc_must_be_a_dict_objec, __pyx_k_Block2_desc_must_be_a_dict_objec, sizeof(__pyx_k_Block2_desc_must_be_a_dict_objec), 0, 0, 1, 0}, + {&__pyx_kp_s_Block3_desc_must_be_a_dict_objec, __pyx_k_Block3_desc_must_be_a_dict_objec, sizeof(__pyx_k_Block3_desc_must_be_a_dict_objec), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_binds_desc_miss_event_desc, __pyx_k_Block_binds_desc_miss_event_desc, sizeof(__pyx_k_Block_binds_desc_miss_event_desc), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_blocksAction_desc_s_widget, __pyx_k_Block_blocksAction_desc_s_widget, sizeof(__pyx_k_Block_blocksAction_desc_s_widget), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_desc_s_must_be_a_dict_obje, __pyx_k_Block_desc_s_must_be_a_dict_obje, sizeof(__pyx_k_Block_desc_s_must_be_a_dict_obje), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_desc_s_rfname_s_not_found, __pyx_k_Block_desc_s_rfname_s_not_found, sizeof(__pyx_k_Block_desc_s_rfname_s_not_found), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_eventAction_desc_s_miss_di, __pyx_k_Block_eventAction_desc_s_miss_di, sizeof(__pyx_k_Block_eventAction_desc_s_miss_di), 0, 0, 1, 0}, + {&__pyx_kp_u_Block_eventAction_dispatch, __pyx_k_Block_eventAction_dispatch, sizeof(__pyx_k_Block_eventAction_dispatch), 0, 1, 0, 0}, + {&__pyx_kp_s_Block_get_a_null_function_s, __pyx_k_Block_get_a_null_function_s, sizeof(__pyx_k_Block_get_a_null_function_s), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_methodAction_desc_s_method, __pyx_k_Block_methodAction_desc_s_method, sizeof(__pyx_k_Block_methodAction_desc_s_method), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_methodAction_desc_s_target, __pyx_k_Block_methodAction_desc_s_target, sizeof(__pyx_k_Block_methodAction_desc_s_target), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_s_s, __pyx_k_Block_s_s, sizeof(__pyx_k_Block_s_s), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_scriptAction_desc_s_target, __pyx_k_Block_scriptAction_desc_s_target, sizeof(__pyx_k_Block_scriptAction_desc_s_target), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_uniaction_called_desc_s, __pyx_k_Block_uniaction_called_desc_s, sizeof(__pyx_k_Block_uniaction_called_desc_s), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_urlwidgetAction_desc_s_wid, __pyx_k_Block_urlwidgetAction_desc_s_wid, sizeof(__pyx_k_Block_urlwidgetAction_desc_s_wid), 0, 0, 1, 0}, + {&__pyx_kp_s_Block_w_build_desc_invalid, __pyx_k_Block_w_build_desc_invalid, sizeof(__pyx_k_Block_w_build_desc_invalid), 0, 0, 1, 0}, + {&__pyx_n_s_Blocks, __pyx_k_Blocks, sizeof(__pyx_k_Blocks), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks___init, __pyx_k_Blocks___init, sizeof(__pyx_k_Blocks___init), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_arrayValueExpr, __pyx_k_Blocks_arrayValueExpr, sizeof(__pyx_k_Blocks_arrayValueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_blocksAction, __pyx_k_Blocks_blocksAction, sizeof(__pyx_k_Blocks_blocksAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_blocksAction_locals_doerr, __pyx_k_Blocks_blocksAction_locals_doerr, sizeof(__pyx_k_Blocks_blocksAction_locals_doerr), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_blocksAction_locals_doit, __pyx_k_Blocks_blocksAction_locals_doit, sizeof(__pyx_k_Blocks_blocksAction_locals_doit), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_buildAction, __pyx_k_Blocks_buildAction, sizeof(__pyx_k_Blocks_buildAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_buildBind, __pyx_k_Blocks_buildBind, sizeof(__pyx_k_Blocks_buildBind), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_build_attributes, __pyx_k_Blocks_build_attributes, sizeof(__pyx_k_Blocks_build_attributes), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_build_rest, __pyx_k_Blocks_build_rest, sizeof(__pyx_k_Blocks_build_rest), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_build_rtdesc, __pyx_k_Blocks_build_rtdesc, sizeof(__pyx_k_Blocks_build_rtdesc), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_conform_action, __pyx_k_Blocks_conform_action, sizeof(__pyx_k_Blocks_conform_action), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_dictValueExpr, __pyx_k_Blocks_dictValueExpr, sizeof(__pyx_k_Blocks_dictValueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_eval, __pyx_k_Blocks_eval, sizeof(__pyx_k_Blocks_eval), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_eventAction, __pyx_k_Blocks_eventAction, sizeof(__pyx_k_Blocks_eventAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_getActionData, __pyx_k_Blocks_getActionData, sizeof(__pyx_k_Blocks_getActionData), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_getUrlData, __pyx_k_Blocks_getUrlData, sizeof(__pyx_k_Blocks_getUrlData), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_getWidgetById, __pyx_k_Blocks_getWidgetById, sizeof(__pyx_k_Blocks_getWidgetById), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_getWidgetById_locals_find, __pyx_k_Blocks_getWidgetById_locals_find, sizeof(__pyx_k_Blocks_getWidgetById_locals_find), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_get_rtdata, __pyx_k_Blocks_get_rtdata, sizeof(__pyx_k_Blocks_get_rtdata), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_get_target, __pyx_k_Blocks_get_target, sizeof(__pyx_k_Blocks_get_target), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_methodAction, __pyx_k_Blocks_methodAction, sizeof(__pyx_k_Blocks_methodAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_multipleAction, __pyx_k_Blocks_multipleAction, sizeof(__pyx_k_Blocks_multipleAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_on_built, __pyx_k_Blocks_on_built, sizeof(__pyx_k_Blocks_on_built), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_on_failed, __pyx_k_Blocks_on_failed, sizeof(__pyx_k_Blocks_on_failed), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_registedfunctionAction, __pyx_k_Blocks_registedfunctionAction, sizeof(__pyx_k_Blocks_registedfunctionAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_register_widget, __pyx_k_Blocks_register_widget, sizeof(__pyx_k_Blocks_register_widget), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_scriptAction, __pyx_k_Blocks_scriptAction, sizeof(__pyx_k_Blocks_scriptAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_set, __pyx_k_Blocks_set, sizeof(__pyx_k_Blocks_set), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_strValueExpr, __pyx_k_Blocks_strValueExpr, sizeof(__pyx_k_Blocks_strValueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_uniaction, __pyx_k_Blocks_uniaction, sizeof(__pyx_k_Blocks_uniaction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_urlwidgetAction, __pyx_k_Blocks_urlwidgetAction, sizeof(__pyx_k_Blocks_urlwidgetAction), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_urlwidgetAction_locals_do, __pyx_k_Blocks_urlwidgetAction_locals_do, sizeof(__pyx_k_Blocks_urlwidgetAction_locals_do), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_urlwidgetAction_locals_do_2, __pyx_k_Blocks_urlwidgetAction_locals_do_2, sizeof(__pyx_k_Blocks_urlwidgetAction_locals_do_2), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_valueExpr, __pyx_k_Blocks_valueExpr, sizeof(__pyx_k_Blocks_valueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_w_build, __pyx_k_Blocks_w_build, sizeof(__pyx_k_Blocks_w_build), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_widgetBuild, __pyx_k_Blocks_widgetBuild, sizeof(__pyx_k_Blocks_widgetBuild), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks_widgetBuild_locals_doit, __pyx_k_Blocks_widgetBuild_locals_doit, sizeof(__pyx_k_Blocks_widgetBuild_locals_doit), 0, 0, 1, 1}, + {&__pyx_n_s_BooleanProperty, __pyx_k_BooleanProperty, sizeof(__pyx_k_BooleanProperty), 0, 0, 1, 1}, + {&__pyx_n_s_BoxViewer, __pyx_k_BoxViewer, sizeof(__pyx_k_BoxViewer), 0, 0, 1, 1}, + {&__pyx_n_s_ClassMethodNotFound, __pyx_k_ClassMethodNotFound, sizeof(__pyx_k_ClassMethodNotFound), 0, 0, 1, 1}, + {&__pyx_n_s_ClassMethodNotFound___expr, __pyx_k_ClassMethodNotFound___expr, sizeof(__pyx_k_ClassMethodNotFound___expr), 0, 0, 1, 1}, + {&__pyx_n_s_ClassMethodNotFound___init, __pyx_k_ClassMethodNotFound___init, sizeof(__pyx_k_ClassMethodNotFound___init), 0, 0, 1, 1}, + {&__pyx_n_s_ClassMethodNotFound___str, __pyx_k_ClassMethodNotFound___str, sizeof(__pyx_k_ClassMethodNotFound___str), 0, 0, 1, 1}, + {&__pyx_n_s_Config, __pyx_k_Config, sizeof(__pyx_k_Config), 0, 0, 1, 1}, + {&__pyx_n_s_Conform, __pyx_k_Conform, sizeof(__pyx_k_Conform), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid, __pyx_k_DataGrid, sizeof(__pyx_k_DataGrid), 0, 0, 1, 1}, + {&__pyx_n_s_DictObject, __pyx_k_DictObject, sizeof(__pyx_k_DictObject), 0, 0, 1, 1}, + {&__pyx_kp_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 0}, + {&__pyx_n_s_EventDispatcher, __pyx_k_EventDispatcher, sizeof(__pyx_k_EventDispatcher), 0, 0, 1, 1}, + {&__pyx_kp_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 0}, + {&__pyx_n_s_Factory, __pyx_k_Factory, sizeof(__pyx_k_Factory), 0, 0, 1, 1}, + {&__pyx_n_s_Form, __pyx_k_Form, sizeof(__pyx_k_Form), 0, 0, 1, 1}, + {&__pyx_n_s_GET, __pyx_k_GET, sizeof(__pyx_k_GET), 0, 0, 1, 1}, + {&__pyx_n_s_GlobalEnv, __pyx_k_GlobalEnv, sizeof(__pyx_k_GlobalEnv), 0, 0, 1, 1}, + {&__pyx_n_s_HttpClient, __pyx_k_HttpClient, sizeof(__pyx_k_HttpClient), 0, 0, 1, 1}, + {&__pyx_n_s_InputBox, __pyx_k_InputBox, sizeof(__pyx_k_InputBox), 0, 0, 1, 1}, + {&__pyx_n_s_Layout, __pyx_k_Layout, sizeof(__pyx_k_Layout), 0, 0, 1, 1}, + {&__pyx_n_s_Logger, __pyx_k_Logger, sizeof(__pyx_k_Logger), 0, 0, 1, 1}, + {&__pyx_kp_s_Method_s_not_found_in_class_s, __pyx_k_Method_s_not_found_in_class_s, sizeof(__pyx_k_Method_s_not_found_in_class_s), 0, 0, 1, 0}, + {&__pyx_n_s_NotExistsObject, __pyx_k_NotExistsObject, sizeof(__pyx_k_NotExistsObject), 0, 0, 1, 1}, + {&__pyx_n_s_NotExistsObject___expr, __pyx_k_NotExistsObject___expr, sizeof(__pyx_k_NotExistsObject___expr), 0, 0, 1, 1}, + {&__pyx_n_s_NotExistsObject___init, __pyx_k_NotExistsObject___init, sizeof(__pyx_k_NotExistsObject___init), 0, 0, 1, 1}, + {&__pyx_n_s_NotExistsObject___str, __pyx_k_NotExistsObject___str, sizeof(__pyx_k_NotExistsObject___str), 0, 0, 1, 1}, + {&__pyx_n_s_NotRegistedWidget, __pyx_k_NotRegistedWidget, sizeof(__pyx_k_NotRegistedWidget), 0, 0, 1, 1}, + {&__pyx_n_s_NotRegistedWidget___expr, __pyx_k_NotRegistedWidget___expr, sizeof(__pyx_k_NotRegistedWidget___expr), 0, 0, 1, 1}, + {&__pyx_n_s_NotRegistedWidget___init, __pyx_k_NotRegistedWidget___init, sizeof(__pyx_k_NotRegistedWidget___init), 0, 0, 1, 1}, + {&__pyx_n_s_NotRegistedWidget___str, __pyx_k_NotRegistedWidget___str, sizeof(__pyx_k_NotRegistedWidget___str), 0, 0, 1, 1}, + {&__pyx_n_s_OrientationLayout, __pyx_k_OrientationLayout, sizeof(__pyx_k_OrientationLayout), 0, 0, 1, 1}, + {&__pyx_n_s_ProgramPath, __pyx_k_ProgramPath, sizeof(__pyx_k_ProgramPath), 0, 0, 1, 1}, + {&__pyx_n_s_RegisterFunction, __pyx_k_RegisterFunction, sizeof(__pyx_k_RegisterFunction), 0, 0, 1, 1}, + {&__pyx_n_s_ServerImageViewer, __pyx_k_ServerImageViewer, sizeof(__pyx_k_ServerImageViewer), 0, 0, 1, 1}, + {&__pyx_n_s_SingletonDecorator, __pyx_k_SingletonDecorator, sizeof(__pyx_k_SingletonDecorator), 0, 0, 1, 1}, + {&__pyx_n_s_StrSearchForm, __pyx_k_StrSearchForm, sizeof(__pyx_k_StrSearchForm), 0, 0, 1, 1}, + {&__pyx_n_s_TextTree, __pyx_k_TextTree, sizeof(__pyx_k_TextTree), 0, 0, 1, 1}, + {&__pyx_n_s_Tree, __pyx_k_Tree, sizeof(__pyx_k_Tree), 0, 0, 1, 1}, + {&__pyx_n_s_VPlayer, __pyx_k_VPlayer, sizeof(__pyx_k_VPlayer), 0, 0, 1, 1}, + {&__pyx_n_s_Video, __pyx_k_Video, sizeof(__pyx_k_Video), 0, 0, 1, 1}, + {&__pyx_n_s_Widget, __pyx_k_Widget, sizeof(__pyx_k_Widget), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetNotFoundById, __pyx_k_WidgetNotFoundById, sizeof(__pyx_k_WidgetNotFoundById), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetNotFoundById___expr, __pyx_k_WidgetNotFoundById___expr, sizeof(__pyx_k_WidgetNotFoundById___expr), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetNotFoundById___init, __pyx_k_WidgetNotFoundById___init, sizeof(__pyx_k_WidgetNotFoundById___init), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetNotFoundById___str, __pyx_k_WidgetNotFoundById___str, sizeof(__pyx_k_WidgetNotFoundById___str), 0, 0, 1, 1}, + {&__pyx_kp_s_Widget_not_found_by_id, __pyx_k_Widget_not_found_by_id, sizeof(__pyx_k_Widget_not_found_by_id), 0, 0, 1, 0}, + {&__pyx_n_s_Window, __pyx_k_Window, sizeof(__pyx_k_Window), 0, 0, 1, 1}, + {&__pyx_n_s_WindowBase, __pyx_k_WindowBase, sizeof(__pyx_k_WindowBase), 0, 0, 1, 1}, + {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0}, + {&__pyx_n_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 1}, + {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, + {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, + {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, + {&__pyx_n_s_action_id, __pyx_k_action_id, sizeof(__pyx_k_action_id), 0, 0, 1, 1}, + {&__pyx_n_s_actions, __pyx_k_actions, sizeof(__pyx_k_actions), 0, 0, 1, 1}, + {&__pyx_n_s_actiontype, __pyx_k_actiontype, sizeof(__pyx_k_actiontype), 0, 0, 1, 1}, + {&__pyx_kp_s_actiontype_s_invalid, __pyx_k_actiontype_s_invalid, sizeof(__pyx_k_actiontype_s_invalid), 0, 0, 1, 0}, + {&__pyx_n_s_acttype, __pyx_k_acttype, sizeof(__pyx_k_acttype), 0, 0, 1, 1}, + {&__pyx_n_s_add_mode, __pyx_k_add_mode, sizeof(__pyx_k_add_mode), 0, 0, 1, 1}, + {&__pyx_n_s_add_widget, __pyx_k_add_widget, sizeof(__pyx_k_add_widget), 0, 0, 1, 1}, + {&__pyx_n_s_addon, __pyx_k_addon, sizeof(__pyx_k_addon), 0, 0, 1, 1}, + {&__pyx_n_s_alert, __pyx_k_alert, sizeof(__pyx_k_alert), 0, 0, 1, 1}, + {&__pyx_kp_s_app, __pyx_k_app, sizeof(__pyx_k_app), 0, 0, 1, 0}, + {&__pyx_n_s_appPublic_Singleton, __pyx_k_appPublic_Singleton, sizeof(__pyx_k_appPublic_Singleton), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_datamapping, __pyx_k_appPublic_datamapping, sizeof(__pyx_k_appPublic_datamapping), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_dictExt, __pyx_k_appPublic_dictExt, sizeof(__pyx_k_appPublic_dictExt), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_dictObject, __pyx_k_appPublic_dictObject, sizeof(__pyx_k_appPublic_dictObject), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_folderUtils, __pyx_k_appPublic_folderUtils, sizeof(__pyx_k_appPublic_folderUtils), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_registerfunction, __pyx_k_appPublic_registerfunction, sizeof(__pyx_k_appPublic_registerfunction), 0, 0, 1, 1}, + {&__pyx_n_s_app_2, __pyx_k_app_2, sizeof(__pyx_k_app_2), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_argument, __pyx_k_argument, sizeof(__pyx_k_argument), 0, 0, 1, 1}, + {&__pyx_kp_s_argument_s_missed_s, __pyx_k_argument_s_missed_s, sizeof(__pyx_k_argument_s_missed_s), 0, 0, 1, 0}, + {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, + {&__pyx_n_s_arrayValueExpr, __pyx_k_arrayValueExpr, sizeof(__pyx_k_arrayValueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_aw, __pyx_k_aw, sizeof(__pyx_k_aw), 0, 0, 1, 1}, + {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, + {&__pyx_n_s_baseWidget, __pyx_k_baseWidget, sizeof(__pyx_k_baseWidget), 0, 0, 1, 1}, + {&__pyx_n_s_bgcolorbehavior, __pyx_k_bgcolorbehavior, sizeof(__pyx_k_bgcolorbehavior), 0, 0, 1, 1}, + {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1}, + {&__pyx_n_s_binds, __pyx_k_binds, sizeof(__pyx_k_binds), 0, 0, 1, 1}, + {&__pyx_n_s_blocks, __pyx_k_blocks, sizeof(__pyx_k_blocks), 0, 0, 1, 1}, + {&__pyx_n_s_blocksAction, __pyx_k_blocksAction, sizeof(__pyx_k_blocksAction), 0, 0, 1, 1}, + {&__pyx_n_s_boxViewer, __pyx_k_boxViewer, sizeof(__pyx_k_boxViewer), 0, 0, 1, 1}, + {&__pyx_n_s_buildAction, __pyx_k_buildAction, sizeof(__pyx_k_buildAction), 0, 0, 1, 1}, + {&__pyx_n_s_buildBind, __pyx_k_buildBind, sizeof(__pyx_k_buildBind), 0, 0, 1, 1}, + {&__pyx_n_s_build_attributes, __pyx_k_build_attributes, sizeof(__pyx_k_build_attributes), 0, 0, 1, 1}, + {&__pyx_n_s_build_desc, __pyx_k_build_desc, sizeof(__pyx_k_build_desc), 0, 0, 1, 1}, + {&__pyx_n_s_build_rest, __pyx_k_build_rest, sizeof(__pyx_k_build_rest), 0, 0, 1, 1}, + {&__pyx_n_s_build_rtdesc, __pyx_k_build_rtdesc, sizeof(__pyx_k_build_rtdesc), 0, 0, 1, 1}, + {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, + {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1}, + {&__pyx_n_s_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 0, 1, 1}, + {&__pyx_n_s_classname, __pyx_k_classname, sizeof(__pyx_k_classname), 0, 0, 1, 1}, + {&__pyx_n_s_clear_widgets, __pyx_k_clear_widgets, sizeof(__pyx_k_clear_widgets), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_codecs, __pyx_k_codecs, sizeof(__pyx_k_codecs), 0, 0, 1, 1}, + {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1}, + {&__pyx_n_s_conform, __pyx_k_conform, sizeof(__pyx_k_conform), 0, 0, 1, 1}, + {&__pyx_n_s_conform_action, __pyx_k_conform_action, sizeof(__pyx_k_conform_action), 0, 0, 1, 1}, + {&__pyx_n_s_conform_desc, __pyx_k_conform_desc, sizeof(__pyx_k_conform_desc), 0, 0, 1, 1}, + {&__pyx_kp_s_contructon_error, __pyx_k_contructon_error, sizeof(__pyx_k_contructon_error), 0, 0, 1, 0}, + {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, + {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, + {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, + {&__pyx_n_s_datacript, __pyx_k_datacript, sizeof(__pyx_k_datacript), 0, 0, 1, 1}, + {&__pyx_n_s_datakwargs, __pyx_k_datakwargs, sizeof(__pyx_k_datakwargs), 0, 0, 1, 1}, + {&__pyx_n_s_datamethod, __pyx_k_datamethod, sizeof(__pyx_k_datamethod), 0, 0, 1, 1}, + {&__pyx_n_s_datascript, __pyx_k_datascript, sizeof(__pyx_k_datascript), 0, 0, 1, 1}, + {&__pyx_n_s_datawidget, __pyx_k_datawidget, sizeof(__pyx_k_datawidget), 0, 0, 1, 1}, + {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1}, + {&__pyx_n_s_desc1, __pyx_k_desc1, sizeof(__pyx_k_desc1), 0, 0, 1, 1}, + {&__pyx_n_s_dg, __pyx_k_dg, sizeof(__pyx_k_dg), 0, 0, 1, 1}, + {&__pyx_n_s_dic, __pyx_k_dic, sizeof(__pyx_k_dic), 0, 0, 1, 1}, + {&__pyx_n_u_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 0, 1}, + {&__pyx_n_s_dictExtend, __pyx_k_dictExtend, sizeof(__pyx_k_dictExtend), 0, 0, 1, 1}, + {&__pyx_n_s_dictValueExpr, __pyx_k_dictValueExpr, sizeof(__pyx_k_dictValueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_dispatch, __pyx_k_dispatch, sizeof(__pyx_k_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_dispatch_event, __pyx_k_dispatch_event, sizeof(__pyx_k_dispatch_event), 0, 0, 1, 1}, + {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, + {&__pyx_n_s_doerr, __pyx_k_doerr, sizeof(__pyx_k_doerr), 0, 0, 1, 1}, + {&__pyx_n_s_doit, __pyx_k_doit, sizeof(__pyx_k_doit), 0, 0, 1, 1}, + {&__pyx_n_s_dp, __pyx_k_dp, sizeof(__pyx_k_dp), 0, 0, 1, 1}, + {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1}, + {&__pyx_n_s_errback, __pyx_k_errback, sizeof(__pyx_k_errback), 0, 0, 1, 1}, + {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, + {&__pyx_kp_u_error_2, __pyx_k_error_2, sizeof(__pyx_k_error_2), 0, 1, 0, 0}, + {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1}, + {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, + {&__pyx_n_s_eventAction, __pyx_k_eventAction, sizeof(__pyx_k_eventAction), 0, 0, 1, 1}, + {&__pyx_n_s_excludes, __pyx_k_excludes, sizeof(__pyx_k_excludes), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1}, + {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_fid, __pyx_k_fid, sizeof(__pyx_k_fid), 0, 0, 1, 1}, + {&__pyx_kp_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 0}, + {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1}, + {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, + {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1}, + {&__pyx_n_s_find_widget_by_id, __pyx_k_find_widget_by_id, sizeof(__pyx_k_find_widget_by_id), 0, 0, 1, 1}, + {&__pyx_kp_s_find_widget_by_id_id, __pyx_k_find_widget_by_id_id, sizeof(__pyx_k_find_widget_by_id_id), 0, 0, 1, 0}, + {&__pyx_n_s_forbidens, __pyx_k_forbidens, sizeof(__pyx_k_forbidens), 0, 0, 1, 1}, + {&__pyx_n_s_form, __pyx_k_form, sizeof(__pyx_k_form), 0, 0, 1, 1}, + {&__pyx_n_s_from_widget, __pyx_k_from_widget, sizeof(__pyx_k_from_widget), 0, 0, 1, 1}, + {&__pyx_n_s_fs_widget, __pyx_k_fs_widget, sizeof(__pyx_k_fs_widget), 0, 0, 1, 1}, + {&__pyx_n_s_fullscreen, __pyx_k_fullscreen, sizeof(__pyx_k_fullscreen), 0, 0, 1, 1}, + {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, + {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1}, + {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_getActionData, __pyx_k_getActionData, sizeof(__pyx_k_getActionData), 0, 0, 1, 1}, + {&__pyx_n_s_getConfig, __pyx_k_getConfig, sizeof(__pyx_k_getConfig), 0, 0, 1, 1}, + {&__pyx_n_s_getUrlData, __pyx_k_getUrlData, sizeof(__pyx_k_getUrlData), 0, 0, 1, 1}, + {&__pyx_n_s_getValue, __pyx_k_getValue, sizeof(__pyx_k_getValue), 0, 0, 1, 1}, + {&__pyx_n_s_getWidgetById, __pyx_k_getWidgetById, sizeof(__pyx_k_getWidgetById), 0, 0, 1, 1}, + {&__pyx_n_s_get_rtdata, __pyx_k_get_rtdata, sizeof(__pyx_k_get_rtdata), 0, 0, 1, 1}, + {&__pyx_kp_s_get_rtdata_desc_is_None, __pyx_k_get_rtdata_desc_is_None, sizeof(__pyx_k_get_rtdata_desc_is_None), 0, 0, 1, 0}, + {&__pyx_kp_s_get_rtdata_method_is_None, __pyx_k_get_rtdata_method_is_None, sizeof(__pyx_k_get_rtdata_method_is_None), 0, 0, 1, 0}, + {&__pyx_kp_s_get_rtdata_method_return_is_not, __pyx_k_get_rtdata_method_return_is_not, sizeof(__pyx_k_get_rtdata_method_return_is_not), 0, 0, 1, 0}, + {&__pyx_kp_s_get_rtdata_w_is_None, __pyx_k_get_rtdata_w_is_None, sizeof(__pyx_k_get_rtdata_w_is_None), 0, 0, 1, 0}, + {&__pyx_n_s_get_running_app, __pyx_k_get_running_app, sizeof(__pyx_k_get_running_app), 0, 0, 1, 1}, + {&__pyx_n_s_get_target, __pyx_k_get_target, sizeof(__pyx_k_get_target), 0, 0, 1, 1}, + {&__pyx_n_s_hc, __pyx_k_hc, sizeof(__pyx_k_hc), 0, 0, 1, 1}, + {&__pyx_kp_s_http, __pyx_k_http, sizeof(__pyx_k_http), 0, 0, 1, 0}, + {&__pyx_kp_s_https, __pyx_k_https, sizeof(__pyx_k_https), 0, 0, 1, 0}, + {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, + {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, + {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1}, + {&__pyx_n_s_idstr, __pyx_k_idstr, sizeof(__pyx_k_idstr), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, + {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, + {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, + {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1}, + {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, + {&__pyx_n_s_keyMapping, __pyx_k_keyMapping, sizeof(__pyx_k_keyMapping), 0, 0, 1, 1}, + {&__pyx_n_s_keymapping, __pyx_k_keymapping, sizeof(__pyx_k_keymapping), 0, 0, 1, 1}, + {&__pyx_n_s_kivy, __pyx_k_kivy, sizeof(__pyx_k_kivy), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_app, __pyx_k_kivy_app, sizeof(__pyx_k_kivy_app), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_config, __pyx_k_kivy_config, sizeof(__pyx_k_kivy_config), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_core_window, __pyx_k_kivy_core_window, sizeof(__pyx_k_kivy_core_window), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_factory, __pyx_k_kivy_factory, sizeof(__pyx_k_kivy_factory), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_logger, __pyx_k_kivy_logger, sizeof(__pyx_k_kivy_logger), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_metrics, __pyx_k_kivy_metrics, sizeof(__pyx_k_kivy_metrics), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_properties, __pyx_k_kivy_properties, sizeof(__pyx_k_kivy_properties), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_video, __pyx_k_kivy_uix_video, sizeof(__pyx_k_kivy_uix_video), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_widget, __pyx_k_kivy_uix_widget, sizeof(__pyx_k_kivy_uix_widget), 0, 0, 1, 1}, + {&__pyx_n_s_kivyblocks_blocks, __pyx_k_kivyblocks_blocks, sizeof(__pyx_k_kivyblocks_blocks), 0, 0, 1, 1}, + {&__pyx_kp_s_kivyblocks_blocks_pyx, __pyx_k_kivyblocks_blocks_pyx, sizeof(__pyx_k_kivyblocks_blocks_pyx), 0, 0, 1, 0}, + {&__pyx_n_s_klass, __pyx_k_klass, sizeof(__pyx_k_klass), 0, 0, 1, 1}, + {&__pyx_n_s_kname, __pyx_k_kname, sizeof(__pyx_k_kname), 0, 0, 1, 1}, + {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1}, + {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, + {&__pyx_n_u_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 1, 0, 1}, + {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1}, + {&__pyx_n_s_localnamespace, __pyx_k_localnamespace, sizeof(__pyx_k_localnamespace), 0, 0, 1, 1}, + {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, + {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1}, + {&__pyx_n_s_methodAction, __pyx_k_methodAction, sizeof(__pyx_k_methodAction), 0, 0, 1, 1}, + {&__pyx_kp_s_miss_url, __pyx_k_miss_url, sizeof(__pyx_k_miss_url), 0, 0, 1, 0}, + {&__pyx_n_s_mm, __pyx_k_mm, sizeof(__pyx_k_mm), 0, 0, 1, 1}, + {&__pyx_n_s_mname, __pyx_k_mname, sizeof(__pyx_k_mname), 0, 0, 1, 1}, + {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, + {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, + {&__pyx_n_s_multiple, __pyx_k_multiple, sizeof(__pyx_k_multiple), 0, 0, 1, 1}, + {&__pyx_n_s_multipleAction, __pyx_k_multipleAction, sizeof(__pyx_k_multipleAction), 0, 0, 1, 1}, + {&__pyx_n_s_mydesc, __pyx_k_mydesc, sizeof(__pyx_k_mydesc), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_new_desc, __pyx_k_new_desc, sizeof(__pyx_k_new_desc), 0, 0, 1, 1}, + {&__pyx_n_s_newvideo, __pyx_k_newvideo, sizeof(__pyx_k_newvideo), 0, 0, 1, 1}, + {&__pyx_kp_s_not_exists_widget_s, __pyx_k_not_exists_widget_s, sizeof(__pyx_k_not_exists_widget_s), 0, 0, 1, 0}, + {&__pyx_kp_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 0}, + {&__pyx_kp_s_not_found_via_Blocks_getWidgetBy, __pyx_k_not_found_via_Blocks_getWidgetBy, sizeof(__pyx_k_not_found_via_Blocks_getWidgetBy), 0, 0, 1, 0}, + {&__pyx_kp_s_not_reigsted_widget_s, __pyx_k_not_reigsted_widget_s, sizeof(__pyx_k_not_reigsted_widget_s), 0, 0, 1, 0}, + {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1}, + {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, + {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, + {&__pyx_n_s_on_built, __pyx_k_on_built, sizeof(__pyx_k_on_built), 0, 0, 1, 1}, + {&__pyx_n_s_on_conform, __pyx_k_on_conform, sizeof(__pyx_k_on_conform), 0, 0, 1, 1}, + {&__pyx_n_s_on_failed, __pyx_k_on_failed, sizeof(__pyx_k_on_failed), 0, 0, 1, 1}, + {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, + {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1}, + {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1}, + {&__pyx_n_s_orientationlayout, __pyx_k_orientationlayout, sizeof(__pyx_k_orientationlayout), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, + {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1}, + {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1}, + {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1}, + {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, + {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1}, + {&__pyx_kp_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 0}, + {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, + {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1}, + {&__pyx_n_s_ready, __pyx_k_ready, sizeof(__pyx_k_ready), 0, 0, 1, 1}, + {&__pyx_n_s_registedfunction, __pyx_k_registedfunction, sizeof(__pyx_k_registedfunction), 0, 0, 1, 1}, + {&__pyx_n_s_registedfunctionAction, __pyx_k_registedfunctionAction, sizeof(__pyx_k_registedfunctionAction), 0, 0, 1, 1}, + {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1}, + {&__pyx_n_s_registerWidget, __pyx_k_registerWidget, sizeof(__pyx_k_registerWidget), 0, 0, 1, 1}, + {&__pyx_n_s_register_event_type, __pyx_k_register_event_type, sizeof(__pyx_k_register_event_type), 0, 0, 1, 1}, + {&__pyx_n_s_register_widget, __pyx_k_register_widget, sizeof(__pyx_k_register_widget), 0, 0, 1, 1}, + {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, + {&__pyx_n_s_resp, __pyx_k_resp, sizeof(__pyx_k_resp), 0, 0, 1, 1}, + {&__pyx_kp_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 0}, + {&__pyx_n_s_ret_2, __pyx_k_ret_2, sizeof(__pyx_k_ret_2), 0, 0, 1, 1}, + {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, + {&__pyx_n_s_rf, __pyx_k_rf, sizeof(__pyx_k_rf), 0, 0, 1, 1}, + {&__pyx_n_s_rfname, __pyx_k_rfname, sizeof(__pyx_k_rfname), 0, 0, 1, 1}, + {&__pyx_kp_s_rfname_s_not_found, __pyx_k_rfname_s_not_found, sizeof(__pyx_k_rfname_s_not_found), 0, 0, 1, 0}, + {&__pyx_kp_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 0}, + {&__pyx_n_s_root_2, __pyx_k_root_2, sizeof(__pyx_k_root_2), 0, 0, 1, 1}, + {&__pyx_n_s_rt, __pyx_k_rt, sizeof(__pyx_k_rt), 0, 0, 1, 1}, + {&__pyx_n_s_rtdata, __pyx_k_rtdata, sizeof(__pyx_k_rtdata), 0, 0, 1, 1}, + {&__pyx_n_s_rtdesc, __pyx_k_rtdesc, sizeof(__pyx_k_rtdesc), 0, 0, 1, 1}, + {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, + {&__pyx_kp_s_s_method_not_found, __pyx_k_s_method_not_found, sizeof(__pyx_k_s_method_not_found), 0, 0, 1, 0}, + {&__pyx_kp_s_script, __pyx_k_script, sizeof(__pyx_k_script), 0, 0, 1, 0}, + {&__pyx_n_s_scriptAction, __pyx_k_scriptAction, sizeof(__pyx_k_scriptAction), 0, 0, 1, 1}, + {&__pyx_n_s_script_2, __pyx_k_script_2, sizeof(__pyx_k_script_2), 0, 0, 1, 1}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_kp_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 0}, + {&__pyx_n_s_serverImageViewer, __pyx_k_serverImageViewer, sizeof(__pyx_k_serverImageViewer), 0, 0, 1, 1}, + {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1}, + {&__pyx_n_s_sp, __pyx_k_sp, sizeof(__pyx_k_sp), 0, 0, 1, 1}, + {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, + {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, + {&__pyx_n_s_strValueExpr, __pyx_k_strValueExpr, sizeof(__pyx_k_strValueExpr), 0, 0, 1, 1}, + {&__pyx_n_u_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 1, 0, 1}, + {&__pyx_n_s_subwidget_total, __pyx_k_subwidget_total, sizeof(__pyx_k_subwidget_total), 0, 0, 1, 1}, + {&__pyx_n_s_subwidgets, __pyx_k_subwidgets, sizeof(__pyx_k_subwidgets), 0, 0, 1, 1}, + {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, + {&__pyx_n_s_sw, __pyx_k_sw, sizeof(__pyx_k_sw), 0, 0, 1, 1}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, + {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, + {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_threadcall, __pyx_k_threadcall, sizeof(__pyx_k_threadcall), 0, 0, 1, 1}, + {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1}, + {&__pyx_n_s_to_dict, __pyx_k_to_dict, sizeof(__pyx_k_to_dict), 0, 0, 1, 1}, + {&__pyx_n_s_toolbar, __pyx_k_toolbar, sizeof(__pyx_k_toolbar), 0, 0, 1, 1}, + {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_tree, __pyx_k_tree, sizeof(__pyx_k_tree), 0, 0, 1, 1}, + {&__pyx_n_s_uihome, __pyx_k_uihome, sizeof(__pyx_k_uihome), 0, 0, 1, 1}, + {&__pyx_n_s_ujson, __pyx_k_ujson, sizeof(__pyx_k_ujson), 0, 0, 1, 1}, + {&__pyx_n_s_uniaction, __pyx_k_uniaction, sizeof(__pyx_k_uniaction), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_url, __pyx_k_url, sizeof(__pyx_k_url), 0, 0, 1, 1}, + {&__pyx_kp_s_url_is_None, __pyx_k_url_is_None, sizeof(__pyx_k_url_is_None), 0, 0, 1, 0}, + {&__pyx_n_s_urlwidget, __pyx_k_urlwidget, sizeof(__pyx_k_urlwidget), 0, 0, 1, 1}, + {&__pyx_n_s_urlwidgetAction, __pyx_k_urlwidgetAction, sizeof(__pyx_k_urlwidgetAction), 0, 0, 1, 1}, + {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1}, + {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, + {&__pyx_n_s_valueExpr, __pyx_k_valueExpr, sizeof(__pyx_k_valueExpr), 0, 0, 1, 1}, + {&__pyx_n_s_vplayer, __pyx_k_vplayer, sizeof(__pyx_k_vplayer), 0, 0, 1, 1}, + {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, + {&__pyx_n_s_w_build, __pyx_k_w_build, sizeof(__pyx_k_w_build), 0, 0, 1, 1}, + {&__pyx_n_s_wid, __pyx_k_wid, sizeof(__pyx_k_wid), 0, 0, 1, 1}, + {&__pyx_n_s_widget, __pyx_k_widget, sizeof(__pyx_k_widget), 0, 0, 1, 1}, + {&__pyx_n_s_widgetBuild, __pyx_k_widgetBuild, sizeof(__pyx_k_widgetBuild), 0, 0, 1, 1}, + {&__pyx_kp_s_widgetBuild1_desc_must_be_a_dict, __pyx_k_widgetBuild1_desc_must_be_a_dict, sizeof(__pyx_k_widgetBuild1_desc_must_be_a_dict), 0, 0, 1, 0}, + {&__pyx_n_s_widgetClass, __pyx_k_widgetClass, sizeof(__pyx_k_widgetClass), 0, 0, 1, 1}, + {&__pyx_kp_s_widget_2, __pyx_k_widget_2, sizeof(__pyx_k_widget_2), 0, 0, 1, 0}, + {&__pyx_n_s_widget_id, __pyx_k_widget_id, sizeof(__pyx_k_widget_id), 0, 0, 1, 1}, + {&__pyx_kp_s_widget_id_s_can_not_contain, __pyx_k_widget_id_s_can_not_contain, sizeof(__pyx_k_widget_id_s_can_not_contain), 0, 0, 1, 0}, + {&__pyx_n_s_widget_name, __pyx_k_widget_name, sizeof(__pyx_k_widget_name), 0, 0, 1, 1}, + {&__pyx_n_s_widgettype, __pyx_k_widgettype, sizeof(__pyx_k_widgettype), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 308, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "kivyblocks/blocks.pyx":161 + * if url is None: + * if errback: + * errback(None,Exception('url is None')) # <<<<<<<<<<<<<< + * else: + * return None + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_url_is_None); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "kivyblocks/blocks.pyx":167 + * if url.startswith('file://'): + * filename = url[7:] + * with codecs.open(filename,'r','utf-8') as f: # <<<<<<<<<<<<<< + * b = f.read() + * dic = json.loads(b) + */ + __pyx_tuple__3 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "kivyblocks/blocks.pyx":250 + * def w_build(self,desc) -> Widget: + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) # <<<<<<<<<<<<<< + * if not widgetClass: + * Logger.info("Block: w_build(), desc invalid", desc) + */ + __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_s_widgettype, Py_None); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "kivyblocks/blocks.pyx":270 + * if id.startswith('app.'): + * app = App.get_running_app() + * id = id[4:] # <<<<<<<<<<<<<< + * setattr(app, id, widget) + * if id.startswith('root.'): + */ + __pyx_slice__6 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__6); + __Pyx_GIVEREF(__pyx_slice__6); + + /* "kivyblocks/blocks.pyx":274 + * if id.startswith('root.'): + * app = App.get_running_app() + * id = id[5:] # <<<<<<<<<<<<<< + * setattr(app.root, id, widget) + * + */ + __pyx_slice__7 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__7); + __Pyx_GIVEREF(__pyx_slice__7); + + /* "kivyblocks/blocks.pyx":321 + * + * def buildBind(self, widget:Widget, desc): + * wid = desc.get('wid','self') # <<<<<<<<<<<<<< + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + * if not w: + */ + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_wid, __pyx_n_s_self); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "kivyblocks/blocks.pyx":405 + * def blocksAction(self, widget:Widget, desc, *args): + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') # <<<<<<<<<<<<<< + * opts = desc.get('options').copy() + * d = self.getActionData(widget,desc, *args) + */ + __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_mode, __pyx_n_s_replace); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "kivyblocks/blocks.pyx":412 + * p.update(d) + * opts['options'] = p + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + __pyx_tuple__11 = PyTuple_Pack(4, __pyx_n_s_target, __pyx_n_s_add_mode, __pyx_n_s_o, __pyx_n_s_w); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_doit, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 412, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":418 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_o, __pyx_n_s_e); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_doerr, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 418, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":444 + * } + * + * def doit(target:Widget, add_mode:str, o, w:Widget): # <<<<<<<<<<<<<< + * if target: + * if add_mode == 'replace': + */ + __pyx_tuple__15 = PyTuple_Pack(4, __pyx_n_s_target, __pyx_n_s_add_mode, __pyx_n_s_o, __pyx_n_s_w); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_doit, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 444, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":450 + * target.add_widget(w) + * + * def doerr(o,e): # <<<<<<<<<<<<<< + * Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + * ,str(desc)) + */ + __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_o, __pyx_n_s_e); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_doerr, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 450, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":513 + * rtdesc['script'] = desc.get('datacript') + * else: + * rtdesc['method'] = desc.get('datamethod', 'getValue') # <<<<<<<<<<<<<< + * rtdesc['kwargs'] = desc.get('datakwargs', {}) + * else: + */ + __pyx_tuple__19 = PyTuple_Pack(2, __pyx_n_s_datamethod, __pyx_n_s_getValue); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + + /* "kivyblocks/blocks.pyx":555 + * return d + * + * method = desc.get('method', 'getValue') # <<<<<<<<<<<<<< + * if not hasattr(w, method): + * print('get_rtdata():method is None', desc, type(w)) + */ + __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_method, __pyx_n_s_getValue); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + + /* "kivyblocks/blocks.pyx":606 + * } + * """ + * def doit(desc): # <<<<<<<<<<<<<< + * if isinstance(desc,DictObject): + * desc = desc.to_dict() + */ + __pyx_tuple__21 = PyTuple_Pack(3, __pyx_n_s_desc, __pyx_n_s_widget, __pyx_n_s_e); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_doit, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 606, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":631 + * print('widgetBuild1: desc must be a dict object', + * desc,type(desc)) + * self.dispatch('on_failed',Exception('miss url')) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_miss_url); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + + /* "kivyblocks/blocks.pyx":679 + * if from_widget.widget_id == id: + * return from_widget + * if id[0] == '-' and from_widget.widget_id == id[1:]: # <<<<<<<<<<<<<< + * return from_widget + * if hasattr(from_widget, id): + */ + __pyx_slice__25 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__25); + __Pyx_GIVEREF(__pyx_slice__25); + + /* "kivyblocks/blocks.pyx":673 + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): # <<<<<<<<<<<<<< + * if id=='self': + * return from_widget + */ + __pyx_tuple__26 = PyTuple_Pack(5, __pyx_n_s_id, __pyx_n_s_from_widget, __pyx_n_s_w, __pyx_n_s_c, __pyx_n_s_ret_2); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_find_widget_by_id, 673, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 673, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":42 + * + * class WidgetNotFoundById(Exception): + * def __init__(self, id): # <<<<<<<<<<<<<< + * super().__init__() + * self.idstr = id + */ + __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 42, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":46 + * self.idstr = id + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "Widget not found by id:" + self.idstr + ':' + * + */ + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_str, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 46, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":49 + * return "Widget not found by id:" + self.idstr + ':' + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return str(self) + * + */ + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_expr, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 49, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":53 + * + * class ClassMethodNotFound(Exception): + * def __init__(self,k,m): # <<<<<<<<<<<<<< + * super().__init__() + * self.kname = k + */ + __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_k, __pyx_n_s_m); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 53, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 53, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":58 + * self.mname = m + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) + */ + __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_str, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 58, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":63 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_expr, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 63, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":68 + * + * class NotExistsObject(Exception): + * def __init__(self,name): # <<<<<<<<<<<<<< + * super().__init__() + * self.name = name + */ + __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 68, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":72 + * self.name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not exists widget(%s)' % self.name + * return s + */ + __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_str, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 72, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":76 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_expr, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 76, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":80 + * + * class ArgumentError(Exception): + * def __init__(self,argument,desc): # <<<<<<<<<<<<<< + * super().__init__() + * self.argument = argument + */ + __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_argument, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 80, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":85 + * self.desc = desc + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) + * return s + */ + __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_str, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 85, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":89 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_expr, 89, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 89, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":94 + * + * class NotRegistedWidget(Exception): + * def __init__(self, name:str): # <<<<<<<<<<<<<< + * super().__init__() + * self.widget_name = name + */ + __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 94, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":98 + * self.widget_name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not reigsted widget(%s)' % self.name + * return s + */ + __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_str, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 98, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":102 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_expr, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 102, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":105 + * return self.__str__() + * + * def registerWidget(name:str,widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_widget); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_registerWidget, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 105, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":110 + * + * class Blocks(EventDispatcher): + * def __init__(self): # <<<<<<<<<<<<<< + * EventDispatcher.__init__(self) + * self.action_id = 0 + */ + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_init, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 110, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":117 + * self.env = GlobalEnv() + * + * def set(self, k:str, v): # <<<<<<<<<<<<<< + * self.env[k] = v + * + */ + __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_set, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 117, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":120 + * self.env[k] = v + * + * def register_widget(self, name:str, widget:Widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_widget); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_register_widget, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 120, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":123 + * globals()[name] = widget + * + * def buildAction(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + __pyx_tuple__67 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_conform_desc, __pyx_n_s_blocks, __pyx_n_s_func); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_buildAction, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 123, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":132 + * + * + * def eval(self, s:str, l:dict): # <<<<<<<<<<<<<< + * g = {} + * forbidens = [ + */ + __pyx_tuple__69 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_s, __pyx_n_s_l, __pyx_n_s_g, __pyx_n_s_forbidens, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_eval, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 132, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":154 + * return eval(s,g,l) + * + * def getUrlData(self, url:str, method:str='GET', # <<<<<<<<<<<<<< + * params:dict={}, files:dict={}, + * callback=None, + */ + __pyx_tuple__71 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_url, __pyx_n_s_method, __pyx_n_s_params, __pyx_n_s_files, __pyx_n_s_callback, __pyx_n_s_errback, __pyx_n_s_kw, __pyx_n_s_filename, __pyx_n_s_f, __pyx_n_s_b, __pyx_n_s_dic, __pyx_n_s_hc, __pyx_n_s_resp, __pyx_n_s_e, __pyx_n_s_config); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(7, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_getUrlData, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 154, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":190 + * **kw) + * + * def strValueExpr(self,s:str,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if not s.startswith('py::'): + * return s + */ + __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_s, __pyx_n_s_localnamespace, __pyx_n_s_v, __pyx_n_s_e); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_strValueExpr, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 190, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":202 + * return s + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: # <<<<<<<<<<<<<< + * d = [] + * for v in arr: + */ + __pyx_tuple__75 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_arr, __pyx_n_s_localnamespace, __pyx_n_s_d, __pyx_n_s_v); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_arrayValueExpr, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 202, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":220 + * return d + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: # <<<<<<<<<<<<<< + * d = {} + * for k,v in dic.items(): + */ + __pyx_tuple__77 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_dic, __pyx_n_s_localnamespace, __pyx_n_s_d, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_dictValueExpr, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 220, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":237 + * d[k] = v + * return d + * def valueExpr(self,obj,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + */ + __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_localnamespace); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_valueExpr, 237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 237, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":248 + * return obj + * + * def w_build(self,desc) -> Widget: # <<<<<<<<<<<<<< + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + */ + __pyx_tuple__81 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_desc, __pyx_n_s_widgetClass, __pyx_n_s_opts, __pyx_n_s_widget, __pyx_n_s_klass, __pyx_n_s_e, __pyx_n_s_id, __pyx_n_s_app_2); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_w_build, 248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 248, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":287 + * return widget + * + * def build_attributes(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + */ + __pyx_tuple__83 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_t, __pyx_n_s_excludes, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_aw); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_build_attributes, 287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + + /* "kivyblocks/blocks.pyx":304 + * localnamespace={'self':widget})) + * + * def build_rest(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] + */ + __pyx_tuple__86 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_t, __pyx_n_s_pos, __pyx_n_s_sw, __pyx_n_s_b, __pyx_n_s_kw, __pyx_n_s_w, __pyx_n_s_i); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); + __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_build_rest, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_tuple__88 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); + + /* "kivyblocks/blocks.pyx":320 + * self.buildBind(widget,kw) + * + * def buildBind(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + */ + __pyx_tuple__89 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_wid, __pyx_n_s_w, __pyx_n_s_event, __pyx_n_s_f); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_buildBind, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 320, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":338 + * # Logger.info('Block: %s bind built', str(desc)) + * + * def multipleAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + */ + __pyx_tuple__91 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_desc1, __pyx_n_s_mydesc, __pyx_n_s_a, __pyx_n_s_new_desc, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_multipleAction, 338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 338, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":346 + * self.uniaction(widget,new_desc, *args) + * + * def conform_action(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + __pyx_tuple__93 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_conform_desc, __pyx_n_s_blocks, __pyx_n_s_w); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_conform_action, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 346, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":359 + * w.open() + * + * def uniaction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) + * + */ + __pyx_tuple__95 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_acttype); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_uniaction, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 359, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":380 + * alert("actiontype(%s) invalid" % acttype,title='error') + * + * def eventAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + */ + __pyx_tuple__97 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_target, __pyx_n_s_event, __pyx_n_s_params, __pyx_n_s_d, __pyx_n_s_e); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_eventAction, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 380, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":398 + * return + * + * def get_target(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * if not desc.get('target'): + * return None + */ + __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_get_target, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 398, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + __pyx_tuple__101 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_target, __pyx_n_s_add_mode, __pyx_n_s_opts, __pyx_n_s_d, __pyx_n_s_p, __pyx_n_s_doit, __pyx_n_s_doit, __pyx_n_s_doerr, __pyx_n_s_doerr, __pyx_n_s_b); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_blocksAction, 403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 403, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + __pyx_tuple__103 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_target, __pyx_n_s_add_mode, __pyx_n_s_opts, __pyx_n_s_p, __pyx_n_s_d, __pyx_n_s_doit, __pyx_n_s_doit, __pyx_n_s_doerr, __pyx_n_s_doerr, __pyx_n_s_b); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_urlwidgetAction, 428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 428, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":459 + * b.widgetBuild(d) + * + * def getActionData(self, widget:Widget, desc,*args): # <<<<<<<<<<<<<< + * data = {} + * rtdesc = self.build_rtdesc(desc) + */ + __pyx_tuple__105 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_data, __pyx_n_s_rtdesc, __pyx_n_s_rt); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_getActionData, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 459, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":468 + * return data + * + * def registedfunctionAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * rf = RegisterFunction() + */ + __pyx_tuple__107 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_target, __pyx_n_s_rf, __pyx_n_s_name, __pyx_n_s_func, __pyx_n_s_params, __pyx_n_s_d); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); + __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_registedfunctionAction, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 468, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":484 + * func(target, *args, **params) + * + * def scriptAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * script = desc.get('script') + * if not script: + */ + __pyx_tuple__109 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_script_2, __pyx_n_s_target, __pyx_n_s_d, __pyx_n_s_ns, __pyx_n_s_e); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); + __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_scriptAction, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 484, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":504 + * print(e) + * + * def build_rtdesc(self, desc): # <<<<<<<<<<<<<< + * rtdesc = desc.get('rtdata') + * if not rtdesc: + */ + __pyx_tuple__111 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_desc, __pyx_n_s_rtdesc); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__111); + __Pyx_GIVEREF(__pyx_tuple__111); + __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_build_rtdesc, 504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 504, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":519 + * return rtdesc + * + * def get_rtdata(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * """ + * desc descript follow attributes + */ + __pyx_tuple__113 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_w, __pyx_n_s_target, __pyx_n_s_script_2, __pyx_n_s_ns, __pyx_n_s_d, __pyx_n_s_method, __pyx_n_s_f, __pyx_n_s_r); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__113); + __Pyx_GIVEREF(__pyx_tuple__113); + __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_get_rtdata, 519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 519, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":572 + * return {} + * + * def methodAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * method = desc.get('method') + * target = self.get_target(widget, desc) + */ + __pyx_tuple__115 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_widget, __pyx_n_s_desc, __pyx_n_s_args, __pyx_n_s_method, __pyx_n_s_target, __pyx_n_s_f, __pyx_n_s_kwargs, __pyx_n_s_d); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__115); + __Pyx_GIVEREF(__pyx_tuple__115); + __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_methodAction, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 572, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ + __pyx_tuple__117 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_desc, __pyx_n_s_doit, __pyx_n_s_doit, __pyx_n_s_widgettype, __pyx_n_s_opts, __pyx_n_s_extend, __pyx_n_s_addon, __pyx_n_s_url, __pyx_n_s_rtdesc, __pyx_n_s_rtdata, __pyx_n_s_params); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); + __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_widgetBuild, 593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 593, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ + __pyx_tuple__119 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_from_widget, __pyx_n_s_find_widget_by_id, __pyx_n_s_find_widget_by_id, __pyx_n_s_ids, __pyx_n_s_app_2, __pyx_n_s_fid, __pyx_n_s_w); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__119); + __Pyx_GIVEREF(__pyx_tuple__119); + __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_getWidgetById, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_tuple__121 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__121); + __Pyx_GIVEREF(__pyx_tuple__121); + + /* "kivyblocks/blocks.pyx":732 + * return w + * + * def on_built(self,v=None): # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_v); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__122); + __Pyx_GIVEREF(__pyx_tuple__122); + __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_on_built, 732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 732, __pyx_L1_error) + __pyx_tuple__124 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__124); + __Pyx_GIVEREF(__pyx_tuple__124); + + /* "kivyblocks/blocks.pyx":735 + * return + * + * def on_failed(self,e=None): # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__125 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_e); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__125); + __Pyx_GIVEREF(__pyx_tuple__125); + __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_blocks_pyx, __pyx_n_s_on_failed, 735, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_tuple__127 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__127); + __Pyx_GIVEREF(__pyx_tuple__127); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_update.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyString_Type_split.type = (PyObject*)&PyString_Type; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction) < 0) __PYX_ERR(0, 403, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction.tp_dictoffset && __pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct__blocksAction = &__pyx_type_10kivyblocks_6blocks___pyx_scope_struct__blocksAction; + if (PyType_Ready(&__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction) < 0) __PYX_ERR(0, 428, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction.tp_dictoffset && __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction = &__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_1_urlwidgetAction; + if (PyType_Ready(&__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild) < 0) __PYX_ERR(0, 593, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild.tp_dictoffset && __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild = &__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_2_widgetBuild; + if (PyType_Ready(&__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById.tp_dictoffset && __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById = &__pyx_type_10kivyblocks_6blocks___pyx_scope_struct_3_getWidgetById; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION < 3 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initblocks(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initblocks(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_blocks(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_blocks(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_blocks(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'blocks' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_blocks(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("blocks", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_kivyblocks__blocks) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "kivyblocks.blocks")) { + if (unlikely(PyDict_SetItemString(modules, "kivyblocks.blocks", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; + (void)__Pyx_modinit_type_import_code(); + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "kivyblocks/blocks.pyx":1 + * import os # <<<<<<<<<<<<<< + * import sys + * import codecs + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":2 + * import os + * import sys # <<<<<<<<<<<<<< + * import codecs + * import ujson as json + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":3 + * import os + * import sys + * import codecs # <<<<<<<<<<<<<< + * import ujson as json + * from traceback import print_exc + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_codecs, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_codecs, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":4 + * import sys + * import codecs + * import ujson as json # <<<<<<<<<<<<<< + * from traceback import print_exc + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ujson, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":5 + * import codecs + * import ujson as json + * from traceback import print_exc # <<<<<<<<<<<<<< + * + * import kivy + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_print_exc); + __Pyx_GIVEREF(__pyx_n_s_print_exc); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_print_exc); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_traceback, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_print_exc, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":7 + * from traceback import print_exc + * + * import kivy # <<<<<<<<<<<<<< + * from functools import partial + * + */ + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_kivy, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":8 + * + * import kivy + * from functools import partial # <<<<<<<<<<<<<< + * + * from appPublic.dictExt import dictExtend + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_partial); + __Pyx_GIVEREF(__pyx_n_s_partial); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_partial); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_partial, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":10 + * from functools import partial + * + * from appPublic.dictExt import dictExtend # <<<<<<<<<<<<<< + * from appPublic.folderUtils import ProgramPath + * from appPublic.dictObject import DictObject + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_dictExtend); + __Pyx_GIVEREF(__pyx_n_s_dictExtend); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_dictExtend); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_appPublic_dictExt, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dictExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dictExtend, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":11 + * + * from appPublic.dictExt import dictExtend + * from appPublic.folderUtils import ProgramPath # <<<<<<<<<<<<<< + * from appPublic.dictObject import DictObject + * from appPublic.Singleton import SingletonDecorator, GlobalEnv + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_ProgramPath); + __Pyx_GIVEREF(__pyx_n_s_ProgramPath); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ProgramPath); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_appPublic_folderUtils, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ProgramPath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProgramPath, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":12 + * from appPublic.dictExt import dictExtend + * from appPublic.folderUtils import ProgramPath + * from appPublic.dictObject import DictObject # <<<<<<<<<<<<<< + * from appPublic.Singleton import SingletonDecorator, GlobalEnv + * from appPublic.datamapping import keyMapping + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_DictObject); + __Pyx_GIVEREF(__pyx_n_s_DictObject); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DictObject); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_appPublic_dictObject, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DictObject, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":13 + * from appPublic.folderUtils import ProgramPath + * from appPublic.dictObject import DictObject + * from appPublic.Singleton import SingletonDecorator, GlobalEnv # <<<<<<<<<<<<<< + * from appPublic.datamapping import keyMapping + * from appPublic.registerfunction import RegisterFunction + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_SingletonDecorator); + __Pyx_GIVEREF(__pyx_n_s_SingletonDecorator); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SingletonDecorator); + __Pyx_INCREF(__pyx_n_s_GlobalEnv); + __Pyx_GIVEREF(__pyx_n_s_GlobalEnv); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_GlobalEnv); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_appPublic_Singleton, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SingletonDecorator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SingletonDecorator, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GlobalEnv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalEnv, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":14 + * from appPublic.dictObject import DictObject + * from appPublic.Singleton import SingletonDecorator, GlobalEnv + * from appPublic.datamapping import keyMapping # <<<<<<<<<<<<<< + * from appPublic.registerfunction import RegisterFunction + * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_keyMapping); + __Pyx_GIVEREF(__pyx_n_s_keyMapping); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_keyMapping); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_appPublic_datamapping, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_keyMapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_keyMapping, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":15 + * from appPublic.Singleton import SingletonDecorator, GlobalEnv + * from appPublic.datamapping import keyMapping + * from appPublic.registerfunction import RegisterFunction # <<<<<<<<<<<<<< + * + * from kivy.logger import Logger + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_RegisterFunction); + __Pyx_GIVEREF(__pyx_n_s_RegisterFunction); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_RegisterFunction); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_appPublic_registerfunction, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_RegisterFunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RegisterFunction, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":17 + * from appPublic.registerfunction import RegisterFunction + * + * from kivy.logger import Logger # <<<<<<<<<<<<<< + * from kivy.config import Config + * from kivy.metrics import sp,dp,mm + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Logger); + __Pyx_GIVEREF(__pyx_n_s_Logger); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Logger); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_logger, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Logger, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":18 + * + * from kivy.logger import Logger + * from kivy.config import Config # <<<<<<<<<<<<<< + * from kivy.metrics import sp,dp,mm + * from kivy.core.window import WindowBase, Window + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Config); + __Pyx_GIVEREF(__pyx_n_s_Config); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Config); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_config, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Config, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":19 + * from kivy.logger import Logger + * from kivy.config import Config + * from kivy.metrics import sp,dp,mm # <<<<<<<<<<<<<< + * from kivy.core.window import WindowBase, Window + * from kivy.properties import BooleanProperty + */ + __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_sp); + __Pyx_GIVEREF(__pyx_n_s_sp); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_sp); + __Pyx_INCREF(__pyx_n_s_dp); + __Pyx_GIVEREF(__pyx_n_s_dp); + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_dp); + __Pyx_INCREF(__pyx_n_s_mm); + __Pyx_GIVEREF(__pyx_n_s_mm); + PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_mm); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_metrics, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sp, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dp, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_mm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mm, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":20 + * from kivy.config import Config + * from kivy.metrics import sp,dp,mm + * from kivy.core.window import WindowBase, Window # <<<<<<<<<<<<<< + * from kivy.properties import BooleanProperty + * from kivy.uix.widget import Widget + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_WindowBase); + __Pyx_GIVEREF(__pyx_n_s_WindowBase); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WindowBase); + __Pyx_INCREF(__pyx_n_s_Window); + __Pyx_GIVEREF(__pyx_n_s_Window); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Window); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_core_window, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_WindowBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WindowBase, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Window, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":21 + * from kivy.metrics import sp,dp,mm + * from kivy.core.window import WindowBase, Window + * from kivy.properties import BooleanProperty # <<<<<<<<<<<<<< + * from kivy.uix.widget import Widget + * from kivy.app import App + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_BooleanProperty); + __Pyx_GIVEREF(__pyx_n_s_BooleanProperty); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BooleanProperty); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_properties, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_BooleanProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BooleanProperty, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":22 + * from kivy.core.window import WindowBase, Window + * from kivy.properties import BooleanProperty + * from kivy.uix.widget import Widget # <<<<<<<<<<<<<< + * from kivy.app import App + * from kivy.factory import Factory + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Widget); + __Pyx_GIVEREF(__pyx_n_s_Widget); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Widget); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_uix_widget, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Widget, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":23 + * from kivy.properties import BooleanProperty + * from kivy.uix.widget import Widget + * from kivy.app import App # <<<<<<<<<<<<<< + * from kivy.factory import Factory + * from kivy.uix.video import Video + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_App); + __Pyx_GIVEREF(__pyx_n_s_App); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_App); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_app, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_App); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_App, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":24 + * from kivy.uix.widget import Widget + * from kivy.app import App + * from kivy.factory import Factory # <<<<<<<<<<<<<< + * from kivy.uix.video import Video + * from .baseWidget import * + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Factory); + __Pyx_GIVEREF(__pyx_n_s_Factory); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Factory); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_factory, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Factory, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":25 + * from kivy.app import App + * from kivy.factory import Factory + * from kivy.uix.video import Video # <<<<<<<<<<<<<< + * from .baseWidget import * + * from .toolbar import * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Video); + __Pyx_GIVEREF(__pyx_n_s_Video); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Video); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_uix_video, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Video, __pyx_t_1) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":26 + * from kivy.factory import Factory + * from kivy.uix.video import Video + * from .baseWidget import * # <<<<<<<<<<<<<< + * from .toolbar import * + * from .dg import DataGrid + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s__28); + __Pyx_GIVEREF(__pyx_n_s__28); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__28); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_baseWidget, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_import_star(__pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":27 + * from kivy.uix.video import Video + * from .baseWidget import * + * from .toolbar import * # <<<<<<<<<<<<<< + * from .dg import DataGrid + * from .utils import * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s__28); + __Pyx_GIVEREF(__pyx_n_s__28); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__28); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_toolbar, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 27, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":28 + * from .baseWidget import * + * from .toolbar import * + * from .dg import DataGrid # <<<<<<<<<<<<<< + * from .utils import * + * from .serverImageViewer import ServerImageViewer + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_DataGrid); + __Pyx_GIVEREF(__pyx_n_s_DataGrid); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DataGrid); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_dg, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DataGrid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataGrid, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":29 + * from .toolbar import * + * from .dg import DataGrid + * from .utils import * # <<<<<<<<<<<<<< + * from .serverImageViewer import ServerImageViewer + * from .vplayer import VPlayer + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s__28); + __Pyx_GIVEREF(__pyx_n_s__28); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__28); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":30 + * from .dg import DataGrid + * from .utils import * + * from .serverImageViewer import ServerImageViewer # <<<<<<<<<<<<<< + * from .vplayer import VPlayer + * from .form import InputBox, Form, StrSearchForm + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_ServerImageViewer); + __Pyx_GIVEREF(__pyx_n_s_ServerImageViewer); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ServerImageViewer); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_serverImageViewer, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ServerImageViewer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServerImageViewer, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":31 + * from .utils import * + * from .serverImageViewer import ServerImageViewer + * from .vplayer import VPlayer # <<<<<<<<<<<<<< + * from .form import InputBox, Form, StrSearchForm + * from .boxViewer import BoxViewer + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_VPlayer); + __Pyx_GIVEREF(__pyx_n_s_VPlayer); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_VPlayer); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_vplayer, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_VPlayer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VPlayer, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":32 + * from .serverImageViewer import ServerImageViewer + * from .vplayer import VPlayer + * from .form import InputBox, Form, StrSearchForm # <<<<<<<<<<<<<< + * from .boxViewer import BoxViewer + * from .tree import Tree, TextTree + */ + __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_InputBox); + __Pyx_GIVEREF(__pyx_n_s_InputBox); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_InputBox); + __Pyx_INCREF(__pyx_n_s_Form); + __Pyx_GIVEREF(__pyx_n_s_Form); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Form); + __Pyx_INCREF(__pyx_n_s_StrSearchForm); + __Pyx_GIVEREF(__pyx_n_s_StrSearchForm); + PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_StrSearchForm); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_form, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_InputBox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_InputBox, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Form); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Form, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StrSearchForm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StrSearchForm, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":33 + * from .vplayer import VPlayer + * from .form import InputBox, Form, StrSearchForm + * from .boxViewer import BoxViewer # <<<<<<<<<<<<<< + * from .tree import Tree, TextTree + * from .newvideo import Video + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_BoxViewer); + __Pyx_GIVEREF(__pyx_n_s_BoxViewer); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BoxViewer); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_boxViewer, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_BoxViewer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BoxViewer, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":34 + * from .form import InputBox, Form, StrSearchForm + * from .boxViewer import BoxViewer + * from .tree import Tree, TextTree # <<<<<<<<<<<<<< + * from .newvideo import Video + * from .bgcolorbehavior import BGColorBehavior + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Tree); + __Pyx_GIVEREF(__pyx_n_s_Tree); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Tree); + __Pyx_INCREF(__pyx_n_s_TextTree); + __Pyx_GIVEREF(__pyx_n_s_TextTree); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_TextTree); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_tree, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tree, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TextTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TextTree, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":35 + * from .boxViewer import BoxViewer + * from .tree import Tree, TextTree + * from .newvideo import Video # <<<<<<<<<<<<<< + * from .bgcolorbehavior import BGColorBehavior + * from .orientationlayout import OrientationLayout + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Video); + __Pyx_GIVEREF(__pyx_n_s_Video); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Video); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_newvideo, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Video, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":36 + * from .tree import Tree, TextTree + * from .newvideo import Video + * from .bgcolorbehavior import BGColorBehavior # <<<<<<<<<<<<<< + * from .orientationlayout import OrientationLayout + * from .threadcall import HttpClient + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_BGColorBehavior); + __Pyx_GIVEREF(__pyx_n_s_BGColorBehavior); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BGColorBehavior); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_bgcolorbehavior, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BGColorBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BGColorBehavior, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":37 + * from .newvideo import Video + * from .bgcolorbehavior import BGColorBehavior + * from .orientationlayout import OrientationLayout # <<<<<<<<<<<<<< + * from .threadcall import HttpClient + * from .register import * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_OrientationLayout); + __Pyx_GIVEREF(__pyx_n_s_OrientationLayout); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrientationLayout); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_orientationlayout, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrientationLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrientationLayout, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":38 + * from .bgcolorbehavior import BGColorBehavior + * from .orientationlayout import OrientationLayout + * from .threadcall import HttpClient # <<<<<<<<<<<<<< + * from .register import * + * + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_HttpClient); + __Pyx_GIVEREF(__pyx_n_s_HttpClient); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_HttpClient); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_threadcall, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_HttpClient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HttpClient, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":39 + * from .orientationlayout import OrientationLayout + * from .threadcall import HttpClient + * from .register import * # <<<<<<<<<<<<<< + * + * class WidgetNotFoundById(Exception): + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s__28); + __Pyx_GIVEREF(__pyx_n_s__28); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__28); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_register, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":41 + * from .register import * + * + * class WidgetNotFoundById(Exception): # <<<<<<<<<<<<<< + * def __init__(self, id): + * super().__init__() + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_WidgetNotFoundById, __pyx_n_s_WidgetNotFoundById, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "kivyblocks/blocks.pyx":42 + * + * class WidgetNotFoundById(Exception): + * def __init__(self, id): # <<<<<<<<<<<<<< + * super().__init__() + * self.idstr = id + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_1__init__, 0, __pyx_n_s_WidgetNotFoundById___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_5); + PyList_Append(__pyx_t_4, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":46 + * self.idstr = id + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "Widget not found by id:" + self.idstr + ':' + * + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_3__str__, 0, __pyx_n_s_WidgetNotFoundById___str, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":49 + * return "Widget not found by id:" + self.idstr + ':' + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return str(self) + * + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_18WidgetNotFoundById_5__expr__, 0, __pyx_n_s_WidgetNotFoundById___expr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expr, __pyx_t_5) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":41 + * from .register import * + * + * class WidgetNotFoundById(Exception): # <<<<<<<<<<<<<< + * def __init__(self, id): + * super().__init__() + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WidgetNotFoundById, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_4, __pyx_t_5) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WidgetNotFoundById, __pyx_t_5) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":52 + * return str(self) + * + * class ClassMethodNotFound(Exception): # <<<<<<<<<<<<<< + * def __init__(self,k,m): + * super().__init__() + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ClassMethodNotFound, __pyx_n_s_ClassMethodNotFound, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "kivyblocks/blocks.pyx":53 + * + * class ClassMethodNotFound(Exception): + * def __init__(self,k,m): # <<<<<<<<<<<<<< + * super().__init__() + * self.kname = k + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_1__init__, 0, __pyx_n_s_ClassMethodNotFound___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_4); + PyList_Append(__pyx_t_5, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":58 + * self.mname = m + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'Method(%s) not found in class(%s)' % (self.mname, + * str(self.kname.__classname__)) + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_3__str__, 0, __pyx_n_s_ClassMethodNotFound___str, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":63 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_19ClassMethodNotFound_5__expr__, 0, __pyx_n_s_ClassMethodNotFound___expr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expr, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":52 + * return str(self) + * + * class ClassMethodNotFound(Exception): # <<<<<<<<<<<<<< + * def __init__(self,k,m): + * super().__init__() + */ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ClassMethodNotFound, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_5, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ClassMethodNotFound, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":67 + * + * + * class NotExistsObject(Exception): # <<<<<<<<<<<<<< + * def __init__(self,name): + * super().__init__() + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NotExistsObject, __pyx_n_s_NotExistsObject, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "kivyblocks/blocks.pyx":68 + * + * class NotExistsObject(Exception): + * def __init__(self,name): # <<<<<<<<<<<<<< + * super().__init__() + * self.name = name + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_1__init__, 0, __pyx_n_s_NotExistsObject___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_5); + PyList_Append(__pyx_t_4, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":72 + * self.name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not exists widget(%s)' % self.name + * return s + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_3__str__, 0, __pyx_n_s_NotExistsObject___str, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":76 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_15NotExistsObject_5__expr__, 0, __pyx_n_s_NotExistsObject___expr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expr, __pyx_t_5) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/blocks.pyx":67 + * + * + * class NotExistsObject(Exception): # <<<<<<<<<<<<<< + * def __init__(self,name): + * super().__init__() + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NotExistsObject, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_4, __pyx_t_5) < 0) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NotExistsObject, __pyx_t_5) < 0) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":79 + * return self.__str__() + * + * class ArgumentError(Exception): # <<<<<<<<<<<<<< + * def __init__(self,argument,desc): + * super().__init__() + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ArgumentError, __pyx_n_s_ArgumentError, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "kivyblocks/blocks.pyx":80 + * + * class ArgumentError(Exception): + * def __init__(self,argument,desc): # <<<<<<<<<<<<<< + * super().__init__() + * self.argument = argument + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_13ArgumentError_1__init__, 0, __pyx_n_s_ArgumentError___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_4); + PyList_Append(__pyx_t_5, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":85 + * self.desc = desc + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'argument(%s) missed:%s' % (self.argument,self.desc) + * return s + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_13ArgumentError_3__str__, 0, __pyx_n_s_ArgumentError___str, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":89 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_13ArgumentError_5__expr__, 0, __pyx_n_s_ArgumentError___expr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expr, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":79 + * return self.__str__() + * + * class ArgumentError(Exception): # <<<<<<<<<<<<<< + * def __init__(self,argument,desc): + * super().__init__() + */ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ArgumentError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_5, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArgumentError, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":93 + * + * + * class NotRegistedWidget(Exception): # <<<<<<<<<<<<<< + * def __init__(self, name:str): + * super().__init__() + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NotRegistedWidget, __pyx_n_s_NotRegistedWidget, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "kivyblocks/blocks.pyx":94 + * + * class NotRegistedWidget(Exception): + * def __init__(self, name:str): # <<<<<<<<<<<<<< + * super().__init__() + * self.widget_name = name + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_1__init__, 0, __pyx_n_s_NotRegistedWidget___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_6); + PyList_Append(__pyx_t_4, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":98 + * self.widget_name = name + * + * def __str__(self): # <<<<<<<<<<<<<< + * s = 'not reigsted widget(%s)' % self.name + * return s + */ + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_3__str__, 0, __pyx_n_s_NotRegistedWidget___str, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":102 + * return s + * + * def __expr__(self): # <<<<<<<<<<<<<< + * return self.__str__() + * + */ + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_17NotRegistedWidget_5__expr__, 0, __pyx_n_s_NotRegistedWidget___expr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expr, __pyx_t_6) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":93 + * + * + * class NotRegistedWidget(Exception): # <<<<<<<<<<<<<< + * def __init__(self, name:str): + * super().__init__() + */ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NotRegistedWidget, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_4, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NotRegistedWidget, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":105 + * return self.__str__() + * + * def registerWidget(name:str,widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_1registerWidget, NULL, __pyx_n_s_kivyblocks_blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_registerWidget, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/blocks.pyx":109 + * + * + * class Blocks(EventDispatcher): # <<<<<<<<<<<<<< + * def __init__(self): + * EventDispatcher.__init__(self) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EventDispatcher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Blocks, __pyx_n_s_Blocks, (PyObject *) NULL, __pyx_n_s_kivyblocks_blocks, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "kivyblocks/blocks.pyx":110 + * + * class Blocks(EventDispatcher): + * def __init__(self): # <<<<<<<<<<<<<< + * EventDispatcher.__init__(self) + * self.action_id = 0 + */ + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_1__init__, 0, __pyx_n_s_Blocks___init, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":117 + * self.env = GlobalEnv() + * + * def set(self, k:str, v): # <<<<<<<<<<<<<< + * self.env[k] = v + * + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_k, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_3set, 0, __pyx_n_s_Blocks_set, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_set, __pyx_t_4) < 0) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":120 + * self.env[k] = v + * + * def register_widget(self, name:str, widget:Widget): # <<<<<<<<<<<<<< + * globals()[name] = widget + * + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_5register_widget, 0, __pyx_n_s_Blocks_register_widget, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_register_widget, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":123 + * globals()[name] = widget + * + * def buildAction(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_7buildAction, 0, __pyx_n_s_Blocks_buildAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_buildAction, __pyx_t_4) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":132 + * + * + * def eval(self, s:str, l:dict): # <<<<<<<<<<<<<< + * g = {} + * forbidens = [ + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_s, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_l, __pyx_n_u_dict) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_9eval, 0, __pyx_n_s_Blocks_eval, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_eval, __pyx_t_6) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":154 + * return eval(s,g,l) + * + * def getUrlData(self, url:str, method:str='GET', # <<<<<<<<<<<<<< + * params:dict={}, files:dict={}, + * callback=None, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_url, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_method, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_params, __pyx_n_u_dict) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_files, __pyx_n_u_dict) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_11getUrlData, 0, __pyx_n_s_Blocks_getUrlData, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 2)) __PYX_ERR(0, 154, __pyx_L1_error) + + /* "kivyblocks/blocks.pyx":155 + * + * def getUrlData(self, url:str, method:str='GET', + * params:dict={}, files:dict={}, # <<<<<<<<<<<<<< + * callback=None, + * errback=None,**kw): + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_params = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_files = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_10kivyblocks_6blocks_2__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getUrlData, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":190 + * **kw) + * + * def strValueExpr(self,s:str,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if not s.startswith('py::'): + * return s + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_s, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_localnamespace, __pyx_n_u_dict) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_13strValueExpr, 0, __pyx_n_s_Blocks_strValueExpr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_6)->__pyx_arg_localnamespace = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_10kivyblocks_6blocks_4__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_strValueExpr, __pyx_t_6) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":202 + * return s + * + * def arrayValueExpr(self,arr:list,localnamespace:dict={}) -> list: # <<<<<<<<<<<<<< + * d = [] + * for v in arr: + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_arr, __pyx_n_u_list) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_localnamespace, __pyx_n_u_dict) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_u_list) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_15arrayValueExpr, 0, __pyx_n_s_Blocks_arrayValueExpr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_localnamespace = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_10kivyblocks_6blocks_6__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_arrayValueExpr, __pyx_t_4) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":220 + * return d + * + * def dictValueExpr(self,dic:dict,localnamespace:dict={}) -> dict: # <<<<<<<<<<<<<< + * d = {} + * for k,v in dic.items(): + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dic, __pyx_n_u_dict) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_localnamespace, __pyx_n_u_dict) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return, __pyx_n_u_dict) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_17dictValueExpr, 0, __pyx_n_s_Blocks_dictValueExpr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_6)->__pyx_arg_localnamespace = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_10kivyblocks_6blocks_8__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_dictValueExpr, __pyx_t_6) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":237 + * d[k] = v + * return d + * def valueExpr(self,obj,localnamespace:dict={}): # <<<<<<<<<<<<<< + * if type(obj) == type(''): + * return self.strValueExpr(obj,localnamespace) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_localnamespace, __pyx_n_u_dict) < 0) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_19valueExpr, 0, __pyx_n_s_Blocks_valueExpr, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_4)->__pyx_arg_localnamespace = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_10kivyblocks_6blocks_10__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_valueExpr, __pyx_t_4) < 0) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":248 + * return obj + * + * def w_build(self,desc) -> Widget: # <<<<<<<<<<<<<< + * # print('w_build(),desc=',desc) + * widgetClass = desc.get('widgettype',None) + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return, __pyx_t_6) < 0) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_21w_build, 0, __pyx_n_s_Blocks_w_build, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_w_build, __pyx_t_6) < 0) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":287 + * return widget + * + * def build_attributes(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * excludes = ['widgettype','options','subwidgets','binds'] + * for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_23build_attributes, 0, __pyx_n_s_Blocks_build_attributes, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__85); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_build_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":304 + * localnamespace={'self':widget})) + * + * def build_rest(self, widget:Widget,desc,t=None): # <<<<<<<<<<<<<< + * self.subwidget_total = len(desc.get('subwidgets',[])) + * self.subwidgets = [ None for i in range(self.subwidget_total)] + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_25build_rest, 0, __pyx_n_s_Blocks_build_rest, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__88); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_build_rest, __pyx_t_6) < 0) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":320 + * self.buildBind(widget,kw) + * + * def buildBind(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * wid = desc.get('wid','self') + * w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_27buildBind, 0, __pyx_n_s_Blocks_buildBind, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_buildBind, __pyx_t_4) < 0) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":338 + * # Logger.info('Block: %s bind built', str(desc)) + * + * def multipleAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * desc1 = {k:v for k, v in desc.items() if k != 'actions'} + * mydesc = desc1.copy() + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_29multipleAction, 0, __pyx_n_s_Blocks_multipleAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_multipleAction, __pyx_t_6) < 0) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":346 + * self.uniaction(widget,new_desc, *args) + * + * def conform_action(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * conform_desc = desc.get('conform') + * blocks = Blocks() + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_31conform_action, 0, __pyx_n_s_Blocks_conform_action, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_conform_action, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":359 + * w.open() + * + * def uniaction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * Logger.info('Block: uniaction() called, desc=%s', str(desc)) + * + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_33uniaction, 0, __pyx_n_s_Blocks_uniaction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_uniaction, __pyx_t_6) < 0) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":380 + * alert("actiontype(%s) invalid" % acttype,title='error') + * + * def eventAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * event = desc.get('dispatch_event') + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_35eventAction, 0, __pyx_n_s_Blocks_eventAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_eventAction, __pyx_t_4) < 0) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":398 + * return + * + * def get_target(self, widget:Widget, desc): # <<<<<<<<<<<<<< + * if not desc.get('target'): + * return None + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_37get_target, 0, __pyx_n_s_Blocks_get_target, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_get_target, __pyx_t_6) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":403 + * return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + * + * def blocksAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_39blocksAction, 0, __pyx_n_s_Blocks_blocksAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_blocksAction, __pyx_t_4) < 0) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":428 + * b.widgetBuild(opts) + * + * def urlwidgetAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * add_mode = desc.get('mode','replace') + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_41urlwidgetAction, 0, __pyx_n_s_Blocks_urlwidgetAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_urlwidgetAction, __pyx_t_6) < 0) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":459 + * b.widgetBuild(d) + * + * def getActionData(self, widget:Widget, desc,*args): # <<<<<<<<<<<<<< + * data = {} + * rtdesc = self.build_rtdesc(desc) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_43getActionData, 0, __pyx_n_s_Blocks_getActionData, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getActionData, __pyx_t_4) < 0) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":468 + * return data + * + * def registedfunctionAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * target = self.get_target(widget, desc) + * rf = RegisterFunction() + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_45registedfunctionAction, 0, __pyx_n_s_Blocks_registedfunctionAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_registedfunctionAction, __pyx_t_6) < 0) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":484 + * func(target, *args, **params) + * + * def scriptAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * script = desc.get('script') + * if not script: + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_47scriptAction, 0, __pyx_n_s_Blocks_scriptAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_scriptAction, __pyx_t_4) < 0) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":504 + * print(e) + * + * def build_rtdesc(self, desc): # <<<<<<<<<<<<<< + * rtdesc = desc.get('rtdata') + * if not rtdesc: + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_49build_rtdesc, 0, __pyx_n_s_Blocks_build_rtdesc, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_build_rtdesc, __pyx_t_4) < 0) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":519 + * return rtdesc + * + * def get_rtdata(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * """ + * desc descript follow attributes + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widget, __pyx_t_6) < 0) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_51get_rtdata, 0, __pyx_n_s_Blocks_get_rtdata, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_get_rtdata, __pyx_t_6) < 0) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/blocks.pyx":572 + * return {} + * + * def methodAction(self, widget:Widget, desc, *args): # <<<<<<<<<<<<<< + * method = desc.get('method') + * target = self.get_target(widget, desc) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Widget); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_widget, __pyx_t_4) < 0) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_53methodAction, 0, __pyx_n_s_Blocks_methodAction, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_methodAction, __pyx_t_4) < 0) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":593 + * alert('%s method not found' % method) + * + * def widgetBuild(self, desc): # <<<<<<<<<<<<<< + * """ + * desc format: + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_55widgetBuild, 0, __pyx_n_s_Blocks_widgetBuild, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_widgetBuild, __pyx_t_4) < 0) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":672 + * + * @classmethod + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: # <<<<<<<<<<<<<< + * def find_widget_by_id(id, from_widget): + * if id=='self': + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_n_u_str_2) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_from_widget, __pyx_t_6) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return, __pyx_t_6) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_57getWidgetById, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Blocks_getWidgetById, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__121); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":671 + * return doit(desc) + * + * @classmethod # <<<<<<<<<<<<<< + * def getWidgetById(self, id:str, from_widget:Widget=None) -> Widget: + * def find_widget_by_id(id, from_widget): + */ + __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getWidgetById, __pyx_t_4) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":732 + * return w + * + * def on_built(self,v=None): # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_59on_built, 0, __pyx_n_s_Blocks_on_built, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__124); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_built, __pyx_t_4) < 0) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":735 + * return + * + * def on_failed(self,e=None): # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10kivyblocks_6blocks_6Blocks_61on_failed, 0, __pyx_n_s_Blocks_on_failed, NULL, __pyx_n_s_kivyblocks_blocks, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__127); + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_failed, __pyx_t_4) < 0) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/blocks.pyx":109 + * + * + * class Blocks(EventDispatcher): # <<<<<<<<<<<<<< + * def __init__(self): + * EventDispatcher.__init__(self) + */ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Blocks, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Blocks, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":738 + * return + * + * Factory.register('Blocks',Blocks) # <<<<<<<<<<<<<< + * Factory.register('Video',Video) + * Factory.register('OrientationLayout', OrientationLayout) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_Blocks); + __Pyx_GIVEREF(__pyx_n_s_Blocks); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Blocks); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":739 + * + * Factory.register('Blocks',Blocks) + * Factory.register('Video',Video) # <<<<<<<<<<<<<< + * Factory.register('OrientationLayout', OrientationLayout) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Video); + __Pyx_GIVEREF(__pyx_n_s_Video); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Video); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":740 + * Factory.register('Blocks',Blocks) + * Factory.register('Video',Video) + * Factory.register('OrientationLayout', OrientationLayout) # <<<<<<<<<<<<<< + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_OrientationLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_OrientationLayout); + __Pyx_GIVEREF(__pyx_n_s_OrientationLayout); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_OrientationLayout); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/blocks.pyx":1 + * import os # <<<<<<<<<<<<<< + * import sys + * import codecs + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init kivyblocks.blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init kivyblocks.blocks"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* Globals */ +static PyObject* __Pyx_Globals(void) { + Py_ssize_t i; + PyObject *names; + PyObject *globals = __pyx_d; + Py_INCREF(globals); + names = PyObject_Dir(__pyx_m); + if (!names) + goto bad; + for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { +#if CYTHON_COMPILING_IN_PYPY + PyObject* name = PySequence_ITEM(names, i); + if (!name) + goto bad; +#else + PyObject* name = PyList_GET_ITEM(names, i); +#endif + if (!PyDict_Contains(globals, name)) { + PyObject* value = __Pyx_GetAttr(__pyx_m, name); + if (!value) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + goto bad; + } + if (PyDict_SetItem(globals, name, value) < 0) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + Py_DECREF(value); + goto bad; + } + } +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + } + Py_DECREF(names); + return globals; +bad: + Py_XDECREF(names); + Py_XDECREF(globals); + return NULL; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/* UnpackUnboundCMethod */ +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + if (likely(cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return (*(cfunc->func))(self, arg); + } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { + if (PY_VERSION_HEX >= 0x030700A0) { + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); + } else { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } + return __Pyx__CallUnboundCMethod1(cfunc, self, arg); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(2, self, arg); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* bytes_tailmatch */ +static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, + Py_ssize_t start, Py_ssize_t end, int direction) { + const char* self_ptr = PyBytes_AS_STRING(self); + Py_ssize_t self_len = PyBytes_GET_SIZE(self); + const char* sub_ptr; + Py_ssize_t sub_len; + int retval; + Py_buffer view; + view.obj = NULL; + if ( PyBytes_Check(arg) ) { + sub_ptr = PyBytes_AS_STRING(arg); + sub_len = PyBytes_GET_SIZE(arg); + } +#if PY_MAJOR_VERSION < 3 + else if ( PyUnicode_Check(arg) ) { + return (int) PyUnicode_Tailmatch(self, arg, start, end, direction); + } +#endif + else { + if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1)) + return -1; + sub_ptr = (const char*) view.buf; + sub_len = view.len; + } + if (end > self_len) + end = self_len; + else if (end < 0) + end += self_len; + if (end < 0) + end = 0; + if (start < 0) + start += self_len; + if (start < 0) + start = 0; + if (direction > 0) { + if (end-sub_len > start) + start = end - sub_len; + } + if (start + sub_len <= end) + retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len); + else + retval = 0; + if (view.obj) + PyBuffer_Release(&view); + return retval; +} +static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings, + Py_ssize_t start, Py_ssize_t end, int direction) { + Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); + for (i = 0; i < count; i++) { + int result; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i), + start, end, direction); +#else + PyObject* sub = PySequence_ITEM(substrings, i); + if (unlikely(!sub)) return -1; + result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); + Py_DECREF(sub); +#endif + if (result) { + return result; + } + } + return 0; +} +static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction) { + if (unlikely(PyTuple_Check(substr))) { + return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction); + } + return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction); +} + +/* unicode_tailmatch */ +static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, + Py_ssize_t start, Py_ssize_t end, int direction) { + Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); + for (i = 0; i < count; i++) { + Py_ssize_t result; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i), + start, end, direction); +#else + PyObject* sub = PySequence_ITEM(substrings, i); + if (unlikely(!sub)) return -1; + result = PyUnicode_Tailmatch(s, sub, start, end, direction); + Py_DECREF(sub); +#endif + if (result) { + return (int) result; + } + } + return 0; +} +static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction) { + if (unlikely(PyTuple_Check(substr))) { + return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction); + } + return (int) PyUnicode_Tailmatch(s, substr, start, end, direction); +} + +/* str_tailmatch */ +static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, + Py_ssize_t end, int direction) +{ + if (PY_MAJOR_VERSION < 3) + return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction); + else + return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction); +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = Py_TYPE(iter)->tp_iternext; + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* MergeKeywords */ +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { + PyObject *iter, *key = NULL, *value = NULL; + int source_is_dict, result; + Py_ssize_t orig_length, ppos = 0; + iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict); + if (unlikely(!iter)) { + PyObject *args; + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + args = PyTuple_Pack(1, source_mapping); + if (likely(args)) { + PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); + Py_DECREF(args); + if (likely(fallback)) { + iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict); + Py_DECREF(fallback); + } + } + if (unlikely(!iter)) goto bad; + } + while (1) { + result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); + if (unlikely(result < 0)) goto bad; + if (!result) break; + if (unlikely(PyDict_Contains(kwdict, key))) { + __Pyx_RaiseDoubleKeywordsError("function", key); + result = -1; + } else { + result = PyDict_SetItem(kwdict, key, value); + } + Py_DECREF(key); + Py_DECREF(value); + if (unlikely(result < 0)) goto bad; + } + Py_XDECREF(iter); + return 0; +bad: + Py_XDECREF(iter); + return -1; +} + +/* CallUnboundCMethod0 */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *args, *result = NULL; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_ASSUME_SAFE_MACROS + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); +#else + args = PyTuple_Pack(1, self); + if (unlikely(!args)) goto bad; +#endif + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + Py_DECREF(args); +bad: + return result; +} + +/* py_dict_items */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d); + else + return PyDict_Items(d); +} + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + CYTHON_UNUSED Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind; + Py_ssize_t i, char_pos; + void *result_udata; +#if CYTHON_PEP393_ENABLED + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + result_udata = PyUnicode_DATA(result_uval); +#else + result_uval = PyUnicode_FromUnicode(NULL, result_ulength); + if (unlikely(!result_uval)) return NULL; + result_ukind = sizeof(Py_UNICODE); + result_udata = PyUnicode_AS_UNICODE(result_uval); +#endif + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); + if (unlikely(__Pyx_PyUnicode_READY(uval))) + goto bad; + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + if (unlikely(!ulength)) + continue; + if (unlikely(char_pos + ulength < 0)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { + memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); + } else { + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + result_ulength++; + value_count++; + return PyUnicode_Join(__pyx_empty_unicode, value_tuple); +#endif +} + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* FetchCommonType */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CythonFunction */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromString(m->func.m_ml->ml_name); +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); + if (op == NULL) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + PyObject_GC_Track(op); + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; + PyObject *tmp = PyTuple_GET_ITEM(bases, i); + tmptype = Py_TYPE(tmp); +#if PY_MAJOR_VERSION < 3 + if (tmptype == &PyClass_Type) + continue; +#endif + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { +#if PY_MAJOR_VERSION < 3 + metaclass = &PyClass_Type; +#else + metaclass = &PyType_Type; +#endif + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); + if (prep) { + PyObject *pargs = PyTuple_Pack(2, name, bases); + if (unlikely(!pargs)) { + Py_DECREF(prep); + return NULL; + } + ns = PyObject_Call(prep, pargs, mkw); + Py_DECREF(prep); + Py_DECREF(pargs); + } else { + if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + PyErr_Clear(); + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result, *margs; + PyObject *owned_metaclass = NULL; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + margs = PyTuple_Pack(3, name, bases, dict); + if (unlikely(!margs)) { + result = NULL; + } else { + result = PyObject_Call(metaclass, margs, mkw); + Py_DECREF(margs); + } + Py_XDECREF(owned_metaclass); + return result; +} + +/* CyFunctionClassCell */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions); + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + Py_INCREF(classobj); + m->func_classobj = classobj; +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + +/* ClassMethod */ +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY + if (PyMethodDescr_Check(method)) +#else + static PyTypeObject *methoddescr_type = NULL; + if (methoddescr_type == NULL) { + PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); + if (!meth) return NULL; + methoddescr_type = Py_TYPE(meth); + Py_DECREF(meth); + } + if (__Pyx_TypeCheck(method, methoddescr_type)) +#endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + #if PY_VERSION_HEX < 0x03020000 + PyTypeObject *d_type = descr->d_type; + #else + PyTypeObject *d_type = descr->d_common.d_type; + #endif + return PyDescr_NewClassMethod(d_type, descr->d_method); + } +#endif + else if (PyMethod_Check(method)) { + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else if (PyCFunction_Check(method)) { + return PyClassMethod_New(method); + } +#ifdef __Pyx_CyFunction_USED + else if (__Pyx_CyFunction_Check(method)) { + return PyClassMethod_New(method); + } +#endif + PyErr_SetString(PyExc_TypeError, + "Class-level classmethod() can only be called on " + "a method_descriptor or instance method."); + return NULL; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* Print */ +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file_2, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* PrintOne */ +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/kivyblocks/blocks.cp37-win_amd64.pyd b/kivyblocks/blocks.cp37-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..ce37e181b5bfda599f034e30c4466e73237d7737 GIT binary patch literal 336896 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 z z)m@B_usl|JgM0z8@Lx|=Vyv-%z#>C-y{%mJ->As>=b-ve3_urEpGx%#`#SiH%b99??-m z810~FDVW+_{nQ~+)P2Kw(xVF4eF;L-t=0UHf!%%%yFCrNcNyV*Z9H}byHkW+z1!q` z_#_RmA2@u6zGP&$i#=o9zG526Bf7EkjgNf4nBaGG@DDWjpTY$D z8~nY2KS}U6Xm2>?T_aNY((BSa_R-=SCbQtO#-fDi&L1GrC6(5q#22?pbd?kpBQkv^ zi~~x97Mt|mMPW&ADMD`2yHQhcJISw5{5umhbi5Aah}RELyb3LKqfk8Bwyztbz$rGQ z`5u@eacF5UBE1}>?gnWM*$MRS&ePzai~2 zRCN(Xo$;Zko4Ew>??)|2Q|O zA9eMwvHFJx^)ILXv#Q_CuRqMyzkHzTznZRJ=IZyb`s*28hyRh(e^vE=-A?1|RM=;O z#MBe6V>;b}ChG}cyq6h#l+>gU^}Ygf+?&Sp5Tnm0!}u=vPZ)gf$PwBU`AkMv>{mNi zfq(Dh)^eT{aznN|($YBTeTmswoV$_Q#~cd5!&PTTVx`w%XMHD}+nL1^iI%R3L@V&a zEt1WZ+EyI$MWX#b11-d&vJWUN6H0SsI?119hx}19p_(D4$W70+H>?T}e{aLBAIcAOnDtBB2R6msLV5vg2k zGvuzJT%-=B^=*7R>Zr3tcAG$Y;s50IN?ymkwlJ{hjj)`qIVS3z!Y|gh?PWt+-Azah*_{4aRCloK3}bsW2N!^1gQlbd+3fU{;{1HLy_JyO*aM^6yYR zKZ?FLs)g)Dhv~bt79f1RoR}-3?utw^k68F5NP^cF`A7_gAu@Qky#uhH0aylmH~@P9U{?Y742v;aQM>2^ zPUPtL<&cMgDqXYl==9C&A8F3!422}XyN2gshSoeR^|pd~Cs4I~`VKa%jc`uzv@;t` z)VI0%Q>}gvo}H}zWa=NP`h$fP`D>1MMw0FH?xQamx4xJ~t~V^Zbmz;`v@Y!Gz;`t8 zU&Bfc`~iSJQs6f=&oz@9!WW&@2*-7rPw;ugYk*zKuGXa7|*96ty&=vdX zfI?tY+kM%6^6mS6(U=^QT~k+EQ=NErwx%wlsZ-Td1x;1NzHJC!C+?7Iz#SwE?O9C! zyO}e-S`uH>ef1f5tl7~_pCc?b|A96OIX9T+93jR#n&)}yRh`NL=2K9^K@&bi^A`IN zt9Zdse2c1p8lS^Aac?TmBMik4v7s&lMXhAoB@ffip($3h9?rBX^I^_Q4zm9RO63vh z7HLt{9sSx6zR!rTLZELm(^zj+Uw~s zJj&|-z)(9352yZBLH()JM_#@|_$p#^CHM#5j^MLY=<1vO0<}?70Owx;!ui(#RFYcP z1fWU*m1mn2OOBz^S_jAD?*T6qj^*fTv*fn2&SM3aGO~=3auCdAHmqWc!Fv`Fg%*B_ z(KZk8)iMfDd={*)pq(HxJPvNf% z>Mo_lCslWQ>SpW2QtcCMld*(&zQ6SxQ7IRJa?ZBAbvlD8W@0Yz2Uq&|Z01%*WGJo1 zy&ZWL8Qv$+_UmeUrZwTcI7}SI-rw;Sp2r|`)jZI%Ja)F5ez)dA)yA$OBMs~B^@;nY zY6?(DvQ}BkY?E+TNs=t>9Ylr7n|vc~nZN$J4(4*0EX1x@AWW>Yv=OS=18GR_Atpn7 zeThW?^sO8Un$D>%c8i{4ox28Lr=ER6jk^LKSg_XFa@Ev=!t00u8CWV&5+zB?mY)9xb}a; z{$Ee~^plMUhCBDD1&RMQDThT0gV5*_y7mLYvKtUv*od~Zm?r`rX9K>u(dcFEfa; zrfQ_D50l&wl=^^DN2pZ4>|xcq$lA+X8FA0Z zY0}y;=GmY25sKyp|vl3VCd#cg?t#wzZ~`|EYNzi#17SghjV z+_KWCdBj-i1uo-F<5N&>qco(AlVcAM_3pGCSvE|yDe|Ycvo2VWvwztP566GLf7#{~ zN;_2>>|Z7|2mLShFUOoLWVXD2IS89VO3U^y*9mhJ2(zSCMVb4TYs)gq)%oSno)k*& zUw(aTMxlrNLMR3S%h|uYwQc_W%g^U=aD*F!q&L7U@q^2I%2M-FOpz9Hx#r)$yhRPx zdY^9vL2>(+BL&y?FLzMu!X2bP-`z*L zA-tWnv9OW_6&RzsUPk$s%q&2ov445)3995hq<@~_#reJ*i*DUX;^W8KPNgxMa9(Yz6Z>$XJlLhkVgtj;`Pbu!q3^|* zk85dUtUr-@a?2f?iY_gUDB+Lh!se0KXOV_dNSbj96W83Ky`iT9Ult~MO`?nDnzJKY zsofjPuHC|l)g_*~R@#V@Kz3g1W!S`_(gai<5h{Oa0V>(%N>TfE40%cHqmtNSvPqBy zzdW`&Qq=yUf&PwW`_`ZyB*6!nhVT;*K}qmse)OlECN|&Qj)=aXc4}xRRMVQL@BfFo zza!*%$oYWC;uIRNwgJ{w2CE!cZwgj7;T-cG0~;gXaZrur*y^#wQ~IU^gv)#D*1Teo zPk|o^?;4TMl4)6X@=`4Jg))S7?bdWFSC<%5Bl@ufUc;oM(YzEXaOk{N(X7d0q4VxG zc}PeDV>@haV2{@fvf`lHwN!gg)poIJjc4tK@M1b8uhvm4hWL?6?>WhELvy?cVRSKAI1meXH&jj<@=kO8ryY_W z-(f+uhp4uVs&%nyTcS+^0_yX=hIU$sqO@ZzijUqtbQP4Y!^6abj z|L!LhUV>5f6gmqL_#8Dtp2nlnjI^3AIY#Of z)W3}Sd#ip+tFNR9i%f~S(@$^kIg={atG5CFu7Y0_uuDE=z#Jhkdy3}pFB0QB3lF_c z$S;dHUHno|r2*a3O;v6HLay-~9$F&I$^U=|baI$$l|Bo-$Ydut#6Jhno(9@cg0|eC zHD3Lt1!7yQpF9fh+2b?26$WYx>(;42jR-1o#G3j!D`uxUu}+TWWnaCV3+sT{-IdbV zU)TZIgNO`5A?hGg>HzFEq8rQMOm$&NFwDuw`B(Z_bqR1*9!aAtCy7?W5b)Dbuq%@C z$d6@Nfvwabaf^wLQ5JNb1jkc_PG_N$cbOtxOWe4Mb{tlVBG4gvj;N+nT5S09L$Qt%LN%w_O7QnS9HA7>SHowP9^)U! z1`anIRt4{ACW;o+!CstK=jp~}4)xBbUj3QsD7yyAP4o-2`&T#PJ8sNMolm%(U&^8* zbv|K@e?DPx;-4fg^?9-%_Xz;)5}23gDA@%)m*oHeUM)z?Z&M9`|MBFa(~ zTUdW_9#>t?qAn+AQab}ovB?@kKTAxoc35%doE=mG37J#2#!4AkT7k0I`f_(s z^3Jw14Bp&fsg>4gb0P?QG4W5Z<+dhFJJ7KkUB`ac1Qhkw^NywOBm9fh7Ch7%3-$Pp zo4N6Db*SbN7^J?21#EI8pMuag`yht`KBbXuE%>wbNxl_X8Ht_JibzrH#YpTYHpnb0 zw75cRmTo4aAhnzT$VrKw!dRWf{Aiqd4RRaGT!6OydpVJCT3KqOBUw8k*otP} zQkxQdxtEGr2D~v_fC(oAMB+VW0vHBypVg~blaZRMpAh9)%NHm8d=poyg<5Y;3#gir zZ(?zX?+&o{=&qu8c)Wh1NFn0`3_S7o_0!VmOkj@yc22&DeH`c!0u4$E!yK0Z_HYMw z-yE?03~T{lF9R%`{hQ_ya>&6FaqmH%n;}5SOg-U*xx2s#eGdIM`6gblq|AdAGC49M zm~ztGN-^QkbhspoUGn=5AlpQOAW5Z10fWLvz`%kemm$B!rJcSZt1kgw@3_Ri>s?~s zKPsXZlhJp*jch92M4_T4VV3Z#*f6QtgcQHZH9?w*GocHQL3#|+1NYIHZAZX{fpO6j zdX%$XSqt6GM`KD{)7zJtVmSZ6JVm}Hp7o#`_uj)2sOrIJf9T=~4(qFf8swU&AZ;xZ z4L6^Y+7SP9bDR#@A!aOEE1Zr%oSD(|nq{ifvD`#tl*+M)IY{ zS-%&61^d-JS6jd5vNpO){hmiuKpu51+aXr41K<)JarXH$od|i219*i2Y|rxt19&k2 zX9(aF7iO@uk8*jeQUr>ajAP5rn&H?o0rwou&drgW%H_er7}K%Ho5A=6i3mC|=Mimi zdn8(Vd+MBHhDB2~l|A6;iMK9yTOWSsKg1MZ&=Psxe;T;z>3oZdEN*QZfDLa62``_+q@sWWgQm`*IM9YRn7f!cVbKyY$K5)eP_ z?SGTjQRHvty7UKpOS~pe*QNF7k=g3fM!6-n+@)6yM;Bfpua!I2d3LGTMlLt;Ou;=i z!4%wXZS)P=m`WS(sEuiU8@|;<9sqBevziE<4q`*EHnYj{5)4*eg2jn*u4ptmU9B0f zqc!t2{NuWE0L{FwW_r*}cA#0dAth}Qs#zl@c7e^w6^{RwYtAMAJ7CHG9spm^9rulZ zFERfEyL%|%H%wvW4H*0s%CHUWFIbHK9pEbraC@F>9sdJ(g8=KmG6Y%L%lN+{_J^Ot zw5!G1bRonB0|8e%;WTpObJgBu1aV0o8rk)zT3;TRDZ2U+aVtWlG`iZasU7%~x%DLs zu-a3RXvIv3>~mP;pd}=UpOJVDuYo&b9;$iQ@#mXTG*RzmgdpyXz3D zrBJO@%0H6jvtuq3*v7js@aJ(ypzN9XID2EOBxI~KU%bYlJ)QRVwcj$$K~e8rI5X}| z;`yU->O1JCLxsZjpujGLmZfKvh(tDNa8&nUN_3=z5^vbn;9@&iYMZis=((KB+Mw-I z*bt6cO(QNfM^UqzYIevLR9nhxdp~hHEa|sZ6!(g#aTGNWnRX7}y$s)_46^Wb0=~Bw z2)LFWJL{{hi!$PvvWThl>lot08p6dk{=tm+CWeB>p9UCzp6iS(&!DdQiYz~GEsKgx zJfsQYpLek0_}0@+tY#^It6lxet^UD5{fnqyuKF>*ezB`RyMyXKm#$yp>K|$KSHTai z{llm~Q1$y!AIB%8l7U>A_>uLI-}E-FY6F$H|B2@YL;V+45yMpVNUDxKwjvhC0)Fo? z4e8RvGv|ri^HTP}9K@R5ziJ>x^Zdm?JO_yL1mc%w;!AeMnk!X1#3tXQ(J$PM4Obbl z7|W^r;1ZK#Nee!@K0&?l&_*`QE^?dgY6=s} zi_(vRcKtsZ!h_g$<)fLBpQ;~^lqH3)8zp__t53-7t>$GF( z)`i$r{zSV>@9(A$tMIL44J0o8j%^7o}pW#YZ1k%x^# zHLn;CxM}(^eJ=8Tf`dXeR~b@`lkY1M(opK3MhQJU5j~uVnUaGm-F|i?WMqqxkit7u zbGrFiZpONO7;NizukFiulEVq2@GXXJ*wegxTvU&F!!=<>y}@vE+}nYt#zo8CD${ls zq+`gjp7}Wle&mk!S#$$hEBdi4m1T^`5&OdL3lsa1YS@vJyAhgMd+V5IX>S$$OZ*#8 z#|PhZCWW#v()5t6i==18A9?L0t+Z(D4`OZdZnUEkj)5VW7^IEIfR<{si^O(HTslya zI(B%knAaLi5W?45une75$jqPw$SRwP^e9X`a*{d&8W1`9ig+OA?dy88hxKL&4Dy?C z^)B@0Q={*A=3IgZ+G#%?f0-p$Ef#6EI~i!uGk3!~9|iLEJa2a`OEVqn12S4yH>X2u z_H-VW>f4d8ZX1b?5#0n#$C?`~W^bWWDdc zn9mkLp&U~9DG= zU$`~06>%h5ZE(|0P8L=RkFPu*(%D*ets@}R;bet17Ti!( z18!rb8>8MRdLH-oJp-2P%YkRbvAjA`*1=jxYy|1B++~)OjWxk)4mKlaY46~z4 zi0iIcCWq(RZD66R=gNyzGB|&F+}wDQXK!U}-QM=Fe}5i+AyK8i$s5Fz`~ySee-ckp zXvp9PvJ>^W=iyuIBgcs!PjWwlDk~$B8&5KQ|BP~1_~jUcM)4#!ADmI>M86QGoaVBe zc#1f4BcCo@DIz|A%;zOPiVCO@@rw@g(No zRW{)n_;+2l4zKuTdT#z*rjVM6)Us^CxOna2Hf0oEQ4(u#7q_v+BGKpWAEguS>KwVT z`Lc(H;S%OfvA=58 zi+Vr7G;!|%o=R^M_r6B}Iu^r3OWmo@zK6?LSwjY7i?e9YbyTetMaSNlB|&qSEaV*i zY;+6g9nh>Qq1#{-Uyn(2JIAIx$*0|a%>AEmi$k&$ zBzp)+TkI5hVHyb4JOGJ_5z5Z1TWddysKLE0sg`jD`px2IAi==o#(8ynZZWT})PX`l zMg}N7a}eu4p)|9Z*8lnPtUyLTvF@>$z#R{R{%NP#c}HqE3Wfua{MP~4Qvq8kuow7X zaVw0#t*}NjNLOco#CT04zMQBml=);>kSX23mFa9aX5dw$KG%?lod z;(qFX^J_ng44Pm28ObQz=KHnp=c{EfI&u#_u&(Rekq<%0@YbEw>1D|KDFF1XvU4QQ z(KaItQaXdt3^)(Sp_+x9jFb_yKSq!-Fl(Kc>^JYRj+9aO6k$K^a@zkWjoMwO0|}#p zNg_9mTIFyf8QZxsx1ic}p!%r^$3iU3aiZE%$x@cbKqG=3A8xm=BNYsv*C#knI0xYf z2Lk*v13m`eH3Gh#y#y$R8UjHUtlGmN7&;q3wB@P^t?&2O9fzpa>+Qo|1 zC2k#-)ziD+3Wv__nU6 zD-ZR1TAAvpolUhMxO~a*rtN@~i~gow#PG?k}W2xf?!5S!<@v`c>%;v> zUaRq%hT|-k?cHY2UVuvU($x*Yh#w1tFAc&pAS@Mx*3P}YzI}RDAv}#)Wprv*>8%Bq zn^o3kN2{b}mELlv%!9i^cC84Q@4h<}svWp25-nZE%))ZgSi~+4%$!+9Eny#JMdDM( z`4F#a|G2jSiT%b6|JPDFQSVbI9rymuQxvdE&hzVZQ3Gwp}9FtH^~nibvZ>z78W zoLIpJj0y?Z_BfcHRG&&q8nECrRjaWDbn_iZ6{vzK@7ZWd`!qCiFeEdGi7gacr4q5K+! zh;wkA7kYJ3;vBTL?=+&7A7Lri$`Q2Ew1ie((cX#e=uEJ6b80D`$*i|q#0weCV4mx%kFWwgUzT!n{dU?m@)4Vgw==3l^FmG2` z7*Vek@MeBPH>2L0Fgp1(0DFMi`v+jTAJu9tlPsv#mr^S1|5Mbj6|-9J?%k}(L8>*} zknuVmm=@A4GVu6XBeIvy=!kHbtIiygj9fdgm3R1`**IaO{lKW$VEf zEyme&c=f5o-pp(M2y*H2Q6O~`NKyR&hxguTyqCfk$u9x^r=lCGIesevaNg1$`dsAA zMIz;@JuXYKPN$*UQ8h@`EbyF_!qbJKf#gh(oYz>Oj%&SPwr*!|H<2!>Z`!cLbs$tT z+#?u8`KiDVbPx|`kq(oTH3LSu52jY8Zzo>JwM;_hz74+ib3*)>|wkzPs*g=*$Y zI|n(wlCSVpJx^PV-e)KUvl$l!(P{JfsZ3dO%c6r96f$m!Cg|`Kh3W3Qnj(n*qEVk8 zuHa+bdlTJtlCW0JkAEL`mX3gIw`<<1=xMs_>kxe1-YGQu(qQ1z_OYq9EtO`jlz9*C zPhG_cU;QPBAEjN!pH{}Hl@HLR{=VDleFK`In7)8Rg5rBq{Bjk4$m{?uy<&@%A814> z-){C+oD!3yb>mH$z&=3dTq9s73s_bUVJOp+oS!v4nVJSFeF$;yR;t&i`n^q6z46i1 zyfY(l=MbOmU_3dAL$@;b2|e5d&#m0bCrB|+Zx+8yK_{DaH#4wU1u#snd z8FkZqa$aWL$Eo|4>ULD!?DmV=bfzjJTeT1B>tyk6ZTOD0!i2!Tb9qNRH4x?lp`M+d zg1d!fw|*^jn{8b~_@p$q9~}2eD7jE2l?m7;_vUSbPO+D~7w?zo{l4OQQe(kW$~=}R zObPa^sw3jwZwTd5ip9O@@RO(j{Xb)FgY+Nri>L}+s@SPX<*ced^WTy>i^mD?I&yEi z&RrM(fd0(?Kz2*Y%W40-V%Z>y9zN4GJcQR+46bfSKuD}XKR1JU>`1L zvP<3pk)*81?)98Gvy~Rs`HWs|+tujuoIBB&*U3F7pEo=2UcnX+Q;ymWY9{Y4l#`}A z+YYl5c^%|&9OSL!AYZ&@lN{s`ik1w`?;y`PZ+Y`ojQD@-AAg*9RezZi_{T4k@%q0w zZ>j8Xe|Fw7v7MBK?;oGEmpD7Ge|%!AjB=;?h%$U_c%jX}T z;2^K0T84l83qf)I@$CiI{Ns0XTtow+^OmDi%`}AnX>AOljpir^G(%rzu9BIbfFu6# zUu~h}b-{MC<#=QN_;S4^F1jB1p49Ze@{b>${6F}|Pg-SiHyJYK@sF1bz%}m2IPN>1 zPCIEE7l~E3T|t#p{B!jDwUOBO88OgYt+$L&P{l!4#D1(G%(*o7haBXE<|-HQifs>F z58_RxLOL1FtPvM7;_pGSxVQ5zBqBbVv2Uy3!&rDyOW6k-Bktft9?!_$f)Xrgs{tgR zANgbvfR6-dxh)gD1KUterf0vD>Dhz4yuRtl4Yk>u#=h^0P^LwRYs;Knz-(Ie*9^O0 z2eYRZCpM6Zj(5Zxq&9v@N2-abJLtr{HE@SRsxwG^E2L(akE-#3Grx~?`iT&o#$U(w zf6f8c!_*I*5;ek21GEf_xcA9lnl<@JpzB%o`DW)Oy9cz9*XT)2(@}2*b>iMBLCxvZ zT(6om$pPEWfV~D6xNbEASc8C_Wx#Zbh6Q?Q3n17Abk?~PcJ*cB#ll4` zr2h!5(soNO6<4Ku0{b0Ha~~KLr|sOVNr6<)gGLK){a+!O{MLO_$9_xx{MfH$WF)eA zVdD5cVj5-RONePwK8||FGYaE3!+M^M;ZD12$Fl*S!&=ZG>WpeT_- z`g`gQ>MzU1-Vh*%X*Q`FfxB-gZGC9neGuz=f3@|3s2lUVRCka2&yVT8yDeJG9n(Ec ziRZU;O!pBhSC@E4!lZGxGrCI|Ux&+X;L=&RByH`I)o=V1u}>2V*KcZwCHyG46;j?& z?_(fvUORyE?vBlxbQPSkJZm5Vesm-&?7YBNLTcX&TtqGN0)Nj3&5`~-$#TA$7q|xm zwtbRrdu*?g*h6x%k@N|Qe_5x27&&fU4*;?oRw*I07;>145Ui_9` zde?5BcU9EIS~LHaMCJ=-O9-%xmgC;_JU_BQT|)DvBEYk5Mbx1+#dNs%SfXU`-fkGn z(e=@2KD@UaHT*f>(e*z}d`JkpFcIyQN(jplkPPEm8x$WbKS05b*$GR8i^d?e{QRYRfvC&6X^c=4(4D$S6w03sj}>7 zpHiM5#lxXaS?1Mgub@%~!UiQKngGIxv$SsUZq!5)^{xk9&eNcQ&l0NNFyrNoqB1@Y z)y#n8zCKF+L!XPh4&dOflF!-XtQrk!Iv+VAg_?gba+vU9#ZM}B_Ea-YM{a3r(`n97 z%`jY1ApgE*g{Zd>mWz9f;n2|_Uw@!;Qe6<%LeQoR)L6j`D_d}{mA#*`Rg{f;Wqj8- z1uABsDcSxV6kB(;>G5G1YHWb0k~$f{g2~)fZ zg|apRnI9BAoau0)BP=4dvXXVAmDN-+fPbt}VMNpI`(y4HBgYwM@qLSNPE6phww*|c ze2cDLtm9BL`9p|w`!`FZ$G$RCP3Bn1;5qF7!#0tE5smV$r#dvtSSoGjm#buGGS^f4m_qb{trQsmwx#vdtt;}cr$$d~yq-FQ zsnD&b{>IwxHkmp3*Ha&;L1Ky)^DkpP)#XEnht^Yv(I!iir5|LjfHv)@70?^Zyf+EB zzn;3zL0hoMhlc2AJ(ZxUdL?MPqlZDZ>3tsdg=y2@$=UR zuC1qzRqJXEr1wZQ(-7`wZ4}VPL$rZ*_>I}CWahiz$a?A#@mkbdsecmY#_Oq=ekOm- z=Wu?fpEvzC_it>i6Qbr}{{L|QM)NQJY&|vb#0ZyeOlDCvj!w{{C8O!NM6Q$x$xf4X z+MpAq%*W9y60y$-G+I#>`&G-SUa^&0PW6iYKG@H-h3#FUgeyxMCNK=E!?d^vr&$TdP*z(Y_<&+`KvI%vosd>nu5$BN5Q;* z0~pjhBcyVhS+L2ZIjDkbQl)s$R8y zEX1i203@@X!I6ko{5~@l_amJW1A3&Uu~1DNut4PWUBtlNDPS7+wh!>_-<*_n!grjK z{}*|C(_ED?=LML6#w;I=B{BybDt5@~?F~wtKyS7X^^~!w zdM#`?zQ7`y`yY5Znm(}&_eu-L_lX_LJ9$Cjpn~}-#^XOsKn55Kor3IW1ENDQVX@#KCows(iTDe zyXj+ZJzT)~51y_EtGs4S2C1=~Xv|arYoe6DKF8~e-?S3WJ7Oz|jNP2mk2dpe%`UaR zno)QlgFIf%vndqyE;0<-@_f$t@;op&M;JV#agK#=DzGg(?MR&iv-qscUdWFygsK1r ze=@bsRjs313GZwNfY1t0ZQ@q{hTWG~ zU1Wo&LHAS27dg}pH`G?bA`Z2KL9JS-Me~fGZ)HM?2Y<_}D-Kad97CcjrUp_%M7#>4?fQEZnB6MO{$b;uy|@kEX|@Ux7O+~y?OPuB!_|Yp+jT4OU$CK8 zeDM8(zXA9S;m#Cu+F0JT3xZ*+K$e` zk%S0XqrOtzUQEfz%R^S|a>g4`ioDMm7rUFM%^#pyJ8%UmZ3XqqE!fAuq9+wQIw6tR z4DH-FhH4%}+r+)UfZz)t824U=L)5qA_F63$d7l6~bv1m}Zhxp|I+c;uhkmC!ek=`b zuFbulhf>N#y=cR1i=oN0<)7xO$*7Ar43|SvxJ;BwfxVaFTzg*U6w6~Pjg+C9*&vjb zk>s;{^)t(V)m$XE#h8@o?o4|G2mFN=;@;bEi5t)DY5Q#r6q{q|7F$N5axgGy)7h7h z4O?`vS@wY`Qcv;cti2W%B7npSEJVjHPJG-wMP%{9@SurDP&4nUiAPzD=d6{q7gwAs zLZ)I7%Q1En{I3D}ZJ`$w#L=_5=6nV3vFLdvcj(H9JJG@!nX42PN$uD#|Ey!@8caZ(8b$Q9Yho}{3 zg^9GJ4Ak%wTBT)oTADyh!soMJ!N)1iz3IPS5N@IWl--W95Cip-ywlw8-g?g;hcYhP zvniw49|xw4yk2wCaGBEVf0&ytq%{AU76qlQR$BVR?9Og9Y_xu89G7PU)I09I0GGI) z{IRKNlfN2vm=oClU={Vg;I*V-m>wBctxV6~@cJjemFquiD6@?N4J{jz)1mI-Uq!~e zX2Gk_!JpC@%ROjV8}#JA0k1sBCo7G} zn16P{Z={Tr)b>5T3|U9^&kkU3Yfy0(&Z^pz`x-N$eu1{_=7ui$je@?ix@@+W$;U!O zz()-rCuIV;10YBFKxRU>Y&zu%>0&!~jRz&sg#{4nSSYhKAa$ZP?)3#;Ur}Z&l5d2n zH^JfMv8suXc{-5k)y+V(AEemp zR;(UXKT*Z*qZny>cK%W2*tQ9uyIPYDXb7)qnyM>)ReM%<9Cc%j>Rw7+&3mX8gv9w<|N^lF_2R*SN zmPJ=dYhmJ|&4FrM46DqxUWIAmR`qHDY)rM%H3p>1%lxD22;*e$HuRQ3vW??JyELR4 zAk8yKb;$C4f^>}pB35uSWQ}l!8~N5f2UFlvbN8RG-_!2?!F)A$|L#BWfnyQfcj7~E zSatPQ`m&7f^;Er>x%-QOg}Z+*gOqmn->8w3yML8!B`r?0GUFHtMy)S%+e^1Jp^TUq z$#+bg4yez^#6AaKOSV#Ra4PajJxN)mGEX8p!&;X(6cwB*B9pS_ohmW(46{JQ(07A! z+^giNJFF+U^ti zA(fK}tTC$1+#d(Z9a6Y+_>F968MxcotO+a{(k3=Qw-i-dMQXZzL1?A=v=7*9(Gejk z%6cY%{Q-_TOZ1EBx&VB`Fs~ATuP7q`X{STEsS9NglPPP#l*%wL7o)fw+FQDTxrO>N z&i~R*2kifa(D*Yw@T-CUo8Vsq{5-+4vc+?3XO!?1l(20D*D*W|;k!0%C2dT!TPFZE z0I>e>+zBH5IkSRO!ijy-XcQAq$&0P&$(j+r|5nr1Sim_#ZA+P*RE9Y9@LOj0Vp=XrY>Qy{>V>p2-|%8* zBh2-%lA4Avapo@wGmBr;wNQb?=J%^}ewhx*xTkSrU@`VS`cplJljqxo+89p(%= zSq5r_>cFL-^cV>qOwkj4;uJm6Cx2qCXl*^r*Y+*;PunX*rKS|UbUcSnrRXm?FtAuo zh0iS( zNhSY`dz%?MH>30dmnUF%NYD`s5C)LgA0)OAT&Q5mUQVF8OOv|oy!wvRzjvb({YvtG z0RI_dvv05~_GB&P*1wB1r$oItuY0kEeoHwgh9<>nInIfVOq_nqzV`d? zWs-+k?w~o=Qy7}}7oo2Dqcn5)J$7O%5;;~8Hc>z-SX@kAueZRiHvHKO{8Lc$v<-so zRXCWv4dzDrG#?_9{~72{2>K<0PP{ajB;MRliVXZM8K1Y4tGb<4eJ!ZkjH*wnYLQj- zhSN}Krwta*L4bs%K+*Ntz0n3rf1(a%+a<4q1kJMhQsfmOsHxxt@1d3Ig^mR>rIOpN zH+N{mCX4)C583pE;)o830S5%LqG)#(^BJ@|4K(B4Fy@F^LU9+9mpqAhL{JVt>a|lV z?uIPR6&W_#9Em{VSl?E$H`CU~UG}rL6-cI2N~e%?2YG}c>j}Hv%o0kE-MZ7P`mO2f z7WPK`sfuNvcdwZep5odWf9C6V=mU9dF(MGDEYG}kz}*~XT$cO=Tw@w>sH#@@HWd0W~v`FWBHV!sD zR_SMaF4HoAjL$!2WPCor7}JtA@12?Pc~|?r2O^-oLaxDamZ#FpAFkf9$jMCgynj90 z3gI4~NhK_Fx8}UIP9x*Y)ll^-V(12~(QCiVD0I7DD8hJ-?WY1bu>QW28n5*hKN~EZ z*_U^Do?kpm455>k*sI^SQw%{U`W3+A-uvG-ZE_(bO+H}4Q*ftX*Lq(*K@9~C090H3 ztDhGHx7EK%pE=*5e-tT1&(HyM+N>Y95hE{i={B z7(&^cM??sK9HXq(<06yD=bXhB!mPFCu|m8FL)U81e$u}6vPef| z*PIhlML(wQN+H0Fq~6z1in{wyAhtxD)xnewm#1_E_raRMY70hzWXa4q!Z_+h=mN0{ zo9fk{p3Ftdk8IK;ao_vuLXrssZ`i*~nTP)luawMm1n2&eU(Aapu$}|Ei-EOE1GxVY zcz}J#z^+Q*trpmR4(w0^+d>G~F1wt?vtY73)8LOr1)F!&)E$}?YYQHIU8ua}dT_04 zs>qtUnx@vMsTE7D2dF!Z+9zwMC)Y)vltp{=pGU@G&5B>=lT^(4E)uz$X%qI+oQN)6 zU9|^oY-X|xkopmhnYjr>lG_Ud>CtV|R%)(_3h2<`i@bD5ssnER6&-HU3|?Ds|7)Vd z+l~%b(j+AB#J{+A*>@~R;Ml~n_lyp!OisM_e(>p#w(N;pWHxpe1AU%-q*0bV$_QF4 zN*uC#iWX~i-mI}@PocWRoqLENL`7_<>JO5ue-=S}>{h^9GYi286sPi;v%s3qv6*%? z>JS{0nq|lmtNMkdU^*EMY?t z2l}_rw;#uV^%wnU+K(}d#LiRV{m@D8SnmDboEqkdwr9&RR6W2%<1Jkg)Wei z%w4QZ4eoS7=J8`blv{gBGkWeUwq|eZQP^c&NH4D0Fycp(p)9l~!o3nlnhp ze3Aj_dcTm__GJC9lY#qp#Xq6PN4=6e8+1Dr>Y|qlr5iupI~7qj|C^>w9+$NAS5=WA zImJE|OjZlE-ohEw)0}|qtU2N1Ck4mN2?eynoN%pv(wx8+EHIc89wU=`+#3z-M+AF= z{a(<;LA)XbQ5p@1*JVJQBNuLM`0yNvrx?V)0r7r8^yjT_G+MRZ0V#-JE{L5oAYSGm ze&tVXX&hS^#Q6;4T|m^lbwR6o&J}OkdMr!vf~W(%=wWpiZU*eiP2HoRB(4a=E(j~730E3}Y4Jmq8CM%-2Ru>y93 z#om1%gwzs2UtrFDOg!oM@TV8~TpMo2PwDeBFKQHPy+0oCq0yv- zrF90h=Nz=>AI*gJ1?Q;a-n~HUEkVh1AK?%O`E9CY#B;tOC@!A!V8OL`&MVcra0lsQ zQ_VDludp_{)5b6-H3u^7mdtzx9GSL07OzFUT@b3&l$CNjF=f4?x3vYgV>2a&*O?@h zFiT>}amPUHQm6H8J}qa>%6b7!|DhSiiRusk5AmEwJZ}z?$&fM6`8e(e$qMLf=mnmV zxzb`kpwmAi$4wSGA6FLpSUKb{Jr&bgLaKOOZV+1~-?S70+jrGQh=EgM;n{GGVm>XJ z(?3L~n=d#sH>~D8{Trc2B@vzaKdwA_)?|Gc!-t9bFenw!+4%x392L+xS}?4tu;H#xsFSDB_GP7r?rxgK&fDHDa67fK7bu^ z-7V3T5@)kB*~qPj1MZ-)xYrTME9wgOz6vnZ=#8X8Aj@uvf9m5P{Gx2O*nL=j;yQvN za!!5tJ`K2~$U6tAaB1rl(K!R^&gkVQtz$qq@=-P252btx_lAo$~n;ys=2{_)-d|HMuN6!c&6X*Jd5G9#@Qv|oQK75 zV!m#{PvQHiAlx%pua0mVKV=78SlwU&mK=)6c48|Z{==YCtGsoWeJ%QL#MaQhS-~^R ziUb-x3b?p8BmjCpKu;0Sh!2zv6h9q4U9$bw0d0#l+>&nc{A5OLex#oYWv7naEk#Ym zx@=~M9nQS~f0n>6&lm5QZNuwsA{gohj3yV?L0%W_CgtI-gGiL)6G?lT@1syT+l4Nf zPutx8&GVneZnKv+Z8BCEj28y%GoWj%TZVEqcQLfk=n=qZ76;Wlig`3?nz^l)Y!)%lZdOnqL^LTBTXk+ zAWqYcs@j3AoGdBmk2@D=I^(?7qQu8Lq|R%t%{i}CMKJ~6l9N&C>Ky zZwg4^uMAMD#x%WAsGT6xvb|!#5^K|vyei;YbtKpdPQVMU!-oKMnxNij0aMx3^{ylt zSyuGdf08EVf*t7rjgK{VxIvX%q?^R@)d>GlQC&m$BcW znlnT%vlcbmMPl5OBf0E@Sdx>UkNT%z3|-l<%wTKTVk7)CI-VZ?3#f5#Z~*&0V81Nb z8qTN3`R1jfATAq;Y<~If zN6N4?5g&(P?lvN>LpRi^y(>YtAzV%|-={13E!3P7_1>m9`M-inuTyEEDvhv+J8ust zlbUZ1P9;iBoif})qSVX@X9FXw8xXyH-=QOZHan?(dC%+o8HOZNq$;gik!bCNP2&LR z4g;6Z!G(O?@Pj&)d;`*H<7>y9on$Hair6ZbR?gqSOdd)dX1#YnB2;rtzDcR-0&t7Y zLndnnu8j}~>*MB}<{*{;v5m|^|ItB1Tlo6dFpfp%eP`JJHHH0FU~dyn3o=srLC2bK zN|@J~aE_#0+*<{kxB)y22tQ~nJ|Zqmz4p^ytpeo_*{Xx(6dUGenw!fn716Pa3sF@> zv}*pTOEgc3vJv#g0Q5%)=C1-h8qojl-jKAPtQe)3XNGx)?)V(Y>~N6Z3V5*orJ>Dg z=v@o^%F$o1e@a#P#&8Jx*-mkiA({AuFlN5U&OyX+Vrk_kx0n9XUi?PsFBw;h6k)%e zI(-Ie-2||~;{V_x(bLfRf`w5*H+}gdd9kA7vc#}l-cgRlTbR~_$%*U!A9HUW7*(-D(3)z#J2)zwwi)z78F^@aiF zUYl2U0%Ln%G|U4)r1m>wE5-QBlK7oiDPO~TMBNMpT`OQsGgyZMtCL_|>_YXP{2(9) zp?Z!SWq(Qz3)M4<6t~P!1fNYvkuAj_5M^TPY@%EZYY77*$|7XU-T_fguwlwI7&aAk zbo1zWQj?j&*rHO=271S4jw#y{xc6DlY5+P=J-b&BeXlz`WxsP#rRY<9FN`FKiB3;! z%&BbW>v3fS^Zpxn=6(ax3m`)TbZ;?#cLVDV7T^y*KE1IMzm(QT%23KOZnN*fmV^M1DEl=m3{AB%J(oE!C@d^$x^%r z4WjweKZR4O;{6T)06`y-+LxKycHYO^c2#=kWq0>+mdvo1~GmP*E%jcZ&~e&pO#M+`f&==(Fh8}52XkGiD0h9z%UAG+2h zyK5!Y{s=^;+vGtiZStzQqsLz`u4TnO3(He)=?XN$;6vqX8;}LlV#D-RhRXHZ1Jh~3 z^hu1g+6WZf^1T9vmfrQMl^TC@MN1ocRV!HBn+3RpcUA~=CM@%?fF2tF&20GykkR^U z$M`KkZXOG+tdZ_ViGGX@esocc;bk@j!){c&76(|1>yT@%8wb(iGiou3)|;o~py1>! z)_!!*e92UV@nQx!6+P~qv^2gi1pD<;LhA)~keDY=*Nk4z`yia|?U2=May_J#i}+VS z5&s$jyp0Mk3Sb#{=IwS6A?T}3oldz+zloCQZD=hb)d*xt0daC3!<04l?Hw{(88UMi zarqb$UMrAUAY|lLOhr$&N+w*0p!=4kW)Uwff^HH-LZD55MG!9El-m zs&EvXz6$<0!#M4vEdSrI+`75E$gMax;S$n?I1RTk`^kR;w`lcCcyBB!YBt)Tq;<=! zK+o{H@D@XXfQQ=rBj8R7pB?H{z+Ep|(BfE@@VZm|?*{!spzn$5Ynx4Pq*grc|KN3h z-)qf3?6o8AgCAo%%D7hZsyzsB>PdDVe*xhA00&7J=Fs$IuA}J+U{-0 zzR#L!IM8Wz;~=#K++8XyCZpAz!%x%det$U#xcfI>LIt6_hSapWDF6(#x-J^Fcn9f$ z*;?HjZ&FrT-9r{!w=6ltWGM3zt?ov9X102S%XhCy(B=i)UA;oB+2Wv}v0m>Qvvj2$ z_ET&rX6(=O?P{X7=~SuA3b@-ElnJ;y`d+ZBkDhbA(8dwD>vF;NK4e*d0awx+?tkF( zG2_yu2;k=gy;{)y;_hIQ9HLpCkt_GPs&`n`s<7%!RGp=&TU%A+&i^dnZV~uL>ZX_y z;obeZdhwqG+WQT5pTyDaLpM-mENgubM_0llI<*upY!FBH z3P~3OBKM{1*K6U4dsD5+1A>MU-Xt3Tg2oj`cb+YWXJ)MtBl9Cqax{@#E4}olXMPkf zdL3wyAlkUMjkP%+-us6!@D{ZBleJkW8WF2WZ`W*(SSCzw7XU8NDj4_X0Vv^(=To%e zKAE}948S3zPv;>*`hzoLrC4#>2@*4l)0nIPgI;;lMrFaD|Srh zC`fo*Cn!mT=>Hq>b#E^cGa&6ODzBwQXt?;g&;BI|5X9Gw6whdhlAy|puj~FoR-ryY zp_t@k7+<%&n5f>{A36kk_AtI~+j22V5MOtVCAE&kzkw(TZ`_=sW|u(7bezJ0f?e-T zzM2|xCU9^DL7cc&s=Dv%@pjue&?g9V5N|go3v6cxc85H$nkGTK-A}?CZY5Yr8@fnVyxk8^WtCeTlyh@#x%kzB@;+zj4S_uz z6dK`nhk5zvFS-e9MS*|D^I=AxLGRNmi|j! zE)#1ZZerS^h#Af9`?v{v?_s7~!W+Tot10&p6i(ZHBfaztZV%UGpT3^+=jtVVYVrl%@SsvWN^vZSnjiigMg(Sy3pma$Sw19kfp;Opl*sa-_Ltl-)Fa8 z(0XZ&e8{Qjzg|VFPS&lFSM!*#k$ah&FRGFIm>0Q<9!D`q0^#inENp%a`OK6I^Uot!5;Esb@*XPiyX~1lWnO*VOTQ_ z*19xL9m5jMoH~NulmCX#zZp*rqK!}0#(8SP_a1wRVhZXyoOty1I)i{G^hAr+Nh#^X z?**9ZHWZbZWmHZ!ZxB>u*HjT;ESS{^$~Bw<<$5$H5xCD#Yf;Aen)+A%NV`|?`YS~ z5NoF>Y$ryoUsP)>D3(5^Nt-Y(yq@aLMX?)2epQhY^V2YWmL**<3^AUqj}_8o*6ut~dPe4z+!Hiq zN6Hv{RF*mT{`P=!3I@yN1#LL|Yxnzdh{nvpzg794W}RhRY809;GVGIoaOPjUt@1DE zVi3a3K6?Z#Ip?_ZGW?SdAbJFxVDr;p<=^Ihz(ZQlmpiq6d6PalH0LO|=iUhgy-bg!nM-*$ z&HVmZQVmX}feC6L(4+Ts5YJCTq#daS6SE*zI*8r!APzBzTLbX|AWDxOZ|7DvG`Djr zZ)ia3y>IISZ2?376HVD%v_Dk9Y6S(Y)PaYQ>vR-Tj!wKB&90J&a%RKw<1ri_ zmw!ap?q5Hu>HX`oqo6DfCr-exn*_zeD`s@@Isp`RV$R*TUXs3XU7_@q;f3ppnAg1l zT*J;RiLQKD3XuiHpXx51iRtGkeGoB!YNuYDHIvS;LOR1IP$(9E#$B4_ud0f_WcO;N z1^fi9RB`WoglxjwmCq?qig*IHnvs1N`VTFz*jxClLXf$=;9I%eWU1*XPb7JSG#Pg# z)|>9R0I7o(<51cR>hx7Wg{%2T_{I`788cV)2LolpFXPtHNr+*YRJ4JBX z0EgUaP96OhL=V)_7Z?dsN6)8@mX9D6$;tdQb@bC|Qb$Pqj;R~G%+G?g~vo5n9c+asiGXgUKnea~LGY(fI zyy=L#g#tW}z}ZxE6RVe|sduHTbg5P99#*=LN{dzL28*`!-Xg+{^FOTmh!P8<+_N&c z+L&yCS1@gw+q6-zaVEYdz239ou{g?yo?^*oXW)Io5HLfMaA8ubt(GD}Q`2kx$khZ+ z{*avisYzXvL0Y@X|A##OP-tBvb}98{0FaBOjdyYx-lf~|E~Y6Kb|_QPtfGD-j6V`N zzJvz2dfwCvyKUeQIKB*yp8&_twxrpE+Vic5i?XZzIRVqZt9V8thux+);Z=jqm!LzB z4v?@UhXU-*{XdMQh~LmpQNe|xq{KeZGdr0K;oJ@CrCaOop8>oK>wh4*9WQVM$-0F1F{{jG`+~z)q}If&BX+)oK!VH;{v}GZq(tLcPOntBvqIa_ zr-x)mwC^RU=rpTo6M?<|mDFsbnrw%gM$F4??!Tk;?;`jyXp5YDL#WY~8qlnt!*@T! zHwjY+UrFsqU8!=%h5=^{d+Mh(ka?K5KiAd3{}p639R&@OFSF%fr>6z)O;$2UvzSH_ z-b6lqBh4HH#m*wlVoZCH+HKXoTfC4W?QSo)IxmL+CP6}BP~(7)G2kV9UTeTl2lyTW zKE~M%=Rbxpkd0?ZH8vi_+YPK_6K5xiQk&&=Pd;{f!G&4NlAVa`H^~SYvzON@*u&q@ z*jA%O+2u+9eJ7C>>+CLDdylD3$KQkx$ydpz!)*}@Z(rf|rj(Q%%H}QO5Hl5h&Zbth z&!Ym^pFm${Uaj)`YVjCSRr=ew!(#r>mhdX!A7UR$jnKR13Mj98a~!g+NIDn)8GfbN z^rNkA%@ft_wDH z&n~Vc=D(pdw0&ZI%UjkE!gD@$4E60sLZzZF_X+ZLB5xu3 zc(e^TY%JVPyb7P!X)vI1jm^;WvZA3*(c?{H93i$Ipjv1f>qu%b_$SO59i zb0rV3%#04N4-laVuMI6vbuF)Fb*1ICZ~^%8=~^xjU5jWh9N((lJ_F1_*8-7LdRbzd zmja>n@NPf&k)@zYiKf6?#k<7(t&=scO74t1rN8gB11roX|CoT;--MF$Z{s7Eckspz)K3O=WlCU}T{8%8z@clY4<6oxEo}oqR9OopMhhuI(&a z@d1pM>`@bf{ns@}f7^e>@8Lye|8)sJ8!ts!J?Un?unhGZ!I$v7(ajHQ=4=1eptabY zH#!Jd?7t2+NFR*bMaq;*AjsHU{I@2;yGk;pIu+f1I)G@_gCmq8b$Rl3veVnn=!2Tq zfd8nZT->`Kyc6D0eBNM`zvFJs!9w|l$r}h(j4pmirEnEyY4Yc}nxn1e_F>IY)O<-b zxdf99bJI}P=aIgw#@{~Rx)=DNc5{$+GDs`vu*0DpkX{v}_3LF<^9Ha!y?TW)45G*> z>3j1m7C)5vMV94K??~{hDZyOfmzPX0bK9=hl0{Qiw;)qx&DpP}sNFaYa_#*f7?i$V z(=v6_R6X07XPf0bE9Ti*;6#2qz3~@7$eM>iq(&-1+#3U?39lr?_w>8?EqtrNcgnh= zS5v7r&0a{+W~4uM>2g#@&LR&kshl!feu8(e)5u~1@Xc|nV>+fJH3HE+^22Te$&v)l%L&Dgic*+fYf7-tH z8_)M}LLCA@#Jl2QK-_F#&8pD{up~bJ6wD+tPYsfux4Pd^Fj99P;2<7U$tdTr#Uq&07djP9l+f@DM2=ScGCiKFNP#x%^YjoWEvZur2I8Ts2W$dabK z#>EM5W*Uf>0_TMH6rVTR6#eDz1mTI6AO8j|8I{8r6<7yhW@K8fsUP*|J5GD?U*|FU*#ER4{4Pt3 zoDWeAl@)%BUuWUC;-+1q^r%9Ql@%X;U}@sso6U6(4g!Y><<3pCkw@W)b77~+b7P>D zb8aG?^D{sH)p~f~KaR(#zlYM!Xcorf9K*Vzg(g0u(*gz!Kbw358b9ZG!+*dPa$JXF zAR z=f&gn7>lSV5RcPio2KzNCy|uz^=QN7szd9y>Mw4>7waK zFI*p0McSlP^du-Ne)YZQY=>!U+rGex#e1)mYKbyT^6<@+JlxYbYUgvf`RW!YYe^_; z%+4mQ)SlVa4E<-9dImTDEYpj3s#dVjvpNfjyis1wuK>S9Mg$Q zWGDkc&geJE_PwzzT26P5)D3rP#gnY-bYnVvmGBvY~ z7ywe4D6ff}X#0~TGHaXB(xJJDHT^W);P~QKw7YLa_bbd5)O0_WyY0wRb7C%H2nOHl z+JX%JzV+W2e20X0AkB`YkNcz&-Xt1cr-rYz?s}{L7BFPCSMg6X-gv?C5{q|OsHR@9KWBAFH?L^rUmAw`(km;Q4kFfQXRK-WN zk0~%LJ{ps3@olQUPV>eW=wC4kvyjppx=JTcSysIdCORNq6@x3ua_ zZPyy4NZpru6Dslz@7T}iLm^?MhCg>#nxGz_FEkHX-OvQwtLGXzOK~ zNYBG|;|x{`k$jk7=_DNHSPMC#attcY7_QlTrb+qqSpCERyI%CA`f;j$pUi)` z%$m1qe9~~1n(?Duk%*3oMeD&t<~Zj4JCJLPKA$k7FBIfYfgGvr+=SLQO)g05#ti-7 zsA^zcWUy`q*5!hAE3g7u_q_U))RuYKd=JozQN`; zGdbskWm{2prplg=RdnN`;onw0&2F_}^+neZIjrh?n_sG_RVpJIUNljg9-NA>y5inm zRCRY1Tp`i0NPsh<;YIryeG`7mugY^ZX`D4M#@_bFg@)8J3iH7I3u*JQ9QipiGu;ydbT&#c zg`(jc2kbNhwrvP(B*2ma_N^R28x;+Q>E@kKjIUyVT`zW`dZVgeW!0OGl~bh}f0sqj zlvM0e zdjRV)gEbCVTME`izzP_+4W{dicqj_X#wgoHWd~7q$`;2M^k;U zs;>a?+yQdh1Abo+Pn!W7*yi%HxCJ8{?EQ{n3fbQ8Lcp^ArlYk^<)`iae!AH0{d#}H zm+S;|z`|S5)gWb}wOWalwfB2cXrh5mO^ZD8Sg2CHsb~@7*4WCv-fKf>bQS9j(UKbXD(PLq z`yIR{*?^WaK~FO>0nU7nspv<(@DHU*J6AJeHD3#BwxH%2s(BkVbwf}pdVFRm@y&mQ z8g>o^8o4#pJLVEm0>6HAJPezPcBLqq0>xgX*ccTnAy7*(4`?ZK%qL}0_SFf~&(EU- z_mu>#)1OIN#Nyt?qHxai!@eG=oh+=xHF$N>)25LG3Hjnn=DkpK>uSi6hXVG> znau3a6zK=$hG@!W*()DF(FzNl9u(S`y>iRr3)?G~{j6Lrv(26eu;dfw##O%lyI2OV z)*g3r69~EX%3*4--n*j$QfJvKpRMAzY<}1)A3IKL6+Mzi8GGf#sj@I04Dc%jJg`@` zaL}sK&}dTj%F$WS&T-JZCeV5sv>zw2LW-*joF9B#L&6yWs%6YWB)y z{R7-V`kui7()c}z6HR#av~e44z}uG~t?5v%7MP3CEyddT9$3ofHzZQ~Z;4OxEfUHdsr^zvl%1aw z8su~0S=wB8y}j|8S;OA1@M6OI2cM1#KcY_^Ov6?FmkMiAJR4R^^K#1iuIcDv-1t_K z9dv1n*3Gte&sm}rqoRr>s+a-cz&4DseRvsGzNxE)89X!shgQu2jMVXH42=FT!?8t( zW3_gb;Mib^kK}-E1YI#xnLfC22n-17N-vwIM>^I5S_E-9#%cxu{9b6HTba$Ty;D`` zr;+-P7y zG+@glGe_}NZ{7YUQfo@1zs#N}&LC1p^UacHbAq2AQ?ZTbYaO^QVrX#YIjgh_&GVd% z*V;T4`*MnBHceLfUl;N|M!SuXRu47kBvy;{$sdVpQOl@{RD!6H+A#!l=wevGL2s(| z=MsXKiY|vTLU?GpWJ84_Km5V?GJh?K)SV*Sb>M<3tE)!+{xYUU&^}2vl z+}y>bY&h*oaTq~gnfj=nOQ3l}iS0$N?X-$+R{5)u1*Is#%-L~gv&1Ucu|;wyC-ilC z?MBecT8|d7lz_$@5CC63N813u$PVWPFmL!;n{jQ)O3_Oshp(dzetdIyKhCf`ejAS;LPzOh9tkaiAr3?{7u&>>?oD6bO4Pd5PLmRGV^3hNy&FiXkh~bsVX@O*16>*FQ}oabhoY9 zu19LyQdVOYJ;laHTXa@7>y={Z9DrU;=IGFtY%X*Zy1uv_@)3V#axEcHR+D`MQm<(| zM2v~PK&14e2VEfA7Yr2N!NyB_QH~%1<#`Ze6F3e7MOyTKYe1ZH)~Ny_fI`WTNAXLM z7Y|!$2joVT&e_X3n}EWQYo9hXf#${?lshQ7_Af!PRQ^pEk9~NH8mZPl-fA)*m(0e&7{B*kT z$w6V`;fE;STIK&q`Ghwh1avJgTIofVA<>-|XW6$4d9gu^Dk2lF$%`}X+p)a(w_a?| zPXtpptXOOdS_}cn`smw-3s(~QoXukp>l7lkJrJxH3sDUP$`IQEXg>&A(uT2u(G{&r zV1kQnkW5B>%(hemezO&7$&388!|y&CGoTKgmzX~(XGk}454-Vy6SggPi-Ghk5Xp<$ ziE(6P%G?QA8{^~VB)p#)JSTrj$6=_YL-f6igsvvHw-a5a?~HxZEqMBHS>Y(vLV>&m zBVXCEen0IKQabnjXxD!u#`oslj^hx89ICYk%IZAHP9X`|~%oyRMHuePH(f z{3F~l_)`I%6!2hweujfKBMps7sr~r^s-~gc;-H<@1lsimZ79$_16rZ|d9j0h5!JHx z=jREE+n;YCxVAsd)!4A~yNkUM2{= zhgLGKntc_l*yZHT|3Z8DGTW~o)hVXr0NnS8PE_Il5!l$t0-!AsA^!{Yzn4C+0GvwD z5ppYiCv@lXpAKeChq&+Nu}JlD9IE40i-yJ9}npFdcmB%z_4qCAera z^yxtth8cavv1?kR&hEUmI@@#~oiTGPEe!P{gDNFSVGOJ2hl9EkP=65Au5FC!J&@W) z^~K2@NdA~{<`sXdBf%>>)uD*pH+8; z>Y9~(ZH-kD02q)6HbxAeHOKxYkmXc;d<7e8h@z9;Z_6d zJ3j4Y$%@Am@na2O?Jt<&R_!ew4q3HdXMP&1-g=T_ z)ehJ4C5+5V7^T<2svQiLMdqChtXRBXBYl*4p2)lwip)D(EFo6C#|#sTlixfZ3^=jp z*Vr?2AHk|qS+5E>(ss^_t88bBZ0+&p&@%fUK99D(zKD?6PJQ)_mQ5Xi8OGg)DOaG4 zmoLm_h>juD(}238pl&UwezXP&YmB=*d9rkR=i-6r-!haAk-e$1ld62OrC7BoBH(}J z1v2{l!GU5I^q0=ukPiBjvJMxcxo4a9ngsnF4I_p@e~V6p;F%M}&1vF{<26`HB(g3z z>1*fPC$8pj*$>Gx*(C?O3F7;Nh+m8v&`XHdZUN#2l`w=~qzTzP3iuPH@k>eA2QqxA8 zAhum=U$+CvgWIotUFVU<*-5t*oOD}}>A(f>oum9Lgi>F1V2+~2Hr|0Z4I$ToIeaHR zuz4!lZLIbkKS(BM%AUeHj37E5=m~Gju#KZ=qfBj_8??dBY63^zSf{+Q6O1{^G0&#Y z9e3wZaN^$19eYcTrOS-1@4e19z3L)wT@(6&#w+=|RBO%=QYfKi-DMKfS2g?dpFY3k}R!Yy9F5sD~3g`TN}x zbGE8V`c^U1p{C#@ykEfILF)&!I|Z%O;s?FE@h90a-ft`W4j{6*(!Z#^ws53O7=ZtR z+h)0W>W9KYPAm=SFMy|NE~LpHkAXBq43E%2j0hrz1tXm_L0P}hzeXjmpBBy{Tz-$T zoXikT10J3*@6sM8x>^W`ztK`FX3y^02{~mpVqz&dxKDP;mv1bO$k&QA_5)<)=R)@ ztX9X7QDc!&oUHdA9Fdk$3fDD3bR&-U)z901g0ywNl2t z{_tzUTg$ME0Zjd-rAY1Rn3o%dnvJ>X%9ksya*axer)gMVvc(f7ZWr@{kZQQDr36%6 z&|tz_j3l~E)GFnLv%>n(SB7aq6||py0DUs^K>T_Fh$p-$z-bVipA=W2aba4(wpjV|*!C3w!6?SHFTwaVBjx2Ovm@ptn{jt@W;5)>NnFu+Lvl4! z%L)BRoebr)zDDz%{131$`5*XnNPc`Wda00nRFp0Co}d+XUv&Zgyxu^80ITh^SiE9d zlgmM4@rk$7`t<*lF*WIrc32HDtcpUcVqjIIZFO5=RcO6sU2M1$bnN=jg&2ymBuSA2 z`ny=m_|2$Gim zRetZ+`Dy2%j~ULFvpCf|+8H5Bc7wkS~z_CrEb3dtXgenZ$Ns9TY!_XZ+~- zC<<9?Zu%Vb)|&9z@q(hxK`&0;aKHL*rzKwl{(V|!;@%ygobamn9AylD6K!=DHAb=> zNJZx~9hGxjrPHj^wqd1_RO+cpUF2QJAsO1z<3Q1Bv6S${%q)AC9=b+5P=9aLUu1Oj zCgPR)A1c8|Fi|6QSG##LY$&wMN@8beb<*cvVELJ3y_uankNZ!uw5&7>E%PUeeMQTxxtO*#T@Jyr7;ATjbqQD}yfHuaV-!>xGp*M|HeXm7dT@D)=7KrJ|?egJ$ygWbXZ4jn{kI_mP;; z0p|MX<((y3@J4(@G3=kfr~^i0g^S*|TNhK&B%OBwgqKs`Y87C(qkZ{7wqALGE+@D{?33kqnUm$w$j>Ky z#B6%w92z73zsx6Gbdso!@Y+Z|;cu!mgMxg*Qo5x#m*wXZz7kO$mKzzA!^MspY>B3T z{zMvhPz^k&zWBu-ifZ-V&S{8@ zG?Tfwdltk;9mMx{&4nm&nebjmeZL2YdHIAVJJ9oY6ml+~@H>JLAi9eKJ0%b7qbCaN z*?@fxu#*2Q*36Hg%oy@@^Qm1@`7GNjaWBU{cpDx%)VvLdk3Y{Ryyk1UZ53Yym(T1D zm;WdEgolw&cq&c&A-leOE?$ryV$ExiA&o888{$=*6($CKUWp1rOWKx_1&< zYq|fkyRtc*YcPFfGmb_rG&$D6S7?#>U_l=TFzk`KYmL3U4s=#~=Ls713F)0kCg0%k zBsw7BRB{+MqXdF}_k?#Iv#Y3^A#=PIDdOM2HsQ4haBjG`y}Dm0OB2$#(*Gz@cMuq* z6^ouCR;l+Z^sAXr=^x$3ACz?gbIoZCY0VL=IrYPCh>`g!XS*_TDj42g>CX$!1lMdz zM|I&c20=o3nq=j4T?q4Eu^VhnHyZZE6>M9O0c=*YoDElK^^X@%fYliJ%@>ERK zMS|Ivb99Eq(I`OcLs&?iG_*PbsB?f;NddGpJDS_jgjjunq;*)m52S>5EuR&@L!W}B zdkL$%AX+-63bo~*6;fOB?kN5IxKK3%t%?AQp*0mqdk1L6qfpB)9*J}#7gy4Q(gCCF znD8RmwT__HzG{CsRq_XkIhc4&p-gc6tF&#=q~lKG*O}Nv#~oj#D^3`Nw)_fIMp}3r zPEhv@uOFBUrE1~7%tu*<#%ZCKgmTn$A^&T3*}0VMr?LxFmQ2=u3K-SIqKchx51VrZ zO)AoH5`)EPeNj`!sCNRjO8;;|PswJuT~+Cik^0AZt*JH0KM)f~i^|me#xC~a7G4bY zFZ)GtM0&b4D{oey=aamaOdqAtt5JnwN)E&1x1J$-bp-V2dsqoZ719V|42{LNSrDr) zCl&XAHVr3KvvCjqP%n_yJ>q z%t0Zi4$?I;gHzGBH8ki7uTZij?FB)B=k8}gfh|+fJCETQ(6oftHoN)ZG=GemKbGcG z(f#3B*q!lP15<=Z_M+6ODz&dXv3XNaIe|EriaO+Q%VXJIG@Z4Zc+Zv}<9qTy($GMg z2aDK8PEaeiF!Gu~uZg;(jZ|c}`87v`W$&TvB`Vt}uP*oB;7IIDv{kbzom zvE_fd#Jmf^Y6b%56?LM1*z_1F>vI+-(m+P{3_k!7mQ?2By|UFvNDlZ+d~@XVw;NH9!oF6KWK9nO=C@cMz_ zRF}XEeMC8-j&Vc(N5mByn0cBunaMV}nKZExkxfLejk@F}Q>%V?0{ zm2nyUCZKY-e`M!}mnSbK=e}_x_L3#`%-ewOZhknfD024(^!w90HiOh2-%kM&%z~Pg zf7R&ybvDg4X4=j7$+ER(?$;q$L3)(7BZUaByk~xNbeZ~Ckcd&p6DWDLPg*#G#?g+qqVra@56sgsL=u~tlPuzYXQagYribug& zynycB(@*gzT_`~Dsci(rk1m94mhcesP;v0;LxnHf6w26CGB+{Zdv)4cizQ9Y#N5f2 z(*em2##aGi=@4H{Bt(*3SyWPZNC{6tq(yH!aHB(Xu*SoDjFH-JAQH3fco9jS;=gbU zY)QbTvnDz=g?P&Kn3m6tTLwpCyG*uj(-X5h(NdmNRJUS5w+e*!>oqy9)UBsC&a9(t zpxuzpvl;Kz4f*TciUr;J^s+zi)=)Bt(Ph`IalP^cJ%h{Klb|=x0y?4WTchbl!^0NT z@12LlXB`~PQj_qu=hFp8kBXsm?SX{8a&sG-m@8Ip#eN!;F4mV~N2=IyuGr45nBb7F zonnI_H1}yyY=DaG>x!AYihF{S@E!__H4fzXnTi!t4E>)Ml~(^vUUb!qcW~UZ|KY_T zd+|IkI_kyC_Tt#^#WY^*q!$m`i}LWr)x6kIFMNB^C44c47u)N_1@|rYJ{;BBn!+?~h3pjQ4!}7e@+fxa7;UTY2h(Qm-U^OG`RGiLWuv8et z41=R-Ah3XF=P669!+b3@$p6eICHVFoi{E%ra~4FCZu@1m@Li?Sfz@S>Rs!xnv6^GT zn$J-4V$~eu$h{2}E7&IlQ3%eRn~6dwMf*crz%wX!*gsVr-RX6V1&)&2Qc~}z(^qxc3;!PB0TKJEqgBSo&!v6EmxL;!1Lqti0Fc4 zCARMC?h&F3I-3MGG7*$A6E1P%zV^_fW)BJWZ>BvoHD2VdW6}a4)3FGtNUiw+OFa)% zBej><__4`;0?ClYaM!cW7#dz3O(wkk!-gl)@DpnIUQ>`V$D7bp`k>F$976Aggw+RF z^>qxd!}}nr&s6nMRJYSjzXUq$h)Rw>pv(4YY!PVBxid@%(Ez8L2B6fQj#6v6w@bar z^hKwe24pF<3bYu}Sb}EzRiN3rC#bi}g40bg>j8?Eh71k2fTE?-k5aT!`^nm|Brxsd z?L(&<^)yP6+V@OzvXCn(e%D7DYhH!%R7kJm=Q>sE7Ubstg{E0|v0Lj3YMOm6m8zwM z&NR(mr2gdWY64YjI8rl>(9J5w1}ha^C!EYx5UD+br>W>y_Qdt{V4h^DTKnuPRqJI6 zNY&axK*&3{zxt2HjQ+C6eiQhtNYlv78s$GMi6ZnBek9o_Pu{2stH+?$w)%72N&VCmu+`9 znr%Z5b+iRyp5nAeK{$(doMGGTLV%Kaf(L8Ue4TT@6sK`-gA>l1>ey7;f* zrws++NaRgf%OH-_!mqg0rfDc?dRS!tDs0sDKWaQ_%4l za7V&Bji0Rr^yGxsibALmJUyJJo9OBAg!dEruY1~;r_J=VEa80=KHZh48xW0+-4b3R zd|J%YKlF4Y`BeD+J>L`FBfMwP6IXtLRG0q4lU%~!K_+sXVvRi#-duJ<-wF`Dp2hc% z4bTZ0KzBMox9~(1k4OVY=nceQv>X+_36Ku~V#oYa(HU?fv&9bPt;WI^ zC`}c+NNI}HehT?g(erqbyE;|*-B%pS<5UH8*rX~gcNuNzM5}Z;9V`|qO3RJmj{nZV zB)9J*{mwg+Dli3vxgM7kE?scv!byE~DDQwD%0kSq?j^_Ewp+udljn{Gjq;HrIp%i) zd$%P<*-e?HTJsp9a;XJz?*N_@Hj@={5Eayd`upBYm;kT)(rs}jj@X@i>WSQwd(P>t zpvsc`{KO;g0~hD?9v$<$4?jfb%t%jsK^sf&4gHmom~|MJ_-{IOJPM@{S9LnMH$#aL z2BNPWcZg;7-YfrZ-PR^A&+28>tNcs4C{7G`csyBVaXw#=pYnSR?4I>WGnag88D7u#+>dFsl7-PH^=v>duNq9I4C#7bm7;s#*jX@iW)GZ$lYvmtCO&;yJhcxUGc6sC41SRk+@Zw=*SAugsku z!-Tc+8DVVh^d-qY6YMAox?*RPzo)x0nR;3~kX?zW!DL*gSOZp3+9`ft&DDDyH}EgZ zr(VkP6g1)OPKz|MYE%9-@u_cMMv?!nZ&9;H)yhJnW${!8aq0R1BJIeh-k|CZY46LZ zLA)vt;tYd028a&;vGEeSqjwudta+sNE`ev%f+O{QaYxtCR6&`tfsFFb%RY(U<&nGR z5tLJ{c68h?x&sd@r_3W^%ZBDU3rLsu6oQ5j3|W$j_OiDBjc%2oZD!af5O$EQejyNaE}rd9FL+~NB*R_+BH@T+ivmblNHy;B(+8#Wfp&_k0IQvaxf(D zSHR#F%)gWc7>dk?uM*w_KKFqZ+@}fuj@%s%m@V%j_o{T$P#=ZrE?ey&R$*@+dxYuI z8`_nZ;qycFE6!CbzV`!aQ|85I`W5FQEZ<8oIWsSw*RObad+kfB4ZWn$>q5aE4!zw$ zY}USD#@NA032!Ixs}X+ker8TnoY=FV8r@4kJf+R_#FV2QeWIHS{rf~LHkZ!dOK`L;H7^2J4`1fL%lYHB6b}T?l?7;l zO4i}ZY?d6)nSAY@YWPvzwMVuIQh{|b^=3AZl*%WN289)x5;2~ZnX1Ccfv{Co>ayEk z$k%az+p%fsl*-&IQa2Wr;(7Xu#@3Iwnba<;tW!KfUE8#iGIPrZ8XsGNLc~Z_mt20F zP5%ny-j0F8x}r_vv6+lOyHQt{fm=qP7&n6Z7m^Vu<{uREFKWrO!>=VON9wjRCwH1b z8j9>EM@E;XqI)qcBH1)BRN(;Y7woF2u*N_5$>20}SHHS;$xh?5sxQM{A07HT8@gHQ zr+Jj#=PCJr&>P+o|8CEVTwS%=|0Vg>NR3eq1HUwRHK}p9|C}lxsLIzgg+Gy>i}mwO z`#G4OYxqgshGq7oFHgPUP^U>S{7_3ab6u1>zwdU1eEDn4NMTo6mW7K^)y zXsI{+Xk8yQ2r$jQk2D0O-t!ZTVuqcB<;IV+PF(<2Rj;E*I zkFBUe{KYGDu$kVtnfJbXtOsu5)$ky>;W#((ZsbQ**Zm`Pru#XMNaJPPr`oHi*<)_V zfY0O#`|W!tvkGNN#3NY_1IfB6UmHHyQg|>uEF;!f`&EDuko$E zx4zA8y`c5-n${*I-l8}DI<~-5I~vS@sIs*vsj2qH+n9s9crt?xWwu}fgFWc~jE)l{!8(<}4$WSpcnj3f|V zn!NH%ajWzYF^J>UBUi5$%NO>NHiyVd4= zCQC$xhFWvJ!3^w+lXK4wxDNuZvS(OTSv`*e8Gn`0^%gx2*f(>ABBf(Ni)}L4nhuM# zVJ;S+?n1Cmv)4}6g!ff19tBYc?tD6apFd%*z)xTdb_iNZn!#|fh71OC9tFq1VlziI zVX;Z@LmrEniSjliLNFy8uI9Tn<2Wl7eI5F%|8--nl=lKMSh@oKU&svSabFc**ioUh zJ=BHMlwHxLjy5q6iYKqbMrYkWMT218pTn#R#8YcbIB9Bi;c+OQ9<%apdHoVrXMbT& zv~P{nKFX8y+%Od_`WYH1(=ru3lVTD>$7`zj(am?#C}D%dr*c^EYFoX^)f=2sMRWR- zQ$HRI1pBX8Y0F5x zT@25QUJYOTOg_=By|R_^Lwi8C`shpFH_>$~^b|b=A??QQzc51t>eWMhO?Zt=rH)+~ zxv55jrhX;KmtBrXE9}dX@9-UPPln(GBLFwtz}*G7-34x6z&*dMzJ2dJbeDvc##+f; z_(Zn`h0)acR3)3)2zf)ok^`*dI+)9qJcyESspJn1X6LZvj#hFRCE48oa~nz~RB}Eg z=>}N;%G`HE_?}`3@4m3`*Si%po2SBmcVL%?CFfbm@qB96mhfJtCWSMsf}8}MKThRObHMKm3*VS7T*em|6yR4;_%IbNc7?};g-=ZvZW|Up zhQfnYxV0->9v0p|UHB`8*FoNs!u?eEV;TbIZNkEvQ#j$hL`lrOd@G{l0Ey_hEBOt} zlB33I$`Jn^mRyAnSFVyZuH@{n$im^ueFi~g(Yh#xt~h5 zb|udVOP*{cw+TxgOUZpz@)uiNy+gv1eXQg+jH+wB7bW*r$)&DjdrE5L;@*~&q;Jeu z3cKz%r|@nn{4ZCy5z+4oe@YoEd_!3H9ai#PRd_0eFYk!L^FAMF7bz@|X)+%Sq zD4E$tE8K5F_RXN8qKyBu`2Qz)LQ7cWxaW&iMOI@BIH0f8Tlxfzp!xTYuk&TZ!p{yMD)O_{`E2m?qB7OfICHwdD+6uqx84AMw4>562|&~6EN z6W$7x*S2b9q496=?GEBcp9T=2i~N1Rs(JwNaR>3XJcuuK62!}aSPaDf#^2Y|HFUe6 zWcmAU;CJBfvwL#Q-?s-3bNqb=3PD52`TNSO?IPOVi?)$X-|wLUUXl%b!n=b{77a|f z`a~L>kCi2PV9USk@2k{R!E9a4-*@1@|KP`8@b}?wZ<+0Huba%rDC78)jsEIE%t}Ar{&o4{OBFqvOf45f{j=O->~oDhUdQdnj0$ouk;h6 zEJ;0UZr9l%{pKw0IGs=>!&A0JF9PA*UZh5Gq_etd$@mz`JpunEyit4>gIvOU7(Va6 zE1YsyXW<&%lD&smna$V(Bcw8G+hUHzalin;xdxzP2;ejT3=n|JE%#@xJ>cVVoT{ZA zt_GiS+#$?*$Tcc*%j>$lptQpky99Q;4)bGbt#c`6>1}Sr#~yP$2sefCLE!E)T22|?X$;kw(*y8BO1h*)>mZAS(Wb$6>aj8@JvMzt73gy0M{ zuH7z`eKDof>{H45*j`Ix*GiVRHgalmN^#1boi@>ZUSY=l7ia-2zE(}!T9Qeh5iQHt&Mv9(Dw*Hy`C3%%zh2-(w6XY&wlH|tfFt++ zhL~R2p0k0%^d{Nx3&rd}aLb%rKZp>x<{dSf>7gt>(0~^AHlX5H*ZuAQog|?B0-(VW zY8(UJ&crR~Y#YWj#mdPO?-lcmWQg3EY`x~p7C%a~$NxPfxl*;(g)J;bocL;?^)BoS z%nX!?>ZyMV!XyXo)EcdI8Cf0NmDw_w9gt z(!iAn+)+gK_={9}R7}1x+?9v89Pm}0CJ1jo`tjzH8U?M`zR;lVh`=-`LEMvWI6=Id z_2gZ+psh9Cfu>(n(^py3X^C+aT2KMYTu)#Jfe!+^iizsLE(2h~n-qeb&y;ytV0!{K z73~<{)F)URkTu13N`A$QZ?T#K!kX7o^HtUSxua;|eY>NH@M?GY%n))zAYh20=v(bq z6V|0u#VEQYgsW(yG(ai5vq`b8tlC?ML>R!8eP@W7%dEP&0lj}PA|xJiQ~aIHBx%Yu z#aAO+R)?{w%<8Im^(un)lgWj~gsZeN?aBU^nXv*y!EuF&Z6%uK{!2KB`!D$vfg5^S zFLbMV-J9BGG<9`q^(W3oc@n`lQddD0;oKmT2*T+^aI6_$P2Y0DY)_%pUBH<@+jZc) zPJy<<+0H$1&;Xo?F(1k31TnVUW~3B{1!8Q~pGe&ZJ7W-`Pw$ENyYtfmYaid zA!Kc>gzH(-7|peCBj;cEbRGR}Yw~5Q*$pk}X#Prg5acrUtR%9>R==`JUk6~9vi@-e zy1857Or~^jt%GHy?m0+uN|6PY~Gwxt4_TlIcjX?1RY`R7e^oy2=OkcDMH`3?|* z)o`36?ahdsNGFhfi?l3x24mmbp*;f>KkbHKUE-G-Aol1IMvig)eOvd0u1(dJwaVXF zTjvw1N34t1#=Yt8>12Smj)km-S zR#a(~if#hk$fpFf;ezJd5>dPlPh)*!EyWHCh<{Wiw@o2Lp?GNre#VRE!^Fft^2uwy zy|N{FDFD)VlI?C*q@uL~hNr;nu8oI8QXKhe%lF*?pV{E@bA?8v?V|7Br0MWeLPCm>3Rp?|_R$P>B#GP9tJi3g0jW!J6HBTFCfF(v z2?tOI&~$VX*55k1+;B3`;IHTTr;(eMibl5y#Whu0P=)D5m1?TotSUWK#rGacX$4uS z=;ksfId0Yya+~WkSbSm$Wy)EG+`Ij4L8|DIyzb{eWH|x!4A{Vd{`VH-^AhN{F*6sC zs>P2oLI}D*besZTntK1fc6dzIAV0xkem1=5cZ?nzhjy`umc zxM;TmA{)VL4BiLhPSlo)d$$pvnvUtb^Db?`r8XtyeQ&|Mvx(Vc*?CuIpJv%?>?xH= z6EW?bGh#LNPeo(mRVQXXRwmQs$@$o9-5#^1HsRd>Zb%}?{tj|#x@a?tpC*r3C;+P{ zONe+zSnzQQKC6P)t6P~zQ ziTbE0WkgLelmStX5;fx;zHCa=i%`rRQR@tlBkE;;N>n+6%VP<75O zG_`?98TLO;&LeM59$BF$@xN4EN!5h65Nfc7LJ@B>SY5-b?Eegaa-pr zaxuSpYQ97h7NZM4ERsj!~feF@J0z)E1A;Z=vhChfkk5DABWS8TC z8p8E2HT`HH3!c-DENE17Cf#8I(RQKL;EWlBUvgktQ$nT7Y=E(JXlaZ7+*~LwPWCQy zx{}fZrFEjdAxc-Y^is? z&^Ezf)o=&U@=1-T*N|>&J6|L;SYBaR79?aRQAd+0O~@&Xl3r3s1Q>rV*z9+EIa$SH*DIF&P(kQVIKNX$_55tE&ZlV3CK0?o4w6(d8^uNYg0 z+@2t}y^wR41~r{DfO_dSmIv0RmeM!ide%3PS)y2SPW|LX0(DT|vdM56EwO8Z46n04 z+g&Xc$wUc%U^_H29GfP?&_5-^E|~W-WVq~rf@IK~Dzorx{u^gC(gAVS2mSIn>k~M@ zA-5aI^%ioc6)@?^ckp2{i>thD3BW(%v`mv+)Y);Rx@>G3e2&Oo|73^ygTR#dW^d*I=0*-5FR!EFNu; z){g6pvcR4sZDwRxqrXV7g~L}aMf#9b^mGlMTjAC^MfwY6k@bJjjs_+3W$r(w6$LFP zydRn1hpMA{VLD7jcQHiLS~Q|$a#%7!$qJQhLCJiQfO~X{fEhCJa<;e>RHE&g4bz`D zL#jw6hq<#=XGxVUHR#WVgD&m3Oq(o;g`TW@Zv1uwM;pJlp_uE|_8@zdkewovV9qik z;})4n@Co2)tn!;B4mN%0poL1IBv$6+Ft08F+gF?i2D^1tx~GY~B-LKt147GlnZ*bT&N-VaIdmj-Tps98tuhgCBp zUdsZ$krCHAQe%Y|C)e~%&vw>?^sx5{(d>~%^CJe^p}8w))(g#R6?&aB>65n-tH9)M>*N4zn!U8u4+Cf0e=lEc48E8s*@gz-Cx52LCs|kS_$dj}Xz;S*z zKO09e)E^?w8V^SZyk&AN5CR{!5{-)YH$X$%$Kufg^)>FD7JzAuLeGG)7&LZHMX%5Z z%FOk5lR}G=8%&F0f%w`EEng{(9!c6#4C+Ud|1QV}ds(AdOWqB%i4~JEf2SFCV|BkB zvETXKhh;jo47i{&E&a zr|*w{MmoqQF%)u-M2whG!^9ayMI>^MifD#hBATJ&IOGz!=broJ8^%49Q@WB% z^rd`7XAH_cm(2hDS^IgObD2|L-{0@|`v3pEUY&WKXYak%+H0@9_S$Rhi(Vr47$EDH z?`!Oid#h1E0;7IuqxT~9%jM#n`sEzIU!HNWjlNZKW3Z{zPrDJ=_@Q{deAO9 zU|31>J3{vb!zRLT0T^1$hg&wQx;zRs+bcq^x9%2<6PoUqqRD>zNtFuEv8~lPwij?- zM~M3+2CgsFfWNo)M;Y785#9cKDTYF)HIH_^cp}xWWz2ECco+avUI%`6HQ7EDu)C^C z+fk+FXfIa=XYTI^%G3m>*ZuM4F;&^7NhGP>%p`55u|Q zH&O*{PlM+5DOUgaEXHv&3MA|tOPs|-`P-UOA_`2DD_M-5yI<>Nzq|NdWheSyE&dT% zhsgou^pWyj$)4`W7@Cv!Dt0fq>%_PlseAg+eS-EassE>Slnq1Tj)u77MBI(iW@XIB z)lnWJSIdqvk*@*TfuI@KE7>nV%g&g}AzHEVX9Chjkj+EbCjk3Q!T!XD&0)1e+pF@EuD zv;B)Bzc|V{_BJ|A6MOe!9j05ifT8M=uOlsvWDl_C3v8uSa9$9Ao>{odWcL>nHZ#bh zLv4sC=tlU|sw#Ptu(49@T9o`)A$}84q4MAS#Y!u!EeTX~AZ(nha9*IJJ4)Vy07RCb z^Ce&0oOZ_xSLRJcWOcGVBIhqH!3GMKmW(zPInoz7bo0>k!o5NcLEg8h)*D2gjA(O# zF|gUtQc_QwK(UQhjl>cpgLi|?o%x?HgSDJsVKiu6iEaPPEG?;*StLp(+CostfBdX$)h%A0|9eiV4zSAit$X`Jz<&?B)0?&S+oERil0lqeXCC>Vq& z+?5KBLz2e6Esb1-0SkH^bq+2T){tHa?@3Lul98?6BZhIzQeqe|Xh2iXzd4HJc8LJ2 zcG0?>=SmNph&VeZw4|{xlM>aF3S>=GPcHOT_D74bkmS$i@+?ch7YiMIvCL<(SG70m z~B)>miXDJYFxUwW>Y)FrG6*-?oRJvc78F_JEAvDo_x~f^pfW2 zp1(s1vWsq`a2q?ZXO|{iDbWsJNmtH`C3M10!yja0W>W6kR&{TvO3ic0H+Mx=z6pLl zm^7{CC}m)4@O7O;M$%inAa|8*Ii~)eXG@S-_5-T)zX@MqbE6yWO0u(KG2d@E-$HKT|1`6)J|hn zjd9caN@TJZk(<2atY018>0=hJuC!`GS>oycI zD!KWsuCsW4h20Zu?e02_=OMszo4aRgts(;V3(UgFzE}~#+e3&;R~8ptEQmibk;*^2 zLB90EXhfMhHo`W9ICZb>!|ryA!D_(MQKbwp zZg;;bxf4|9{VZmh?SbS(*2CB!ieCiKl=m$1;_A2x!Fy1kyE)J` z>uP?|^%q&VSXg4BmdA)?DdNgHspPa&Y5L<`1GdSwIyD6M2;iO;xJ8=BGt-dn4K~UK zv(#Xz47#{cJKlAu(db`t$VhSd6wra__MiJVxs zE2j_ao-Wu2K7_2S9(*~r2{juH8t(t$7sG+4ks$k6$a)AF>+XKCKJY(2LwE{(sP+i! z0|TxP5=-|k+1?c zz>W*#f55{5I(I7YJ>Ys6TuzxRU@f{rvD0dO_i0AQ;GY#Rqm(muL9IyXz&vBzQ0@V5hLf4el@)Hz_1 zq`fu-_i__5wmsnHw-QM%BpjUE5Gc)KP?7VnJQ&d%Ymq?K*Ze5zLajJLBYxaF1F+oJ z$S>1fo=yb#)&jmOg=D~F%X*v&`a%UoUm!fL(9RUvMui5--H_)Mf{ygkxxU+*VvmQ# ze)zh$s8q$)r6K|0!HMk_3|}W(+n@SHK}r9{xE|JPA_EKcx(+NUubf{TXgpm7uHA&I zpGZu2Uw!|-)Ap~?QvykUJrF&U^x79pagBH#=}V=*;?%l8(@Td_f26_D^h0BDQ4i6y zo#dj-dlQ&W(skTY;;5`+U`y&VlKxSE&Lq8dK9c?sxR&Hd`hU>!JB37yfQU*Fai^q7 z`sIF;bi4P}Bt6vf8A(sC5ED(y)1sfy{H{i&06Rj!`Z!>JQ?D2A7%)kao(RFci*7qc z;EDvUfL<@D-^0%H&(`f%D{mq)f(C~pT66dhDr>ISEfI5Bq;kE+65Tf7)%K3OxP%8n z=pCNsA#}aY#&S~Av5wzhSzL4;#BqP|d<08d8a)mNXzIwhs1ibr=I^Z|?6cF~?QB&d zPf6WteB(?)7LYVYF9WEZ>QLLA_3yx4&%|^2^5UZNsHyA_#v}xIE@|o$CH31`aqAb2 zELbYoQ;xPgfnBseGm8Rt(VNz4VNV(65S<31l(#v*ZH$x?AmuVhY1|o@(DTZ7IX%TK z+{xHQ*g|W!i*BZ;)mFGMVMQRiZcJG2dddo<_t*3*+XX^UQh$~8l=ql=TrWx(0n|V4 z15$9`Uta&Hy~wPf0qX?_+$g|-j3aR0oL=&``v#MaL7=@=XvYezbpK*KnC^d9PZ{0+ zCa+HSfB20OO!qVSZx4vO0MS&gxpyITZ#BwefanTeY5U-^ZsAXu1 z7f}$1#-pj`pu9G(HvQnH)aSHZiZhp)5z*cP37irOw4E^&J*cjxFh?5 zJLRR35hu8NK3F#7E{e8@|Q7=5mZ1?LMpCLKEI+UUC!OE~>^A(={V$IpKBp zyAJTDxe)A~e>ea&WwE^%6(e=PZQ|^9)hHg#d>h@&w<>}AWQJxx+BsKJcZHDPGVN+J z;O(>L!514FkH>pY=HNJ6rd#efTPDQXL0rz2{8eh|5U(?r_z&7Iqi{8B`E8j(aK23{D>c&Zy$b^JlH_j-FuKYMF_Yo#i z>aK3LYTqF9G0L3uHhr_@Jo;GD?Ceu$OW#h9a`Wi%44sE;he&^H@=NWlri~jKq)75% zN(HlMg#tP4HuAued`v`kfC`Rxef|yJlF@_pF=sM;`qvWDoj}kX1iB9XoOVq*Ms}T& zy2-+3$H?Bu6Y{`}1SYOt2QldZB(NOBpOU+#fngtE7&ncy=*Lg!arHW}lImGx{q7-N zMHS@SqIQARr8bjKHwyWq|1K`-4{}82R#XH%WCBu|@($sbnJZIn{Q~HbX^7@BY>}?h z8Xq@KAPWf{CF_ontzsvm2gsVsHK&UuA`^J&UG_%Jxh%}6-4gWI3w<&==@BTBD`6)x zH0?^lU$B8n><0#x;I${u){o06*Bf6;KnP|M5Us1<>s-G7Z9lxE} z)U>I20Ah*RZq!I`x6{xzWDSnk)Igi~Z7{D8W4 zhl0qQBBf0I?QY%pD4pl)?$>SB{kj~dT^%3BalR|6@8T1cOa?hcSl@;getQpsCYcBKzSHzJvgnH*C{ z9Ji_!2O%b+-+z{un6Sj++D%A&pTw|OQw_^rY1$VC(6ldouVG(F87M)(I1CtYxD^%c>t+cR%tvP_y0?|rlKsx7A zn}j&Q7jJ}j(YMCG^O5S5*NI=pzq6sRN&LIW)~Odv8;C2pR{il~ z8y~#)D8>4xu$Z75F3HQc$WBVYeiAh@d8|FSV{*bK9!JXnrmwNRIh zUb;-cI0RHtX`oIuW=(L+VqXEt!LZm?>$h4=56!YA;$M}RB#tz*fomnlm>8aiHk9c+ zui_QcU!<(E&)2)p$~sdY>JQ~Z`uFv0tHk(Ic&XlbM+reNo8+*QCeBSf0?+(!>y*?l zEP)W+2UzxIEsN@Y<=GDL#L&4Mowly+*UELhDBe*nS6+Eb$3KE*tLZpfC6-vxG94~m zz{sANN~?M}TRGqG3lZXYx`T)+^E$yl&JNc}nI$(*=R-&GVBOj=nH|pfH=?LxGAr87 z(RNIhs5}OTdnJ}u)-Nj=|EiYr`5X>RIVIGwEth6EO=eH@QL|mvcp1(eMw4UooVKFR zYXB<*SwH16L1L&EwwJ}(3FY68B|+vMU6t=1wXU1^*i6qd?^^0r+fOl)QnxWw!4mwI zLv>@yeA(^3uXKnUmqXK!M+5gqNqrKzNO|Y0AJ|jFC&fj>x1~p%>UcI@GFN{EX>9w? z-`Y9CaI&#;Y!&;|f{mSq(RY=OW|}ZI+}T-`=(Dz+opt>;fG36GY&3t? z&}gP#Kev+@$G@?@lLvoY6J5KcKFx(Hnc=qaV_xM89Zrz|?_hdRzVqi=>J;?9&6S?l zk*msjoMmFN#2xZV9Dq+}P|75?$Kyn9!We)pBl`i2iUE|2e?nrGH@~Nk$Optm7tku! zn21&^)Oc7h?ERHd=Q`4@s&v9@#V42rHBv5e>+ccc;A&0VccA{r?QCZ6s&bxN-{jVA z{IQ{6A+@UQlO?#7lUZ9aNn$(O7h4_dfecMb|GJ49&-#vCOwajGh$<6p#J3ewfwv{J zx2m>fp5T_$k0p(zUim^hJP_Ka5!!})p#|R*@I9R+v*y$=gR8>hAcwd>f^@X7>+ z#Y#W>-_@}bFfIcDxr4F=dPSg))~sW1LPC(*_?@^Qxv%oWfNxv9UtDyM`1X{wY2*v| z=zAioc(f~)m!lOhT!Jl(i+F8(7OrE=UbfSw?cCt>FX~V2fn4O*&OYFYr9Rd4*a}NmO|LB)Zc)g7>^J_i{(d^pmV{|R9*}%-q z;hn0QIFec(E5eTmu82H|m^)zmN4pGIl{a3jq(7`mr*zs~&UlfeA^t=XQr^OM35H9K&J_2`Ji!h6 z-OKH65WknT}`;c+L>`c4rEO*RU^@GwFaH?_UVM#FHEL!9MoDG1CY1BB6oUxrt z!(Ej0s&iD!WOVtYznH@p`ZxF3;Fql7Ch-{>&mH4?5-!qHaZq%h$@66%%E*Ge23 zCR|Ix#Y))E5_S(0Mv*W`2?|ScUM&gEP&uB2c}n;W_N2T&kV7S4-ln{RNL!|~M#I0v zPfK|_kg!AvasqK*Uzo5V3GXXmvL!qbCj7|g_?!~%Hc&T{;0B&gNa!rVueXFt!h|Iv!8jB&B&) z=ntCN6{;ZNCMBRZDfI6!p)(2Nm7sYl`!&Oa5)#f*!b^tcX%hY_QkGxl78gxb!o8Mo zD+zyC!lxvhsD$w(pp|CO>+$)#Mh4>bVYcVVc7n29MczH8>~r##QQyHI&?nl8hU)KLEc64dnNC z=&Si+W7|fein&fneQTpH7{3}tJ?lR{B$<)Cl=;ac?+e0A9ow+cGwS*!b&px5?j#gg z;EPGyJ%-(>HQjj@s=N(4O}q;@bvH?O`}=@htf-3=tBjVZ{>6%Sb{eVo0xJ^p7b+gr z#+DC zUpQTIYgce&>6P#%A|m+zE;jEvyh(R|9_kc<`-TgR8b8XpC{Zr3y!#P{(0o1MSYFTw z_dY?RrB#Wqvw}vP(!m*q+`MK%qr0iUsOo8fp53#9Mz-`G!Fy2T0X?aY!n>1uPXX;Eg`EP|VIM>2f@rg0^xaigMwG+|kiR>+Si9euN8C$bPy z@Nvh$NI(7dCYLj_JabbRhCMwKT?>{b4&JC;V?;^hb?H6sFGZA^fJ8*;8~(V6(mM)k zxrox$d{nlWizwZBEh&CPsh2nd%S&x!zh%CV4+QyBAV;1mWdOvzgXk8F*Vxf3sC7ky ze!+P#DAG6n(;`aIKu`i1!EZKCy*JVupjBmyYR<$1*`{~dteO*pc+$Z_o{Uyq4?VKj zKcax*Nfqtk&}G-@Yvg_jP%=8_hWvQa*JOsm`=x>6-ks3a@SHeyc2(J`8ZND2IRLS% zkpZrS4$i*}D!7LExFUy;0J>8ZW^=KtAuVuS=5X!jaCH%`=fM^C_DZpabQH2uE!T%r1U)*Bk&_{OTq>{muAQe~VyEA%azI z(&inxE2u1j#hGt|IFObo)~KbuxwtTX$)c{aT;yuGi(IYngI8U|+H$+KvcIh1^ZoiN zL~@LVu(;R9s#nbKXS8X`J8T99&ert#r5lr8)?vwP33gijrn8zN@|R#Fqw^n-3?W<_ zsZyMO>cABlxMvZSB?fL4y6hH#yFuW%?hgm>{ztScxvpb`InK6Y$wcX%?PI~!V|Ee~ zXGSn1^{<;Rl^?ahAe4xSsn5a|{%A&uQXC!RdQ<2Ye^L90akCFeyrGNF=Up*~hEmT*`{3hU^ssp#5WK{vHs%T)9%bGIKiODuF#(W!p+a4MRZp#Z0xmV_zH zUx^D7?)WdI>2b|r_3H*wI)5_CoIrKRvti`_=v*Ns*R10ti8q#3y}K$_HccXQ&zsfz zSC*FCGp&9>P1NMOvi;%lt*7-)mb2l93l*cRGDAH!M|VWd>=Kq43KN)_Y3shjaCqaN zc;DoopJSDj?klOAVltDvIP;sCVuF*Y^Oc?_q4-;7fh^DIxrEPeQquWc+SpSjy2L`5 zYRUvo&msfc!tG)KrdXEb-}dqvCI6tTT0E&LC%i!*g~!=``e6Be;HNLV{65c5zbidR zH;{&sUpWcC%Y-bspY0ZCj>i=;Asu6K9=KkvH(B2VSzl&P1L?ZkcR=b#ZwQHHUS~kN zC71FhKVS+%|8xPN*8yvwoRTH-YxlnFM3b-4`{_jfjJKtLoyb@D*+cKAiM+*@ z_4`raFI4>j zbevp)=f>6n)3OBKDf-$5q;Fb!5Yt|tU-eGlw?oXAo4}vRZl+5m@K>wG+@lNVK;T>W z`a^+VgupK?An>>w8DB;$$`bgs>-aa<{f|1n_AT+w3H%p+_P?*=@3Es2ovd6<>Hk-C z{2|kQf&a-9X1Nk}!sV6~gKclGkr%b6%&l3zidmuEV_C0nnMlC}yaxAJ9*w>tQt-#K zn&+)4QZU!}rkdNGcGp1*cG{AwGEsv2-^6O?#L?ZKH9&rpASjpcIvQ0LC0HrN9`Eoy z#A%-(_gJ>l>gV$iXtN&9gtfBzSDJnSDY1cL#BOE)RW3N-mYDWt?L!%OgPzgO+9X%q zFfz4=+Pwa&0c&GQx&iChH}sV0zYJJ+QsJQgDz+1-gZ}2)%|DItEcpu$ zvOg&~%9tWuyG-GXJljrlq3Xoy7CWfrK`dpWC=X(1{>pPGkD~UG z%A=^s_z?c)?%M8e$2Nt2!uFcFe|IgczhZhhnOVAhf;@#^AaS3Y?CtzQanS-z5_;1p zoYxg5v?JjwC3GXf_`?2|F!cvU&Civ(NhbBWF!g;>KUC^ZFoFF~VZzHKyr6`|mT&?I z%Z!ZsNZ3VPKx|8SJ;Q`J3FS(7k_4ZO9m3RMq?Rc)kx5-IOsyuhi&95qQgtY+L%AoZ z8!NSsp?hbfg|f$H}n!KsF8Ncc<%k6Oa6VZwPN{G^0iGVmf{YClp}D0NgObp;LT zfOaEwnNkO2Qr`_zw;*+fQui~I4J3SHZS>dF;-YqVOzgM^zk;`u+GwduNqtGhiZVbi z4O8DFwLz)>CNpN3UwlxQ;a)O4uMBUH!B6c$>Q@GQ9H~Q;dVeN$+c5QXQcqN>Q<-SR zlvf<49!Ba3q&A)HgZ+y3{ldWRM$)=U>cf8Z@ayJ$ZLP2Sr@WWKuSI-aM_&Q{6JyTf zh;h>f?5E)QF`iT2b>v+NTt+F=Ck!`ly-7!nd#{ipHBg>=zc9lv{`I_(^KU!d3o7hh z39qe?B_oS&#Dn$EyZ>zFV2F~sCs`@hIEkOERn?itHTdJ7Xb+^^O&tH<`r~`OD8094 zfBbHE?LvQi>Lu~Mpg;bEN3!zW*447*+Aqiq+B;w45B_hA z_=eL#8~1K`%DLtb;FI{1=bC@4G0Qc-QN2v7wYlaC`Qw*9C)75%(E9Z)MM5%iJk+@kx0_P*enM>632%FZ}Tr3ybfMfBsdgS_*Q!Qul(`%;*WpYn%8@6Q&5>de%s#7^x$Q&GVj@` zn(wcYf4(B|FZ0jioUh^(4)&Ee*Zfbhcr_b&PiMp8=^xonkmo2w%YUe7O)`2<5VZM) z&v5#wSBwo)=ocyPcz%fo@-+Dg_VfP(Rq%6bWs8n{SSn|JdfIz`>V|gP1X1IPj&U~Av-vNwsBCmFsQR= z=J$=D5}>XY)YE_}$VI&yv`>M5mqS={^llXgonjB4yljdoq`1h4mCHB(r7ON`zq2_Sqb@!E2uOJVXdi zN!A5--fbo3g@Sh*63WP$4{ojlj<@KY_{k>dlzM_lf72bTn^q0tl__3h#Qy!dY~<>) zp4H_=#PUPqNAqJWI@pT3_?v4_g5=7?H&qD^{H$h?GH1T+UzIqH_%d${?YqTv#|m3M z;?*gxVzPR3tDe<6mf&0B-3q4XqF})C-l`+(G~q_==&D5Jd?u46khVo-vT~gY-Tgf) zTxLHQ-^rMg^kHB9iJhTsHP!+HU$PcB3VKF?u;pcN|C5_`H4g9=C`WEXm|4) z2bUaf7r*sRyvHQ8W<540HGkB!PBT~isRAYSryx~T3GXH;)3|pnqQ`nAejV%UuzvSZ zB_4u=iexp%+-&!Zh*_oDvy;I)-WBX;1--D~5fnUtf=wgUBFt9@vTpxhbPtOwRI|(T zBgkekK#C1BIu$Ne%Ib<#de`LvZ%gX8M0CNh3Uv-?-y_i}?|yzAX^of?m0$>56@epE z%0R8m-&A$t8=Vf#0&YYfSFMhbou%zf@zdFt@ux^@X$K~vha#O&3qf>?P109$^c1pt zJSJXe(4!Q8j-wP8+$`;1y(E^b{wS6-!AYfGo~@5#=EK_fVrw?9yQ6$QtTV{ZY$M-n)xqITLm#G>cuxcZdAX#NFHhXd7fZWePw}3e zk)T-ok}l~{6U>s623$nfMLymINy-}+qMC&oPYTr?tbl1@?6d#POi>!yjyt&HAzX)o zwl~Tc*|tT-u|&6yyf&hyp)azGF5Au{D1$L}YgO?me~ z>8;|_d8?Z_(`sJ&mn9Ma+S2U+ywDXJX~nh=iw&jNgDS?I0ML{h3~9;mYI@`H{F6BI zJ1^4zQBJkD zE}zNvcWNg!xQx67{LMN4?^p`YH-`@k$E&xM!)NuyFz$-!GHaZ}Co|J?PivU(y}AKn z^Z%#$UjN5b={3*y4!kvMTK3W7WG+14dxb6?&I_ON^Q~>Z*YWnO0+*@4TIPF)*0-GR z?Xr!!oxlES?&raL@8$cEaoIy_neV-PCasV^-+S*I_2@`HNWrpPR>xa1Izk_F=6g3i zs-83eEJ?8Z{rTQ7ATi$?&L215J4G1Wd~ZEIX3h7u7J2@BZ@StiobPRJ$QRvLT=WRY z>F6`030VKiteo|){JtxRY|t-C{-bdy`Ax1{(|oV{Bjn1O@2v!S&V286Ax}nUo&`O! zW{;&nIN#goY<-P%ba`UK^Cw>hx6p2=m=;_pNsqWZ?C_)Mp&@P zwEpUCjm2^Ab-=m#o+<|Xvkm^!lUWlC{Ji;IwQ{pA47$=kC-O17`CbPhvH9Mndiu}v zJ)8gLov%2ViQf>}#K@@!PMi1*tV+~RgGw$3cT+$P7J3S!vn%7*6Ec`|fC&PR?x>&1 ztDd{?ywrd0E4NSoP6NBXr`uRrEmJvGS+t~PvJ!^!FoFM*_-{)Nlsbf$@v*YEO6s*S zAXc{fr$`CcbL%L^-9HCA@v>N1lUvgCPVFWZXE@I!slz5DhZl4YU{r_UN74hCuk*_c zg{MQ&e!p&x(s{K#uvXue5QNt(%J0a(=+GHF!$u-?B3O+9eJrYBp|Zvd36HxKrc-HSGa);{l5xVUbUQo7G^g z6B(~v8cQ7C=9f2gBI7ij$k?;}FK?{FyoNdCn(nlI)kYlec_g0o@BBJWK8f+RwWv$d zIJse*@J4XF5cxI@ve~GHO&-ZK=pRt)PlIIdYJ9-njTxrDXm^LH7nnK17u;`hkYJs%f6eu4d_gYfw`Ty;_13e&nBMY}faxY2UrP(dy)QtK@+O9e7T?Kc z4k20=B|UFZ2M2WKJG=At4&kh*0C{aSRT;?x>h!kDr4OQ~=#RAgGa`<47!LobhCj-0 z103P}C-9#n{1*v-bF0StsW1+KLDy?MpPwG}M#h=4lLJv|Al^e#9EkRSI9VX}1%wuC zMcb-V_Ly=XgvpCCUo1~Xr(EV!w1fmGT7>$CBkuwT`=4KCq&&^Kqqt~ z(w0qfhop5|%!AGF4rMdpL&i#+S>B)2IhZd1i)8}a8>GxKfy31?HBn!>zDSsto`te- z#(7EI9Q$SwTX=miII^5CK`_3^urWKaIlC0hL-a;Cb`Q1TzEXZ)GLGGf?RA-I`{1Ue z=Sxh&TYfM4cyVRdZ)03N!W>2?zMj}#lh2M-iOb}1u}vAd*X=n^i#BZN1h6viB^t4I zqypEY(Kn@4@yb#>Ev&EfCf_Jt%;yWRr`{`3-Y%9HXbu;5T5N9)L#X&=8uwhkxhBoj(Gk715j~HlcSLUn z(UU~=0tL>0QEk;D0QmcqRD)OGV4sH;u8H{?lQOZhtX=HTlEJn1X#G(UaO2SJM% z4Tn1#dKwKsBT=qmWzg`rXxI}P3Mf|HttStSoyLcU263K%>OkPTHmA=>sD(ND!aty2 zGW>7GJz9M+7*bv`#Iulz$uq+9Y&$h+w4aEk*K`Dg&neaL0ayAi$~F8`*~gj$c&%Zm z9puW**-o^}dn4LRijnRZizM=Hl92BL9{fBH9?)UvW4R}(r$+Yg8io zL=vvXIpv*_SsKT=d%3a1oGO%kQ10HFnxkXx76qZ7cSq^8xVJ4eO?mGk881^`_LI@& zKT%_B&`R083ytoN&B1#Zmx7~enrj#cjziUOJ9w^t#GQSd9){;k!=I`#w05h^QWFXL z(54O2|Cmn(C8`y=fkk=&Vs3;C;{PEr*U;b75Tm&yd2!#Ki}}|0yX2&WYK-hdQ~92x z&yjo^6G}B$gkwUFjd`^@i@M`uv%AFh$Qq0c-L5S-GJJKXGOhG|*<~=}T8$NP zub%2~UpK#UeWkoH^rBy3hHB0|O&Qqq)W&1=>RTK_IN!Rj_u?JualhC=5o3I?*6SJL zq&r$q=4<|PLY?0>lxD=ru1@@%-gu_plAKJnb*3G41F+0_de!CTYh5Ha)g~$L90qJKsAx`J}jdZ5@9n@Vt_YQilx*Keg zdJ0bn#-k=Jbb?F}&VQrTxc`}7r|qhtWhk^X4%<+?(Sf83_2h0;7t^Nm%Kl&S{VcvR z-Z@BZ4brO!pL060Ax;v=#=Fn-x62x=RW7n9>@V(>@M<)2B_q9Sonxdby~SlzmGF3X z+DaE-S81yQr`$a!3DOzp{Gfm@?Sz17@7m>zf}K?xO(SEv)_@SohjtBibM#7@*`M8# zwLe*RQ&vFnnbGMGrxL3Kk1@T})kSIT3VSpzQ^;ra^LME~xQ6 zcl6%wwHx(L1l~Jf>e6lse86zkO$BzT?b95+9`SbMqI;k?ec9`OHX|M>?+NntAYa#J zn?v0)8Dit!^+yUTS1P&>@V!! zz|qpmXn79#a1!;$1lAfODUDk~3r6uxl(LZLn>=8x4;rOLj&{-?S?jGPiT~a!QWJ4c zaJc`PUxLj%Jpr_9sej{aGa#eSp^0Rr&xNEQR%9 z)(HsO%MolkI#e6A%prqOd)7BI-THAE%)7DItb%Pu zZ|eYn|LaHjxlEokbNd(-9YvtqbmD3{&|zglgq`%n{T9ToZC=uQKDwUs{DZjfbzoV63geER|LyHo{jVsQ@+O7lKSMl!Q~6h|XX%j9#E*>LT^FZ!y(f$lKJ5xW zVuc6sJKwl|FNItGgTiAeTrIzsdRqEEnIB<1(;MXq54XbGgqTmGa72ZB3bStn9o7Z_ zGJ^8NQ}%sH{YW)Y#-2Z!S2(+=gTJA{e+@x!-Lp0DpH;@SixiMo{%z4Y7X7_4^wJAp5e8LwO@ou`FO7^ z`s?XZ@6fiUDc|5B)Rc4B3Q6J)2G%s?*VF)s9p(cKHRVd(yg5RhPnwb&d?`0O{f(J) zC@bqu5nX3c>P5Ep3Bz#WJcC)ihGn(>8rzuO`lBQfqD=R?CA^L|x z_B0cUYvaX5Z)!*>HsdxI13u|^?WAO%;^ydP6GS&AsNE&GF6G~_@-fQKSNVgj29;yQ z%Xm*ZK+wg zrjN+38Hhnb!w(;{UmwWH+NP&qIC{0zyuDH&GYP9Vp}eBe_67Yup?e;J*56 zf;MOa9aEtL>_2OGiF@CX*7X;LH4SAlRM%n=%g2h`v%Dks7!6o*CPJ!V&CVvp%GDZ= z`yaM79z%O2yk20zUOtaFQ~I0pB_f<(YW6aOX4%UN9ue2fN-l|iXYK689HEtfNO`}~ zxYJD>dR)yCJGybkyf#*-nH(QrO1jHqz>}4kuQ%3UdKOr_vWD5g8W<5H08-%elj`v; zzrvQ?sg2@8Lt)DY=Mf)T%*vGs;^OF*`3ZNX`ISc;*6#Nm%FP<~aJS zm1_lAMCK_i0Yl)^g@McTkXmGAkn=kQ!F*ljmZ-La7rG2m``+2frqWkTA3_UfAHXjk zL?Ti~%VHEv@s;RlXl@&*+oH&&FH7k7vBVC4^1V@}E=3kx%=4r6+-*9~pplU z3r`6H-0XD4D^!mW3iVZcVrFKlg(M$d2cZz}(TOzQo|o>A(Fti#P@|(%Y#to(%N% zZk>vC?OAp}CSS!cD`bdoI3pb5=W6(gdv60X<&Ea|ZKLb8aoj~K$d>}Sr0!4@jm6KV zX?PrBQ^2&a0NV^*bCIVNcgk&U&!tHU~0hpF|{#Om-n%Dzf< zXkafvVWBpjmDHbypl0#S4!e^7+o(g0lNjrie^buod4&16p9bW*J-@swy7GSDe># zwalz{{L;Cl64a@$nV^ETr2YY|7fX1$6&{i=Hq5()n9m3E$->;lF45_*fe5CD!G-R* zdWtWYfZ3WWZz#$c4mA$%@gR$vT4(PSDId`97%s7_N)GQdi?I0u*GkuY1x|mxbYc~; z?iZ>OpH#)QTJd}C?NuAvXkJp+!R)F--7O%ICu^i_MzxE@AL!H`DTyUYWAVp3%>-&J zF|-X3nBY{i1TnJD)qJv*)w&Ail}^)ynB}zmFX8{|{NI9`L@HTtONW{wf9<%x)+@RC zXXQ&qzN}>0UiVDRv{pq`t=?!xrS+_$RVh}v1<&RD1yp58EHR8h92ALDwI&m`AJG}m zMn#O{#mP%7bj%9!E^pf0-V**BerKK%P+%b=rjV1b0ymb`xWCpdx%xU)JQ+Pfgk1aV z%|^&O&7U*+Uva*eQ2l~CJ8CO6U%c`oVUWt}s{29`(cLaoror%aw#)Y;3?a`7H<>D_ z`%D#Wp5M5;jr*h8X?G(T z>&X{?QO^p)5p3e9pgOE4zMOc*=73IkE9t-$4Nn*z?+e6`6&;iKW6=Oknh)$-#_B8h z44&^!W~|=%Y^~+cW=7Y}LDTz<>aSeu*`E$@#dHZ6H)NhTXz*K%Q2DFE{C<(nuE<-~Fn*()=oi^iqh`F4GvVfEmH0)RN<{Cq_V!EcmMMYq ztt5(&T|&khC3d%+NMnG1|kyVm~1ihvrHKVeMq*O%GPHi^fVT)`mmz~1FVM&Y$ zO*LT_8`8e|Z(+G-;;+bS*dBE!wVTJMFj~b=?tCENQ#q}~?$<@6DF&W+e5cSn7pSCXY zruu5Xs#v05x%Ex@CB3e56aEds$@_Xp20HyX$V*f>!0DI%NASg9ZJ0~fC8e>%APy~x zjITqY%6_Xkr<&PuHHUDW9vs4Tq!@~PsjtXq^VOBiUv_1awXTe5tkl=YvnrkR_Uz@m zctSb+jm)mwaG&fYNGsf==bVUOHXb9P0@FD$Hf-mhTnspXFH;W?%2C-UFK{Rib}090 zf%2*>l!t)wMTfG9wru=@HlVV@$Pz32yk>Z{EF7UeMYY|LnhbHM&k9hlx=lo?Qr}-tDPL7o|){NHqPFl`)Zou7@5|w21w+g?i z<0%y`=euXHq3G}OjA>ETI}F8OP`nIr=qu{zqUm0_ETFizKVP~oZrTH#yM(sKKwt7 z{|EEGEB|-m|I_^cfd6~E(yHiW{@=v^8T?E`a& z@?bUh|BR&`ZjMjz(K|~c2KWD*p!IvcHXd-PY2yv}lk)mr#NA^sBmLBA`K##ge~*Bl zW`}I2CtL!AwnpY3s#fYgR%NaV;xT?iXS*v18YW_{IVcG|#e33Ay|LlP3*1LeDXY;F zrj%9%K5fH`_Xq+hL)sBfPw3AF?h_u3^$pc|s{;2^?quZ8L5w6zPR*~6TNSvTA!Z^G zS$&zPS<9_LRf*{_(qnPDZoF?h^0ukyUoimF2Ch%qD>*zWK5|h-;%Bb? zWcAlbE)n`U79TxLqEfCOfFLxSgRkcCZRfdC@7Vu{BlbVPc-44%jX~q7&FDLqw8gR7 z+A!61n#|wk=%XT@3vql12?wFhAneO89!nrx3WS#hVJ{%S%jxH+@%rO|Q(GQRBYMx+ zC%E7}j0K+gew*In^2vE0%Ki!q%+y=F0&Cja;q2^$E%X+zXrF!!=ZG#Chqlh-T4Cdg zmqxxC?t`qjcN>q`(~MUOMcmEAhFAd$s=16wLlLk7uKMrQM$Q2xptn1qH)VkKGN9K0 z^aBCiiC$3U<~=BG!FKW8kH_#`PPxOX5+~ssT&&RixzvWi8*_Mdm4$e-&0npRn46yU z1eHSmFi~q|3<7aB5S!Y{>w4)^=9253_*O1C(f7NwVch!>@$@VG0FNo}Yix&QqVIt= zqA%CU;~PUTVJljt0296u@fjvebV#ntAUW8O)PqFJ#~Rm1XabcK*jW(w!KFSAs;D|V z__pR?nBjOpfIDH=1LaHsn1wLD&rrjPr|1Nf^HV&+k?q&ZIBItAA zJ|5Zsj{N*0;_k!F%;$hHw#++$dWJVLtp~OKjZCQ-m}4NBZMVxcM<2K(haWl~AC#A6 zQ0{3cYeBhMD7O_#BrTR`Sc)X-P}lB?HAz8Mxx(6)>(l!KvXt_=Q@B}$|Gh4SB_n^( z&g#WoIEF)inLy?3$!A~2WZ<)*<&2VTdnpQQIPkESoy(m}qgnx}%)5Y!)ke{o^uw*w z0^Q8rhQMv=#OakQnCWG{Y=W3oG=Jn2dP$vIY9b+wrY{yS?qu4r*r1jgySCH|5*oci z$^NuzmvwmdX$_**Rf!|pP>-s_ZQ=+{ljenpIF>1uqz9MOoo9Y4yg54XA`9e>$Ke3ka7_oDOoj-q5MnA^o#2`eJVx9<{~;_8QG1iK z@jRO*2bV)J#i8&pcR5rHt(_QF+Jt!2@^wTTi)m`bhn9~VYLXZ9`^NovjqTh$`~3Jl zpa_fP;R7_p!fIe(f_2f?gx5HhKXLEhNRuyKH}S~&5A5eM13npz@1Mh+P52s|)&13-a;pFQ;!Ywv;k}?CF77=IOrK*X^B9jjHjZ$*=J4j|eZronZqw0+#MD(3)X{3*p$_4}U`cu3 zGyi(Xs%z(KSH5C?@I z>Hu-IKy=9J@qy?9Vrx-@=Vm$^cqq$l!4PF)jG8F<@Vy-5_W`0xg#C=GBUD zMLG{eIW$KvpdyZfSHd#uQ069;xkEjyg?^0QeyXG3kX#Dh(g4T#C%{R0=kPnlD45D{ zc$c7^=O~DU6#U~%QSej9g9E}cV<~fw%9tu_NkMy`f@za-cu?Ue5S*0v4ej}eQLs1A z9uc$^)CV5CQxouD>@ZPqen>$>SmrM*na5P-RzS4m!L|M#z3AO1i5EFb5`zf*A68Mu zROe)UKm&K&y9*R4uMfZS$FrUuM9&G)(MFtnAm@KB`aVn_O(5A9@t!Gf>#)cv6nTLn zw0a+aI(e=nxdol_lr02}iv#5IF;6`G)m2kR39@x8$ z3b^xK-9~}g)$J@n%%iqoOvWFlY;~ka zZ-M=r5aF%HZ|3jc9HN7IY!X9wk;|85*9^3S^tpZc-HOC&yMVdM4$$vPC-jfFFK~wb zR#G`SiUs3}I%m$%?<;ewDszUu|88gKv+{v7M*imLg!5EBUGNNjm=+z))SisazqzRd z4WCI>;NZML>ZV!qh*jvOFkjR8E??ikfci(6Z|NCX`QGyLLAa#1q;9fW2zd41UUsn3Xuqbo4H%$fmPdXp)E3#^Fg&?woB{e;R1fL+E+MPsZ5EvEtMMv_#vsHE;0 z%VX!%bcX~S9o(_WH=G?M_5Cd|(k$AN(KdUjYhYO1O5sM77;lkbmgYUZJ8ANK(gyfe zBCqVjyYtq0L#idh(X;ePdq5dn9GvTc!+wgh*fSz>HLwG5O9%1903vt<@$4*!n>&bG zw1C*dAT|?nJqw6U17e8_+BL1qp3qh`+@~FRO)Z@CS^?TZ;eg#V3+%%&BXnBVd_uoE zSAXhGK5A=?f#4dYd<^K|t7Wm@8kW9(=$Y1`*HfqUvG2k!Vi zsfAjr@f?cmO6{k?9Nb=Gx+uY1fuBJ@t_SQ-GK2ED3#@)mB1sK#P_kc%M^%r#pbUIX zn`NE9|4#at6$&cRbL{G)A==s9v4_HGapfhn_vfLS~#JYsHj0H}n z80tDrvoFzSv6MNmkz;MTeya zI`b#9GVI;@2dRh7sFRvtsB0%S$ES8$X$VcLW7C|CSTa6Q^{45l-)(|`{$oRL;M}_z|%R@}# zVJ*+MZ{EkleYWBM7}Z|m7?a<%vCZe#ER6GjUrhajS)Hc-v(uL{?L%jWjG79m*ip3F z?^v2!Yzm`l*Kf%vt)P)Wq#r-bv?eURn37nbl$=J%PAa(zgcBY%<2!Pts_a(9?uqWR zRk3%Y>9ZJmJ+H>l4+-)ZL+A1kGIXgJfZ3h!_BB|xT;U6~c)UY@gOp)totQ6%eqw{# zymTv@F(8~U)Y zynTk*h5!?9js?1e-LcKut>#~3x}NCA2+DTRRJo1|r$5L(fe~{;5<+)xM6OnJlKzvMS`!0Ux+=cF7 zowGMFLjVNY?f_n`bIL4I=j^eR2TXmgm|&SztoSAI3X0Ynp_=HaLlT z`PoKVN&OPJdhwB*abHH;&9-kg<)w4}*}q`tyep^ayhCjS@(!k+%>TiEgVlCFNFJ}+ z&cNT$lAq{hK5J@!MBq&&z_>PVDz2$2=TKdyBZ~ruD&fY^p}LVB@;yJ@@7AD7w#eoI z=_BTU(8l~Pq;Mjfxm6SnHVSi{%Cye_vA8U<`5CM$$FefY3SKIHnNCH1MZy zw^OK4q^4Nv0CywgaGo%2{jjRC4@GTRv+YzIRwYJ-I~7CcC4N=9a%EUNLGi~_{O7{H zli5ef*k|2lhxJdFc$b+3Sg2wn_ND3#iuzSCk5e3=Z1;bkCXRCzO-X$n1j5XvWU@(W z^g399ZI|BT4!@D6)$X108W5L>R+qn+smv8ILm`Iqib%N0622tic_s9*L2Y*Wglk;& zvUg$P{|F&XrNFx?u#FXnT&k|%MnUyg>u3vzb!9qQk2iR=j<(=<*U>tpcnDWKe?s-8 zwGv(zgJm6UH3+NXJ+3lH&FX0D>B#rXB;XnahuA1MJH6U85t4yxz}*GnT?wDG$(oIG z^aNt*F1Es$W!Kr5-+a}Y#w_{8y@3+K)BW*^BQc~+hM@L2&5n^Ob7?$tC^g8y^o8^d ze-9u_l5Zfe`IA_*j)obH&sXZfq>`Wrl{ID1h&`!M=n!G6;rjR75vcZLfAs0kEFA(y z2L!lrNAu{R!afr2xB2Bw9qKSk%PQ>3gWQqEk;cM#9K|W`2YC7?+83{B&V}QVV5gX#e-^LlDbLZaX)BN;Qd{+UUaVA>V04ZWq zg)Vf3TTEoV5z>@#?+oct;ImRUFJ4i2`EJ%a({NN*lRqq|xKc{$?=tu_pKTmyyv`DG zSDoh%NLsIz zmhz6^t1~oj;OqK)MWQd0;))v_wI*})$f$$xvM0P!vKu~kJD6xN%rATj=)|mJ0x+e`6$E}*&Aqu$o^p{re>$YSSoaSaZ!RfxrNq~cFv zX#@~B+_BX7Ta`GQ=s6RjCQlBqa>5$e7bl62SmOpO`^LmROt2HtYmSh@p6|RpJDf~r zdS!VKgen&q&9lk3ec!BntB1IJ^d?+5bJPl!DLNo4(;`0;t|xUvcA$_4y>Z>;0-E$D zADHXvDaU#8z=r~Cr*zFv?{rJx>WL0yg09)1XBD?fQ^Ce=f|Q8N6DE8|ThslroHN^Y zl(w~{R9;Vz0e{Z+E=$Ha^TUbi2vd(`Pk|6Tpt^8xxP$n{Rz5`V$T>4t#eImy4&ucv zAWk-jrvULuAT|xCN?eF@hUJH?YAyuyb`JCz0!>Z1I3jXE7TAl+_@0b*Yyq~nfo%)e z6kw64RT^Q4{~jk><$iu~#p0aNFCB6N;G`>A!^NREm?Ve@(jl2KQL)`3)f%TikW+0i zjt$w#w!XdZZW=464>4DUt`i*8(%~sR-A3fMlYE!;D#mMJH7Ozw`?Pd)}*su#iY0`L69K; z{>y9z?^l3SB`Z+=KO=X;#Fcm}hY1uDm5QygamHLiL0xWTBK@H$y;DJ~f(RTH#dDg8 z>3H2w0D)F%=-$H&m04b%%%jgAR->>?w|_-O4K%$3kQ_CD4~JVnO${vNR#mPQ%u)lN znt)r^E#L{BVZ9+#1M<8bf(AGNjjT?ri_v)34XW-PwZJnC-W*K~f)44OEVaN*t*eS_ zoLU%ln0m7B1m0+{SSz)l?%q>0*=pE5sEi67>YT+&r>?Z`iS~%T7d^CUv9;t=rRosVoql0*A3y5)p zcmxpl0;1FcH?cakAfN394s;)Z_SM2kSzy~bup71jySIV;iNMt1>HrDv^OMCZ+tZrz zuBBs)HnpH%I^#|IA^3Y7WIkJZ9|aUYKr57W7V>5n_M>9TNI!~DbKoZU9Fs^U0B zE@IcO_xcdP#k~eA`VvK@IzqiMn9mpm(i?%@h2A(!Uz3roAtAluK#**yJSd1DPb|@6 zi-GWq%>#*4s7qV#g#DO2q0^Awi9xKp7)Iy&BG9YZS~X9f(r;;i_vkub9HK5J?b zPAoBL0_>^Q9KE7>p<>)+##NiqoVeu|h zLXp5+WtOFKixI4qtD z$WpyYX%1gej?r^6dVv1qgv*8ukV4oVEH4R*uX?{0_gKdrKm?CeZ&?<^ehy-~eLlpE z4B`SttEoV25iYylfqs8u<}SYKT_zYlp_}PB8NHze*cbYX(2D>&7qIlcGo-`g-br+g zl(#XzwGdg+pkF%Wl)dQy|Lkt6_hMs{3ztczP`@Ad%TvD-pgKqWo@8`Jhi(QvQop}a z!qo3Pa-x3AG#B}*NOY(pu8%PtDZ|8 ziCbFHttcur6Y7}Pkc*b;d5XR!BRfDsy04HFP|u@}ZlRt}-%jJqot-9&=)mM9!r$T! z?a-cMX>v^`di|xHO4)ve>5H)UK?2YvzQ1UFF?BmwJ?&^w8aQTqJj1K`iyC_P{-URN z2>nHm(wNR)RAk`HU-YV~74LC@LCW}xjuh8W3iX{m6`Gx%Ylb%sg7aWA`)0!uEqGI} zf-TtEu-UNDK@NnJcM4c>&ms#`4(Grm$%1n(<~uvRRY!qTalyl@2%LbkrXmb*5jZIn z7sS8B%F4Ov0heiN!6{scbS>&K7(2D?UUq(Z#uaK0yoDAGoKM?3lA@3l6-g(`J(urX zX}Jjb&^9c-A{==-*mTz`CK32Sw42YJSFu5HqA2V`v7cIIY zttIdBn>VQO_KY3{YCKyt32VGNSkAW^j{-|CVR=MY65hf-|9y>{_YZ5l+ofx%@kf?# zcKX)Kvuk`WZS81T&fMi_(b7d)wuQ9h*En)Lt>t(lG^4x?t7&fDPxUaj*kKG=2M z9`ErGMpeF5ZRKR~dKxV2yhReec!%u_QYNZ$!%^f_=fwi1(EN0}xT-;4#HC7G^39ug zB!B*!F6Q^IdcS{Z4L#;Z=9W%7188=-o0Ac9$TZjXN_oQ}ca$~YvxgQJ4Tou9zennY zJ%p-?h+0Mlv5_dPp29hC<7_`6ccOeKrYjb3v~zcHh;G=TaEaUtm$#23N!XMesyE2Zn*(=Ld)gpA}{N=K8s^p%iI5FFPZ(RIa&P{H4 z_Iz*6w0}sidx_uD(`sd`?_ZN~Zn7 zZOqBBOA`~p=sCFX$l@&Soh3fb;-)WRalfG!F-v+!d}(36Vn3gJpEXAXX0(x!^lEl) zX-1c}hS4$@0Fmy;2$lU}d&C@15Y8p_n|yOH2H zcjngM!6scDaal@Hy1>9D>_}x(-j^uviNKbZ;WG0wG_PYT!ya&;8`l-6OU?QCn_&20 zAM9*kA8G-1PH%y|4zLeNj1t}@bYVoS1_`CV@=HhnDb_C{-3>VDnY){*duq@?3AK&< zLuDPlt&**Kr4eneh6f;9w(j}C>aI~nX!O$cAxQOV3jt>9{+pcGx+xg$+qy*?=G(g4 zkQo|3>T5JEknnp~@+<06-b|G2$B6xUZjRZZwNNq#Eu8qLMg_$HwVd0dGi>vk21cCXsA7p&x#*yVOBz}r+9$UxaV#M zxW9Ur{A&1CMHnYn2sNx^z~#)}e17l4T(B^|&o=G|l(VwL?~PQ6WMn@`3HkjyGDHoY zk|=pUW8fOU`?nyJeOHJ6&-uO21#98=a_cy`{64kX_Zb}h57w^rQ=REzwefcPey+2D1M*nyQeI&ey=qw25A7JzZhgLP2(>Hv35@&$E!3b52V%G+d$)O3`R#q%8P*a z7w}e%Yb=JCXJv!N+saiL2qHGjo%))L><{(nUM=WbLv(}FJ4$?$DzF+gVA7TRie+S3 zPxKQS;Hf9vp{%1arN!SGll zFLPPskwezN-+^HC`8xtu`~2NNy b4N}u_?-?)#{C$FfK8wFclhl&G2kL7w^6_@? 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�DITb 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 literal 0 HcmV?d00001 diff --git a/kivyblocks/blocks.pyold b/kivyblocks/blocks.pyold new file mode 100644 index 0000000..ff0cb9c --- /dev/null +++ b/kivyblocks/blocks.pyold @@ -0,0 +1,748 @@ +import os +import sys +import codecs +import json +from traceback import print_exc + +import kivy +from functools import partial + +from appPublic.dictExt import dictExtend +from appPublic.folderUtils import ProgramPath +from appPublic.dictObject import DictObject +from appPublic.Singleton import SingletonDecorator, GlobalEnv +from appPublic.datamapping import keyMapping +from appPublic.registerfunction import RegisterFunction + +from kivy.logger import Logger +from kivy.config import Config +from kivy.metrics import sp,dp,mm +from kivy.core.window import WindowBase, Window +from kivy.properties import BooleanProperty +from kivy.uix.widget import Widget +from kivy.app import App +from kivy.factory import Factory +from kivy.uix.video import Video +from .baseWidget import * +from .toolbar import * +from .dg import DataGrid +from .utils import * +from .serverImageViewer import ServerImageViewer +from .vplayer import VPlayer +from .form import InputBox, Form, StrSearchForm +from .boxViewer import BoxViewer +from .tree import Tree, TextTree +from .newvideo import Video +from .bgcolorbehavior import BGColorBehavior +from .orientationlayout import OrientationLayout +from .threadcall import HttpClient +from .register import * + +def showError(e): + print('error',e) + +class WidgetNotFoundById(Exception): + def __init__(self, id): + super().__init__() + self.idstr = id + + def __str__(self): + return "Widget not found by id:" + self.idstr + ':' + + def __expr__(self): + return str(self) + +class ClassMethodNotFound(Exception): + def __init__(self,k,m): + super().__init__() + self.kname = k + self.mname = m + + def __str__(self): + s = 'Method(%s) not found in class(%s)' % (self.mname, + str(self.kname.__classname__)) + return s + + def __expr__(self): + return self.__str__() + + +class NotExistsObject(Exception): + def __init__(self,name): + super().__init__() + self.name = name + + def __str__(self): + s = 'not exists widget(%s)' % self.name + return s + + def __expr__(self): + return self.__str__() + +class ArgumentError(Exception): + def __init__(self,argument,desc): + super().__init__() + self.argument = argument + self.desc = desc + + def __str__(self): + s = 'argument(%s) missed:%s' % (self.argument,self.desc) + return s + + def __expr__(self): + return self.__str__() + + +class NotRegistedWidget(Exception): + def __init__(self,name): + super().__init__() + self.widget_name = name + + def __str__(self): + s = 'not reigsted widget(%s)' % self.name + return s + + def __expr__(self): + return self.__str__() + +def registerWidget(name,widget): + globals()[name] = widget + + +class Blocks(EventDispatcher): + def __init__(self): + EventDispatcher.__init__(self) + self.action_id = 0 + self.register_event_type('on_built') + self.register_event_type('on_failed') + self.env = GlobalEnv() + + def set(self,k,v): + self.env[k] = v + + def register_widget(self,name,widget): + globals()[name] = widget + + def buildAction(self,widget,desc): + conform_desc = desc.get('conform') + blocks = Blocks() + if not conform_desc: + return partial(blocks.uniaction, widget, desc) + l = { + } + body="""def action(widget, *args, **kw): + jsonstr='''%s''' + desc = json.loads(jsonstr) + conform_desc = desc.get('conform') + blocks = Blocks() + if not conform_desc: + blocks.uniaction(widget, desc,*args, **kw) + return + w = blocks.widgetBuild({ + "widgettype":"Conform", + "options":conform_desc + }) + w.bind(on_conform=partial(blocks.uniaction, widget, desc)) + w.open() + print('Conform show.....') +""" % (json.dumps(desc)) + exec(body,globals(),l) + f = l.get('action',None) + if f is None: + raise Exception('None Function') + func =partial(f,widget) + return func + + def eval(self,s,l): + g = {} + forbidens = [ + "os", + "sys", + "codecs", + "json", + ] + + for k,v in globals().copy().items(): + if k not in forbidens: + g[k] = v + + g['__builtins__'] = globals()['__builtins__'].copy() + g['__builtins__']['__import__'] = None + g['__builtins__']['__loader__'] = None + g['__builtins__']['open'] = None + g.update(self.env) + return eval(s,g,l) + + def getUrlData(self,url,method='GET',params={}, files={}, + callback=None, + errback=None,**kw): + + if url is None: + if errback: + errback(None,Exception('url is None')) + else: + return None + + if url.startswith('file://'): + filename = url[7:] + with codecs.open(filename,'r','utf-8') as f: + b = f.read() + dic = json.loads(b) + return dic + elif url.startswith('http://') or url.startswith('https://'): + try: + hc = HttpClient() + resp=hc(url,method=method,params=params,files=files) + # print('Blocks.py :resp=',resp) + return resp + except Exception as e: + print_exc() + if errback: + return errback(None,e) + return None + else: + config = getConfig() + url = config.uihome + url + return self.getUrlData(url,method=method, + params=params, + files=files, + **kw) + + def strValueExpr(self,s:str,localnamespace:dict={}): + if not s.startswith('py::'): + return s + s = s[4:] + try: + v = self.eval(s,localnamespace) + return v + except Exception as e: + print('Exception .... ',e,'script=',s) + print_exc() + return s + + def arrayValueExpr(self,arr:list,localnamespace:dict={}): + d = [] + for v in arr: + if type(v) == type(''): + d.append(self.strValueExpr(v,localnamespace)) + continue + if type(v) == type([]): + d.append(self.arrayValueExpr(v,localnamespace)) + continue + if type(v) == type({}): + d.append(self.dictValueExpr(v,localnamespace)) + continue + if type(v) == type(DictObject): + d.append(self.dictValueExpr(v,localnamespace)) + continue + d.append(v) + return d + + def dictValueExpr(self,dic:dict,localnamespace:dict={}): + d = {} + for k,v in dic.items(): + if type(v) == type(''): + d[k] = self.strValueExpr(v,localnamespace) + continue + if type(v) == type([]): + d[k] = self.arrayValueExpr(v,localnamespace) + continue + if type(v) == type({}): + d[k] = self.dictValueExpr(v,localnamespace) + continue + if type(v) == type(DictObject): + d[k] = self.dictValueExpr(v,localnamespace) + continue + d[k] = v + return d + def valueExpr(self,obj,localnamespace={}): + if type(obj) == type(''): + return self.strValueExpr(obj,localnamespace) + if type(obj) == type([]): + return self.arrayValueExpr(obj,localnamespace) + if type(obj) == type({}): + return self.dictValueExpr(obj,localnamespace) + if isinstance(obj,DictObject): + return self.dictValueExpr(obj,localnamespace) + return obj + + def w_build(self,desc:dict): + # print('w_build(),desc=',desc) + widgetClass = desc.get('widgettype',None) + if not widgetClass: + Logger.info("Block: w_build(), desc invalid", desc) + raise Exception(desc) + + widgetClass = desc['widgettype'] + opts = self.valueExpr(desc.get('options',{}).copy()) + widget = None + try: + klass = Factory.get(widgetClass) + widget = klass(**opts) + except Exception as e: + print('Error:',widgetClass,'contructon error') + print_exc() + raise NotExistsObject(widgetClass) + + if desc.get('id'): + id = desc.get('id') + if id.startswith('app.'): + app = App.get_running_app() + id = id[4:] + setattr(app, id, widget) + if id.startswith('root.'): + app = App.get_running_app() + id = id[5:] + setattr(app.root, id, widget) + + if '.' in id: + Logger.info('widget id(%s) can not contain "."', id) + else: + widget.widget_id = id + + widget.build_desc = desc + self.build_attributes(widget,desc) + self.build_rest(widget,desc) + return widget + + def build_attributes(self,widget,desc,t=None): + excludes = ['widgettype','options','subwidgets','binds'] + for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: + if isinstance(v,dict) and v.get('widgettype'): + b = Blocks() + v = self.valueExpr(v, localnamespace={'self':widget}) + w = b.w_build(v) + if hasattr(widget,k): + aw = getattr(widget,k) + if isinstance(aw,Layout): + aw.add_widget(w) + continue + setattr(widget,k,w) + continue + setattr(widget,k,self.valueExpr(v,\ + localnamespace={'self':widget})) + + def build_rest(self, widget,desc,t=None): + self.subwidget_total = len(desc.get('subwidgets',[])) + self.subwidgets = [ None for i in range(self.subwidget_total)] + pos = 0 + for pos,sw in enumerate(desc.get('subwidgets',[])): + b = Blocks() + kw = self.valueExpr(sw.copy(), + localnamespace={'self':widget}) + w = b.widgetBuild(kw) + widget.add_widget(w) + + for b in desc.get('binds',[]): + kw = self.valueExpr(b.copy(), \ + localnamespace={'self':widget}) + self.buildBind(widget,kw) + + def buildBind(self,widget,desc): + wid = desc.get('wid','self') + w = Blocks.getWidgetById(desc.get('wid','self'),from_widget=widget) + if not w: + Logger.info('Block: %s %s',desc.get('wid','self'), + 'not found via Blocks.getWidgetById()') + return + event = desc.get('event') + if event is None: + Logger.info('Block: binds desc miss event, desc=%s',str(desc)) + return + f = self.buildAction(widget,desc) + if f is None: + Logger.info('Block: get a null function,%s',str(desc)) + return + w.bind(**{event:f}) + # Logger.info('Block: %s bind built', str(desc)) + + def multipleAction(self, widget, desc, *args): + desc1 = {k:v for k, v in desc.items() if k != 'actions'} + mydesc = desc1.copy() + for a in desc['actions']: + new_desc = mydesc.copy() + new_desc.update(a) + self.uniaction(widget,new_desc, *args) + + def uniaction(self,widget,desc, *args): + Logger.info('Block: uniaction() called, desc=%s', str(desc)) + + acttype = desc.get('actiontype') + if acttype=='blocks': + return self.blocksAction(widget,desc, *args) + if acttype=='urlwidget': + return self.urlwidgetAction(widget,desc, *args) + if acttype == 'registedfunction': + return self.registedfunctionAction(widget,desc, *args) + if acttype == 'script': + return self.scriptAction(widget, desc, *args) + if acttype == 'method': + return self.methodAction(widget, desc, *args) + if acttype == 'event': + return self.eventAction(widget, desc, *args) + if acttype == 'multiple': + return self.multipleAction(widget, desc, *args) + + alert("actiontype(%s) invalid" % acttype,title='error') + + def eventAction(self, widget, desc, *args): + target = self.get_target(widget, desc) + event = desc.get('dispatch_event') + if not event: + Logger.info('Block: eventAction():desc(%s) miss dispatch_event', + str(desc)) + return + params = desc.get('params',{}) + d = self.getActionData(widget,desc, *args) + if d: + params.update(d) + try: + target.dispatch(event, params) + except Exception as e: + Logger.info(f'Block: eventAction():dispatch {event} error') + print_exc() + return + + def get_target(self, widget, desc): + if not desc.get('target'): + return None + return Blocks.getWidgetById(desc.get('target'),from_widget=widget) + + def blocksAction(self,widget,desc, *args): + target = self.get_target(widget, desc) + add_mode = desc.get('mode','replace') + opts = desc.get('options').copy() + d = self.getActionData(widget,desc, *args) + p = opts.get('options',{}).copy() + if d: + p.update(d) + opts['options'] = p + def doit(target,add_mode,o,w): + if target: + if add_mode == 'replace': + target.clear_widgets() + target.add_widget(w) + + def doerr(o,e): + Logger.info('Block: blocksAction(): desc=%s widgetBuild error' + ,str(desc)) + raise e + + b = Blocks() + b.bind(on_built=partial(doit,target,add_mode)) + b.bind(on_failed=doerr) + b.widgetBuild(opts) + + def urlwidgetAction(self,widget,desc, *args): + target = self.get_target(widget, desc) + add_mode = desc.get('mode','replace') + opts = desc.get('options').copy() + p = opts.get('params',{}).copy() + if len(args) >= 1 and isinstance(args[0],dict): + p.update(args[0]) + d = self.getActionData(widget, desc, *args) + if d: + p.update(d) + opts['params'] = p + d = { + 'widgettype' : 'urlwidget', + 'options': opts + } + + def doit(target,add_mode,o,w): + if target: + if add_mode == 'replace': + target.clear_widgets() + target.add_widget(w) + + def doerr(o,e): + Logger.info('Block: urlwidgetAction(): desc=%s widgetBuild error' + ,str(desc)) + + b = Blocks() + b.bind(on_built=partial(doit,target,add_mode)) + b.bind(on_failed=doerr) + b.widgetBuild(d) + + def getActionData(self,widget,desc,*args): + data = {} + rtdesc = self.build_rtdesc(desc) + rt = self.get_rtdata(widget, rtdesc, *args) + data.update(rt) + if desc.get('keymapping'): + data = keyMapping(data, desc.get('keymapping')) + return data + + def registedfunctionAction(self, widget, desc, *args): + target = self.get_target(widget, desc) + rf = RegisterFunction() + name = desc.get('rfname') + func = rf.get(name) + if func is None: + Logger.info('Block: desc=%s rfname(%s) not found', + str(desc), name) + raise Exception('rfname(%s) not found' % name) + + params = desc.get('params',{}).copy() + d = self.getActionData(widget,desc, *args) + if d: + params.update(d) + func(target, *args, **params) + + def scriptAction(self, widget, desc, *args): + script = desc.get('script') + if not script: + Logger.info('Block: scriptAction():desc(%s) target not found', + str(desc)) + return + target = self.get_target(widget, desc) + d = self.getActionData(widget,desc, *args) + ns = { + "self":target, + "args":args + } + if d: + ns.update(d) + try: + self.eval(script, ns) + except Exception as e: + print_exc() + print(e) + + def build_rtdesc(self, desc): + rtdesc = desc.get('rtdata') + if not rtdesc: + if desc.get('datawidget'): + rtdesc = {} + rtdesc['target'] = desc['datawidget'] + if desc.get('datascript'): + rtdesc['script'] = desc.get('datacript') + else: + rtdesc['method'] = desc.get('datamethod', 'getValue') + rtdesc['kwargs'] = desc.get('datakwargs', {}) + else: + return {} + return rtdesc + + def get_rtdata(self, widget, desc, *args): + """ + desc descript follow attributes + { + "target", a target name from widget + "method", a method name, default is 'getValue', + "script", script to handle the data + "kwargs":" a dict arguments, default is {} + } + """ + + if desc is None or desc == {}: + print('get_rtdata():desc is None') + return {} + kwargs = desc.get('kwargs', {}) + if not isinstance(kwargs, dict): + kwargs = {} + w = None + if len(args) > 0: + w = args[0] + target = desc.get('target') + if target: + w = self.getWidgetById(target, from_widget=widget) + if w is None: + print('get_rtdata():w is None', desc) + return {} + script = desc.get('script') + if script: + ns = { + "self":w, + "args":args, + "kwargs":kwargs + } + d = self.eval(script, ns) + return d + + method = desc.get('method', 'getValue') + if not hasattr(w, method): + print('get_rtdata():method is None', desc, type(w)) + return {} + f = getattr(w, method) + try: + r = f(**kwargs) + if isinstance(r, dict): + return r + if isinstance(r, DictObject): + return r.to_dict() + print('get_rtdata():method return is not dict', desc, 'ret=', r, type(r)) + return {} + except: + print_exc() + return {} + + def methodAction(self, widget, desc, *args): + method = desc.get('method') + target = self.get_target(widget, desc) + if target is None: + Logger.info('Block: methodAction():desc(%s) target not found', + str(desc)) + return + if method is None: + Logger.info('Block: methodAction():desc(%s) method not found', + str(desc)) + return + if hasattr(target,method): + f = getattr(target, method) + kwargs = desc.get('options',{}).copy() + d = self.getActionData(widget,desc, *args) + if d: + kwargs.update(d) + f(*args, **kwargs) + else: + alert('%s method not found' % method) + + def widgetBuild(self,desc): + """ + desc format: + { + widgettype:, + id:widget id, + options:{} + subwidgets:[ + ] + binds:[ + ] + } + """ + def doit(desc): + if isinstance(desc,DictObject): + desc = desc.to_dict() + if not isinstance(desc,dict): + Logger.info('Block: desc(%s) must be a dict object(%s)', + desc,type(desc)) + return None + + # desc = self.valueExpr(desc) + try: + widget = self.w_build(desc) + self.dispatch('on_built',widget) + if hasattr(widget,'ready'): + widget.ready = True + return widget + except Exception as e: + print_exc() + self.dispatch('on_failed',e) + return None + + if isinstance(desc,DictObject): + desc = desc.to_dict() + if not isinstance(desc, dict): + print('widgetBuild1: desc must be a dict object', + desc,type(desc)) + self.dispatch('on_failed',Exception('miss url')) + return + + widgettype = desc.get('widgettype') + while widgettype == "urlwidget": + opts = desc.get('options',{}).copy() + extend = desc.get('extend') + addon = None + if desc.get('extend'): + addon = desc.get('extend').copy() + url = opts.get('url') + if url is None: + self.dispatch('on_failed',Exception('miss url')) + return + + if opts.get('url'): + del opts['url'] + rtdesc = self.build_rtdesc(opts) + if rtdesc: + rtdata = self.get_rtdata(None, rtdesc) + params = opts.get('params', {}) + params.update(rtdata) + opts['params'] = params + + desc = self.getUrlData(url,**opts) + if not (isinstance(desc, DictObject) or \ + isinstance(desc, dict)): + print('Block2: desc must be a dict object', + desc,type(desc)) + self.dispatch('on_failed',Exception('miss url')) + return + + if addon: + desc = dictExtend(desc,addon) + widgettype = desc.get('widgettype') + if widgettype is None: + print('Block3: desc must be a dict object not None') + return None + return doit(desc) + + @classmethod + def getWidgetById(self,id,from_widget=None): + def find_widget_by_id(id, from_widget): + if id=='self': + return from_widget + if hasattr(from_widget,'widget_id'): + if from_widget.widget_id == id: + return from_widget + if id[0] == '-' and from_widget.widget_id == id[1:]: + return from_widget + if hasattr(from_widget, id): + w = getattr(from_widget,id) + return w + + if id[0] == '-': + print('find_widget_by_id(), id=', id, + 'widget=', from_widget) + if isinstance(from_widget, WindowBase): + return None + if from_widget.parent: + return find_widget_by_id(id, + from_widget=from_widget.parent) + return None + else: + for c in from_widget.children: + ret = find_widget_by_id(id,from_widget=c) + if ret: + return ret + return None + + ids = id.split('.') + app = App.get_running_app() + fid = ids[0] + if fid == '/self' or fid == 'root': + from_widget = app.root + if len(ids) == 1: + return from_widget + ids = ids[1:] + if fid == 'Window': + from_widget == Window + if len(ids) == 1: + return from_widget + ids = ids[1:] + if fid == 'app': + return app + + if from_widget is None: + from_widget = app.root + for id in ids: + w = find_widget_by_id(id,from_widget=from_widget) + if w is None \ + and id == ids[0] \ + and Window.fullscreen == True \ + and app.root != app.fs_widget: + w = find_widget_by_id(id, app.fs_widget) + if w is None: + print(id, 'not found ....') + return None + from_widget = w + return w + + def on_built(self,v=None): + return + + def on_failed(self,e=None): + return + +Factory.register('Blocks',Blocks) +Factory.register('Video',Video) +Factory.register('OrientationLayout', OrientationLayout) diff --git a/kivyblocks/dg.c b/kivyblocks/dg.c new file mode 100644 index 0000000..ea72e65 --- /dev/null +++ b/kivyblocks/dg.c @@ -0,0 +1,23946 @@ +/* Generated by Cython 0.29.23 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "name": "kivyblocks.dg", + "sources": [ + "kivyblocks/dg.pyx" + ] + }, + "module_name": "kivyblocks.dg" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_23" +#define CYTHON_HEX_VERSION 0x001D17F0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__kivyblocks__dg +#define __PYX_HAVE_API__kivyblocks__dg +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "kivyblocks\\dg.pyx", +}; + +/*--- Type declarations ---*/ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod1.proto */ +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* CallUnboundCMethod2.proto */ +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ + (likely(is_tuple || PyTuple_Check(tuple)) ?\ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ + (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* MergeKeywords.proto */ +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return __Pyx_PyObject_GetAttrStr(obj, attr_name); +#endif + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#else +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* Print.proto */ +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PrintOne.proto */ +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'kivyblocks.dg' */ +#define __Pyx_MODULE_NAME "kivyblocks.dg" +extern int __pyx_module_is_main_kivyblocks__dg; +int __pyx_module_is_main_kivyblocks__dg = 0; + +/* Implementation of 'kivyblocks.dg' */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_enumerate; +static const char __pyx_k_0[] = "0"; +static const char __pyx_k_b[] = "b"; +static const char __pyx_k_c[] = "c"; +static const char __pyx_k_d[] = "d"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_h[] = "h"; +static const char __pyx_k_i[] = "i"; +static const char __pyx_k_n[] = "n"; +static const char __pyx_k_o[] = "o"; +static const char __pyx_k_r[] = "r"; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k_t[] = "t"; +static const char __pyx_k_v[] = "v"; +static const char __pyx_k_w[] = "w"; +static const char __pyx_k_x[] = "x"; +static const char __pyx_k__5[] = " "; +static const char __pyx_k_bl[] = "bl"; +static const char __pyx_k_dg[] = "dg"; +static const char __pyx_k_fs[] = "fs"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_kw[] = "kw"; +static const char __pyx_k_rd[] = "rd"; +static const char __pyx_k_tb[] = "tb"; +static const char __pyx_k_tf[] = "tf"; +static const char __pyx_k_up[] = "up"; +static const char __pyx_k_vf[] = "vf"; +static const char __pyx_k_w1[] = "w1"; +static const char __pyx_k_App[] = "App"; +static const char __pyx_k_Fbo[] = "Fbo"; +static const char __pyx_k_Row[] = "Row"; +static const char __pyx_k__17[] = ":"; +static const char __pyx_k_dec[] = "dec"; +static const char __pyx_k_dic[] = "dic"; +static const char __pyx_k_dir[] = "dir"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_end[] = "end"; +static const char __pyx_k_fbo[] = "_fbo"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_ids[] = "ids"; +static const char __pyx_k_idx[] = "idx"; +static const char __pyx_k_int[] = "int"; +static const char __pyx_k_pos[] = "pos"; +static const char __pyx_k_rec[] = "rec"; +static const char __pyx_k_row[] = "row"; +static const char __pyx_k_str[] = "str"; +static const char __pyx_k_txt[] = "txt"; +static const char __pyx_k_0_df[] = "%%.0%df"; +static const char __pyx_k_Body[] = "Body"; +static const char __pyx_k_Cell[] = "Cell"; +static const char __pyx_k_HBox[] = "HBox"; +static const char __pyx_k_Text[] = "Text"; +static const char __pyx_k_VBox[] = "VBox"; +static const char __pyx_k_args[] = "args="; +static const char __pyx_k_bind[] = "bind"; +static const char __pyx_k_body[] = "body"; +static const char __pyx_k_cell[] = "cell"; +static const char __pyx_k_code[] = "code"; +static const char __pyx_k_copy[] = "copy"; +static const char __pyx_k_data[] = "data"; +static const char __pyx_k_desc[] = "desc"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_file[] = "file"; +static const char __pyx_k_i18n[] = "i18n"; +static const char __pyx_k_info[] = "info"; +static const char __pyx_k_init[] = "__init__"; +static const char __pyx_k_json[] = "json"; +static const char __pyx_k_keys[] = "keys"; +static const char __pyx_k_left[] = "left"; +static const char __pyx_k_list[] = "list"; +static const char __pyx_k_long[] = "long"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_opts[] = "opts"; +static const char __pyx_k_page[] = "page"; +static const char __pyx_k_part[] = "part"; +static const char __pyx_k_recs[] = "recs"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_text[] = "text"; +static const char __pyx_k_time[] = "time"; +static const char __pyx_k_wrap[] = "wrap"; +static const char __pyx_k_CSize[] = "CSize"; +static const char __pyx_k_Clock[] = "Clock"; +static const char __pyx_k_Color[] = "Color"; +static const char __pyx_k_Label[] = "Label"; +static const char __pyx_k_SUPER[] = "SUPER"; +static const char __pyx_k_alert[] = "alert"; +static const char __pyx_k_dummy[] = "dummy"; +static const char __pyx_k_dumps[] = "dumps"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_f_row[] = "f_row"; +static const char __pyx_k_float[] = "float"; +static const char __pyx_k_getID[] = "getID"; +static const char __pyx_k_idRow[] = "idRow"; +static const char __pyx_k_index[] = "index"; +static const char __pyx_k_inner[] = "_inner"; +static const char __pyx_k_items[] = "items"; +static const char __pyx_k_label[] = "label"; +static const char __pyx_k_loads[] = "loads"; +static const char __pyx_k_print[] = "print"; +static const char __pyx_k_ready[] = "ready"; +static const char __pyx_k_recs1[] = "recs1"; +static const char __pyx_k_recs2[] = "recs2"; +static const char __pyx_k_right[] = "right"; +static const char __pyx_k_rowid[] = "rowid"; +static const char __pyx_k_super[] = "super"; +static const char __pyx_k_ujson[] = "ujson"; +static const char __pyx_k_utils[] = "utils"; +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_width[] = "width"; +static const char __pyx_k_BLabel[] = "BLabel"; +static const char __pyx_k_Blocks[] = "Blocks"; +static const char __pyx_k_Header[] = "Header"; +static const char __pyx_k_Logger[] = "Logger"; +static const char __pyx_k_Paging[] = "Paging"; +static const char __pyx_k_absurl[] = "absurl"; +static const char __pyx_k_addRow[] = "addRow"; +static const char __pyx_k_append[] = "append"; +static const char __pyx_k_args_2[] = "args"; +static const char __pyx_k_blocks[] = "blocks"; +static const char __pyx_k_body_2[] = "body="; +static const char __pyx_k_cancel[] = "cancel"; +static const char __pyx_k_canvas[] = "canvas"; +static const char __pyx_k_csscls[] = "csscls"; +static const char __pyx_k_delRow[] = "delRow"; +static const char __pyx_k_fields[] = "fields"; +static const char __pyx_k_freeze[] = "freeze"; +static const char __pyx_k_halign[] = "halign"; +static const char __pyx_k_header[] = "header"; +static const char __pyx_k_height[] = "height"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_init_2[] = "init"; +static const char __pyx_k_kwargs[] = "kwargs="; +static const char __pyx_k_loaded[] = "loaded"; +static const char __pyx_k_middle[] = "middle"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_others[] = "others"; +static const char __pyx_k_paging[] = "paging"; +static const char __pyx_k_params[] = "params"; +static const char __pyx_k_return[] = "return"; +static const char __pyx_k_row_id[] = "row_id"; +static const char __pyx_k_tailer[] = "tailer"; +static const char __pyx_k_target[] = "target"; +static const char __pyx_k_uitype[] = "uitype"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_valign[] = "valign"; +static const char __pyx_k_viewer[] = "viewer"; +static const char __pyx_k_Factory[] = "Factory"; +static const char __pyx_k_Toolbar[] = "Toolbar"; +static const char __pyx_k_curpage[] = "curpage"; +static const char __pyx_k_default[] = "default"; +static const char __pyx_k_inner_2[] = "inner="; +static const char __pyx_k_inner_3[] = "inner"; +static const char __pyx_k_integer[] = "integer"; +static const char __pyx_k_loading[] = "loading"; +static const char __pyx_k_locater[] = "locater"; +static const char __pyx_k_max_row[] = "max_row"; +static const char __pyx_k_on_size[] = "on_size"; +static const char __pyx_k_options[] = "options"; +static const char __pyx_k_partial[] = "partial"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_reverse[] = "reverse"; +static const char __pyx_k_rowdesc[] = "rowdesc"; +static const char __pyx_k_spacing[] = "spacing"; +static const char __pyx_k_strdate[] = "strdate"; +static const char __pyx_k_texture[] = "texture"; +static const char __pyx_k_toolbar[] = "toolbar"; +static const char __pyx_k_DataGrid[] = "DataGrid"; +static const char __pyx_k_Row_init[] = "Row.init"; +static const char __pyx_k_TimeCost[] = "TimeCost"; +static const char __pyx_k_add_page[] = "add_page"; +static const char __pyx_k_body_css[] = "body_css"; +static const char __pyx_k_datagrid[] = "datagrid"; +static const char __pyx_k_datatype[] = "datatype"; +static const char __pyx_k_dispatch[] = "dispatch"; +static const char __pyx_k_fbo_rect[] = "_fbo_rect"; +static const char __pyx_k_getValue[] = "getValue"; +static const char __pyx_k_kivy_app[] = "kivy.app"; +static const char __pyx_k_kwargs_2[] = "kwargs"; +static const char __pyx_k_ldr_desc[] = "ldr_desc"; +static const char __pyx_k_loadData[] = "loadData"; +static const char __pyx_k_noheader[] = "noheader"; +static const char __pyx_k_on_press[] = "on_press"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_rendered[] = "rendered"; +static const char __pyx_k_row_data[] = "row_data"; +static const char __pyx_k_scroll_x[] = "scroll_x"; +static const char __pyx_k_scroll_y[] = "scroll_y"; +static const char __pyx_k_selected[] = "selected"; +static const char __pyx_k_setWidth[] = "setWidth"; +static const char __pyx_k_vertical[] = "vertical"; +static const char __pyx_k_BoxLayout[] = "BoxLayout"; +static const char __pyx_k_Rectangle[] = "Rectangle"; +static const char __pyx_k_WidgetCSS[] = "WidgetCSS"; +static const char __pyx_k_bar_width[] = "bar_width"; +static const char __pyx_k_clearRows[] = "clearRows"; +static const char __pyx_k_do_search[] = "do_search"; +static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_font_size[] = "font_size"; +static const char __pyx_k_functools[] = "functools"; +static const char __pyx_k_linewidth[] = "linewidth"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_page_rows[] = "page_rows"; +static const char __pyx_k_rowHeight[] = "rowHeight"; +static const char __pyx_k_rowheight[] = "rowheight"; +static const char __pyx_k_show_rows[] = "show_rows"; +static const char __pyx_k_size_hint[] = "size_hint"; +static const char __pyx_k_textField[] = "textField"; +static const char __pyx_k_timestamp[] = "timestamp"; +static const char __pyx_k_total_cnt[] = "total_cnt"; +static const char __pyx_k_DictObject[] = "DictObject"; +static const char __pyx_k_GridLayout[] = "GridLayout"; +static const char __pyx_k_Row___init[] = "Row.__init__"; +static const char __pyx_k_ScrollView[] = "ScrollView"; +static const char __pyx_k_add_widget[] = "add_widget"; +static const char __pyx_k_baseWidget[] = "baseWidget"; +static const char __pyx_k_bodyOnSize[] = "bodyOnSize"; +static const char __pyx_k_dataloader[] = "dataloader"; +static const char __pyx_k_delRowById[] = "delRowById"; +static const char __pyx_k_getLocater[] = "getLocater"; +static const char __pyx_k_getRowData[] = "_getRowData"; +static const char __pyx_k_header_css[] = "header_css"; +static const char __pyx_k_horizontal[] = "horizontal"; +static const char __pyx_k_info_names[] = "info_names"; +static const char __pyx_k_kivy_clock[] = "kivy.clock"; +static const char __pyx_k_row_height[] = "row_height"; +static const char __pyx_k_select_row[] = "select_row"; +static const char __pyx_k_show_infos[] = "show_infos"; +static const char __pyx_k_valueField[] = "valueField"; +static const char __pyx_k_widget_css[] = "widget_css"; +static const char __pyx_k_widgettype[] = "widgettype"; +static const char __pyx_k_Body___init[] = "Body.__init__"; +static const char __pyx_k_Body_addRow[] = "Body.addRow"; +static const char __pyx_k_Cell___init[] = "Cell.__init__"; +static const char __pyx_k_Header_init[] = "Header.init"; +static const char __pyx_k_ScrollPanel[] = "ScrollPanel"; +static const char __pyx_k_WidgetReady[] = "WidgetReady"; +static const char __pyx_k_delete_page[] = "delete_page"; +static const char __pyx_k_freeze_flag[] = "freeze_flag"; +static const char __pyx_k_freeze_part[] = "freeze_part"; +static const char __pyx_k_getShowRows[] = "getShowRows"; +static const char __pyx_k_kivy_logger[] = "kivy.logger"; +static const char __pyx_k_loader_info[] = "loader_info"; +static const char __pyx_k_normal_part[] = "normal_part"; +static const char __pyx_k_on_newbegin[] = "on_newbegin"; +static const char __pyx_k_on_selected[] = "on_selected"; +static const char __pyx_k_on_sizeTask[] = "on_sizeTask"; +static const char __pyx_k_orientation[] = "orientation"; +static const char __pyx_k_scrollpanel[] = "scrollpanel"; +static const char __pyx_k_setPageRows[] = "setPageRows"; +static const char __pyx_k_size_hint_x[] = "size_hint_x"; +static const char __pyx_k_size_hint_y[] = "size_hint_y"; +static const char __pyx_k_tailer_desc[] = "tailer_desc"; +static const char __pyx_k_widgetBuild[] = "widgetBuild"; +static const char __pyx_k_DataGridPart[] = "DataGridPart"; +static const char __pyx_k_ListProperty[] = "ListProperty"; +static const char __pyx_k_Row_selected[] = "Row.selected"; +static const char __pyx_k_build_tailer[] = "build_tailer"; +static const char __pyx_k_field_widget[] = "field_widget"; +static const char __pyx_k_fields_width[] = "fields_width"; +static const char __pyx_k_getRowData_2[] = "getRowData"; +static const char __pyx_k_getRowHeight[] = "getRowHeight"; +static const char __pyx_k_kivy_factory[] = "kivy.factory"; +static const char __pyx_k_loadNextPage[] = "loadNextPage"; +static const char __pyx_k_row_selected[] = "row selected"; +static const char __pyx_k_select_rowid[] = "select_rowid"; +static const char __pyx_k_BLabel___init[] = "BLabel.__init__"; +static const char __pyx_k_Cell_on_press[] = "Cell.on_press"; +static const char __pyx_k_Header___init[] = "Header.__init__"; +static const char __pyx_k_RelatedLoader[] = "RelatedLoader"; +static const char __pyx_k_bufferObjects[] = "bufferObjects"; +static const char __pyx_k_clear_widgets[] = "clear_widgets"; +static const char __pyx_k_createToolbar[] = "createToolbar"; +static const char __pyx_k_freeze_fields[] = "freeze_fields"; +static const char __pyx_k_getPartFields[] = "getPartFields"; +static const char __pyx_k_kivy_graphics[] = "kivy.graphics"; +static const char __pyx_k_kivyblocks_dg[] = "kivyblocks.dg"; +static const char __pyx_k_normal_fields[] = "normal_fields"; +static const char __pyx_k_on_deletepage[] = "on_deletepage"; +static const char __pyx_k_on_pageloaded[] = "on_pageloaded"; +static const char __pyx_k_on_scrollstop[] = "on_scrollstop"; +static const char __pyx_k_remove_widget[] = "remove_widget"; +static const char __pyx_k_schedule_once[] = "schedule_once"; +static const char __pyx_k_tailer_widget[] = "tailer_widget"; +static const char __pyx_k_Body_clearRows[] = "Body.clearRows"; +static const char __pyx_k_ButtonBehavior[] = "ButtonBehavior"; +static const char __pyx_k_StringProperty[] = "StringProperty"; +static const char __pyx_k_add_page_delay[] = "add_page_delay"; +static const char __pyx_k_appPublic_myTE[] = "appPublic.myTE"; +static const char __pyx_k_getFieldsWidth[] = "getFieldsWidth"; +static const char __pyx_k_kivy_uix_label[] = "kivy.uix.label"; +static const char __pyx_k_on_scroll_stop[] = "on_scroll_stop"; +static const char __pyx_k_row_selected_2[] = "row_selected"; +static const char __pyx_k_selected_rowid[] = "selected_rowid"; +static const char __pyx_k_setSizeOptions[] = "setSizeOptions"; +static const char __pyx_k_tailer_widgets[] = "tailer_widgets"; +static const char __pyx_k_BGColorBehavior[] = "BGColorBehavior"; +static const char __pyx_k_Body_delRowById[] = "Body.delRowById"; +static const char __pyx_k_Body_getRowData[] = "Body.getRowData"; +static const char __pyx_k_BooleanProperty[] = "BooleanProperty"; +static const char __pyx_k_DataGrid___init[] = "DataGrid.__init__"; +static const char __pyx_k_DataGrid_addRow[] = "DataGrid.addRow"; +static const char __pyx_k_DataGrid_delRow[] = "DataGrid.delRow"; +static const char __pyx_k_background_rect[] = "_background_rect"; +static const char __pyx_k_bgcolorbehavior[] = "bgcolorbehavior"; +static const char __pyx_k_getValue_return[] = "getValue() return="; +static const char __pyx_k_kivy_properties[] = "kivy.properties"; +static const char __pyx_k_kivy_uix_button[] = "kivy.uix.button"; +static const char __pyx_k_DataGrid_locater[] = "DataGrid.locater"; +static const char __pyx_k_background_color[] = "_background_color"; +static const char __pyx_k_loadPreviousPage[] = "loadPreviousPage"; +static const char __pyx_k_Body_getRowHeight[] = "Body.getRowHeight"; +static const char __pyx_k_DataGridPart_init[] = "DataGridPart.init"; +static const char __pyx_k_DataGrid_add_page[] = "DataGrid.add_page"; +static const char __pyx_k_DataGrid_getValue[] = "DataGrid.getValue"; +static const char __pyx_k_DataGrid_loadData[] = "DataGrid.loadData"; +static const char __pyx_k_calculateShowRows[] = "calculateShowRows"; +static const char __pyx_k_kivyblocks_dg_pyx[] = "kivyblocks\\dg.pyx"; +static const char __pyx_k_DataGrid_clearRows[] = "DataGrid.clearRows"; +static const char __pyx_k_DataGrid_rowHeight[] = "DataGrid.rowHeight"; +static const char __pyx_k_appPublic_timecost[] = "appPublic.timecost"; +static const char __pyx_k_appPublic_uniqueID[] = "appPublic.uniqueID"; +static const char __pyx_k_build_tailer_other[] = "build_tailer_other"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_createDataGridPart[] = "createDataGridPart"; +static const char __pyx_k_kivy_uix_boxlayout[] = "kivy.uix.boxlayout"; +static const char __pyx_k_update_tailer_info[] = "update_tailer_info"; +static const char __pyx_k_DataGridPart___init[] = "DataGridPart.__init__"; +static const char __pyx_k_DataGridPart_addRow[] = "DataGridPart.addRow"; +static const char __pyx_k_DataGrid_bodyOnSize[] = "DataGrid.bodyOnSize"; +static const char __pyx_k_DataGrid_show_infos[] = "DataGrid.show_infos"; +static const char __pyx_k_build_tailer_others[] = "build_tailer_others"; +static const char __pyx_k_kivy_uix_gridlayout[] = "kivy.uix.gridlayout"; +static const char __pyx_k_kivy_uix_scrollview[] = "kivy.uix.scrollview"; +static const char __pyx_k_register_event_type[] = "register_event_type"; +static const char __pyx_k_DataGridPart_on_size[] = "DataGridPart.on_size"; +static const char __pyx_k_DataGrid__getRowData[] = "DataGrid._getRowData"; +static const char __pyx_k_DataGrid_delete_page[] = "DataGrid.delete_page"; +static const char __pyx_k_DataGrid_getShowRows[] = "DataGrid.getShowRows"; +static const char __pyx_k_DataGrid_loader_info[] = "DataGrid.loader_info"; +static const char __pyx_k_DataGrid_on_selected[] = "DataGrid.on_selected"; +static const char __pyx_k_appPublic_dictObject[] = "appPublic.dictObject"; +static const char __pyx_k_DataGridPart_setWidth[] = "DataGridPart.setWidth"; +static const char __pyx_k_DataGrid_build_tailer[] = "DataGrid.build_tailer"; +static const char __pyx_k_DataGridPart_clearRows[] = "DataGridPart.clearRows"; +static const char __pyx_k_DataGrid_createToolbar[] = "DataGrid.createToolbar"; +static const char __pyx_k_DataGrid_getPartFields[] = "DataGrid.getPartFields"; +static const char __pyx_k_DataGrid_on_scrollstop[] = "DataGrid.on_scrollstop"; +static const char __pyx_k_dg_py_clearRows_called[] = "dg.py:clearRows() called"; +static const char __pyx_k_string_template_render[] = "string_template_render"; +static const char __pyx_k_DataGrid_add_page_delay[] = "DataGrid.add_page_delay"; +static const char __pyx_k_dg_py_delete_page_called[] = "dg.py:delete_page() called"; +static const char __pyx_k_DataGrid_on_selected_fire[] = "DataGrid():on_selected fire"; +static const char __pyx_k_DataGrid_calculateShowRows[] = "DataGrid.calculateShowRows"; +static const char __pyx_k_DataGrid_need_a_DataLoader[] = "DataGrid need a DataLoader"; +static const char __pyx_k_DataGridPart_getFieldsWidth[] = "DataGridPart.getFieldsWidth"; +static const char __pyx_k_DataGrid_createDataGridPart[] = "DataGrid.createDataGridPart"; +static const char __pyx_k_DataGrid_update_tailer_info[] = "DataGrid.update_tailer_info"; +static const char __pyx_k_DataGrid_build_tailer_others[] = "DataGrid.build_tailer_others"; +static const char __pyx_k_DataGrid_data_format_widgettype[] = "\n\tDataGrid data format:\n\t{\n\t\t\"widgettype\":\"DataGrid\",\n\t\t\"dataloader\":{\n\t\t\t\"page\":1,\n\t\t\t\"rows\":60,\n\t\t\t\"dataurl\":\"eeee\",\n\t\t\t\"params\":{\n\t\t\t}\n\t\t},\n\t\t\"tailer\":{\n\t\t\t\"options\":{\n\t\t\t}\n\t\t\t\"info\":[\n\t\t\t\t\"total_cnt\",\n\t\t\t\t\"total_page\",\n\t\t\t\t\"page_rows\",\n\t\t\t\t\"curpage\"\n\t\t\t],\n\t\t\t\"others\":{\n\t\t\t}\n\t\t},\n\t\t\"row_height\": CSize,\n\t\t\"header_css\":\"default\",\n\t\t\"body_css\":\"default\",\n\t\t\"spacing\":1,\n\t\t\"fields\":[\n\t\t\t{\n\t\t\t\t\"name\":\"field1\",\n\t\t\t\t\"label\":\"Field1\",\n\t\t\t\t\"datatype\":\"str\",\n\t\t\t\t\"uitype\":\"code\",\n\t\t\t\t\"value_field\":,\n\t\t\t\t\"text_field\":\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"name\":\"field2\",\n\t\t\t\t\"label\":\"Field2\",\n\t\t\t\t\"viewer\":{\n\t\t\t\t\tblock dic\n\t\t\t\t}\n\t\t\t}\n\t\t\t...\n\t\t]\n\t\t\"binds\":[\n\t\t]\n\t}\n\t"; +static PyObject *__pyx_kp_s_0; +static PyObject *__pyx_kp_s_0_df; +static PyObject *__pyx_n_s_App; +static PyObject *__pyx_n_s_BGColorBehavior; +static PyObject *__pyx_n_s_BLabel; +static PyObject *__pyx_n_s_BLabel___init; +static PyObject *__pyx_n_s_Blocks; +static PyObject *__pyx_n_s_Body; +static PyObject *__pyx_n_s_Body___init; +static PyObject *__pyx_n_s_Body_addRow; +static PyObject *__pyx_n_s_Body_clearRows; +static PyObject *__pyx_n_s_Body_delRowById; +static PyObject *__pyx_n_s_Body_getRowData; +static PyObject *__pyx_n_s_Body_getRowHeight; +static PyObject *__pyx_n_s_BooleanProperty; +static PyObject *__pyx_n_s_BoxLayout; +static PyObject *__pyx_n_s_ButtonBehavior; +static PyObject *__pyx_n_s_CSize; +static PyObject *__pyx_n_s_Cell; +static PyObject *__pyx_n_s_Cell___init; +static PyObject *__pyx_n_s_Cell_on_press; +static PyObject *__pyx_n_s_Clock; +static PyObject *__pyx_n_s_Color; +static PyObject *__pyx_n_s_DataGrid; +static PyObject *__pyx_n_s_DataGridPart; +static PyObject *__pyx_n_s_DataGridPart___init; +static PyObject *__pyx_n_s_DataGridPart_addRow; +static PyObject *__pyx_n_s_DataGridPart_clearRows; +static PyObject *__pyx_n_s_DataGridPart_getFieldsWidth; +static PyObject *__pyx_n_s_DataGridPart_init; +static PyObject *__pyx_n_s_DataGridPart_on_size; +static PyObject *__pyx_n_s_DataGridPart_setWidth; +static PyObject *__pyx_n_s_DataGrid___init; +static PyObject *__pyx_n_s_DataGrid__getRowData; +static PyObject *__pyx_n_s_DataGrid_addRow; +static PyObject *__pyx_n_s_DataGrid_add_page; +static PyObject *__pyx_n_s_DataGrid_add_page_delay; +static PyObject *__pyx_n_s_DataGrid_bodyOnSize; +static PyObject *__pyx_n_s_DataGrid_build_tailer; +static PyObject *__pyx_n_s_DataGrid_build_tailer_others; +static PyObject *__pyx_n_s_DataGrid_calculateShowRows; +static PyObject *__pyx_n_s_DataGrid_clearRows; +static PyObject *__pyx_n_s_DataGrid_createDataGridPart; +static PyObject *__pyx_n_s_DataGrid_createToolbar; +static PyObject *__pyx_kp_s_DataGrid_data_format_widgettype; +static PyObject *__pyx_n_s_DataGrid_delRow; +static PyObject *__pyx_n_s_DataGrid_delete_page; +static PyObject *__pyx_n_s_DataGrid_getPartFields; +static PyObject *__pyx_n_s_DataGrid_getShowRows; +static PyObject *__pyx_n_s_DataGrid_getValue; +static PyObject *__pyx_n_s_DataGrid_loadData; +static PyObject *__pyx_n_s_DataGrid_loader_info; +static PyObject *__pyx_n_s_DataGrid_locater; +static PyObject *__pyx_kp_s_DataGrid_need_a_DataLoader; +static PyObject *__pyx_n_s_DataGrid_on_scrollstop; +static PyObject *__pyx_n_s_DataGrid_on_selected; +static PyObject *__pyx_kp_s_DataGrid_on_selected_fire; +static PyObject *__pyx_n_s_DataGrid_rowHeight; +static PyObject *__pyx_n_s_DataGrid_show_infos; +static PyObject *__pyx_n_s_DataGrid_update_tailer_info; +static PyObject *__pyx_n_s_DictObject; +static PyObject *__pyx_n_s_Factory; +static PyObject *__pyx_n_s_Fbo; +static PyObject *__pyx_n_s_GridLayout; +static PyObject *__pyx_n_s_HBox; +static PyObject *__pyx_n_s_Header; +static PyObject *__pyx_n_s_Header___init; +static PyObject *__pyx_n_s_Header_init; +static PyObject *__pyx_n_s_Label; +static PyObject *__pyx_n_s_ListProperty; +static PyObject *__pyx_n_s_Logger; +static PyObject *__pyx_n_s_Paging; +static PyObject *__pyx_n_s_Rectangle; +static PyObject *__pyx_n_s_RelatedLoader; +static PyObject *__pyx_n_s_Row; +static PyObject *__pyx_n_s_Row___init; +static PyObject *__pyx_n_s_Row_init; +static PyObject *__pyx_n_s_Row_selected; +static PyObject *__pyx_n_s_SUPER; +static PyObject *__pyx_n_s_ScrollPanel; +static PyObject *__pyx_n_s_ScrollView; +static PyObject *__pyx_n_s_StringProperty; +static PyObject *__pyx_n_s_Text; +static PyObject *__pyx_n_s_TimeCost; +static PyObject *__pyx_n_s_Toolbar; +static PyObject *__pyx_n_s_VBox; +static PyObject *__pyx_n_s_WidgetCSS; +static PyObject *__pyx_n_s_WidgetReady; +static PyObject *__pyx_kp_s__17; +static PyObject *__pyx_kp_s__5; +static PyObject *__pyx_n_s_absurl; +static PyObject *__pyx_n_s_addRow; +static PyObject *__pyx_n_s_add_page; +static PyObject *__pyx_n_s_add_page_delay; +static PyObject *__pyx_n_s_add_widget; +static PyObject *__pyx_n_s_alert; +static PyObject *__pyx_n_s_appPublic_dictObject; +static PyObject *__pyx_n_s_appPublic_myTE; +static PyObject *__pyx_n_s_appPublic_timecost; +static PyObject *__pyx_n_s_appPublic_uniqueID; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_kp_s_args; +static PyObject *__pyx_n_s_args_2; +static PyObject *__pyx_n_s_b; +static PyObject *__pyx_n_s_background_color; +static PyObject *__pyx_n_s_background_rect; +static PyObject *__pyx_n_s_bar_width; +static PyObject *__pyx_n_s_baseWidget; +static PyObject *__pyx_n_s_bgcolorbehavior; +static PyObject *__pyx_n_s_bind; +static PyObject *__pyx_n_s_bl; +static PyObject *__pyx_n_s_blocks; +static PyObject *__pyx_n_s_body; +static PyObject *__pyx_n_s_bodyOnSize; +static PyObject *__pyx_kp_s_body_2; +static PyObject *__pyx_n_s_body_css; +static PyObject *__pyx_n_s_bufferObjects; +static PyObject *__pyx_n_s_build_tailer; +static PyObject *__pyx_n_s_build_tailer_other; +static PyObject *__pyx_n_s_build_tailer_others; +static PyObject *__pyx_n_s_c; +static PyObject *__pyx_n_s_calculateShowRows; +static PyObject *__pyx_n_s_cancel; +static PyObject *__pyx_n_s_canvas; +static PyObject *__pyx_n_s_cell; +static PyObject *__pyx_n_s_clearRows; +static PyObject *__pyx_n_s_clear_widgets; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_code; +static PyObject *__pyx_n_s_copy; +static PyObject *__pyx_n_s_createDataGridPart; +static PyObject *__pyx_n_s_createToolbar; +static PyObject *__pyx_n_s_csscls; +static PyObject *__pyx_n_s_curpage; +static PyObject *__pyx_n_s_d; +static PyObject *__pyx_n_s_data; +static PyObject *__pyx_n_s_datagrid; +static PyObject *__pyx_n_s_dataloader; +static PyObject *__pyx_n_s_datatype; +static PyObject *__pyx_n_s_dec; +static PyObject *__pyx_n_s_default; +static PyObject *__pyx_n_s_delRow; +static PyObject *__pyx_n_s_delRowById; +static PyObject *__pyx_n_s_delete_page; +static PyObject *__pyx_n_s_desc; +static PyObject *__pyx_n_s_dg; +static PyObject *__pyx_kp_s_dg_py_clearRows_called; +static PyObject *__pyx_kp_s_dg_py_delete_page_called; +static PyObject *__pyx_n_s_dic; +static PyObject *__pyx_n_s_dir; +static PyObject *__pyx_n_s_dispatch; +static PyObject *__pyx_n_s_do_search; +static PyObject *__pyx_n_s_doc; +static PyObject *__pyx_n_s_dummy; +static PyObject *__pyx_n_s_dumps; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_enter; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_exit; +static PyObject *__pyx_n_s_f; +static PyObject *__pyx_n_s_f_row; +static PyObject *__pyx_n_s_fbo; +static PyObject *__pyx_n_s_fbo_rect; +static PyObject *__pyx_n_s_field_widget; +static PyObject *__pyx_n_s_fields; +static PyObject *__pyx_n_s_fields_width; +static PyObject *__pyx_n_s_file; +static PyObject *__pyx_n_s_float; +static PyObject *__pyx_n_s_font_size; +static PyObject *__pyx_n_s_freeze; +static PyObject *__pyx_n_s_freeze_fields; +static PyObject *__pyx_n_s_freeze_flag; +static PyObject *__pyx_n_s_freeze_part; +static PyObject *__pyx_n_s_fs; +static PyObject *__pyx_n_s_functools; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_s_getFieldsWidth; +static PyObject *__pyx_n_s_getID; +static PyObject *__pyx_n_s_getLocater; +static PyObject *__pyx_n_s_getPartFields; +static PyObject *__pyx_n_s_getRowData; +static PyObject *__pyx_n_s_getRowData_2; +static PyObject *__pyx_n_s_getRowHeight; +static PyObject *__pyx_n_s_getShowRows; +static PyObject *__pyx_n_s_getValue; +static PyObject *__pyx_kp_s_getValue_return; +static PyObject *__pyx_n_s_h; +static PyObject *__pyx_n_s_halign; +static PyObject *__pyx_n_s_header; +static PyObject *__pyx_n_s_header_css; +static PyObject *__pyx_n_s_height; +static PyObject *__pyx_n_s_horizontal; +static PyObject *__pyx_n_s_i; +static PyObject *__pyx_n_s_i18n; +static PyObject *__pyx_n_s_id; +static PyObject *__pyx_n_s_idRow; +static PyObject *__pyx_n_s_ids; +static PyObject *__pyx_n_s_idx; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_index; +static PyObject *__pyx_n_s_info; +static PyObject *__pyx_n_s_info_names; +static PyObject *__pyx_n_s_init; +static PyObject *__pyx_n_s_init_2; +static PyObject *__pyx_n_s_inner; +static PyObject *__pyx_kp_s_inner_2; +static PyObject *__pyx_n_s_inner_3; +static PyObject *__pyx_n_s_int; +static PyObject *__pyx_n_s_integer; +static PyObject *__pyx_n_s_items; +static PyObject *__pyx_n_s_json; +static PyObject *__pyx_n_s_keys; +static PyObject *__pyx_n_s_kivy_app; +static PyObject *__pyx_n_s_kivy_clock; +static PyObject *__pyx_n_s_kivy_factory; +static PyObject *__pyx_n_s_kivy_graphics; +static PyObject *__pyx_n_s_kivy_logger; +static PyObject *__pyx_n_s_kivy_properties; +static PyObject *__pyx_n_s_kivy_uix_boxlayout; +static PyObject *__pyx_n_s_kivy_uix_button; +static PyObject *__pyx_n_s_kivy_uix_gridlayout; +static PyObject *__pyx_n_s_kivy_uix_label; +static PyObject *__pyx_n_s_kivy_uix_scrollview; +static PyObject *__pyx_n_s_kivyblocks_dg; +static PyObject *__pyx_kp_s_kivyblocks_dg_pyx; +static PyObject *__pyx_n_s_kw; +static PyObject *__pyx_kp_s_kwargs; +static PyObject *__pyx_n_s_kwargs_2; +static PyObject *__pyx_n_s_label; +static PyObject *__pyx_n_s_ldr_desc; +static PyObject *__pyx_n_s_left; +static PyObject *__pyx_n_s_linewidth; +static PyObject *__pyx_n_u_list; +static PyObject *__pyx_n_s_loadData; +static PyObject *__pyx_n_s_loadNextPage; +static PyObject *__pyx_n_s_loadPreviousPage; +static PyObject *__pyx_n_s_loaded; +static PyObject *__pyx_n_s_loader_info; +static PyObject *__pyx_n_s_loading; +static PyObject *__pyx_n_s_loads; +static PyObject *__pyx_n_s_locater; +static PyObject *__pyx_n_s_long; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_max_row; +static PyObject *__pyx_n_s_metaclass; +static PyObject *__pyx_n_s_middle; +static PyObject *__pyx_n_s_module; +static PyObject *__pyx_n_s_n; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_name_2; +static PyObject *__pyx_n_s_noheader; +static PyObject *__pyx_n_s_normal_fields; +static PyObject *__pyx_n_s_normal_part; +static PyObject *__pyx_n_s_o; +static PyObject *__pyx_n_s_on_deletepage; +static PyObject *__pyx_n_s_on_newbegin; +static PyObject *__pyx_n_s_on_pageloaded; +static PyObject *__pyx_n_s_on_press; +static PyObject *__pyx_n_s_on_scroll_stop; +static PyObject *__pyx_n_s_on_scrollstop; +static PyObject *__pyx_n_s_on_selected; +static PyObject *__pyx_n_s_on_size; +static PyObject *__pyx_n_s_on_sizeTask; +static PyObject *__pyx_n_s_options; +static PyObject *__pyx_n_s_opts; +static PyObject *__pyx_n_s_orientation; +static PyObject *__pyx_n_s_others; +static PyObject *__pyx_n_s_page; +static PyObject *__pyx_n_s_page_rows; +static PyObject *__pyx_n_s_paging; +static PyObject *__pyx_n_s_params; +static PyObject *__pyx_n_s_part; +static PyObject *__pyx_n_s_partial; +static PyObject *__pyx_n_s_pos; +static PyObject *__pyx_n_s_prepare; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_qualname; +static PyObject *__pyx_n_s_r; +static PyObject *__pyx_n_s_rd; +static PyObject *__pyx_n_s_ready; +static PyObject *__pyx_n_s_rec; +static PyObject *__pyx_n_s_recs; +static PyObject *__pyx_n_s_recs1; +static PyObject *__pyx_n_s_recs2; +static PyObject *__pyx_n_s_register_event_type; +static PyObject *__pyx_n_s_remove_widget; +static PyObject *__pyx_n_s_rendered; +static PyObject *__pyx_n_s_return; +static PyObject *__pyx_n_s_reverse; +static PyObject *__pyx_n_s_right; +static PyObject *__pyx_n_s_row; +static PyObject *__pyx_n_s_rowHeight; +static PyObject *__pyx_n_s_row_data; +static PyObject *__pyx_n_s_row_height; +static PyObject *__pyx_n_s_row_id; +static PyObject *__pyx_kp_s_row_selected; +static PyObject *__pyx_n_s_row_selected_2; +static PyObject *__pyx_n_s_rowdesc; +static PyObject *__pyx_n_s_rowheight; +static PyObject *__pyx_n_s_rowid; +static PyObject *__pyx_n_s_s; +static PyObject *__pyx_n_s_schedule_once; +static PyObject *__pyx_n_s_scroll_x; +static PyObject *__pyx_n_s_scroll_y; +static PyObject *__pyx_n_s_scrollpanel; +static PyObject *__pyx_n_s_select_row; +static PyObject *__pyx_n_s_select_rowid; +static PyObject *__pyx_n_s_selected; +static PyObject *__pyx_n_s_selected_rowid; +static PyObject *__pyx_n_s_self; +static PyObject *__pyx_n_s_setPageRows; +static PyObject *__pyx_n_s_setSizeOptions; +static PyObject *__pyx_n_s_setWidth; +static PyObject *__pyx_n_s_show_infos; +static PyObject *__pyx_n_s_show_rows; +static PyObject *__pyx_n_s_size; +static PyObject *__pyx_n_s_size_hint; +static PyObject *__pyx_n_s_size_hint_x; +static PyObject *__pyx_n_s_size_hint_y; +static PyObject *__pyx_n_s_spacing; +static PyObject *__pyx_n_s_str; +static PyObject *__pyx_n_s_strdate; +static PyObject *__pyx_n_s_string_template_render; +static PyObject *__pyx_n_s_super; +static PyObject *__pyx_n_s_t; +static PyObject *__pyx_n_s_tailer; +static PyObject *__pyx_n_s_tailer_desc; +static PyObject *__pyx_n_s_tailer_widget; +static PyObject *__pyx_n_s_tailer_widgets; +static PyObject *__pyx_n_s_target; +static PyObject *__pyx_n_s_tb; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_text; +static PyObject *__pyx_n_s_textField; +static PyObject *__pyx_n_s_texture; +static PyObject *__pyx_n_s_tf; +static PyObject *__pyx_n_s_time; +static PyObject *__pyx_n_s_timestamp; +static PyObject *__pyx_n_s_toolbar; +static PyObject *__pyx_n_s_total_cnt; +static PyObject *__pyx_n_s_txt; +static PyObject *__pyx_n_s_uitype; +static PyObject *__pyx_n_s_ujson; +static PyObject *__pyx_n_s_up; +static PyObject *__pyx_n_s_update; +static PyObject *__pyx_n_s_update_tailer_info; +static PyObject *__pyx_n_s_utils; +static PyObject *__pyx_n_s_v; +static PyObject *__pyx_n_s_valign; +static PyObject *__pyx_n_s_value; +static PyObject *__pyx_n_s_valueField; +static PyObject *__pyx_n_s_vertical; +static PyObject *__pyx_n_s_vf; +static PyObject *__pyx_n_s_viewer; +static PyObject *__pyx_n_s_w; +static PyObject *__pyx_n_s_w1; +static PyObject *__pyx_n_s_widgetBuild; +static PyObject *__pyx_n_s_widget_css; +static PyObject *__pyx_n_s_widgettype; +static PyObject *__pyx_n_s_width; +static PyObject *__pyx_n_s_wrap; +static PyObject *__pyx_n_s_x; +static PyObject *__pyx_pf_10kivyblocks_2dg_field_widget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc, PyObject *__pyx_v_rec); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_6BLabel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Cell___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Cell_2on_press(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_rowdesc, PyObject *__pyx_v_header, PyObject *__pyx_v_data, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row_2init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row_4selected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_6Header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_6Header_2init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_2addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_data, PyObject *__pyx_v_index); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_4clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_6delRowById(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_8getRowData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rowid); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_10getRowHeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dg, PyObject *__pyx_v_freeze_flag, PyObject *__pyx_v_fields); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_2setWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_4getFieldsWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_6init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_8clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_10addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_12on_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_options); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_2build_tailer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tailer_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_4update_tailer_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_6show_infos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tailer_widget, PyObject *__pyx_v_info_names); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_8build_tailer_others(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_10loader_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_12locater(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_14on_scrollstop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_v); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_16getValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_18_getRowData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rowid); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_20bodyOnSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_22rowHeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_24calculateShowRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_26getShowRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_28clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_30add_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_32add_page_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_34delete_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_36addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_38delRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, CYTHON_UNUSED PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_40createToolbar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_42on_selected(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_row); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_44loadData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_46createDataGridPart(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_48getPartFields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freeze_flag); /* proto */ +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_update = {0, &__pyx_n_s_update, 0, 0, 0}; +static PyObject *__pyx_float_0_3; +static PyObject *__pyx_float_0_001; +static PyObject *__pyx_float_0_999; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_10; +static PyObject *__pyx_int_60; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__18; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__23; +static PyObject *__pyx_tuple__25; +static PyObject *__pyx_tuple__27; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__32; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__39; +static PyObject *__pyx_tuple__41; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__46; +static PyObject *__pyx_tuple__48; +static PyObject *__pyx_tuple__50; +static PyObject *__pyx_tuple__52; +static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__60; +static PyObject *__pyx_tuple__62; +static PyObject *__pyx_tuple__64; +static PyObject *__pyx_tuple__66; +static PyObject *__pyx_tuple__68; +static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__71; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__83; +static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__86; +static PyObject *__pyx_tuple__88; +static PyObject *__pyx_tuple__90; +static PyObject *__pyx_tuple__92; +static PyObject *__pyx_tuple__94; +static PyObject *__pyx_tuple__96; +static PyObject *__pyx_tuple__98; +static PyObject *__pyx_tuple__100; +static PyObject *__pyx_tuple__102; +static PyObject *__pyx_tuple__104; +static PyObject *__pyx_tuple__106; +static PyObject *__pyx_tuple__108; +static PyObject *__pyx_tuple__110; +static PyObject *__pyx_tuple__112; +static PyObject *__pyx_tuple__114; +static PyObject *__pyx_tuple__116; +static PyObject *__pyx_tuple__118; +static PyObject *__pyx_tuple__120; +static PyObject *__pyx_codeobj__22; +static PyObject *__pyx_codeobj__24; +static PyObject *__pyx_codeobj__26; +static PyObject *__pyx_codeobj__28; +static PyObject *__pyx_codeobj__31; +static PyObject *__pyx_codeobj__34; +static PyObject *__pyx_codeobj__36; +static PyObject *__pyx_codeobj__38; +static PyObject *__pyx_codeobj__40; +static PyObject *__pyx_codeobj__42; +static PyObject *__pyx_codeobj__44; +static PyObject *__pyx_codeobj__47; +static PyObject *__pyx_codeobj__49; +static PyObject *__pyx_codeobj__51; +static PyObject *__pyx_codeobj__53; +static PyObject *__pyx_codeobj__55; +static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__59; +static PyObject *__pyx_codeobj__61; +static PyObject *__pyx_codeobj__63; +static PyObject *__pyx_codeobj__65; +static PyObject *__pyx_codeobj__67; +static PyObject *__pyx_codeobj__70; +static PyObject *__pyx_codeobj__72; +static PyObject *__pyx_codeobj__74; +static PyObject *__pyx_codeobj__76; +static PyObject *__pyx_codeobj__78; +static PyObject *__pyx_codeobj__80; +static PyObject *__pyx_codeobj__82; +static PyObject *__pyx_codeobj__84; +static PyObject *__pyx_codeobj__87; +static PyObject *__pyx_codeobj__89; +static PyObject *__pyx_codeobj__91; +static PyObject *__pyx_codeobj__93; +static PyObject *__pyx_codeobj__95; +static PyObject *__pyx_codeobj__97; +static PyObject *__pyx_codeobj__99; +static PyObject *__pyx_codeobj__101; +static PyObject *__pyx_codeobj__103; +static PyObject *__pyx_codeobj__105; +static PyObject *__pyx_codeobj__107; +static PyObject *__pyx_codeobj__109; +static PyObject *__pyx_codeobj__111; +static PyObject *__pyx_codeobj__113; +static PyObject *__pyx_codeobj__115; +static PyObject *__pyx_codeobj__117; +static PyObject *__pyx_codeobj__119; +/* Late includes */ + +/* "kivyblocks/dg.pyx":33 + * from .widget_css import WidgetCSS + * + * def field_widget(desc, rec): # <<<<<<<<<<<<<< + * viewer = desc.get('viewer') + * if viewer: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_1field_widget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_1field_widget = {"field_widget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_1field_widget, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_1field_widget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_desc = 0; + PyObject *__pyx_v_rec = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("field_widget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_desc,&__pyx_n_s_rec,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rec)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("field_widget", 1, 2, 2, 1); __PYX_ERR(0, 33, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "field_widget") < 0)) __PYX_ERR(0, 33, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_desc = values[0]; + __pyx_v_rec = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("field_widget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.field_widget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_field_widget(__pyx_self, __pyx_v_desc, __pyx_v_rec); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_field_widget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc, PyObject *__pyx_v_rec) { + PyObject *__pyx_v_viewer = NULL; + PyObject *__pyx_v_rendered = NULL; + PyObject *__pyx_v_dic = NULL; + PyObject *__pyx_v_blocks = NULL; + PyObject *__pyx_v_uitype = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_tf = NULL; + PyObject *__pyx_v_vf = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("field_widget", 0); + + /* "kivyblocks/dg.pyx":34 + * + * def field_widget(desc, rec): + * viewer = desc.get('viewer') # <<<<<<<<<<<<<< + * if viewer: + * if not isinstance(viewer,str): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_viewer) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_viewer); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_viewer = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":35 + * def field_widget(desc, rec): + * viewer = desc.get('viewer') + * if viewer: # <<<<<<<<<<<<<< + * if not isinstance(viewer,str): + * viewer = json.dumps(viewer) + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_viewer); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 35, __pyx_L1_error) + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":36 + * viewer = desc.get('viewer') + * if viewer: + * if not isinstance(viewer,str): # <<<<<<<<<<<<<< + * viewer = json.dumps(viewer) + * rendered = string_template_render(viewer, rec) + */ + __pyx_t_4 = PyString_Check(__pyx_v_viewer); + __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":37 + * if viewer: + * if not isinstance(viewer,str): + * viewer = json.dumps(viewer) # <<<<<<<<<<<<<< + * rendered = string_template_render(viewer, rec) + * dic = json.loads(rendered) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_viewer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_viewer); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_viewer, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":36 + * viewer = desc.get('viewer') + * if viewer: + * if not isinstance(viewer,str): # <<<<<<<<<<<<<< + * viewer = json.dumps(viewer) + * rendered = string_template_render(viewer, rec) + */ + } + + /* "kivyblocks/dg.pyx":38 + * if not isinstance(viewer,str): + * viewer = json.dumps(viewer) + * rendered = string_template_render(viewer, rec) # <<<<<<<<<<<<<< + * dic = json.loads(rendered) + * if dic is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_string_template_render); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_viewer, __pyx_v_rec}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_viewer, __pyx_v_rec}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_v_viewer); + __Pyx_GIVEREF(__pyx_v_viewer); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_viewer); + __Pyx_INCREF(__pyx_v_rec); + __Pyx_GIVEREF(__pyx_v_rec); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_rec); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_rendered = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":39 + * viewer = json.dumps(viewer) + * rendered = string_template_render(viewer, rec) + * dic = json.loads(rendered) # <<<<<<<<<<<<<< + * if dic is None: + * return None + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_rendered) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_rendered); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_dic = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":40 + * rendered = string_template_render(viewer, rec) + * dic = json.loads(rendered) + * if dic is None: # <<<<<<<<<<<<<< + * return None + * blocks = Factory.Blocks() + */ + __pyx_t_5 = (__pyx_v_dic == Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":41 + * dic = json.loads(rendered) + * if dic is None: + * return None # <<<<<<<<<<<<<< + * blocks = Factory.Blocks() + * return blocks.widgetBuild(dic) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":40 + * rendered = string_template_render(viewer, rec) + * dic = json.loads(rendered) + * if dic is None: # <<<<<<<<<<<<<< + * return None + * blocks = Factory.Blocks() + */ + } + + /* "kivyblocks/dg.pyx":42 + * if dic is None: + * return None + * blocks = Factory.Blocks() # <<<<<<<<<<<<<< + * return blocks.widgetBuild(dic) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Factory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_blocks = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":43 + * return None + * blocks = Factory.Blocks() + * return blocks.widgetBuild(dic) # <<<<<<<<<<<<<< + * + * uitype = desc.get('uitype', 'str') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_blocks, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_dic) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_dic); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":35 + * def field_widget(desc, rec): + * viewer = desc.get('viewer') + * if viewer: # <<<<<<<<<<<<<< + * if not isinstance(viewer,str): + * viewer = json.dumps(viewer) + */ + } + + /* "kivyblocks/dg.pyx":45 + * return blocks.widgetBuild(dic) + * + * uitype = desc.get('uitype', 'str') # <<<<<<<<<<<<<< + * if uitype is None: + * uitype = desc.get('datatype') + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_uitype = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":46 + * + * uitype = desc.get('uitype', 'str') + * if uitype is None: # <<<<<<<<<<<<<< + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + */ + __pyx_t_4 = (__pyx_v_uitype == Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":47 + * uitype = desc.get('uitype', 'str') + * if uitype is None: + * uitype = desc.get('datatype') # <<<<<<<<<<<<<< + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + * return Text(text = str(desc['value']), + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_n_s_datatype) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_s_datatype); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_uitype, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":46 + * + * uitype = desc.get('uitype', 'str') + * if uitype is None: # <<<<<<<<<<<<<< + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + */ + } + + /* "kivyblocks/dg.pyx":48 + * if uitype is None: + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: # <<<<<<<<<<<<<< + * return Text(text = str(desc['value']), + * font_size=CSize(1),wrap=True, + */ + __Pyx_INCREF(__pyx_v_uitype); + __pyx_t_3 = __pyx_v_uitype; + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_strdate, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 48, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_time, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 48, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_timestamp, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __pyx_t_4; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (__pyx_t_5 != 0); + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":49 + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + * return Text(text = str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":50 + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + * return Text(text = str(desc['value']), + * font_size=CSize(1),wrap=True, # <<<<<<<<<<<<<< + * halign='left', valign='middle' + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_font_size, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_halign, __pyx_n_s_left) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":49 + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: + * return Text(text = str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":48 + * if uitype is None: + * uitype = desc.get('datatype') + * if uitype in [ 'str' 'date', 'time', 'timestamp' ]: # <<<<<<<<<<<<<< + * return Text(text = str(desc['value']), + * font_size=CSize(1),wrap=True, + */ + } + + /* "kivyblocks/dg.pyx":53 + * halign='left', valign='middle' + * ) + * if uitype in [ 'long', 'int','integer' ]: # <<<<<<<<<<<<<< + * return Text(text=str(desc['value']), + * font_size=CSize(1), wrap=True, + */ + __Pyx_INCREF(__pyx_v_uitype); + __pyx_t_2 = __pyx_v_uitype; + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_long, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 53, __pyx_L1_error) + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_int, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 53, __pyx_L1_error) + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_integer, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":54 + * ) + * if uitype in [ 'long', 'int','integer' ]: + * return Text(text=str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1), wrap=True, + * halign='right', valign='middle' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":55 + * if uitype in [ 'long', 'int','integer' ]: + * return Text(text=str(desc['value']), + * font_size=CSize(1), wrap=True, # <<<<<<<<<<<<<< + * halign='right', valign='middle' + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_font_size, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_halign, __pyx_n_s_right) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":54 + * ) + * if uitype in [ 'long', 'int','integer' ]: + * return Text(text=str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1), wrap=True, + * halign='right', valign='middle' + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":53 + * halign='left', valign='middle' + * ) + * if uitype in [ 'long', 'int','integer' ]: # <<<<<<<<<<<<<< + * return Text(text=str(desc['value']), + * font_size=CSize(1), wrap=True, + */ + } + + /* "kivyblocks/dg.pyx":58 + * halign='right', valign='middle' + * ) + * if uitype == 'float': # <<<<<<<<<<<<<< + * f = '%%.0%df' % desc.get('dec',2) + * return Text(text=f % float(desc['value']), + */ + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_uitype, __pyx_n_s_float, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 58, __pyx_L1_error) + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":59 + * ) + * if uitype == 'float': + * f = '%%.0%df' % desc.get('dec',2) # <<<<<<<<<<<<<< + * return Text(text=f % float(desc['value']), + * font_size=CSize(1), wrap=True, + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_0_df, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_f = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":60 + * if uitype == 'float': + * f = '%%.0%df' % desc.get('dec',2) + * return Text(text=f % float(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1), wrap=True, + * halign='right', valign='middle' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Text); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Remainder(__pyx_v_f, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_t_2) < 0) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":61 + * f = '%%.0%df' % desc.get('dec',2) + * return Text(text=f % float(desc['value']), + * font_size=CSize(1), wrap=True, # <<<<<<<<<<<<<< + * halign='right', valign='middle' + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_font_size, __pyx_t_2) < 0) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 60, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_halign, __pyx_n_s_right) < 0) __PYX_ERR(0, 60, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 60, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":60 + * if uitype == 'float': + * f = '%%.0%df' % desc.get('dec',2) + * return Text(text=f % float(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1), wrap=True, + * halign='right', valign='middle' + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":58 + * halign='right', valign='middle' + * ) + * if uitype == 'float': # <<<<<<<<<<<<<< + * f = '%%.0%df' % desc.get('dec',2) + * return Text(text=f % float(desc['value']), + */ + } + + /* "kivyblocks/dg.pyx":64 + * halign='right', valign='middle' + * ) + * if uitype == 'code': # <<<<<<<<<<<<<< + * tf = desc.get('textField','text') + * vf = desc.get('valueField','value') + */ + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_uitype, __pyx_n_s_code, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 64, __pyx_L1_error) + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":65 + * ) + * if uitype == 'code': + * tf = desc.get('textField','text') # <<<<<<<<<<<<<< + * vf = desc.get('valueField','value') + * v = rec.get(tf,rec.get(vf, ' ')) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_tf = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":66 + * if uitype == 'code': + * tf = desc.get('textField','text') + * vf = desc.get('valueField','value') # <<<<<<<<<<<<<< + * v = rec.get(tf,rec.get(vf, ' ')) + * return Text(text=v, font_size = CSize(1), wrap=True, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_vf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":67 + * tf = desc.get('textField','text') + * vf = desc.get('valueField','value') + * v = rec.get(tf,rec.get(vf, ' ')) # <<<<<<<<<<<<<< + * return Text(text=v, font_size = CSize(1), wrap=True, + * halign='right', valign='middle' + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rec, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rec, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_vf, __pyx_kp_s__5}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_7); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_vf, __pyx_kp_s__5}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_7); + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_vf); + __Pyx_GIVEREF(__pyx_v_vf); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_vf); + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_GIVEREF(__pyx_kp_s__5); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_kp_s__5); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_tf, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_tf, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_tf); + __Pyx_GIVEREF(__pyx_v_tf); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_tf); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_v = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":68 + * vf = desc.get('valueField','value') + * v = rec.get(tf,rec.get(vf, ' ')) + * return Text(text=v, font_size = CSize(1), wrap=True, # <<<<<<<<<<<<<< + * halign='right', valign='middle' + * ) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_v_v) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_font_size, __pyx_t_9) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_halign, __pyx_n_s_right) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":64 + * halign='right', valign='middle' + * ) + * if uitype == 'code': # <<<<<<<<<<<<<< + * tf = desc.get('textField','text') + * vf = desc.get('valueField','value') + */ + } + + /* "kivyblocks/dg.pyx":71 + * halign='right', valign='middle' + * ) + * return Text(text = str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_t_7) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":72 + * ) + * return Text(text = str(desc['value']), + * font_size=CSize(1),wrap=True, # <<<<<<<<<<<<<< + * halign='left', valign='middle' + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_font_size, __pyx_t_7) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_halign, __pyx_n_s_left) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":71 + * halign='right', valign='middle' + * ) + * return Text(text = str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":33 + * from .widget_css import WidgetCSS + * + * def field_widget(desc, rec): # <<<<<<<<<<<<<< + * viewer = desc.get('viewer') + * if viewer: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("kivyblocks.dg.field_widget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_viewer); + __Pyx_XDECREF(__pyx_v_rendered); + __Pyx_XDECREF(__pyx_v_dic); + __Pyx_XDECREF(__pyx_v_blocks); + __Pyx_XDECREF(__pyx_v_uitype); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_tf); + __Pyx_XDECREF(__pyx_v_vf); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":78 + * + * class BLabel(ButtonBehavior, Text): + * def __init__(self, **kw): # <<<<<<<<<<<<<< + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_6BLabel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_6BLabel_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_6BLabel_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_6BLabel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 78, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 78, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.BLabel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_6BLabel___init__(__pyx_self, __pyx_v_self, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_6BLabel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kw) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":79 + * class BLabel(ButtonBehavior, Text): + * def __init__(self, **kw): + * ButtonBehavior.__init__(self) # <<<<<<<<<<<<<< + * Text.__init__(self,**kw) + * self.csscls = 'dummy' + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ButtonBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":80 + * def __init__(self, **kw): + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) # <<<<<<<<<<<<<< + * self.csscls = 'dummy' + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __pyx_t_2 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":81 + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) + * self.csscls = 'dummy' # <<<<<<<<<<<<<< + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_csscls, __pyx_n_s_dummy) < 0) __PYX_ERR(0, 81, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":78 + * + * class BLabel(ButtonBehavior, Text): + * def __init__(self, **kw): # <<<<<<<<<<<<<< + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.BLabel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":84 + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): + * def __init__(self,row,desc, **kw): # <<<<<<<<<<<<<< + * """ + * desc:{ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Cell_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10kivyblocks_2dg_4Cell___init__[] = "\n\t\tdesc:{\n\t\t\twidth,\n\t\t\tdatatype:fff\n\t\t\tvalue:\n\t\t\tformat:\n\t\t\ton_press:\n\t\t}\n\t\t"; +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Cell_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Cell_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10kivyblocks_2dg_4Cell___init__}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Cell_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_row = 0; + PyObject *__pyx_v_desc = 0; + CYTHON_UNUSED PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_row,&__pyx_n_s_desc,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 84, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 84, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 84, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_row = values[1]; + __pyx_v_desc = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 84, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.Cell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Cell___init__(__pyx_self, __pyx_v_self, __pyx_v_row, __pyx_v_desc, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Cell___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_desc, CYTHON_UNUSED PyObject *__pyx_v_kw) { + PyObject *__pyx_v_csscls = NULL; + PyObject *__pyx_v_bl = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":94 + * } + * """ + * self.desc = desc # <<<<<<<<<<<<<< + * self.row = row + * csscls=self.row.part.datagrid.body_css + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_desc, __pyx_v_desc) < 0) __PYX_ERR(0, 94, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":95 + * """ + * self.desc = desc + * self.row = row # <<<<<<<<<<<<<< + * csscls=self.row.part.datagrid.body_css + * if self.row.header: + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row, __pyx_v_row) < 0) __PYX_ERR(0, 95, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":96 + * self.desc = desc + * self.row = row + * csscls=self.row.part.datagrid.body_css # <<<<<<<<<<<<<< + * if self.row.header: + * csscls=self.row.part.datagrid.header_css + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_body_css); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_csscls = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":97 + * self.row = row + * csscls=self.row.part.datagrid.body_css + * if self.row.header: # <<<<<<<<<<<<<< + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":98 + * csscls=self.row.part.datagrid.body_css + * if self.row.header: + * csscls=self.row.part.datagrid.header_css # <<<<<<<<<<<<<< + * super().__init__(size_hint=(None,None), + * width = self.desc['width'], + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_header_css); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_csscls, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":97 + * self.row = row + * csscls=self.row.part.datagrid.body_css + * if self.row.header: # <<<<<<<<<<<<<< + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), + */ + } + + /* "kivyblocks/dg.pyx":99 + * if self.row.header: + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), # <<<<<<<<<<<<<< + * width = self.desc['width'], + * height = self.row.part.datagrid.rowHeight(), + */ + __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 99, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size_hint, __pyx_tuple__6) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":100 + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), + * width = self.desc['width'], # <<<<<<<<<<<<<< + * height = self.row.part.datagrid.rowHeight(), + * csscls=csscls + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_desc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_width, __pyx_t_5) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":101 + * super().__init__(size_hint=(None,None), + * width = self.desc['width'], + * height = self.row.part.datagrid.rowHeight(), # <<<<<<<<<<<<<< + * csscls=csscls + * ) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rowHeight); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_height, __pyx_t_5) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":102 + * width = self.desc['width'], + * height = self.row.part.datagrid.rowHeight(), + * csscls=csscls # <<<<<<<<<<<<<< + * ) + * if desc['header']: + */ + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_csscls, __pyx_v_csscls) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":99 + * if self.row.header: + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), # <<<<<<<<<<<<<< + * width = self.desc['width'], + * height = self.row.part.datagrid.rowHeight(), + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":104 + * csscls=csscls + * ) + * if desc['header']: # <<<<<<<<<<<<<< + * bl = Text(i18n=True, text=str(desc['value']), + * font_size=CSize(1),wrap=True, + */ + __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_header); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":105 + * ) + * if desc['header']: + * bl = Text(i18n=True, text=str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Text); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i18n, Py_True) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_desc, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_t_6) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":106 + * if desc['header']: + * bl = Text(i18n=True, text=str(desc['value']), + * font_size=CSize(1),wrap=True, # <<<<<<<<<<<<<< + * halign='left', valign='middle' + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_font_size, __pyx_t_6) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wrap, Py_True) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_halign, __pyx_n_s_left) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_valign, __pyx_n_s_middle) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":105 + * ) + * if desc['header']: + * bl = Text(i18n=True, text=str(desc['value']), # <<<<<<<<<<<<<< + * font_size=CSize(1),wrap=True, + * halign='left', valign='middle' + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_bl = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":104 + * csscls=csscls + * ) + * if desc['header']: # <<<<<<<<<<<<<< + * bl = Text(i18n=True, text=str(desc['value']), + * font_size=CSize(1),wrap=True, + */ + goto __pyx_L4; + } + + /* "kivyblocks/dg.pyx":110 + * ) + * else: + * bl = field_widget(desc,self.row.row_data) # <<<<<<<<<<<<<< + * if bl: + * self.add_widget(bl) + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_field_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_row_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_desc, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_desc, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_desc); + __Pyx_GIVEREF(__pyx_v_desc); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_desc); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_bl = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_L4:; + + /* "kivyblocks/dg.pyx":111 + * else: + * bl = field_widget(desc,self.row.row_data) + * if bl: # <<<<<<<<<<<<<< + * self.add_widget(bl) + * + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_bl); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 111, __pyx_L1_error) + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":112 + * bl = field_widget(desc,self.row.row_data) + * if bl: + * self.add_widget(bl) # <<<<<<<<<<<<<< + * + * def on_press(self,o=None): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_bl) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_bl); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":111 + * else: + * bl = field_widget(desc,self.row.row_data) + * if bl: # <<<<<<<<<<<<<< + * self.add_widget(bl) + * + */ + } + + /* "kivyblocks/dg.pyx":84 + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): + * def __init__(self,row,desc, **kw): # <<<<<<<<<<<<<< + * """ + * desc:{ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.Cell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_csscls); + __Pyx_XDECREF(__pyx_v_bl); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":114 + * self.add_widget(bl) + * + * def on_press(self,o=None): # <<<<<<<<<<<<<< + * if not self.row.header: + * self.row.selected() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Cell_3on_press(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Cell_3on_press = {"on_press", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Cell_3on_press, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Cell_3on_press(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_press (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_press") < 0)) __PYX_ERR(0, 114, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_press", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Cell.on_press", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Cell_2on_press(__pyx_self, __pyx_v_self, __pyx_v_o); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Cell_2on_press(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("on_press", 0); + + /* "kivyblocks/dg.pyx":115 + * + * def on_press(self,o=None): + * if not self.row.header: # <<<<<<<<<<<<<< + * self.row.selected() + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_header); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = ((!__pyx_t_3) != 0); + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":116 + * def on_press(self,o=None): + * if not self.row.header: + * self.row.selected() # <<<<<<<<<<<<<< + * + * class Row(BoxLayout): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_selected); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":115 + * + * def on_press(self,o=None): + * if not self.row.header: # <<<<<<<<<<<<<< + * self.row.selected() + * + */ + } + + /* "kivyblocks/dg.pyx":114 + * self.add_widget(bl) + * + * def on_press(self,o=None): # <<<<<<<<<<<<<< + * if not self.row.header: + * self.row.selected() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.dg.Cell.on_press", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":119 + * + * class Row(BoxLayout): + * def __init__(self,part, rowdesc,header=False,data=None, **kw): # <<<<<<<<<<<<<< + * """ + * rowdesc=[ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10kivyblocks_2dg_3Row___init__[] = "\n\t\trowdesc=[\n\t\t\t{\n\t\t\t\twidth,\n\t\t\t\tname\n\t\t\t\tvalue\n\t\t\t\ton_press\n\t\t\t}\n\n\t\t"; +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_3Row_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_3Row_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10kivyblocks_2dg_3Row___init__}; +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_part = 0; + PyObject *__pyx_v_rowdesc = 0; + PyObject *__pyx_v_header = 0; + PyObject *__pyx_v_data = 0; + PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_part,&__pyx_n_s_rowdesc,&__pyx_n_s_header,&__pyx_n_s_data,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[3] = ((PyObject *)((PyObject *)Py_False)); + values[4] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_part)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 119, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowdesc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 119, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 119, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_part = values[1]; + __pyx_v_rowdesc = values[2]; + __pyx_v_header = values[3]; + __pyx_v_data = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.Row.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_3Row___init__(__pyx_self, __pyx_v_self, __pyx_v_part, __pyx_v_rowdesc, __pyx_v_header, __pyx_v_data, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_rowdesc, PyObject *__pyx_v_header, PyObject *__pyx_v_data, PyObject *__pyx_v_kw) { + PyObject *__pyx_v_opts = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":130 + * + * """ + * self.part = part # <<<<<<<<<<<<<< + * self.header = header + * self.row_data = data + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_part, __pyx_v_part) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":131 + * """ + * self.part = part + * self.header = header # <<<<<<<<<<<<<< + * self.row_data = data + * self.row_id = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_v_header) < 0) __PYX_ERR(0, 131, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":132 + * self.part = part + * self.header = header + * self.row_data = data # <<<<<<<<<<<<<< + * self.row_id = None + * self.linewidth = self.part.datagrid.linewidth + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_data, __pyx_v_data) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":133 + * self.header = header + * self.row_data = data + * self.row_id = None # <<<<<<<<<<<<<< + * self.linewidth = self.part.datagrid.linewidth + * self.rowdesc = rowdesc + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_id, Py_None) < 0) __PYX_ERR(0, 133, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":134 + * self.row_data = data + * self.row_id = None + * self.linewidth = self.part.datagrid.linewidth # <<<<<<<<<<<<<< + * self.rowdesc = rowdesc + * opts = kw.copy() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linewidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linewidth, __pyx_t_1) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":135 + * self.row_id = None + * self.linewidth = self.part.datagrid.linewidth + * self.rowdesc = rowdesc # <<<<<<<<<<<<<< + * opts = kw.copy() + * opts.update({ + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowdesc, __pyx_v_rowdesc) < 0) __PYX_ERR(0, 135, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":136 + * self.linewidth = self.part.datagrid.linewidth + * self.rowdesc = rowdesc + * opts = kw.copy() # <<<<<<<<<<<<<< + * opts.update({ + * "spacing":self.linewidth, + */ + __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_opts = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":138 + * opts = kw.copy() + * opts.update({ + * "spacing":self.linewidth, # <<<<<<<<<<<<<< + * "orientation":"horizontal" + * }) + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linewidth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_spacing, __pyx_t_2) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_orientation, __pyx_n_s_horizontal) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":137 + * self.rowdesc = rowdesc + * opts = kw.copy() + * opts.update({ # <<<<<<<<<<<<<< + * "spacing":self.linewidth, + * "orientation":"horizontal" + */ + __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_opts, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":141 + * "orientation":"horizontal" + * }) + * super(Row, self).__init__(**opts) # <<<<<<<<<<<<<< + * self.height = self.part.datagrid.rowHeight() + * self.init(0) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_v_opts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 141, __pyx_L1_error) + } + __pyx_t_2 = PyDict_Copy(__pyx_v_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":142 + * }) + * super(Row, self).__init__(**opts) + * self.height = self.part.datagrid.rowHeight() # <<<<<<<<<<<<<< + * self.init(0) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rowHeight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_height, __pyx_t_3) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":143 + * super(Row, self).__init__(**opts) + * self.height = self.part.datagrid.rowHeight() + * self.init(0) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":119 + * + * class Row(BoxLayout): + * def __init__(self,part, rowdesc,header=False,data=None, **kw): # <<<<<<<<<<<<<< + * """ + * rowdesc=[ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.Row.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_opts); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":146 + * + * + * def init(self,t): # <<<<<<<<<<<<<< + * w = 0 + * h = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_3init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_3Row_3init = {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_3Row_3init, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_3init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("init (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, 1); __PYX_ERR(0, 146, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 146, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_t = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Row.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_3Row_2init(__pyx_self, __pyx_v_self, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row_2init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t) { + PyObject *__pyx_v_w = NULL; + CYTHON_UNUSED long __pyx_v_h; + PyObject *__pyx_v_c = NULL; + PyObject *__pyx_v_cell = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("init", 0); + + /* "kivyblocks/dg.pyx":147 + * + * def init(self,t): + * w = 0 # <<<<<<<<<<<<<< + * h = 0 + * for c in self.rowdesc: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_w = __pyx_int_0; + + /* "kivyblocks/dg.pyx":148 + * def init(self,t): + * w = 0 + * h = 0 # <<<<<<<<<<<<<< + * for c in self.rowdesc: + * c['header'] = self.header + */ + __pyx_v_h = 0; + + /* "kivyblocks/dg.pyx":149 + * w = 0 + * h = 0 + * for c in self.rowdesc: # <<<<<<<<<<<<<< + * c['header'] = self.header + * cell = Cell(self,c) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowdesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 149, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 149, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 149, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":150 + * h = 0 + * for c in self.rowdesc: + * c['header'] = self.header # <<<<<<<<<<<<<< + * cell = Cell(self,c) + * self.add_widget(cell) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_v_c, __pyx_n_s_header, __pyx_t_1) < 0)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":151 + * for c in self.rowdesc: + * c['header'] = self.header + * cell = Cell(self,c) # <<<<<<<<<<<<<< + * self.add_widget(cell) + * w += cell.width + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Cell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_c}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_c}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self); + __Pyx_INCREF(__pyx_v_c); + __Pyx_GIVEREF(__pyx_v_c); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_c); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_cell, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":152 + * c['header'] = self.header + * cell = Cell(self,c) + * self.add_widget(cell) # <<<<<<<<<<<<<< + * w += cell.width + * self.size_hint = None,None + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_cell) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_cell); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":153 + * cell = Cell(self,c) + * self.add_widget(cell) + * w += cell.width # <<<<<<<<<<<<<< + * self.size_hint = None,None + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cell, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_w, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_w, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":149 + * w = 0 + * h = 0 + * for c in self.rowdesc: # <<<<<<<<<<<<<< + * c['header'] = self.header + * cell = Cell(self,c) + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":154 + * self.add_widget(cell) + * w += cell.width + * self.size_hint = None,None # <<<<<<<<<<<<<< + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + * + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_size_hint, __pyx_tuple__6) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":155 + * w += cell.width + * self.size_hint = None,None + * self.width = w + self.linewidth * (len(self.rowdesc)+1) # <<<<<<<<<<<<<< + * + * def selected(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linewidth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowdesc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_3 + 1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Add(__pyx_v_w, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_5) < 0) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":146 + * + * + * def init(self,t): # <<<<<<<<<<<<<< + * w = 0 + * h = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.dg.Row.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_c); + __Pyx_XDECREF(__pyx_v_cell); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":157 + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + * + * def selected(self): # <<<<<<<<<<<<<< + * if not hasattr(self,'row_data'): + * return # header + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_5selected(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_3Row_5selected = {"selected", (PyCFunction)__pyx_pw_10kivyblocks_2dg_3Row_5selected, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_3Row_5selected(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("selected (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_3Row_4selected(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_3Row_4selected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("selected", 0); + + /* "kivyblocks/dg.pyx":158 + * + * def selected(self): + * if not hasattr(self,'row_data'): # <<<<<<<<<<<<<< + * return # header + * print('row selected',self.row_id, self.row_data) + */ + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_s_row_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":159 + * def selected(self): + * if not hasattr(self,'row_data'): + * return # header # <<<<<<<<<<<<<< + * print('row selected',self.row_id, self.row_data) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":158 + * + * def selected(self): + * if not hasattr(self,'row_data'): # <<<<<<<<<<<<<< + * return # header + * print('row selected',self.row_id, self.row_data) + */ + } + + /* "kivyblocks/dg.pyx":160 + * if not hasattr(self,'row_data'): + * return # header + * print('row selected',self.row_id, self.row_data) # <<<<<<<<<<<<<< + * + * self.part.datagrid.row_selected = True + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_s_row_selected); + __Pyx_GIVEREF(__pyx_kp_s_row_selected); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_row_selected); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + if (__Pyx_PrintOne(0, __pyx_t_5) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":162 + * print('row selected',self.row_id, self.row_data) + * + * self.part.datagrid.row_selected = True # <<<<<<<<<<<<<< + * self.part.datagrid.select_rowid = self.row_id + * self.part.datagrid.select_row = self + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_row_selected_2, Py_True) < 0) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":163 + * + * self.part.datagrid.row_selected = True + * self.part.datagrid.select_rowid = self.row_id # <<<<<<<<<<<<<< + * self.part.datagrid.select_row = self + * self.part.datagrid.dispatch('on_selected',self) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_select_rowid, __pyx_t_4) < 0) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":164 + * self.part.datagrid.row_selected = True + * self.part.datagrid.select_rowid = self.row_id + * self.part.datagrid.select_row = self # <<<<<<<<<<<<<< + * self.part.datagrid.dispatch('on_selected',self) + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_select_row, __pyx_v_self) < 0) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":165 + * self.part.datagrid.select_rowid = self.row_id + * self.part.datagrid.select_row = self + * self.part.datagrid.dispatch('on_selected',self) # <<<<<<<<<<<<<< + * + * class Header(WidgetReady, ScrollPanel): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dispatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_on_selected, __pyx_v_self}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_on_selected, __pyx_v_self}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_n_s_on_selected); + __Pyx_GIVEREF(__pyx_n_s_on_selected); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_s_on_selected); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":157 + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + * + * def selected(self): # <<<<<<<<<<<<<< + * if not hasattr(self,'row_data'): + * return # header + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.dg.Row.selected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":168 + * + * class Header(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * SUPER(Header, self, kw) + * self.part = part + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_6Header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_6Header_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_6Header_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_6Header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_part = 0; + PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_part,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_part)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 168, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 168, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_part = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 168, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.Header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_6Header___init__(__pyx_self, __pyx_v_self, __pyx_v_part, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_6Header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_kw) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":169 + * class Header(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): + * SUPER(Header, self, kw) # <<<<<<<<<<<<<< + * self.part = part + * self.init(1) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SUPER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_kw}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_kw}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self); + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_kw); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":170 + * def __init__(self,part,**kw): + * SUPER(Header, self, kw) + * self.part = part # <<<<<<<<<<<<<< + * self.init(1) + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_part, __pyx_v_part) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":171 + * SUPER(Header, self, kw) + * self.part = part + * self.init(1) # <<<<<<<<<<<<<< + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":172 + * self.part = part + * self.init(1) + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) # <<<<<<<<<<<<<< + * if self.part.freeze_flag: + * self.bar_width = 0 + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_on_scrollstop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_scroll_stop, __pyx_t_6) < 0) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":173 + * self.init(1) + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: # <<<<<<<<<<<<<< + * self.bar_width = 0 + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_freeze_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "kivyblocks/dg.pyx":174 + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: + * self.bar_width = 0 # <<<<<<<<<<<<<< + * + * def init(self,t): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bar_width, __pyx_int_0) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":173 + * self.init(1) + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: # <<<<<<<<<<<<<< + * self.bar_width = 0 + * + */ + } + + /* "kivyblocks/dg.pyx":168 + * + * class Header(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * SUPER(Header, self, kw) + * self.part = part + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.Header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":176 + * self.bar_width = 0 + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_6Header_3init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_6Header_3init = {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_6Header_3init, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_6Header_3init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("init (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, 1); __PYX_ERR(0, 176, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 176, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_t = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Header.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_6Header_2init(__pyx_self, __pyx_v_self, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_6Header_2init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t) { + PyObject *__pyx_v_rd = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("init", 0); + + /* "kivyblocks/dg.pyx":177 + * + * def init(self,t): + * rd = [ f.copy() for f in self.part.rowdesc ] # <<<<<<<<<<<<<< + * [ f.update({'value':self.part.fields[i].get('label', \ + * self.part.fields[i].get('name'))}) \ + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rowdesc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_5(__pyx_t_2); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 177, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_rd = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":178 + * def init(self,t): + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ # <<<<<<<<<<<<<< + * self.part.fields[i].get('name'))}) \ + * for i,f in enumerate(rd) ] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_int_0); + __pyx_t_2 = __pyx_int_0; + + /* "kivyblocks/dg.pyx":180 + * [ f.update({'value':self.part.fields[i].get('label', \ + * self.part.fields[i].get('name'))}) \ + * for i,f in enumerate(rd) ] # <<<<<<<<<<<<<< + * self.header = Row(self.part,rd,header=True) + * self.add_widget(self.header) + */ + __pyx_t_3 = __pyx_v_rd; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; + for (;;) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":178 + * def init(self,t): + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ # <<<<<<<<<<<<<< + * self.part.fields[i].get('name'))}) \ + * for i,f in enumerate(rd) ] + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_fields); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_get); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "kivyblocks/dg.pyx":179 + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ + * self.part.fields[i].get('name'))}) \ # <<<<<<<<<<<<<< + * for i,f in enumerate(rd) ] + * self.header = Row(self.part,rd,header=True) + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_fields); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_get); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_13, function); + } + } + __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_12, __pyx_n_s_name) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_n_s_name); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + __pyx_t_14 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_14 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_n_s_label, __pyx_t_10}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_n_s_label, __pyx_t_10}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_13) { + __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL; + } + __Pyx_INCREF(__pyx_n_s_label); + __Pyx_GIVEREF(__pyx_n_s_label); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_n_s_label); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_value, __pyx_t_9) < 0) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":180 + * [ f.update({'value':self.part.fields[i].get('label', \ + * self.part.fields[i].get('name'))}) \ + * for i,f in enumerate(rd) ] # <<<<<<<<<<<<<< + * self.header = Row(self.part,rd,header=True) + * self.add_widget(self.header) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":181 + * self.part.fields[i].get('name'))}) \ + * for i,f in enumerate(rd) ] + * self.header = Row(self.part,rd,header=True) # <<<<<<<<<<<<<< + * self.add_widget(self.header) + * self.height = self.header.height + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_rd); + __Pyx_GIVEREF(__pyx_v_rd); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rd); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_header, Py_True) < 0) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_6) < 0) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":182 + * for i,f in enumerate(rd) ] + * self.header = Row(self.part,rd,header=True) + * self.add_widget(self.header) # <<<<<<<<<<<<<< + * self.height = self.header.height + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":183 + * self.header = Row(self.part,rd,header=True) + * self.add_widget(self.header) + * self.height = self.header.height # <<<<<<<<<<<<<< + * + * class Body(WidgetReady, ScrollPanel): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_height, __pyx_t_2) < 0) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":176 + * self.bar_width = 0 + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("kivyblocks.dg.Header.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_rd); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":186 + * + * class Body(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * self.part = part + * SUPER(Body, self, kw) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Body_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_part = 0; + PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_part,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_part)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 186, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 186, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_part = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 186, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.Body.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body___init__(__pyx_self, __pyx_v_self, __pyx_v_part, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_kw) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":187 + * class Body(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): + * self.part = part # <<<<<<<<<<<<<< + * SUPER(Body, self, kw) + * self._inner.spacing = self.part.datagrid.linewidth + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_part, __pyx_v_part) < 0) __PYX_ERR(0, 187, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":188 + * def __init__(self,part,**kw): + * self.part = part + * SUPER(Body, self, kw) # <<<<<<<<<<<<<< + * self._inner.spacing = self.part.datagrid.linewidth + * self.size_hint=(1,1) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SUPER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Body); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_kw}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_kw}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self); + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_kw); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":189 + * self.part = part + * SUPER(Body, self, kw) + * self._inner.spacing = self.part.datagrid.linewidth # <<<<<<<<<<<<<< + * self.size_hint=(1,1) + * self.idRow = {} + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linewidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_spacing, __pyx_t_1) < 0) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":190 + * SUPER(Body, self, kw) + * self._inner.spacing = self.part.datagrid.linewidth + * self.size_hint=(1,1) # <<<<<<<<<<<<<< + * self.idRow = {} + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_size_hint, __pyx_tuple__7) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":191 + * self._inner.spacing = self.part.datagrid.linewidth + * self.size_hint=(1,1) + * self.idRow = {} # <<<<<<<<<<<<<< + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_idRow, __pyx_t_2) < 0) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":192 + * self.size_hint=(1,1) + * self.idRow = {} + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) # <<<<<<<<<<<<<< + * if self.part.freeze_flag: + * self.bar_width = 0 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_on_scrollstop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_on_scroll_stop, __pyx_t_6) < 0) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":193 + * self.idRow = {} + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: # <<<<<<<<<<<<<< + * self.bar_width = 0 + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_freeze_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "kivyblocks/dg.pyx":194 + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: + * self.bar_width = 0 # <<<<<<<<<<<<<< + * + * def addRow(self,id, data,index=0): + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bar_width, __pyx_int_0) < 0) __PYX_ERR(0, 194, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":193 + * self.idRow = {} + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + * if self.part.freeze_flag: # <<<<<<<<<<<<<< + * self.bar_width = 0 + * + */ + } + + /* "kivyblocks/dg.pyx":186 + * + * class Body(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * self.part = part + * SUPER(Body, self, kw) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.Body.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":196 + * self.bar_width = 0 + * + * def addRow(self,id, data,index=0): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_3addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_3addRow = {"addRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Body_3addRow, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_3addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + PyObject *__pyx_v_data = 0; + PyObject *__pyx_v_index = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("addRow (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,&__pyx_n_s_data,&__pyx_n_s_index,0}; + PyObject* values[4] = {0,0,0,0}; + values[3] = ((PyObject *)((PyObject *)__pyx_int_0)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addRow", 0, 3, 4, 1); __PYX_ERR(0, 196, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addRow", 0, 3, 4, 2); __PYX_ERR(0, 196, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRow") < 0)) __PYX_ERR(0, 196, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_id = values[1]; + __pyx_v_data = values[2]; + __pyx_v_index = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("addRow", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 196, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Body.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body_2addRow(__pyx_self, __pyx_v_self, __pyx_v_id, __pyx_v_data, __pyx_v_index); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_2addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_data, PyObject *__pyx_v_index) { + PyObject *__pyx_v_rd = NULL; + PyObject *__pyx_v_row = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("addRow", 0); + + /* "kivyblocks/dg.pyx":197 + * + * def addRow(self,id, data,index=0): + * rd = [ f.copy() for f in self.part.rowdesc ] # <<<<<<<<<<<<<< + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + * row = Row(self.part,rd,data=data) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rowdesc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_5(__pyx_t_2); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 197, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_rd = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":198 + * def addRow(self,id, data,index=0): + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] # <<<<<<<<<<<<<< + * row = Row(self.part,rd,data=data) + * row.row_id = id + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_rd; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; + for (;;) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 198, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_f, __pyx_n_s_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_value, __pyx_t_8) < 0) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":199 + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + * row = Row(self.part,rd,data=data) # <<<<<<<<<<<<<< + * row.row_id = id + * self.add_widget(row,index=index) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_v_rd); + __Pyx_GIVEREF(__pyx_v_rd); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rd); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_row = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":200 + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + * row = Row(self.part,rd,data=data) + * row.row_id = id # <<<<<<<<<<<<<< + * self.add_widget(row,index=index) + * self.idRow[id] = row + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_row, __pyx_n_s_row_id, __pyx_v_id) < 0) __PYX_ERR(0, 200, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":201 + * row = Row(self.part,rd,data=data) + * row.row_id = id + * self.add_widget(row,index=index) # <<<<<<<<<<<<<< + * self.idRow[id] = row + * return row + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_row); + __Pyx_GIVEREF(__pyx_v_row); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_row); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, __pyx_v_index) < 0) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":202 + * row.row_id = id + * self.add_widget(row,index=index) + * self.idRow[id] = row # <<<<<<<<<<<<<< + * return row + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idRow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_id, __pyx_v_row) < 0)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":203 + * self.add_widget(row,index=index) + * self.idRow[id] = row + * return row # <<<<<<<<<<<<<< + * + * def clearRows(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_row); + __pyx_r = __pyx_v_row; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":196 + * self.bar_width = 0 + * + * def addRow(self,id, data,index=0): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("kivyblocks.dg.Body.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_rd); + __Pyx_XDECREF(__pyx_v_row); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":205 + * return row + * + * def clearRows(self): # <<<<<<<<<<<<<< + * self.idRow = {} + * self.clear_widgets() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_5clearRows(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_5clearRows = {"clearRows", (PyCFunction)__pyx_pw_10kivyblocks_2dg_4Body_5clearRows, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_5clearRows(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("clearRows (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body_4clearRows(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_4clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("clearRows", 0); + + /* "kivyblocks/dg.pyx":206 + * + * def clearRows(self): + * self.idRow = {} # <<<<<<<<<<<<<< + * self.clear_widgets() + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_idRow, __pyx_t_1) < 0) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":207 + * def clearRows(self): + * self.idRow = {} + * self.clear_widgets() # <<<<<<<<<<<<<< + * + * def delRowById(self,id): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clear_widgets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":205 + * return row + * + * def clearRows(self): # <<<<<<<<<<<<<< + * self.idRow = {} + * self.clear_widgets() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.Body.clearRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":209 + * self.clear_widgets() + * + * def delRowById(self,id): # <<<<<<<<<<<<<< + * row = self.idRow.get(id) + * if row: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_7delRowById(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_7delRowById = {"delRowById", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Body_7delRowById, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_7delRowById(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("delRowById (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("delRowById", 1, 2, 2, 1); __PYX_ERR(0, 209, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delRowById") < 0)) __PYX_ERR(0, 209, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_id = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("delRowById", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 209, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Body.delRowById", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body_6delRowById(__pyx_self, __pyx_v_self, __pyx_v_id); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_6delRowById(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id) { + PyObject *__pyx_v_row = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("delRowById", 0); + + /* "kivyblocks/dg.pyx":210 + * + * def delRowById(self,id): + * row = self.idRow.get(id) # <<<<<<<<<<<<<< + * if row: + * self.remove_widget(row) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idRow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_id); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_row = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":211 + * def delRowById(self,id): + * row = self.idRow.get(id) + * if row: # <<<<<<<<<<<<<< + * self.remove_widget(row) + * if self.idRow.get(id): + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_row); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 211, __pyx_L1_error) + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":212 + * row = self.idRow.get(id) + * if row: + * self.remove_widget(row) # <<<<<<<<<<<<<< + * if self.idRow.get(id): + * del self.idRow[id] + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_widget); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_row) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_row); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":211 + * def delRowById(self,id): + * row = self.idRow.get(id) + * if row: # <<<<<<<<<<<<<< + * self.remove_widget(row) + * if self.idRow.get(id): + */ + } + + /* "kivyblocks/dg.pyx":213 + * if row: + * self.remove_widget(row) + * if self.idRow.get(id): # <<<<<<<<<<<<<< + * del self.idRow[id] + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idRow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_id); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":214 + * self.remove_widget(row) + * if self.idRow.get(id): + * del self.idRow[id] # <<<<<<<<<<<<<< + * + * def getRowData(self,rowid): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idRow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_DelItem(__pyx_t_1, __pyx_v_id) < 0)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":213 + * if row: + * self.remove_widget(row) + * if self.idRow.get(id): # <<<<<<<<<<<<<< + * del self.idRow[id] + * + */ + } + + /* "kivyblocks/dg.pyx":209 + * self.clear_widgets() + * + * def delRowById(self,id): # <<<<<<<<<<<<<< + * row = self.idRow.get(id) + * if row: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.Body.delRowById", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_row); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":216 + * del self.idRow[id] + * + * def getRowData(self,rowid): # <<<<<<<<<<<<<< + * return self.idRow[rowid].row_data + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_9getRowData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_9getRowData = {"getRowData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_4Body_9getRowData, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_9getRowData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_rowid = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getRowData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_rowid,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowid)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getRowData", 1, 2, 2, 1); __PYX_ERR(0, 216, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getRowData") < 0)) __PYX_ERR(0, 216, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_rowid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getRowData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 216, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.Body.getRowData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body_8getRowData(__pyx_self, __pyx_v_self, __pyx_v_rowid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_8getRowData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rowid) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getRowData", 0); + + /* "kivyblocks/dg.pyx":217 + * + * def getRowData(self,rowid): + * return self.idRow[rowid].row_data # <<<<<<<<<<<<<< + * + * def getRowHeight(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idRow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_rowid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_row_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":216 + * del self.idRow[id] + * + * def getRowData(self,rowid): # <<<<<<<<<<<<<< + * return self.idRow[rowid].row_data + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.dg.Body.getRowData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":219 + * return self.idRow[rowid].row_data + * + * def getRowHeight(self): # <<<<<<<<<<<<<< + * return self.part.datagrid.rowHeight() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_11getRowHeight(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_4Body_11getRowHeight = {"getRowHeight", (PyCFunction)__pyx_pw_10kivyblocks_2dg_4Body_11getRowHeight, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_4Body_11getRowHeight(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getRowHeight (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_4Body_10getRowHeight(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_4Body_10getRowHeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getRowHeight", 0); + + /* "kivyblocks/dg.pyx":220 + * + * def getRowHeight(self): + * return self.part.datagrid.rowHeight() # <<<<<<<<<<<<<< + * + * class DataGridPart(WidgetReady, BoxLayout): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rowHeight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":219 + * return self.idRow[rowid].row_data + * + * def getRowHeight(self): # <<<<<<<<<<<<<< + * return self.part.datagrid.rowHeight() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.Body.getRowHeight", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":223 + * + * class DataGridPart(WidgetReady, BoxLayout): + * def __init__(self,dg, freeze_flag, fields): # <<<<<<<<<<<<<< + * self.datagrid = dg + * self.fields = fields + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_12DataGridPart_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_dg = 0; + PyObject *__pyx_v_freeze_flag = 0; + PyObject *__pyx_v_fields = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dg,&__pyx_n_s_freeze_flag,&__pyx_n_s_fields,0}; + PyObject* values[4] = {0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dg)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 223, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeze_flag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 223, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fields)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 223, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 223, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_self = values[0]; + __pyx_v_dg = values[1]; + __pyx_v_freeze_flag = values[2]; + __pyx_v_fields = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 223, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart___init__(__pyx_self, __pyx_v_self, __pyx_v_dg, __pyx_v_freeze_flag, __pyx_v_fields); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dg, PyObject *__pyx_v_freeze_flag, PyObject *__pyx_v_fields) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":224 + * class DataGridPart(WidgetReady, BoxLayout): + * def __init__(self,dg, freeze_flag, fields): + * self.datagrid = dg # <<<<<<<<<<<<<< + * self.fields = fields + * self.freeze_flag = freeze_flag + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_datagrid, __pyx_v_dg) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":225 + * def __init__(self,dg, freeze_flag, fields): + * self.datagrid = dg + * self.fields = fields # <<<<<<<<<<<<<< + * self.freeze_flag = freeze_flag + * self.fields_width = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fields, __pyx_v_fields) < 0) __PYX_ERR(0, 225, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":226 + * self.datagrid = dg + * self.fields = fields + * self.freeze_flag = freeze_flag # <<<<<<<<<<<<<< + * self.fields_width = None + * BoxLayout.__init__(self, orientation='vertical') + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_freeze_flag, __pyx_v_freeze_flag) < 0) __PYX_ERR(0, 226, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":227 + * self.fields = fields + * self.freeze_flag = freeze_flag + * self.fields_width = None # <<<<<<<<<<<<<< + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fields_width, Py_None) < 0) __PYX_ERR(0, 227, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":228 + * self.freeze_flag = freeze_flag + * self.fields_width = None + * BoxLayout.__init__(self, orientation='vertical') # <<<<<<<<<<<<<< + * WidgetReady.__init__(self) + * self.init(0) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_orientation, __pyx_n_s_vertical) < 0) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":229 + * self.fields_width = None + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) # <<<<<<<<<<<<<< + * self.init(0) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":230 + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) + * self.init(0) # <<<<<<<<<<<<<< + * + * def setWidth(self): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_0); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":223 + * + * class DataGridPart(WidgetReady, BoxLayout): + * def __init__(self,dg, freeze_flag, fields): # <<<<<<<<<<<<<< + * self.datagrid = dg + * self.fields = fields + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":232 + * self.init(0) + * + * def setWidth(self): # <<<<<<<<<<<<<< + * if self.freeze_flag: + * self.size_hint_x = None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_3setWidth(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_3setWidth = {"setWidth", (PyCFunction)__pyx_pw_10kivyblocks_2dg_12DataGridPart_3setWidth, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_3setWidth(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setWidth (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_2setWidth(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_2setWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setWidth", 0); + + /* "kivyblocks/dg.pyx":233 + * + * def setWidth(self): + * if self.freeze_flag: # <<<<<<<<<<<<<< + * self.size_hint_x = None + * self.width = self.getFieldsWidth() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":234 + * def setWidth(self): + * if self.freeze_flag: + * self.size_hint_x = None # <<<<<<<<<<<<<< + * self.width = self.getFieldsWidth() + * + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_size_hint_x, Py_None) < 0) __PYX_ERR(0, 234, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":235 + * if self.freeze_flag: + * self.size_hint_x = None + * self.width = self.getFieldsWidth() # <<<<<<<<<<<<<< + * + * def getFieldsWidth(self): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getFieldsWidth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_1) < 0) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":233 + * + * def setWidth(self): + * if self.freeze_flag: # <<<<<<<<<<<<<< + * self.size_hint_x = None + * self.width = self.getFieldsWidth() + */ + } + + /* "kivyblocks/dg.pyx":232 + * self.init(0) + * + * def setWidth(self): # <<<<<<<<<<<<<< + * if self.freeze_flag: + * self.size_hint_x = None + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.setWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":237 + * self.width = self.getFieldsWidth() + * + * def getFieldsWidth(self): # <<<<<<<<<<<<<< + * if not self.fields_width: + * width = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_5getFieldsWidth(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_5getFieldsWidth = {"getFieldsWidth", (PyCFunction)__pyx_pw_10kivyblocks_2dg_12DataGridPart_5getFieldsWidth, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_5getFieldsWidth(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFieldsWidth (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_4getFieldsWidth(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_4getFieldsWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_width = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFieldsWidth", 0); + + /* "kivyblocks/dg.pyx":238 + * + * def getFieldsWidth(self): + * if not self.fields_width: # <<<<<<<<<<<<<< + * width = 0 + * for f in self.rowdesc: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":239 + * def getFieldsWidth(self): + * if not self.fields_width: + * width = 0 # <<<<<<<<<<<<<< + * for f in self.rowdesc: + * width += f['width'] + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_width = __pyx_int_0; + + /* "kivyblocks/dg.pyx":240 + * if not self.fields_width: + * width = 0 + * for f in self.rowdesc: # <<<<<<<<<<<<<< + * width += f['width'] + * self.fields_width = width + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowdesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 240, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 240, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 240, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":241 + * width = 0 + * for f in self.rowdesc: + * width += f['width'] # <<<<<<<<<<<<<< + * self.fields_width = width + * return self.fields_width + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_f, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_width, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_width, __pyx_t_7); + __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":240 + * if not self.fields_width: + * width = 0 + * for f in self.rowdesc: # <<<<<<<<<<<<<< + * width += f['width'] + * self.fields_width = width + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":242 + * for f in self.rowdesc: + * width += f['width'] + * self.fields_width = width # <<<<<<<<<<<<<< + * return self.fields_width + * + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fields_width, __pyx_v_width) < 0) __PYX_ERR(0, 242, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":238 + * + * def getFieldsWidth(self): + * if not self.fields_width: # <<<<<<<<<<<<<< + * width = 0 + * for f in self.rowdesc: + */ + } + + /* "kivyblocks/dg.pyx":243 + * width += f['width'] + * self.fields_width = width + * return self.fields_width # <<<<<<<<<<<<<< + * + * def init(self,t): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":237 + * self.width = self.getFieldsWidth() + * + * def getFieldsWidth(self): # <<<<<<<<<<<<<< + * if not self.fields_width: + * width = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.getFieldsWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_width); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":245 + * return self.fields_width + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [] + * for f in self.fields: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_7init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_7init = {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_12DataGridPart_7init, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_7init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("init (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, 1); __PYX_ERR(0, 245, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 245, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_t = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 245, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_6init(__pyx_self, __pyx_v_self, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_6init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t) { + PyObject *__pyx_v_rd = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_r = NULL; + PyObject *__pyx_v_kw = NULL; + CYTHON_UNUSED PyObject *__pyx_v_inner = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("init", 0); + + /* "kivyblocks/dg.pyx":246 + * + * def init(self,t): + * rd = [] # <<<<<<<<<<<<<< + * for f in self.fields: + * r = f.copy() + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_rd = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":247 + * def init(self,t): + * rd = [] + * for f in self.fields: # <<<<<<<<<<<<<< + * r = f.copy() + * r['width'] = CSize(f.get('width',10)) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 247, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 247, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 247, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":248 + * rd = [] + * for f in self.fields: + * r = f.copy() # <<<<<<<<<<<<<< + * r['width'] = CSize(f.get('width',10)) + * rd.append(r) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":249 + * for f in self.fields: + * r = f.copy() + * r['width'] = CSize(f.get('width',10)) # <<<<<<<<<<<<<< + * rd.append(r) + * self.rowdesc = rd + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CSize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(PyObject_SetItem(__pyx_v_r, __pyx_n_s_width, __pyx_t_1) < 0)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":250 + * r = f.copy() + * r['width'] = CSize(f.get('width',10)) + * rd.append(r) # <<<<<<<<<<<<<< + * self.rowdesc = rd + * self.setWidth() + */ + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rd, __pyx_v_r); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 250, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":247 + * def init(self,t): + * rd = [] + * for f in self.fields: # <<<<<<<<<<<<<< + * r = f.copy() + * r['width'] = CSize(f.get('width',10)) + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":251 + * r['width'] = CSize(f.get('width',10)) + * rd.append(r) + * self.rowdesc = rd # <<<<<<<<<<<<<< + * self.setWidth() + * kw = {} + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowdesc, __pyx_v_rd) < 0) __PYX_ERR(0, 251, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":252 + * rd.append(r) + * self.rowdesc = rd + * self.setWidth() # <<<<<<<<<<<<<< + * kw = {} + * if self.freeze_flag: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":253 + * self.rowdesc = rd + * self.setWidth() + * kw = {} # <<<<<<<<<<<<<< + * if self.freeze_flag: + * kw['width'] = self.fields_width + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_kw = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":254 + * self.setWidth() + * kw = {} + * if self.freeze_flag: # <<<<<<<<<<<<<< + * kw['width'] = self.fields_width + * kw['size_hint'] = (None,None) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_9) { + + /* "kivyblocks/dg.pyx":255 + * kw = {} + * if self.freeze_flag: + * kw['width'] = self.fields_width # <<<<<<<<<<<<<< + * kw['size_hint'] = (None,None) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_width, __pyx_t_2) < 0)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":256 + * if self.freeze_flag: + * kw['width'] = self.fields_width + * kw['size_hint'] = (None,None) # <<<<<<<<<<<<<< + * else: + * kw['size_hint'] = (1,None) + */ + if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_size_hint, __pyx_tuple__6) < 0)) __PYX_ERR(0, 256, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":254 + * self.setWidth() + * kw = {} + * if self.freeze_flag: # <<<<<<<<<<<<<< + * kw['width'] = self.fields_width + * kw['size_hint'] = (None,None) + */ + goto __pyx_L5; + } + + /* "kivyblocks/dg.pyx":258 + * kw['size_hint'] = (None,None) + * else: + * kw['size_hint'] = (1,None) # <<<<<<<<<<<<<< + * kw['height'] = self.datagrid.rowHeight() + * + */ + /*else*/ { + if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_size_hint, __pyx_tuple__9) < 0)) __PYX_ERR(0, 258, __pyx_L1_error) + } + __pyx_L5:; + + /* "kivyblocks/dg.pyx":259 + * else: + * kw['size_hint'] = (1,None) + * kw['height'] = self.datagrid.rowHeight() # <<<<<<<<<<<<<< + * + * self.header = None + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rowHeight); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_height, __pyx_t_2) < 0)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":261 + * kw['height'] = self.datagrid.rowHeight() + * + * self.header = None # <<<<<<<<<<<<<< + * if not self.datagrid.noheader: + * self.header = Header(self,**kw) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, Py_None) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":262 + * + * self.header = None + * if not self.datagrid.noheader: # <<<<<<<<<<<<<< + * self.header = Header(self,**kw) + * self.add_widget(self.header) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_noheader); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_10 = ((!__pyx_t_9) != 0); + if (__pyx_t_10) { + + /* "kivyblocks/dg.pyx":263 + * self.header = None + * if not self.datagrid.noheader: + * self.header = Header(self,**kw) # <<<<<<<<<<<<<< + * self.add_widget(self.header) + * inner = { + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Header); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); + __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_7) < 0) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":264 + * if not self.datagrid.noheader: + * self.header = Header(self,**kw) + * self.add_widget(self.header) # <<<<<<<<<<<<<< + * inner = { + * "widgettype":"VBox", + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":262 + * + * self.header = None + * if not self.datagrid.noheader: # <<<<<<<<<<<<<< + * self.header = Header(self,**kw) + * self.add_widget(self.header) + */ + } + + /* "kivyblocks/dg.pyx":266 + * self.add_widget(self.header) + * inner = { + * "widgettype":"VBox", # <<<<<<<<<<<<<< + * "options":{ + * } + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_widgettype, __pyx_n_s_VBox) < 0) __PYX_ERR(0, 266, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":267 + * inner = { + * "widgettype":"VBox", + * "options":{ # <<<<<<<<<<<<<< + * } + * } + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_options, __pyx_t_1) < 0) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_inner = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":270 + * } + * } + * self.body = Body(self) # <<<<<<<<<<<<<< + * self.add_widget(self.body) + * if not self.freeze_flag: + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Body); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_body, __pyx_t_7) < 0) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":271 + * } + * self.body = Body(self) + * self.add_widget(self.body) # <<<<<<<<<<<<<< + * if not self.freeze_flag: + * self.body.bind(pos=self.datagrid.bodyOnSize, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":272 + * self.body = Body(self) + * self.add_widget(self.body) + * if not self.freeze_flag: # <<<<<<<<<<<<<< + * self.body.bind(pos=self.datagrid.bodyOnSize, + * size=self.datagrid.bodyOnSize) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_flag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = ((!__pyx_t_10) != 0); + if (__pyx_t_9) { + + /* "kivyblocks/dg.pyx":273 + * self.add_widget(self.body) + * if not self.freeze_flag: + * self.body.bind(pos=self.datagrid.bodyOnSize, # <<<<<<<<<<<<<< + * size=self.datagrid.bodyOnSize) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bodyOnSize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pos, __pyx_t_5) < 0) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":274 + * if not self.freeze_flag: + * self.body.bind(pos=self.datagrid.bodyOnSize, + * size=self.datagrid.bodyOnSize) # <<<<<<<<<<<<<< + * + * def clearRows(self): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datagrid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bodyOnSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_size, __pyx_t_2) < 0) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":273 + * self.add_widget(self.body) + * if not self.freeze_flag: + * self.body.bind(pos=self.datagrid.bodyOnSize, # <<<<<<<<<<<<<< + * size=self.datagrid.bodyOnSize) + * + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":272 + * self.body = Body(self) + * self.add_widget(self.body) + * if not self.freeze_flag: # <<<<<<<<<<<<<< + * self.body.bind(pos=self.datagrid.bodyOnSize, + * size=self.datagrid.bodyOnSize) + */ + } + + /* "kivyblocks/dg.pyx":245 + * return self.fields_width + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [] + * for f in self.fields: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_rd); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_r); + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_inner); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":276 + * size=self.datagrid.bodyOnSize) + * + * def clearRows(self): # <<<<<<<<<<<<<< + * return self.body.clearRows() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_9clearRows(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_9clearRows = {"clearRows", (PyCFunction)__pyx_pw_10kivyblocks_2dg_12DataGridPart_9clearRows, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_9clearRows(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("clearRows (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_8clearRows(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_8clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("clearRows", 0); + + /* "kivyblocks/dg.pyx":277 + * + * def clearRows(self): + * return self.body.clearRows() # <<<<<<<<<<<<<< + * + * def addRow(self,id, data): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearRows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":276 + * size=self.datagrid.bodyOnSize) + * + * def clearRows(self): # <<<<<<<<<<<<<< + * return self.body.clearRows() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.clearRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":279 + * return self.body.clearRows() + * + * def addRow(self,id, data): # <<<<<<<<<<<<<< + * return self.body.addRow(id, data) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_11addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_11addRow = {"addRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_12DataGridPart_11addRow, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_11addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + PyObject *__pyx_v_data = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("addRow (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,&__pyx_n_s_data,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addRow", 1, 3, 3, 1); __PYX_ERR(0, 279, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addRow", 1, 3, 3, 2); __PYX_ERR(0, 279, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRow") < 0)) __PYX_ERR(0, 279, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_id = values[1]; + __pyx_v_data = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("addRow", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_10addRow(__pyx_self, __pyx_v_self, __pyx_v_id, __pyx_v_data); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_10addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_data) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("addRow", 0); + + /* "kivyblocks/dg.pyx":280 + * + * def addRow(self,id, data): + * return self.body.addRow(id, data) # <<<<<<<<<<<<<< + * + * def on_size(self, o, s=None): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_addRow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_id, __pyx_v_data}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_id, __pyx_v_data}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_id); + __Pyx_INCREF(__pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_data); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":279 + * return self.body.clearRows() + * + * def addRow(self,id, data): # <<<<<<<<<<<<<< + * return self.body.addRow(id, data) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":282 + * return self.body.addRow(id, data) + * + * def on_size(self, o, s=None): # <<<<<<<<<<<<<< + * if not hasattr(self, 'body'): + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_13on_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_12DataGridPart_13on_size = {"on_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_12DataGridPart_13on_size, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_12DataGridPart_13on_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + CYTHON_UNUSED PyObject *__pyx_v_s = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_size (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,&__pyx_n_s_s,0}; + PyObject* values[3] = {0,0,0}; + values[2] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("on_size", 0, 2, 3, 1); __PYX_ERR(0, 282, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_size") < 0)) __PYX_ERR(0, 282, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + __pyx_v_s = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_size", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 282, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.on_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_12DataGridPart_12on_size(__pyx_self, __pyx_v_self, __pyx_v_o, __pyx_v_s); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_12DataGridPart_12on_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("on_size", 0); + + /* "kivyblocks/dg.pyx":283 + * + * def on_size(self, o, s=None): + * if not hasattr(self, 'body'): # <<<<<<<<<<<<<< + * return + * self.body.size_hint_y = None + */ + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_s_body); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":284 + * def on_size(self, o, s=None): + * if not hasattr(self, 'body'): + * return # <<<<<<<<<<<<<< + * self.body.size_hint_y = None + * if self.header: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":283 + * + * def on_size(self, o, s=None): + * if not hasattr(self, 'body'): # <<<<<<<<<<<<<< + * return + * self.body.size_hint_y = None + */ + } + + /* "kivyblocks/dg.pyx":285 + * if not hasattr(self, 'body'): + * return + * self.body.size_hint_y = None # <<<<<<<<<<<<<< + * if self.header: + * self.body.height = self.height - self.header.height + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_size_hint_y, Py_None) < 0) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":286 + * return + * self.body.size_hint_y = None + * if self.header: # <<<<<<<<<<<<<< + * self.body.height = self.height - self.header.height + * else: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":287 + * self.body.size_hint_y = None + * if self.header: + * self.body.height = self.height - self.header.height # <<<<<<<<<<<<<< + * else: + * self.body.height = self.height + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_height, __pyx_t_4) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":286 + * return + * self.body.size_hint_y = None + * if self.header: # <<<<<<<<<<<<<< + * self.body.height = self.height - self.header.height + * else: + */ + goto __pyx_L4; + } + + /* "kivyblocks/dg.pyx":289 + * self.body.height = self.height - self.header.height + * else: + * self.body.height = self.height # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_height, __pyx_t_5) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L4:; + + /* "kivyblocks/dg.pyx":282 + * return self.body.addRow(id, data) + * + * def on_size(self, o, s=None): # <<<<<<<<<<<<<< + * if not hasattr(self, 'body'): + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.dg.DataGridPart.on_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":343 + * """ + * row_selected = BooleanProperty(False) + * def __init__(self,**options): # <<<<<<<<<<<<<< + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_options = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + __pyx_v_options = PyDict_New(); if (unlikely(!__pyx_v_options)) return NULL; + __Pyx_GOTREF(__pyx_v_options); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_options, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 343, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 343, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_options); __pyx_v_options = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid___init__(__pyx_self, __pyx_v_self, __pyx_v_options); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_options); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_options) { + PyObject *__pyx_v_ldr_desc = NULL; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "kivyblocks/dg.pyx":344 + * row_selected = BooleanProperty(False) + * def __init__(self,**options): + * options['orientation'] = 'vertical' # <<<<<<<<<<<<<< + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) + */ + if (unlikely(PyDict_SetItem(__pyx_v_options, __pyx_n_s_orientation, __pyx_n_s_vertical) < 0)) __PYX_ERR(0, 344, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":345 + * def __init__(self,**options): + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') # <<<<<<<<<<<<<< + * WidgetReady.__init__(self) + * self.select_rowid = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_orientation, __pyx_n_s_vertical) < 0) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":346 + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) # <<<<<<<<<<<<<< + * self.select_rowid = None + * self.options = options + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":347 + * BoxLayout.__init__(self, orientation='vertical') + * WidgetReady.__init__(self) + * self.select_rowid = None # <<<<<<<<<<<<<< + * self.options = options + * self.rowheight = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_select_rowid, Py_None) < 0) __PYX_ERR(0, 347, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":348 + * WidgetReady.__init__(self) + * self.select_rowid = None + * self.options = options # <<<<<<<<<<<<<< + * self.rowheight = None + * self.on_sizeTask = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_options, __pyx_v_options) < 0) __PYX_ERR(0, 348, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":349 + * self.select_rowid = None + * self.options = options + * self.rowheight = None # <<<<<<<<<<<<<< + * self.on_sizeTask = None + * self.selected_rowid = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowheight, Py_None) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":350 + * self.options = options + * self.rowheight = None + * self.on_sizeTask = None # <<<<<<<<<<<<<< + * self.selected_rowid = None + * self.show_rows = 0 + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_on_sizeTask, Py_None) < 0) __PYX_ERR(0, 350, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":351 + * self.rowheight = None + * self.on_sizeTask = None + * self.selected_rowid = None # <<<<<<<<<<<<<< + * self.show_rows = 0 + * self.toolbar = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_selected_rowid, Py_None) < 0) __PYX_ERR(0, 351, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":352 + * self.on_sizeTask = None + * self.selected_rowid = None + * self.show_rows = 0 # <<<<<<<<<<<<<< + * self.toolbar = None + * self.freeze_part = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_show_rows, __pyx_int_0) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":353 + * self.selected_rowid = None + * self.show_rows = 0 + * self.toolbar = None # <<<<<<<<<<<<<< + * self.freeze_part = None + * self.normal_part = None + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toolbar, Py_None) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":354 + * self.show_rows = 0 + * self.toolbar = None + * self.freeze_part = None # <<<<<<<<<<<<<< + * self.normal_part = None + * self.page_rows = self.options.get('page_rows', 60) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part, Py_None) < 0) __PYX_ERR(0, 354, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":355 + * self.toolbar = None + * self.freeze_part = None + * self.normal_part = None # <<<<<<<<<<<<<< + * self.page_rows = self.options.get('page_rows', 60) + * self.params = self.options.get('params',{}) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_normal_part, Py_None) < 0) __PYX_ERR(0, 355, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":356 + * self.freeze_part = None + * self.normal_part = None + * self.page_rows = self.options.get('page_rows', 60) # <<<<<<<<<<<<<< + * self.params = self.options.get('params',{}) + * self.total_cnt = 0 + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_page_rows, __pyx_t_4) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":357 + * self.normal_part = None + * self.page_rows = self.options.get('page_rows', 60) + * self.params = self.options.get('params',{}) # <<<<<<<<<<<<<< + * self.total_cnt = 0 + * self.max_row = 0 + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_params, __pyx_t_1}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_params, __pyx_t_1}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_n_s_params); + __Pyx_GIVEREF(__pyx_n_s_params); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_params); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_params, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":358 + * self.page_rows = self.options.get('page_rows', 60) + * self.params = self.options.get('params',{}) + * self.total_cnt = 0 # <<<<<<<<<<<<<< + * self.max_row = 0 + * self.row_height = self.options.get('row_height',2) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_total_cnt, __pyx_int_0) < 0) __PYX_ERR(0, 358, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":359 + * self.params = self.options.get('params',{}) + * self.total_cnt = 0 + * self.max_row = 0 # <<<<<<<<<<<<<< + * self.row_height = self.options.get('row_height',2) + * self.header_css = self.options.get('header_css','default') + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_row, __pyx_int_0) < 0) __PYX_ERR(0, 359, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":360 + * self.total_cnt = 0 + * self.max_row = 0 + * self.row_height = self.options.get('row_height',2) # <<<<<<<<<<<<<< + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_height, __pyx_t_4) < 0) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":361 + * self.max_row = 0 + * self.row_height = self.options.get('row_height',2) + * self.header_css = self.options.get('header_css','default') # <<<<<<<<<<<<<< + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_css, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":362 + * self.row_height = self.options.get('row_height',2) + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) # <<<<<<<<<<<<<< + * self.body_css = self.options.get('body_css', 'default') + * self.linewidth = self.options.get('linewidth',1) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_noheader, __pyx_t_4) < 0) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":363 + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') # <<<<<<<<<<<<<< + * self.linewidth = self.options.get('linewidth',1) + * self.curpage = 0 + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_body_css, __pyx_t_4) < 0) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":364 + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') + * self.linewidth = self.options.get('linewidth',1) # <<<<<<<<<<<<<< + * self.curpage = 0 + * self.loading = False + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linewidth, __pyx_t_4) < 0) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":365 + * self.body_css = self.options.get('body_css', 'default') + * self.linewidth = self.options.get('linewidth',1) + * self.curpage = 0 # <<<<<<<<<<<<<< + * self.loading = False + * self.freeze_fields = self.getPartFields(freeze_flag=True) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curpage, __pyx_int_0) < 0) __PYX_ERR(0, 365, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":366 + * self.linewidth = self.options.get('linewidth',1) + * self.curpage = 0 + * self.loading = False # <<<<<<<<<<<<<< + * self.freeze_fields = self.getPartFields(freeze_flag=True) + * self.normal_fields = self.getPartFields(freeze_flag=False) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_loading, Py_False) < 0) __PYX_ERR(0, 366, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":367 + * self.curpage = 0 + * self.loading = False + * self.freeze_fields = self.getPartFields(freeze_flag=True) # <<<<<<<<<<<<<< + * self.normal_fields = self.getPartFields(freeze_flag=False) + * ldr_desc = options.get('dataloader') + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getPartFields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_freeze_flag, Py_True) < 0) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_freeze_fields, __pyx_t_6) < 0) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":368 + * self.loading = False + * self.freeze_fields = self.getPartFields(freeze_flag=True) + * self.normal_fields = self.getPartFields(freeze_flag=False) # <<<<<<<<<<<<<< + * ldr_desc = options.get('dataloader') + * if not ldr_desc: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getPartFields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_freeze_flag, Py_False) < 0) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_normal_fields, __pyx_t_4) < 0) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":369 + * self.freeze_fields = self.getPartFields(freeze_flag=True) + * self.normal_fields = self.getPartFields(freeze_flag=False) + * ldr_desc = options.get('dataloader') # <<<<<<<<<<<<<< + * if not ldr_desc: + * raise Exception('DataGrid need a DataLoader') + */ + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_options, __pyx_n_s_dataloader, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ldr_desc = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":370 + * self.normal_fields = self.getPartFields(freeze_flag=False) + * ldr_desc = options.get('dataloader') + * if not ldr_desc: # <<<<<<<<<<<<<< + * raise Exception('DataGrid need a DataLoader') + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_ldr_desc); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_8 = ((!__pyx_t_7) != 0); + if (unlikely(__pyx_t_8)) { + + /* "kivyblocks/dg.pyx":371 + * ldr_desc = options.get('dataloader') + * if not ldr_desc: + * raise Exception('DataGrid need a DataLoader') # <<<<<<<<<<<<<< + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + * self.dataloader.bind(on_deletepage=self.delete_page) + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 371, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":370 + * self.normal_fields = self.getPartFields(freeze_flag=False) + * ldr_desc = options.get('dataloader') + * if not ldr_desc: # <<<<<<<<<<<<<< + * raise Exception('DataGrid need a DataLoader') + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + */ + } + + /* "kivyblocks/dg.pyx":372 + * if not ldr_desc: + * raise Exception('DataGrid need a DataLoader') + * self.dataloader = RelatedLoader(target=self, **ldr_desc) # <<<<<<<<<<<<<< + * self.dataloader.bind(on_deletepage=self.delete_page) + * self.dataloader.bind(on_pageloaded=self.add_page) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RelatedLoader); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_target, __pyx_v_self) < 0) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_3 = __pyx_t_6; + __pyx_t_6 = 0; + if (unlikely(__pyx_v_ldr_desc == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 372, __pyx_L1_error) + } + if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_v_ldr_desc) < 0) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataloader, __pyx_t_6) < 0) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":373 + * raise Exception('DataGrid need a DataLoader') + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + * self.dataloader.bind(on_deletepage=self.delete_page) # <<<<<<<<<<<<<< + * self.dataloader.bind(on_pageloaded=self.add_page) + * self.dataloader.bind(on_pageloaded=self.update_tailer_info) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delete_page); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_on_deletepage, __pyx_t_4) < 0) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":374 + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + * self.dataloader.bind(on_deletepage=self.delete_page) + * self.dataloader.bind(on_pageloaded=self.add_page) # <<<<<<<<<<<<<< + * self.dataloader.bind(on_pageloaded=self.update_tailer_info) + * self.dataloader.bind(on_newbegin=self.clearRows) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_page); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_on_pageloaded, __pyx_t_3) < 0) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":375 + * self.dataloader.bind(on_deletepage=self.delete_page) + * self.dataloader.bind(on_pageloaded=self.add_page) + * self.dataloader.bind(on_pageloaded=self.update_tailer_info) # <<<<<<<<<<<<<< + * self.dataloader.bind(on_newbegin=self.clearRows) + * self.register_event_type('on_selected') + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_tailer_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_on_pageloaded, __pyx_t_6) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":376 + * self.dataloader.bind(on_pageloaded=self.add_page) + * self.dataloader.bind(on_pageloaded=self.update_tailer_info) + * self.dataloader.bind(on_newbegin=self.clearRows) # <<<<<<<<<<<<<< + * self.register_event_type('on_selected') + * self.register_event_type('on_scrollstop') + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clearRows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_on_newbegin, __pyx_t_4) < 0) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":377 + * self.dataloader.bind(on_pageloaded=self.update_tailer_info) + * self.dataloader.bind(on_newbegin=self.clearRows) + * self.register_event_type('on_selected') # <<<<<<<<<<<<<< + * self.register_event_type('on_scrollstop') + * self.createDataGridPart() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_register_event_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_n_s_on_selected) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s_on_selected); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":378 + * self.dataloader.bind(on_newbegin=self.clearRows) + * self.register_event_type('on_selected') + * self.register_event_type('on_scrollstop') # <<<<<<<<<<<<<< + * self.createDataGridPart() + * self.createToolbar() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_register_event_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_n_s_on_scrollstop) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s_on_scrollstop); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":379 + * self.register_event_type('on_selected') + * self.register_event_type('on_scrollstop') + * self.createDataGridPart() # <<<<<<<<<<<<<< + * self.createToolbar() + * if self.toolbar: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_createDataGridPart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":380 + * self.register_event_type('on_scrollstop') + * self.createDataGridPart() + * self.createToolbar() # <<<<<<<<<<<<<< + * if self.toolbar: + * self.add_widget(self.toolbar) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_createToolbar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":381 + * self.createDataGridPart() + * self.createToolbar() + * if self.toolbar: # <<<<<<<<<<<<<< + * self.add_widget(self.toolbar) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toolbar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { + + /* "kivyblocks/dg.pyx":382 + * self.createToolbar() + * if self.toolbar: + * self.add_widget(self.toolbar) # <<<<<<<<<<<<<< + * + * b = BoxLayout(orientation='horizontal') + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toolbar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":381 + * self.createDataGridPart() + * self.createToolbar() + * if self.toolbar: # <<<<<<<<<<<<<< + * self.add_widget(self.toolbar) + * + */ + } + + /* "kivyblocks/dg.pyx":384 + * self.add_widget(self.toolbar) + * + * b = BoxLayout(orientation='horizontal') # <<<<<<<<<<<<<< + * if self.freeze_part: + * b.add_widget(self.freeze_part) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_orientation, __pyx_n_s_horizontal) < 0) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_b = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":385 + * + * b = BoxLayout(orientation='horizontal') + * if self.freeze_part: # <<<<<<<<<<<<<< + * b.add_widget(self.freeze_part) + * if self.normal_part: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + + /* "kivyblocks/dg.pyx":386 + * b = BoxLayout(orientation='horizontal') + * if self.freeze_part: + * b.add_widget(self.freeze_part) # <<<<<<<<<<<<<< + * if self.normal_part: + * b.add_widget(self.normal_part) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":385 + * + * b = BoxLayout(orientation='horizontal') + * if self.freeze_part: # <<<<<<<<<<<<<< + * b.add_widget(self.freeze_part) + * if self.normal_part: + */ + } + + /* "kivyblocks/dg.pyx":387 + * if self.freeze_part: + * b.add_widget(self.freeze_part) + * if self.normal_part: # <<<<<<<<<<<<<< + * b.add_widget(self.normal_part) + * self.add_widget(b) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + + /* "kivyblocks/dg.pyx":388 + * b.add_widget(self.freeze_part) + * if self.normal_part: + * b.add_widget(self.normal_part) # <<<<<<<<<<<<<< + * self.add_widget(b) + * if self.options.get('tailer'): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":387 + * if self.freeze_part: + * b.add_widget(self.freeze_part) + * if self.normal_part: # <<<<<<<<<<<<<< + * b.add_widget(self.normal_part) + * self.add_widget(b) + */ + } + + /* "kivyblocks/dg.pyx":389 + * if self.normal_part: + * b.add_widget(self.normal_part) + * self.add_widget(b) # <<<<<<<<<<<<<< + * if self.options.get('tailer'): + * self.tailer_widgets = {} + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_b) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_b); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":390 + * b.add_widget(self.normal_part) + * self.add_widget(b) + * if self.options.get('tailer'): # <<<<<<<<<<<<<< + * self.tailer_widgets = {} + * self.build_tailer(self.options.get('tailer')) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_n_s_tailer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_tailer); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + + /* "kivyblocks/dg.pyx":391 + * self.add_widget(b) + * if self.options.get('tailer'): + * self.tailer_widgets = {} # <<<<<<<<<<<<<< + * self.build_tailer(self.options.get('tailer')) + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tailer_widgets, __pyx_t_3) < 0) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":392 + * if self.options.get('tailer'): + * self.tailer_widgets = {} + * self.build_tailer(self.options.get('tailer')) # <<<<<<<<<<<<<< + * + * def build_tailer(self, tailer_desc): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_tailer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_s_tailer) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_tailer); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":390 + * b.add_widget(self.normal_part) + * self.add_widget(b) + * if self.options.get('tailer'): # <<<<<<<<<<<<<< + * self.tailer_widgets = {} + * self.build_tailer(self.options.get('tailer')) + */ + } + + /* "kivyblocks/dg.pyx":343 + * """ + * row_selected = BooleanProperty(False) + * def __init__(self,**options): # <<<<<<<<<<<<<< + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ldr_desc); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":394 + * self.build_tailer(self.options.get('tailer')) + * + * def build_tailer(self, tailer_desc): # <<<<<<<<<<<<<< + * kw = tailer_desc.get('options', {}) + * kw.update({ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_3build_tailer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_3build_tailer = {"build_tailer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_3build_tailer, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_3build_tailer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_tailer_desc = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("build_tailer (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tailer_desc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tailer_desc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("build_tailer", 1, 2, 2, 1); __PYX_ERR(0, 394, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_tailer") < 0)) __PYX_ERR(0, 394, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_tailer_desc = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("build_tailer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.build_tailer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_2build_tailer(__pyx_self, __pyx_v_self, __pyx_v_tailer_desc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_2build_tailer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tailer_desc) { + PyObject *__pyx_v_kw = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_w1 = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("build_tailer", 0); + + /* "kivyblocks/dg.pyx":395 + * + * def build_tailer(self, tailer_desc): + * kw = tailer_desc.get('options', {}) # <<<<<<<<<<<<<< + * kw.update({ + * 'size_hint_y':None, + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_options, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_options, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_n_s_options); + __Pyx_GIVEREF(__pyx_n_s_options); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_options); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_kw = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":396 + * def build_tailer(self, tailer_desc): + * kw = tailer_desc.get('options', {}) + * kw.update({ # <<<<<<<<<<<<<< + * 'size_hint_y':None, + * 'height':self.rowheight + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kw, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "kivyblocks/dg.pyx":397 + * kw = tailer_desc.get('options', {}) + * kw.update({ + * 'size_hint_y':None, # <<<<<<<<<<<<<< + * 'height':self.rowheight + * }) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_size_hint_y, Py_None) < 0) __PYX_ERR(0, 397, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":398 + * kw.update({ + * 'size_hint_y':None, + * 'height':self.rowheight # <<<<<<<<<<<<<< + * }) + * w = HBox(**kw) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowheight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_height, __pyx_t_3) < 0) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":400 + * 'height':self.rowheight + * }) + * w = HBox(**kw) # <<<<<<<<<<<<<< + * self.add_widget(w) + * self.show_infos(w, tailer_desc.get('info')) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HBox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_kw == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 400, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kw))) { + __pyx_t_2 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kw, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_w = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":401 + * }) + * w = HBox(**kw) + * self.add_widget(w) # <<<<<<<<<<<<<< + * self.show_infos(w, tailer_desc.get('info')) + * if tailer_desc.get('others'): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":402 + * w = HBox(**kw) + * self.add_widget(w) + * self.show_infos(w, tailer_desc.get('info')) # <<<<<<<<<<<<<< + * if tailer_desc.get('others'): + * w1 = self.build_tailer_other(tailer_desc.get('others')) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s_info) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_info); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_w, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_w, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_w); + __Pyx_GIVEREF(__pyx_v_w); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_w); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":403 + * self.add_widget(w) + * self.show_infos(w, tailer_desc.get('info')) + * if tailer_desc.get('others'): # <<<<<<<<<<<<<< + * w1 = self.build_tailer_other(tailer_desc.get('others')) + * if w1: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_n_s_others) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_others); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + + /* "kivyblocks/dg.pyx":404 + * self.show_infos(w, tailer_desc.get('info')) + * if tailer_desc.get('others'): + * w1 = self.build_tailer_other(tailer_desc.get('others')) # <<<<<<<<<<<<<< + * if w1: + * w.add_widget(w1) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_tailer_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_desc, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_n_s_others) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_s_others); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_w1 = __pyx_t_6; + __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":405 + * if tailer_desc.get('others'): + * w1 = self.build_tailer_other(tailer_desc.get('others')) + * if w1: # <<<<<<<<<<<<<< + * w.add_widget(w1) + * + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_w1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 405, __pyx_L1_error) + if (__pyx_t_7) { + + /* "kivyblocks/dg.pyx":406 + * w1 = self.build_tailer_other(tailer_desc.get('others')) + * if w1: + * w.add_widget(w1) # <<<<<<<<<<<<<< + * + * def update_tailer_info(self, *args): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_w, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_w1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_w1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":405 + * if tailer_desc.get('others'): + * w1 = self.build_tailer_other(tailer_desc.get('others')) + * if w1: # <<<<<<<<<<<<<< + * w.add_widget(w1) + * + */ + } + + /* "kivyblocks/dg.pyx":403 + * self.add_widget(w) + * self.show_infos(w, tailer_desc.get('info')) + * if tailer_desc.get('others'): # <<<<<<<<<<<<<< + * w1 = self.build_tailer_other(tailer_desc.get('others')) + * if w1: + */ + } + + /* "kivyblocks/dg.pyx":394 + * self.build_tailer(self.options.get('tailer')) + * + * def build_tailer(self, tailer_desc): # <<<<<<<<<<<<<< + * kw = tailer_desc.get('options', {}) + * kw.update({ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.build_tailer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_w1); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":408 + * w.add_widget(w1) + * + * def update_tailer_info(self, *args): # <<<<<<<<<<<<<< + * if not hasattr(self, 'tailer_widgets'): + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_5update_tailer_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_5update_tailer_info = {"update_tailer_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_5update_tailer_info, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_5update_tailer_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_tailer_info (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 1) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "update_tailer_info") < 0)) __PYX_ERR(0, 408, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_tailer_info", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 408, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.update_tailer_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_4update_tailer_info(__pyx_self, __pyx_v_self, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_4update_tailer_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { + PyObject *__pyx_v_n = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_tailer_info", 0); + + /* "kivyblocks/dg.pyx":409 + * + * def update_tailer_info(self, *args): + * if not hasattr(self, 'tailer_widgets'): # <<<<<<<<<<<<<< + * return + * for n,w in self.tailer_widgets.items(): + */ + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_s_tailer_widgets); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":410 + * def update_tailer_info(self, *args): + * if not hasattr(self, 'tailer_widgets'): + * return # <<<<<<<<<<<<<< + * for n,w in self.tailer_widgets.items(): + * w.text = self.loader_info(n) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":409 + * + * def update_tailer_info(self, *args): + * if not hasattr(self, 'tailer_widgets'): # <<<<<<<<<<<<<< + * return + * for n,w in self.tailer_widgets.items(): + */ + } + + /* "kivyblocks/dg.pyx":411 + * if not hasattr(self, 'tailer_widgets'): + * return + * for n,w in self.tailer_widgets.items(): # <<<<<<<<<<<<<< + * w.text = self.loader_info(n) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tailer_widgets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 411, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 411, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_8); + __pyx_t_8 = 0; + + /* "kivyblocks/dg.pyx":412 + * return + * for n,w in self.tailer_widgets.items(): + * w.text = self.loader_info(n) # <<<<<<<<<<<<<< + * + * def show_infos(self, tailer_widget, info_names): + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loader_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_n); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_w, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":411 + * if not hasattr(self, 'tailer_widgets'): + * return + * for n,w in self.tailer_widgets.items(): # <<<<<<<<<<<<<< + * w.text = self.loader_info(n) + * + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":408 + * w.add_widget(w1) + * + * def update_tailer_info(self, *args): # <<<<<<<<<<<<<< + * if not hasattr(self, 'tailer_widgets'): + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.update_tailer_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_n); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":414 + * w.text = self.loader_info(n) + * + * def show_infos(self, tailer_widget, info_names): # <<<<<<<<<<<<<< + * for n in info_names: + * desc = { + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_7show_infos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_7show_infos = {"show_infos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_7show_infos, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_7show_infos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_tailer_widget = 0; + PyObject *__pyx_v_info_names = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show_infos (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tailer_widget,&__pyx_n_s_info_names,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tailer_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("show_infos", 1, 3, 3, 1); __PYX_ERR(0, 414, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info_names)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("show_infos", 1, 3, 3, 2); __PYX_ERR(0, 414, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "show_infos") < 0)) __PYX_ERR(0, 414, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_tailer_widget = values[1]; + __pyx_v_info_names = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("show_infos", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 414, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.show_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_6show_infos(__pyx_self, __pyx_v_self, __pyx_v_tailer_widget, __pyx_v_info_names); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_6show_infos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tailer_widget, PyObject *__pyx_v_info_names) { + PyObject *__pyx_v_n = NULL; + PyObject *__pyx_v_desc = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show_infos", 0); + + /* "kivyblocks/dg.pyx":415 + * + * def show_infos(self, tailer_widget, info_names): + * for n in info_names: # <<<<<<<<<<<<<< + * desc = { + * "widgettype":"Text", + */ + if (likely(PyList_CheckExact(__pyx_v_info_names)) || PyTuple_CheckExact(__pyx_v_info_names)) { + __pyx_t_1 = __pyx_v_info_names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_info_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 415, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 415, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 415, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":417 + * for n in info_names: + * desc = { + * "widgettype":"Text", # <<<<<<<<<<<<<< + * "options":{ + * "text":n, + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_widgettype, __pyx_n_s_Text) < 0) __PYX_ERR(0, 417, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":419 + * "widgettype":"Text", + * "options":{ + * "text":n, # <<<<<<<<<<<<<< + * "i18n":True, + * } + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_text, __pyx_v_n) < 0) __PYX_ERR(0, 419, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":420 + * "options":{ + * "text":n, + * "i18n":True, # <<<<<<<<<<<<<< + * } + * } + */ + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_i18n, Py_True) < 0) __PYX_ERR(0, 419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_options, __pyx_t_5) < 0) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_desc, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":423 + * } + * } + * w = Factory.Blocks().widgetBuild(desc) # <<<<<<<<<<<<<< + * tailer_widget.add_widget(w) + * tailer_widget.add_widget(Label(text=':')) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Factory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_desc); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":424 + * } + * w = Factory.Blocks().widgetBuild(desc) + * tailer_widget.add_widget(w) # <<<<<<<<<<<<<< + * tailer_widget.add_widget(Label(text=':')) + * self.tailer_widgets[n] = Label(text=self.loader_info(n)) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_widget, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_w); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":425 + * w = Factory.Blocks().widgetBuild(desc) + * tailer_widget.add_widget(w) + * tailer_widget.add_widget(Label(text=':')) # <<<<<<<<<<<<<< + * self.tailer_widgets[n] = Label(text=self.loader_info(n)) + * tailer_widget.add_widget(self.tailer_widgets[n]) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_widget, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_text, __pyx_kp_s__17) < 0) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":426 + * tailer_widget.add_widget(w) + * tailer_widget.add_widget(Label(text=':')) + * self.tailer_widgets[n] = Label(text=self.loader_info(n)) # <<<<<<<<<<<<<< + * tailer_widget.add_widget(self.tailer_widgets[n]) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Label); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loader_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_n); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_text, __pyx_t_8) < 0) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tailer_widgets); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_n, __pyx_t_8) < 0)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/dg.pyx":427 + * tailer_widget.add_widget(Label(text=':')) + * self.tailer_widgets[n] = Label(text=self.loader_info(n)) + * tailer_widget.add_widget(self.tailer_widgets[n]) # <<<<<<<<<<<<<< + * + * def build_tailer_others(desc): + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tailer_widget, __pyx_n_s_add_widget); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tailer_widgets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_n); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_8 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "kivyblocks/dg.pyx":415 + * + * def show_infos(self, tailer_widget, info_names): + * for n in info_names: # <<<<<<<<<<<<<< + * desc = { + * "widgettype":"Text", + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":414 + * w.text = self.loader_info(n) + * + * def show_infos(self, tailer_widget, info_names): # <<<<<<<<<<<<<< + * for n in info_names: + * desc = { + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.show_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_n); + __Pyx_XDECREF(__pyx_v_desc); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":429 + * tailer_widget.add_widget(self.tailer_widgets[n]) + * + * def build_tailer_others(desc): # <<<<<<<<<<<<<< + * return Factory.Blocks().widgetBuild(desc) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_9build_tailer_others(PyObject *__pyx_self, PyObject *__pyx_v_desc); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_9build_tailer_others = {"build_tailer_others", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_9build_tailer_others, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_9build_tailer_others(PyObject *__pyx_self, PyObject *__pyx_v_desc) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("build_tailer_others (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_8build_tailer_others(__pyx_self, ((PyObject *)__pyx_v_desc)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_8build_tailer_others(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("build_tailer_others", 0); + + /* "kivyblocks/dg.pyx":430 + * + * def build_tailer_others(desc): + * return Factory.Blocks().widgetBuild(desc) # <<<<<<<<<<<<<< + * + * def loader_info(self, n): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Blocks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_widgetBuild); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_desc); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":429 + * tailer_widget.add_widget(self.tailer_widgets[n]) + * + * def build_tailer_others(desc): # <<<<<<<<<<<<<< + * return Factory.Blocks().widgetBuild(desc) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.build_tailer_others", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":432 + * return Factory.Blocks().widgetBuild(desc) + * + * def loader_info(self, n): # <<<<<<<<<<<<<< + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_11loader_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_11loader_info = {"loader_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_11loader_info, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_11loader_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_n = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loader_info (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("loader_info", 1, 2, 2, 1); __PYX_ERR(0, 432, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loader_info") < 0)) __PYX_ERR(0, 432, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("loader_info", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 432, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.loader_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_10loader_info(__pyx_self, __pyx_v_self, __pyx_v_n); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_10loader_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { + PyObject *__pyx_v_txt = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("loader_info", 0); + + /* "kivyblocks/dg.pyx":433 + * + * def loader_info(self, n): + * if hasattr(self.dataloader, n): # <<<<<<<<<<<<<< + * txt=getattr(self.dataloader, n, 0) + * if txt is None: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_HasAttr(__pyx_t_1, __pyx_v_n); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":434 + * def loader_info(self, n): + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) # <<<<<<<<<<<<<< + * if txt is None: + * txt = '0' + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_1, __pyx_v_n, __pyx_int_0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_txt = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":435 + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + * if txt is None: # <<<<<<<<<<<<<< + * txt = '0' + * txt = str(txt) + */ + __pyx_t_3 = (__pyx_v_txt == Py_None); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":436 + * txt=getattr(self.dataloader, n, 0) + * if txt is None: + * txt = '0' # <<<<<<<<<<<<<< + * txt = str(txt) + * return txt + */ + __Pyx_INCREF(__pyx_kp_s_0); + __Pyx_DECREF_SET(__pyx_v_txt, __pyx_kp_s_0); + + /* "kivyblocks/dg.pyx":435 + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + * if txt is None: # <<<<<<<<<<<<<< + * txt = '0' + * txt = str(txt) + */ + } + + /* "kivyblocks/dg.pyx":437 + * if txt is None: + * txt = '0' + * txt = str(txt) # <<<<<<<<<<<<<< + * return txt + * + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_txt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_txt, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":438 + * txt = '0' + * txt = str(txt) + * return txt # <<<<<<<<<<<<<< + * + * def locater(self,pos): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_txt); + __pyx_r = __pyx_v_txt; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":433 + * + * def loader_info(self, n): + * if hasattr(self.dataloader, n): # <<<<<<<<<<<<<< + * txt=getattr(self.dataloader, n, 0) + * if txt is None: + */ + } + + /* "kivyblocks/dg.pyx":432 + * return Factory.Blocks().widgetBuild(desc) + * + * def loader_info(self, n): # <<<<<<<<<<<<<< + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.loader_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_txt); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":440 + * return txt + * + * def locater(self,pos): # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_13locater(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_13locater = {"locater", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_13locater, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_13locater(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_pos = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("locater (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pos,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("locater", 1, 2, 2, 1); __PYX_ERR(0, 440, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "locater") < 0)) __PYX_ERR(0, 440, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_pos = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("locater", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 440, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.locater", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_12locater(__pyx_self, __pyx_v_self, __pyx_v_pos); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_12locater(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pos) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("locater", 0); + + /* "kivyblocks/dg.pyx":441 + * + * def locater(self,pos): + * self.normal_part.body.scroll_y = pos # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.scroll_y = pos + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_scroll_y, __pyx_v_pos) < 0) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":442 + * def locater(self,pos): + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.scroll_y = pos + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":443 + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: + * self.freeze_part.body.scroll_y = pos # <<<<<<<<<<<<<< + * + * def on_scrollstop(self,o,v=None): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_body); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_scroll_y, __pyx_v_pos) < 0) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":442 + * def locater(self,pos): + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.scroll_y = pos + * + */ + } + + /* "kivyblocks/dg.pyx":440 + * return txt + * + * def locater(self,pos): # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.locater", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":445 + * self.freeze_part.body.scroll_y = pos + * + * def on_scrollstop(self,o,v=None): # <<<<<<<<<<<<<< + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_15on_scrollstop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_15on_scrollstop = {"on_scrollstop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_15on_scrollstop, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_15on_scrollstop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_o = 0; + CYTHON_UNUSED PyObject *__pyx_v_v = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_scrollstop (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,&__pyx_n_s_v,0}; + PyObject* values[3] = {0,0,0}; + values[2] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("on_scrollstop", 0, 2, 3, 1); __PYX_ERR(0, 445, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_scrollstop") < 0)) __PYX_ERR(0, 445, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + __pyx_v_v = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_scrollstop", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 445, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.on_scrollstop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_14on_scrollstop(__pyx_self, __pyx_v_self, __pyx_v_o, __pyx_v_v); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_14on_scrollstop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("on_scrollstop", 0); + + /* "kivyblocks/dg.pyx":446 + * + * def on_scrollstop(self,o,v=None): + * if not self.noheader and o == self.normal_part.header: # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_x = o.scroll_x + * return + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_noheader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = ((!__pyx_t_3) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_1 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_header); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_o, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "kivyblocks/dg.pyx":447 + * def on_scrollstop(self,o,v=None): + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x # <<<<<<<<<<<<<< + * return + * if o == self.normal_part.body: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_body); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_scroll_x, __pyx_t_2) < 0) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":448 + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x + * return # <<<<<<<<<<<<<< + * if o == self.normal_part.body: + * if not self.noheader: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":446 + * + * def on_scrollstop(self,o,v=None): + * if not self.noheader and o == self.normal_part.header: # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_x = o.scroll_x + * return + */ + } + + /* "kivyblocks/dg.pyx":449 + * self.normal_part.body.scroll_x = o.scroll_x + * return + * if o == self.normal_part.body: # <<<<<<<<<<<<<< + * if not self.noheader: + * self.normal_part.header.scroll_x = o.scroll_x + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_v_o, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "kivyblocks/dg.pyx":450 + * return + * if o == self.normal_part.body: + * if not self.noheader: # <<<<<<<<<<<<<< + * self.normal_part.header.scroll_x = o.scroll_x + * if self.freeze_part: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_noheader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = ((!__pyx_t_1) != 0); + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":451 + * if o == self.normal_part.body: + * if not self.noheader: + * self.normal_part.header.scroll_x = o.scroll_x # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.scroll_y = o.scroll_y + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_header); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_scroll_x, __pyx_t_6) < 0) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":450 + * return + * if o == self.normal_part.body: + * if not self.noheader: # <<<<<<<<<<<<<< + * self.normal_part.header.scroll_x = o.scroll_x + * if self.freeze_part: + */ + } + + /* "kivyblocks/dg.pyx":452 + * if not self.noheader: + * self.normal_part.header.scroll_x = o.scroll_x + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.scroll_y = o.scroll_y + * if self.freeze_part and o == self.freeze_part.body: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":453 + * self.normal_part.header.scroll_x = o.scroll_x + * if self.freeze_part: + * self.freeze_part.body.scroll_y = o.scroll_y # <<<<<<<<<<<<<< + * if self.freeze_part and o == self.freeze_part.body: + * self.normal_part.body.scroll_y = o.scroll_y + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_scroll_y, __pyx_t_5) < 0) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":452 + * if not self.noheader: + * self.normal_part.header.scroll_x = o.scroll_x + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.scroll_y = o.scroll_y + * if self.freeze_part and o == self.freeze_part.body: + */ + } + + /* "kivyblocks/dg.pyx":449 + * self.normal_part.body.scroll_x = o.scroll_x + * return + * if o == self.normal_part.body: # <<<<<<<<<<<<<< + * if not self.noheader: + * self.normal_part.header.scroll_x = o.scroll_x + */ + } + + /* "kivyblocks/dg.pyx":454 + * if self.freeze_part: + * self.freeze_part.body.scroll_y = o.scroll_y + * if self.freeze_part and o == self.freeze_part.body: # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = o.scroll_y + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + } else { + __pyx_t_4 = __pyx_t_1; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_o, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_t_1; + __pyx_L10_bool_binop_done:; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":455 + * self.freeze_part.body.scroll_y = o.scroll_y + * if self.freeze_part and o == self.freeze_part.body: + * self.normal_part.body.scroll_y = o.scroll_y # <<<<<<<<<<<<<< + * + * if o.scroll_y <= 0.001: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_body); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_scroll_y, __pyx_t_2) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "kivyblocks/dg.pyx":454 + * if self.freeze_part: + * self.freeze_part.body.scroll_y = o.scroll_y + * if self.freeze_part and o == self.freeze_part.body: # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = o.scroll_y + * + */ + } + + /* "kivyblocks/dg.pyx":457 + * self.normal_part.body.scroll_y = o.scroll_y + * + * if o.scroll_y <= 0.001: # <<<<<<<<<<<<<< + * self.dataloader.loadNextPage() + * if o.scroll_y >= 0.999: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_y); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_float_0_001, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":458 + * + * if o.scroll_y <= 0.001: + * self.dataloader.loadNextPage() # <<<<<<<<<<<<<< + * if o.scroll_y >= 0.999: + * self.dataloader.loadPreviousPage() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loadNextPage); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":457 + * self.normal_part.body.scroll_y = o.scroll_y + * + * if o.scroll_y <= 0.001: # <<<<<<<<<<<<<< + * self.dataloader.loadNextPage() + * if o.scroll_y >= 0.999: + */ + } + + /* "kivyblocks/dg.pyx":459 + * if o.scroll_y <= 0.001: + * self.dataloader.loadNextPage() + * if o.scroll_y >= 0.999: # <<<<<<<<<<<<<< + * self.dataloader.loadPreviousPage() + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_scroll_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_float_0_999, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":460 + * self.dataloader.loadNextPage() + * if o.scroll_y >= 0.999: + * self.dataloader.loadPreviousPage() # <<<<<<<<<<<<<< + * + * def getValue(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadPreviousPage); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":459 + * if o.scroll_y <= 0.001: + * self.dataloader.loadNextPage() + * if o.scroll_y >= 0.999: # <<<<<<<<<<<<<< + * self.dataloader.loadPreviousPage() + * + */ + } + + /* "kivyblocks/dg.pyx":445 + * self.freeze_part.body.scroll_y = pos + * + * def on_scrollstop(self,o,v=None): # <<<<<<<<<<<<<< + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.on_scrollstop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":462 + * self.dataloader.loadPreviousPage() + * + * def getValue(self): # <<<<<<<<<<<<<< + * if not self.select_rowid: + * return None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_17getValue(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_17getValue = {"getValue", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_17getValue, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_17getValue(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getValue (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_16getValue(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_16getValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getValue", 0); + + /* "kivyblocks/dg.pyx":463 + * + * def getValue(self): + * if not self.select_rowid: # <<<<<<<<<<<<<< + * return None + * return self._getRowData(self.select_rowid) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_select_rowid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":464 + * def getValue(self): + * if not self.select_rowid: + * return None # <<<<<<<<<<<<<< + * return self._getRowData(self.select_rowid) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":463 + * + * def getValue(self): + * if not self.select_rowid: # <<<<<<<<<<<<<< + * return None + * return self._getRowData(self.select_rowid) + */ + } + + /* "kivyblocks/dg.pyx":465 + * if not self.select_rowid: + * return None + * return self._getRowData(self.select_rowid) # <<<<<<<<<<<<<< + * + * def _getRowData(self, rowid): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getRowData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_select_rowid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":462 + * self.dataloader.loadPreviousPage() + * + * def getValue(self): # <<<<<<<<<<<<<< + * if not self.select_rowid: + * return None + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":467 + * return self._getRowData(self.select_rowid) + * + * def _getRowData(self, rowid): # <<<<<<<<<<<<<< + * d = {} + * if self.freeze_part: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_19_getRowData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_19_getRowData = {"_getRowData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_19_getRowData, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_19_getRowData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_rowid = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_getRowData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_rowid,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowid)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_getRowData", 1, 2, 2, 1); __PYX_ERR(0, 467, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getRowData") < 0)) __PYX_ERR(0, 467, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_rowid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_getRowData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 467, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid._getRowData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_18_getRowData(__pyx_self, __pyx_v_self, __pyx_v_rowid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_18_getRowData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rowid) { + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_getRowData", 0); + + /* "kivyblocks/dg.pyx":468 + * + * def _getRowData(self, rowid): + * d = {} # <<<<<<<<<<<<<< + * if self.freeze_part: + * d.update(self.freeze_part.body.getRowData(rowid)) + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_d = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":469 + * def _getRowData(self, rowid): + * d = {} + * if self.freeze_part: # <<<<<<<<<<<<<< + * d.update(self.freeze_part.body.getRowData(rowid)) + * d.update(self.normal_part.body.getRowData(rowid)) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":470 + * d = {} + * if self.freeze_part: + * d.update(self.freeze_part.body.getRowData(rowid)) # <<<<<<<<<<<<<< + * d.update(self.normal_part.body.getRowData(rowid)) + * print('getValue() return=',d) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getRowData_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_rowid) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rowid); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_d, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":469 + * def _getRowData(self, rowid): + * d = {} + * if self.freeze_part: # <<<<<<<<<<<<<< + * d.update(self.freeze_part.body.getRowData(rowid)) + * d.update(self.normal_part.body.getRowData(rowid)) + */ + } + + /* "kivyblocks/dg.pyx":471 + * if self.freeze_part: + * d.update(self.freeze_part.body.getRowData(rowid)) + * d.update(self.normal_part.body.getRowData(rowid)) # <<<<<<<<<<<<<< + * print('getValue() return=',d) + * return DictObject(**d) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getRowData_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_rowid) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_rowid); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_d, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":472 + * d.update(self.freeze_part.body.getRowData(rowid)) + * d.update(self.normal_part.body.getRowData(rowid)) + * print('getValue() return=',d) # <<<<<<<<<<<<<< + * return DictObject(**d) + * + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_s_getValue_return); + __Pyx_GIVEREF(__pyx_kp_s_getValue_return); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_getValue_return); + __Pyx_INCREF(__pyx_v_d); + __Pyx_GIVEREF(__pyx_v_d); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_d); + if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 472, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":473 + * d.update(self.normal_part.body.getRowData(rowid)) + * print('getValue() return=',d) + * return DictObject(**d) # <<<<<<<<<<<<<< + * + * def bodyOnSize(self,o,s): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyDict_Copy(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":467 + * return self._getRowData(self.select_rowid) + * + * def _getRowData(self, rowid): # <<<<<<<<<<<<<< + * d = {} + * if self.freeze_part: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid._getRowData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":475 + * return DictObject(**d) + * + * def bodyOnSize(self,o,s): # <<<<<<<<<<<<<< + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_21bodyOnSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_21bodyOnSize = {"bodyOnSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_21bodyOnSize, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_21bodyOnSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + CYTHON_UNUSED PyObject *__pyx_v_s = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("bodyOnSize (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,&__pyx_n_s_s,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("bodyOnSize", 1, 3, 3, 1); __PYX_ERR(0, 475, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("bodyOnSize", 1, 3, 3, 2); __PYX_ERR(0, 475, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bodyOnSize") < 0)) __PYX_ERR(0, 475, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + __pyx_v_s = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("bodyOnSize", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 475, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.bodyOnSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_20bodyOnSize(__pyx_self, __pyx_v_self, __pyx_v_o, __pyx_v_s); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_20bodyOnSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, CYTHON_UNUSED PyObject *__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("bodyOnSize", 0); + + /* "kivyblocks/dg.pyx":476 + * + * def bodyOnSize(self,o,s): + * if self.on_sizeTask is not None: # <<<<<<<<<<<<<< + * self.on_sizeTask.cancel() + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_on_sizeTask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":477 + * def bodyOnSize(self,o,s): + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() # <<<<<<<<<<<<<< + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_on_sizeTask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":476 + * + * def bodyOnSize(self,o,s): + * if self.on_sizeTask is not None: # <<<<<<<<<<<<<< + * self.on_sizeTask.cancel() + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + */ + } + + /* "kivyblocks/dg.pyx":478 + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) # <<<<<<<<<<<<<< + * + * def rowHeight(self): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Clock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_schedule_once); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculateShowRows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_float_0_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_float_0_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_5); + __Pyx_INCREF(__pyx_float_0_3); + __Pyx_GIVEREF(__pyx_float_0_3); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_float_0_3); + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_on_sizeTask, __pyx_t_1) < 0) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":475 + * return DictObject(**d) + * + * def bodyOnSize(self,o,s): # <<<<<<<<<<<<<< + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.bodyOnSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":480 + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + * + * def rowHeight(self): # <<<<<<<<<<<<<< + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_23rowHeight(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_23rowHeight = {"rowHeight", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_23rowHeight, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_23rowHeight(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("rowHeight (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_22rowHeight(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_22rowHeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("rowHeight", 0); + + /* "kivyblocks/dg.pyx":481 + * + * def rowHeight(self): + * if not self.rowheight: # <<<<<<<<<<<<<< + * self.rowheight = CSize(self.row_height) + * return self.rowheight + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowheight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":482 + * def rowHeight(self): + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) # <<<<<<<<<<<<<< + * return self.rowheight + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CSize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_row_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowheight, __pyx_t_1) < 0) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":481 + * + * def rowHeight(self): + * if not self.rowheight: # <<<<<<<<<<<<<< + * self.rowheight = CSize(self.row_height) + * return self.rowheight + */ + } + + /* "kivyblocks/dg.pyx":483 + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) + * return self.rowheight # <<<<<<<<<<<<<< + * + * def calculateShowRows(self,t): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowheight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":480 + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + * + * def rowHeight(self): # <<<<<<<<<<<<<< + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.rowHeight", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":485 + * return self.rowheight + * + * def calculateShowRows(self,t): # <<<<<<<<<<<<<< + * self.getShowRows() + * self.dataloader.setPageRows(self.show_rows * 2) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_25calculateShowRows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_25calculateShowRows = {"calculateShowRows", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_25calculateShowRows, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_25calculateShowRows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_t = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("calculateShowRows (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("calculateShowRows", 1, 2, 2, 1); __PYX_ERR(0, 485, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateShowRows") < 0)) __PYX_ERR(0, 485, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_t = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("calculateShowRows", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 485, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.calculateShowRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_24calculateShowRows(__pyx_self, __pyx_v_self, __pyx_v_t); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_24calculateShowRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("calculateShowRows", 0); + + /* "kivyblocks/dg.pyx":486 + * + * def calculateShowRows(self,t): + * self.getShowRows() # <<<<<<<<<<<<<< + * self.dataloader.setPageRows(self.show_rows * 2) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getShowRows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":487 + * def calculateShowRows(self,t): + * self.getShowRows() + * self.dataloader.setPageRows(self.show_rows * 2) # <<<<<<<<<<<<<< + * + * def getShowRows(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setPageRows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_int_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":485 + * return self.rowheight + * + * def calculateShowRows(self,t): # <<<<<<<<<<<<<< + * self.getShowRows() + * self.dataloader.setPageRows(self.show_rows * 2) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.calculateShowRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":489 + * self.dataloader.setPageRows(self.show_rows * 2) + * + * def getShowRows(self): # <<<<<<<<<<<<<< + * if self.show_rows == 0: + * return 60 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_27getShowRows(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_27getShowRows = {"getShowRows", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_27getShowRows, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_27getShowRows(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getShowRows (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_26getShowRows(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_26getShowRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getShowRows", 0); + + /* "kivyblocks/dg.pyx":490 + * + * def getShowRows(self): + * if self.show_rows == 0: # <<<<<<<<<<<<<< + * return 60 + * self.show_rows = int(self.rowHeight() / self.normal_part.body.height) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":491 + * def getShowRows(self): + * if self.show_rows == 0: + * return 60 # <<<<<<<<<<<<<< + * self.show_rows = int(self.rowHeight() / self.normal_part.body.height) + * return self.show_rows * 2 + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_60); + __pyx_r = __pyx_int_60; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":490 + * + * def getShowRows(self): + * if self.show_rows == 0: # <<<<<<<<<<<<<< + * return 60 + * self.show_rows = int(self.rowHeight() / self.normal_part.body.height) + */ + } + + /* "kivyblocks/dg.pyx":492 + * if self.show_rows == 0: + * return 60 + * self.show_rows = int(self.rowHeight() / self.normal_part.body.height) # <<<<<<<<<<<<<< + * return self.show_rows * 2 + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_show_rows, __pyx_t_1) < 0) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":493 + * return 60 + * self.show_rows = int(self.rowHeight() / self.normal_part.body.height) + * return self.show_rows * 2 # <<<<<<<<<<<<<< + * + * def clearRows(self, *args): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_int_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":489 + * self.dataloader.setPageRows(self.show_rows * 2) + * + * def getShowRows(self): # <<<<<<<<<<<<<< + * if self.show_rows == 0: + * return 60 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.getShowRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":495 + * return self.show_rows * 2 + * + * def clearRows(self, *args): # <<<<<<<<<<<<<< + * print('dg.py:clearRows() called') + * if self.freeze_part: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_29clearRows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_29clearRows = {"clearRows", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_29clearRows, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_29clearRows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("clearRows (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 1) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "clearRows") < 0)) __PYX_ERR(0, 495, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("clearRows", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.clearRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_28clearRows(__pyx_self, __pyx_v_self, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_28clearRows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("clearRows", 0); + + /* "kivyblocks/dg.pyx":496 + * + * def clearRows(self, *args): + * print('dg.py:clearRows() called') # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.clearRows() + */ + if (__Pyx_PrintOne(0, __pyx_kp_s_dg_py_clearRows_called) < 0) __PYX_ERR(0, 496, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":497 + * def clearRows(self, *args): + * print('dg.py:clearRows() called') + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.clearRows() + * self.normal_part.body.clearRows() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":498 + * print('dg.py:clearRows() called') + * if self.freeze_part: + * self.freeze_part.body.clearRows() # <<<<<<<<<<<<<< + * self.normal_part.body.clearRows() + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clearRows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":497 + * def clearRows(self, *args): + * print('dg.py:clearRows() called') + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.clearRows() + * self.normal_part.body.clearRows() + */ + } + + /* "kivyblocks/dg.pyx":499 + * if self.freeze_part: + * self.freeze_part.body.clearRows() + * self.normal_part.body.clearRows() # <<<<<<<<<<<<<< + * + * def add_page(self,o,data): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clearRows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":495 + * return self.show_rows * 2 + * + * def clearRows(self, *args): # <<<<<<<<<<<<<< + * print('dg.py:clearRows() called') + * if self.freeze_part: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.clearRows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":501 + * self.normal_part.body.clearRows() + * + * def add_page(self,o,data): # <<<<<<<<<<<<<< + * dir = data['dir'] + * if not self.show_rows: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_31add_page(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_31add_page = {"add_page", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_31add_page, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_31add_page(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + PyObject *__pyx_v_data = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_page (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,&__pyx_n_s_data,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("add_page", 1, 3, 3, 1); __PYX_ERR(0, 501, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("add_page", 1, 3, 3, 2); __PYX_ERR(0, 501, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_page") < 0)) __PYX_ERR(0, 501, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + __pyx_v_data = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_page", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 501, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_30add_page(__pyx_self, __pyx_v_self, __pyx_v_o, __pyx_v_data); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_30add_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_data) { + PyObject *__pyx_v_dir = NULL; + PyObject *__pyx_v_ids = NULL; + PyObject *__pyx_v_recs = NULL; + long __pyx_v_idx; + PyObject *__pyx_v_recs1 = NULL; + PyObject *__pyx_v_recs2 = NULL; + PyObject *__pyx_v_r = NULL; + PyObject *__pyx_v_id = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_page", 0); + + /* "kivyblocks/dg.pyx":502 + * + * def add_page(self,o,data): + * dir = data['dir'] # <<<<<<<<<<<<<< + * if not self.show_rows: + * self.getShowRows() + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_dir = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":503 + * def add_page(self,o,data): + * dir = data['dir'] + * if not self.show_rows: # <<<<<<<<<<<<<< + * self.getShowRows() + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":504 + * dir = data['dir'] + * if not self.show_rows: + * self.getShowRows() # <<<<<<<<<<<<<< + * + * ids = [] + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getShowRows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":503 + * def add_page(self,o,data): + * dir = data['dir'] + * if not self.show_rows: # <<<<<<<<<<<<<< + * self.getShowRows() + * + */ + } + + /* "kivyblocks/dg.pyx":506 + * self.getShowRows() + * + * ids = [] # <<<<<<<<<<<<<< + * recs = data['data'] + * idx = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ids = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":507 + * + * ids = [] + * recs = data['data'] # <<<<<<<<<<<<<< + * idx = 0 + * if dir == 'up': + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_recs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":508 + * ids = [] + * recs = data['data'] + * idx = 0 # <<<<<<<<<<<<<< + * if dir == 'up': + * recs.reverse() + */ + __pyx_v_idx = 0; + + /* "kivyblocks/dg.pyx":509 + * recs = data['data'] + * idx = 0 + * if dir == 'up': # <<<<<<<<<<<<<< + * recs.reverse() + * idx = -1 + */ + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_dir, __pyx_n_s_up, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 509, __pyx_L1_error) + if (__pyx_t_3) { + + /* "kivyblocks/dg.pyx":510 + * idx = 0 + * if dir == 'up': + * recs.reverse() # <<<<<<<<<<<<<< + * idx = -1 + * recs1 = recs[:self.show_rows] + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_recs, __pyx_n_s_reverse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":511 + * if dir == 'up': + * recs.reverse() + * idx = -1 # <<<<<<<<<<<<<< + * recs1 = recs[:self.show_rows] + * recs2 = recs[self.show_rows:] + */ + __pyx_v_idx = -1L; + + /* "kivyblocks/dg.pyx":509 + * recs = data['data'] + * idx = 0 + * if dir == 'up': # <<<<<<<<<<<<<< + * recs.reverse() + * idx = -1 + */ + } + + /* "kivyblocks/dg.pyx":512 + * recs.reverse() + * idx = -1 + * recs1 = recs[:self.show_rows] # <<<<<<<<<<<<<< + * recs2 = recs[self.show_rows:] + * self._fbo = Fbo(size=self.size) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_recs, 0, 0, NULL, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_recs1 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":513 + * idx = -1 + * recs1 = recs[:self.show_rows] + * recs2 = recs[self.show_rows:] # <<<<<<<<<<<<<< + * self._fbo = Fbo(size=self.size) + * with self._fbo: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_recs, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_recs2 = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":514 + * recs1 = recs[:self.show_rows] + * recs2 = recs[self.show_rows:] + * self._fbo = Fbo(size=self.size) # <<<<<<<<<<<<<< + * with self._fbo: + * self._background_color = Color(0,0,0,1) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Fbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_size, __pyx_t_5) < 0) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fbo, __pyx_t_5) < 0) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":515 + * recs2 = recs[self.show_rows:] + * self._fbo = Fbo(size=self.size) + * with self._fbo: # <<<<<<<<<<<<<< + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + */ + /*with:*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fbo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "kivyblocks/dg.pyx":516 + * self._fbo = Fbo(size=self.size) + * with self._fbo: + * self._background_color = Color(0,0,0,1) # <<<<<<<<<<<<<< + * self._background_rect = Rectangle(size=self.size) + * for r in recs1: + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Color); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_background_color, __pyx_t_4) < 0) __PYX_ERR(0, 516, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":517 + * with self._fbo: + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) # <<<<<<<<<<<<<< + * for r in recs1: + * id = self.addRow(r,index=idx) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Rectangle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_background_rect, __pyx_t_1) < 0) __PYX_ERR(0, 517, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":515 + * recs2 = recs[self.show_rows:] + * self._fbo = Fbo(size=self.size) + * with self._fbo: # <<<<<<<<<<<<<< + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + */ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L14_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 515, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 515, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_3 < 0) __PYX_ERR(0, 515, __pyx_L11_except_error) + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 515, __pyx_L11_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L10_exception_handled; + } + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L14_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__19, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L8; + } + __pyx_L8:; + } + goto __pyx_L18; + __pyx_L5_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "kivyblocks/dg.pyx":518 + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + * for r in recs1: # <<<<<<<<<<<<<< + * id = self.addRow(r,index=idx) + * ids.append(id) + */ + if (likely(PyList_CheckExact(__pyx_v_recs1)) || PyTuple_CheckExact(__pyx_v_recs1)) { + __pyx_t_4 = __pyx_v_recs1; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_recs1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 518, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 518, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 518, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_13(__pyx_t_4); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 518, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_5); + __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":519 + * self._background_rect = Rectangle(size=self.size) + * for r in recs1: + * id = self.addRow(r,index=idx) # <<<<<<<<<<<<<< + * ids.append(id) + * with self.canvas: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_addRow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_r); + __Pyx_GIVEREF(__pyx_v_r); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_idx); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_index, __pyx_t_14) < 0) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_id, __pyx_t_14); + __pyx_t_14 = 0; + + /* "kivyblocks/dg.pyx":520 + * for r in recs1: + * id = self.addRow(r,index=idx) + * ids.append(id) # <<<<<<<<<<<<<< + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, + */ + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_ids, __pyx_v_id); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 520, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":518 + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + * for r in recs1: # <<<<<<<<<<<<<< + * id = self.addRow(r,index=idx) + * ids.append(id) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":521 + * id = self.addRow(r,index=idx) + * ids.append(id) + * with self.canvas: # <<<<<<<<<<<<<< + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) + */ + /*with:*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_canvas); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 521, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_14 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 521, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "kivyblocks/dg.pyx":522 + * ids.append(id) + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, # <<<<<<<<<<<<<< + * texture=self._fbo.texture) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Rectangle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_size, __pyx_t_7) < 0) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "kivyblocks/dg.pyx":523 + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) # <<<<<<<<<<<<<< + * + * data['idx'] = idx + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fbo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_texture); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_texture, __pyx_t_1) < 0) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":522 + * ids.append(id) + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, # <<<<<<<<<<<<<< + * texture=self._fbo.texture) + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fbo_rect, __pyx_t_1) < 0) __PYX_ERR(0, 522, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":521 + * id = self.addRow(r,index=idx) + * ids.append(id) + * with self.canvas: # <<<<<<<<<<<<<< + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L30_try_end; + __pyx_L25_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_14, &__pyx_t_4) < 0) __PYX_ERR(0, 521, __pyx_L27_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_14, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 521, __pyx_L27_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 521, __pyx_L27_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_2 < 0) __PYX_ERR(0, 521, __pyx_L27_except_error) + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_14, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 521, __pyx_L27_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L26_exception_handled; + } + __pyx_L27_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L26_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __pyx_L30_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__19, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L24; + } + __pyx_L24:; + } + goto __pyx_L34; + __pyx_L21_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L34:; + } + + /* "kivyblocks/dg.pyx":525 + * texture=self._fbo.texture) + * + * data['idx'] = idx # <<<<<<<<<<<<<< + * data['ids'] = ids + * data['data'] = recs2 + */ + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_idx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_n_s_idx, __pyx_t_4) < 0)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":526 + * + * data['idx'] = idx + * data['ids'] = ids # <<<<<<<<<<<<<< + * data['data'] = recs2 + * f = partial(self.add_page_delay,data) + */ + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_n_s_ids, __pyx_v_ids) < 0)) __PYX_ERR(0, 526, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":527 + * data['idx'] = idx + * data['ids'] = ids + * data['data'] = recs2 # <<<<<<<<<<<<<< + * f = partial(self.add_page_delay,data) + * Clock.schedule_once(f, 0) + */ + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_n_s_data, __pyx_v_recs2) < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":528 + * data['ids'] = ids + * data['data'] = recs2 + * f = partial(self.add_page_delay,data) # <<<<<<<<<<<<<< + * Clock.schedule_once(f, 0) + * print('body=', self.normal_part.body.size, + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_partial); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_page_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = NULL; + __pyx_t_16 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + __pyx_t_16 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_14)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_data}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_data}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_16, __pyx_t_1); + __Pyx_INCREF(__pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_16, __pyx_v_data); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v_f = __pyx_t_4; + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":529 + * data['data'] = recs2 + * f = partial(self.add_page_delay,data) + * Clock.schedule_once(f, 0) # <<<<<<<<<<<<<< + * print('body=', self.normal_part.body.size, + * 'inner=', self.normal_part.body._inner.size) + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Clock); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_schedule_once); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + __pyx_t_16 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_16 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_f, __pyx_int_0}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_f, __pyx_int_0}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_1 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__pyx_t_14) { + __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __pyx_t_14 = NULL; + } + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_16, __pyx_v_f); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_16, __pyx_int_0); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":530 + * f = partial(self.add_page_delay,data) + * Clock.schedule_once(f, 0) + * print('body=', self.normal_part.body.size, # <<<<<<<<<<<<<< + * 'inner=', self.normal_part.body._inner.size) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":531 + * Clock.schedule_once(f, 0) + * print('body=', self.normal_part.body.size, + * 'inner=', self.normal_part.body._inner.size) # <<<<<<<<<<<<<< + * + * def add_page_delay(self, data, *args): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_body); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inner); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":530 + * f = partial(self.add_page_delay,data) + * Clock.schedule_once(f, 0) + * print('body=', self.normal_part.body.size, # <<<<<<<<<<<<<< + * 'inner=', self.normal_part.body._inner.size) + * + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_s_body_2); + __Pyx_GIVEREF(__pyx_kp_s_body_2); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_body_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_s_inner_2); + __Pyx_GIVEREF(__pyx_kp_s_inner_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_s_inner_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + if (__Pyx_PrintOne(0, __pyx_t_5) < 0) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":501 + * self.normal_part.body.clearRows() + * + * def add_page(self,o,data): # <<<<<<<<<<<<<< + * dir = data['dir'] + * if not self.show_rows: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_dir); + __Pyx_XDECREF(__pyx_v_ids); + __Pyx_XDECREF(__pyx_v_recs); + __Pyx_XDECREF(__pyx_v_recs1); + __Pyx_XDECREF(__pyx_v_recs2); + __Pyx_XDECREF(__pyx_v_r); + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":533 + * 'inner=', self.normal_part.body._inner.size) + * + * def add_page_delay(self, data, *args): # <<<<<<<<<<<<<< + * recs = data['data'] + * page = data['page'] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_33add_page_delay(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_33add_page_delay = {"add_page_delay", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_33add_page_delay, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_33add_page_delay(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_data = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_page_delay (wrapper)", 0); + if (PyTuple_GET_SIZE(__pyx_args) > 2) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("add_page_delay", 0, 2, 2, 1); __PYX_ERR(0, 533, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_page_delay") < 0)) __PYX_ERR(0, 533, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_data = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_page_delay", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 533, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page_delay", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_32add_page_delay(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_32add_page_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_args) { + PyObject *__pyx_v_recs = NULL; + PyObject *__pyx_v_page = NULL; + PyObject *__pyx_v_idx = NULL; + PyObject *__pyx_v_ids = NULL; + PyObject *__pyx_v_r = NULL; + PyObject *__pyx_v_id = NULL; + PyObject *__pyx_v_x = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_page_delay", 0); + + /* "kivyblocks/dg.pyx":534 + * + * def add_page_delay(self, data, *args): + * recs = data['data'] # <<<<<<<<<<<<<< + * page = data['page'] + * idx = data['idx'] + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_recs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":535 + * def add_page_delay(self, data, *args): + * recs = data['data'] + * page = data['page'] # <<<<<<<<<<<<<< + * idx = data['idx'] + * ids = data['ids'] + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_page); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_page = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":536 + * recs = data['data'] + * page = data['page'] + * idx = data['idx'] # <<<<<<<<<<<<<< + * ids = data['ids'] + * self._fbo = Fbo(size=self.size) + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_idx = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":537 + * page = data['page'] + * idx = data['idx'] + * ids = data['ids'] # <<<<<<<<<<<<<< + * self._fbo = Fbo(size=self.size) + * with self._fbo: + */ + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ids = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":538 + * idx = data['idx'] + * ids = data['ids'] + * self._fbo = Fbo(size=self.size) # <<<<<<<<<<<<<< + * with self._fbo: + * self._background_color = Color(0,0,0,1) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Fbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_t_3) < 0) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fbo, __pyx_t_3) < 0) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":539 + * ids = data['ids'] + * self._fbo = Fbo(size=self.size) + * with self._fbo: # <<<<<<<<<<<<<< + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + */ + /*with:*/ { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fbo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "kivyblocks/dg.pyx":540 + * self._fbo = Fbo(size=self.size) + * with self._fbo: + * self._background_color = Color(0,0,0,1) # <<<<<<<<<<<<<< + * self._background_rect = Rectangle(size=self.size) + * for r in recs: + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_background_color, __pyx_t_2) < 0) __PYX_ERR(0, 540, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":541 + * with self._fbo: + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) # <<<<<<<<<<<<<< + * for r in recs: + * id = self.addRow(r,index=idx) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Rectangle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_background_rect, __pyx_t_1) < 0) __PYX_ERR(0, 541, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":539 + * ids = data['ids'] + * self._fbo = Fbo(size=self.size) + * with self._fbo: # <<<<<<<<<<<<<< + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page_delay", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 539, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 539, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_10 < 0) __PYX_ERR(0, 539, __pyx_L9_except_error) + __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 539, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_4) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__19, NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "kivyblocks/dg.pyx":542 + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + * for r in recs: # <<<<<<<<<<<<<< + * id = self.addRow(r,index=idx) + * ids.append(id) + */ + if (likely(PyList_CheckExact(__pyx_v_recs)) || PyTuple_CheckExact(__pyx_v_recs)) { + __pyx_t_2 = __pyx_v_recs; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_recs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 542, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 542, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 542, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_13(__pyx_t_2); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 542, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_3); + __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":543 + * self._background_rect = Rectangle(size=self.size) + * for r in recs: + * id = self.addRow(r,index=idx) # <<<<<<<<<<<<<< + * ids.append(id) + * with self.canvas: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_addRow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_r); + __Pyx_GIVEREF(__pyx_v_r); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, __pyx_v_idx) < 0) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_id, __pyx_t_14); + __pyx_t_14 = 0; + + /* "kivyblocks/dg.pyx":544 + * for r in recs: + * id = self.addRow(r,index=idx) + * ids.append(id) # <<<<<<<<<<<<<< + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, + */ + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_ids, __pyx_v_id); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 544, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":542 + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + * for r in recs: # <<<<<<<<<<<<<< + * id = self.addRow(r,index=idx) + * ids.append(id) + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":545 + * id = self.addRow(r,index=idx) + * ids.append(id) + * with self.canvas: # <<<<<<<<<<<<<< + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) + */ + /*with:*/ { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_canvas); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_14 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 545, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "kivyblocks/dg.pyx":546 + * ids.append(id) + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, # <<<<<<<<<<<<<< + * texture=self._fbo.texture) + * self.dataloader.bufferObjects(page,ids) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Rectangle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_size, __pyx_t_5) < 0) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":547 + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) # <<<<<<<<<<<<<< + * self.dataloader.bufferObjects(page,ids) + * x = self.dataloader.getLocater() + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fbo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_texture); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_texture, __pyx_t_1) < 0) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":546 + * ids.append(id) + * with self.canvas: + * self._fbo_rect = Rectangle(size=self.size, # <<<<<<<<<<<<<< + * texture=self._fbo.texture) + * self.dataloader.bufferObjects(page,ids) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fbo_rect, __pyx_t_1) < 0) __PYX_ERR(0, 546, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":545 + * id = self.addRow(r,index=idx) + * ids.append(id) + * with self.canvas: # <<<<<<<<<<<<<< + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) + */ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L28_try_end; + __pyx_L23_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page_delay", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_14, &__pyx_t_2) < 0) __PYX_ERR(0, 545, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_14, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_11 < 0) __PYX_ERR(0, 545, __pyx_L25_except_error) + __pyx_t_10 = ((!(__pyx_t_11 != 0)) != 0); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_14, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 545, __pyx_L25_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L24_exception_handled; + } + __pyx_L25_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L24_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); + __pyx_L28_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_4) { + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__19, NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + goto __pyx_L22; + } + __pyx_L22:; + } + goto __pyx_L32; + __pyx_L19_error:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L1_error; + __pyx_L32:; + } + + /* "kivyblocks/dg.pyx":548 + * self._fbo_rect = Rectangle(size=self.size, + * texture=self._fbo.texture) + * self.dataloader.bufferObjects(page,ids) # <<<<<<<<<<<<<< + * x = self.dataloader.getLocater() + * self.locater(x) + */ + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_bufferObjects); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + __pyx_t_16 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_16 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_page, __pyx_v_ids}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_page, __pyx_v_ids}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_14) { + __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_14); __pyx_t_14 = NULL; + } + __Pyx_INCREF(__pyx_v_page); + __Pyx_GIVEREF(__pyx_v_page); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_16, __pyx_v_page); + __Pyx_INCREF(__pyx_v_ids); + __Pyx_GIVEREF(__pyx_v_ids); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_16, __pyx_v_ids); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":549 + * texture=self._fbo.texture) + * self.dataloader.bufferObjects(page,ids) + * x = self.dataloader.getLocater() # <<<<<<<<<<<<<< + * self.locater(x) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getLocater); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_x = __pyx_t_2; + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":550 + * self.dataloader.bufferObjects(page,ids) + * x = self.dataloader.getLocater() + * self.locater(x) # <<<<<<<<<<<<<< + * + * def delete_page(self,o,data): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_locater); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_x); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":533 + * 'inner=', self.normal_part.body._inner.size) + * + * def add_page_delay(self, data, *args): # <<<<<<<<<<<<<< + * recs = data['data'] + * page = data['page'] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.add_page_delay", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_recs); + __Pyx_XDECREF(__pyx_v_page); + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_XDECREF(__pyx_v_ids); + __Pyx_XDECREF(__pyx_v_r); + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XDECREF(__pyx_v_x); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":552 + * self.locater(x) + * + * def delete_page(self,o,data): # <<<<<<<<<<<<<< + * print('dg.py:delete_page() called') + * for id in data: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_35delete_page(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_35delete_page = {"delete_page", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_35delete_page, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_35delete_page(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_o = 0; + PyObject *__pyx_v_data = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("delete_page (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,&__pyx_n_s_data,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("delete_page", 1, 3, 3, 1); __PYX_ERR(0, 552, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("delete_page", 1, 3, 3, 2); __PYX_ERR(0, 552, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_page") < 0)) __PYX_ERR(0, 552, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + __pyx_v_data = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("delete_page", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 552, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.delete_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_34delete_page(__pyx_self, __pyx_v_self, __pyx_v_o, __pyx_v_data); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_34delete_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o, PyObject *__pyx_v_data) { + PyObject *__pyx_v_id = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("delete_page", 0); + + /* "kivyblocks/dg.pyx":553 + * + * def delete_page(self,o,data): + * print('dg.py:delete_page() called') # <<<<<<<<<<<<<< + * for id in data: + * self.delRow(id) + */ + if (__Pyx_PrintOne(0, __pyx_kp_s_dg_py_delete_page_called) < 0) __PYX_ERR(0, 553, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":554 + * def delete_page(self,o,data): + * print('dg.py:delete_page() called') + * for id in data: # <<<<<<<<<<<<<< + * self.delRow(id) + * + */ + if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { + __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 554, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_id, __pyx_t_4); + __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":555 + * print('dg.py:delete_page() called') + * for id in data: + * self.delRow(id) # <<<<<<<<<<<<<< + * + * def addRow(self,data, **kw): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delRow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_id) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_id); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":554 + * def delete_page(self,o,data): + * print('dg.py:delete_page() called') + * for id in data: # <<<<<<<<<<<<<< + * self.delRow(id) + * + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":552 + * self.locater(x) + * + * def delete_page(self,o,data): # <<<<<<<<<<<<<< + * print('dg.py:delete_page() called') + * for id in data: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.delete_page", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":557 + * self.delRow(id) + * + * def addRow(self,data, **kw): # <<<<<<<<<<<<<< + * id = getID() + * f_row = None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_37addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_37addRow = {"addRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_37addRow, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_37addRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_data = 0; + PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("addRow (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addRow", 1, 2, 2, 1); __PYX_ERR(0, 557, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "addRow") < 0)) __PYX_ERR(0, 557, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_data = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("addRow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 557, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_36addRow(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_36addRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_kw) { + PyObject *__pyx_v_id = NULL; + CYTHON_UNUSED PyObject *__pyx_v_f_row = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("addRow", 0); + + /* "kivyblocks/dg.pyx":558 + * + * def addRow(self,data, **kw): + * id = getID() # <<<<<<<<<<<<<< + * f_row = None + * if self.freeze_part: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_id = __pyx_t_1; + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":559 + * def addRow(self,data, **kw): + * id = getID() + * f_row = None # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.addRow(id, data, **kw) + */ + __Pyx_INCREF(Py_None); + __pyx_v_f_row = Py_None; + + /* "kivyblocks/dg.pyx":560 + * id = getID() + * f_row = None + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.addRow(id, data, **kw) + * self.normal_part.body.addRow(id, data, **kw) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "kivyblocks/dg.pyx":561 + * f_row = None + * if self.freeze_part: + * self.freeze_part.body.addRow(id, data, **kw) # <<<<<<<<<<<<<< + * self.normal_part.body.addRow(id, data, **kw) + * return id + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_addRow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_id); + __Pyx_INCREF(__pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_data); + __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":560 + * id = getID() + * f_row = None + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.addRow(id, data, **kw) + * self.normal_part.body.addRow(id, data, **kw) + */ + } + + /* "kivyblocks/dg.pyx":562 + * if self.freeze_part: + * self.freeze_part.body.addRow(id, data, **kw) + * self.normal_part.body.addRow(id, data, **kw) # <<<<<<<<<<<<<< + * return id + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_body); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_addRow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_id); + __Pyx_GIVEREF(__pyx_v_id); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_id); + __Pyx_INCREF(__pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data); + __pyx_t_2 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":563 + * self.freeze_part.body.addRow(id, data, **kw) + * self.normal_part.body.addRow(id, data, **kw) + * return id # <<<<<<<<<<<<<< + * + * def delRow(self,id,**kw): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_id); + __pyx_r = __pyx_v_id; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":557 + * self.delRow(id) + * + * def addRow(self,data, **kw): # <<<<<<<<<<<<<< + * id = getID() + * f_row = None + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_id); + __Pyx_XDECREF(__pyx_v_f_row); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":565 + * return id + * + * def delRow(self,id,**kw): # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_39delRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_39delRow = {"delRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_39delRow, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_39delRow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_id = 0; + CYTHON_UNUSED PyObject *__pyx_v_kw = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("delRow (wrapper)", 0); + __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL; + __Pyx_GOTREF(__pyx_v_kw); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("delRow", 1, 2, 2, 1); __PYX_ERR(0, 565, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "delRow") < 0)) __PYX_ERR(0, 565, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_id = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("delRow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 565, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.delRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_38delRow(__pyx_self, __pyx_v_self, __pyx_v_id, __pyx_v_kw); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_38delRow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id, CYTHON_UNUSED PyObject *__pyx_v_kw) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("delRow", 0); + + /* "kivyblocks/dg.pyx":566 + * + * def delRow(self,id,**kw): + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.delRowById(id) + * self.normal_part.body.delRowById(id) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":567 + * def delRow(self,id,**kw): + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) # <<<<<<<<<<<<<< + * self.normal_part.body.delRowById(id) + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_delRowById); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_id); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":566 + * + * def delRow(self,id,**kw): + * if self.freeze_part: # <<<<<<<<<<<<<< + * self.freeze_part.body.delRowById(id) + * self.normal_part.body.delRowById(id) + */ + } + + /* "kivyblocks/dg.pyx":568 + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) + * self.normal_part.body.delRowById(id) # <<<<<<<<<<<<<< + * + * def createToolbar(self): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_body); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_delRowById); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_id); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":565 + * return id + * + * def delRow(self,id,**kw): # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.delRow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":570 + * self.normal_part.body.delRowById(id) + * + * def createToolbar(self): # <<<<<<<<<<<<<< + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_41createToolbar(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_41createToolbar = {"createToolbar", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_41createToolbar, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_41createToolbar(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("createToolbar (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_40createToolbar(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_40createToolbar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_tb = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("createToolbar", 0); + + /* "kivyblocks/dg.pyx":571 + * + * def createToolbar(self): + * if 'toolbar' in self.options.keys(): # <<<<<<<<<<<<<< + * tb = self.options['toolbar'] + * self.toolbar = Toolbar(**tb) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_toolbar, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":572 + * def createToolbar(self): + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] # <<<<<<<<<<<<<< + * self.toolbar = Toolbar(**tb) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_toolbar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_tb = __pyx_t_3; + __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":573 + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] + * self.toolbar = Toolbar(**tb) # <<<<<<<<<<<<<< + * + * def on_selected(self,row): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Toolbar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_tb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 573, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_tb))) { + __pyx_t_1 = PyDict_Copy(__pyx_v_tb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_tb, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toolbar, __pyx_t_2) < 0) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":571 + * + * def createToolbar(self): + * if 'toolbar' in self.options.keys(): # <<<<<<<<<<<<<< + * tb = self.options['toolbar'] + * self.toolbar = Toolbar(**tb) + */ + } + + /* "kivyblocks/dg.pyx":570 + * self.normal_part.body.delRowById(id) + * + * def createToolbar(self): # <<<<<<<<<<<<<< + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.createToolbar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tb); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":575 + * self.toolbar = Toolbar(**tb) + * + * def on_selected(self,row): # <<<<<<<<<<<<<< + * print("DataGrid():on_selected fire") + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_43on_selected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_43on_selected = {"on_selected", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_43on_selected, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_43on_selected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_row = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("on_selected (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_row,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("on_selected", 1, 2, 2, 1); __PYX_ERR(0, 575, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_selected") < 0)) __PYX_ERR(0, 575, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_row = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("on_selected", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 575, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.on_selected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_42on_selected(__pyx_self, __pyx_v_self, __pyx_v_row); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_42on_selected(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_row) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("on_selected", 0); + + /* "kivyblocks/dg.pyx":576 + * + * def on_selected(self,row): + * print("DataGrid():on_selected fire") # <<<<<<<<<<<<<< + * + * def loadData(self,*args, **kwargs): + */ + if (__Pyx_PrintOne(0, __pyx_kp_s_DataGrid_on_selected_fire) < 0) __PYX_ERR(0, 576, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":575 + * self.toolbar = Toolbar(**tb) + * + * def on_selected(self,row): # <<<<<<<<<<<<<< + * print("DataGrid():on_selected fire") + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.on_selected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":578 + * print("DataGrid():on_selected fire") + * + * def loadData(self,*args, **kwargs): # <<<<<<<<<<<<<< + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_45loadData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_45loadData = {"loadData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_45loadData, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_45loadData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadData (wrapper)", 0); + __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + if (PyTuple_GET_SIZE(__pyx_args) > 1) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "loadData") < 0)) __PYX_ERR(0, 578, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("loadData", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 578, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.loadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_44loadData(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_44loadData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("loadData", 0); + + /* "kivyblocks/dg.pyx":579 + * + * def loadData(self,*args, **kwargs): + * print('args=', args, 'kwargs=',kwargs) # <<<<<<<<<<<<<< + * kwargs['page'] = 1 + * self.dataloader.do_search(None,kwargs) + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_s_args); + __Pyx_GIVEREF(__pyx_kp_s_args); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_args); + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_args); + __Pyx_INCREF(__pyx_kp_s_kwargs); + __Pyx_GIVEREF(__pyx_kp_s_kwargs); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s_kwargs); + __Pyx_INCREF(__pyx_v_kwargs); + __Pyx_GIVEREF(__pyx_v_kwargs); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_kwargs); + if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":580 + * def loadData(self,*args, **kwargs): + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 # <<<<<<<<<<<<<< + * self.dataloader.do_search(None,kwargs) + * + */ + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_s_page, __pyx_int_1) < 0)) __PYX_ERR(0, 580, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":581 + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 + * self.dataloader.do_search(None,kwargs) # <<<<<<<<<<<<<< + * + * def createDataGridPart(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataloader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_do_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, Py_None, __pyx_v_kwargs}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, Py_None, __pyx_v_kwargs}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, Py_None); + __Pyx_INCREF(__pyx_v_kwargs); + __Pyx_GIVEREF(__pyx_v_kwargs); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_kwargs); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":578 + * print("DataGrid():on_selected fire") + * + * def loadData(self,*args, **kwargs): # <<<<<<<<<<<<<< + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.loadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":583 + * self.dataloader.do_search(None,kwargs) + * + * def createDataGridPart(self): # <<<<<<<<<<<<<< + * self.freeze_part = None + * self.normal_part = None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_47createDataGridPart(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_47createDataGridPart = {"createDataGridPart", (PyCFunction)__pyx_pw_10kivyblocks_2dg_8DataGrid_47createDataGridPart, METH_O, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_47createDataGridPart(PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("createDataGridPart (wrapper)", 0); + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_46createDataGridPart(__pyx_self, ((PyObject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_46createDataGridPart(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("createDataGridPart", 0); + + /* "kivyblocks/dg.pyx":584 + * + * def createDataGridPart(self): + * self.freeze_part = None # <<<<<<<<<<<<<< + * self.normal_part = None + * if self.freeze_fields: + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part, Py_None) < 0) __PYX_ERR(0, 584, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":585 + * def createDataGridPart(self): + * self.freeze_part = None + * self.normal_part = None # <<<<<<<<<<<<<< + * if self.freeze_fields: + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_normal_part, Py_None) < 0) __PYX_ERR(0, 585, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":586 + * self.freeze_part = None + * self.normal_part = None + * if self.freeze_fields: # <<<<<<<<<<<<<< + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + * if self.normal_fields: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":587 + * self.normal_part = None + * if self.freeze_fields: + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) # <<<<<<<<<<<<<< + * if self.normal_fields: + * self.normal_part = DataGridPart(self, False, self.normal_fields) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataGridPart); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freeze_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self, Py_True, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self, Py_True, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self); + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_True); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_freeze_part, __pyx_t_1) < 0) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":586 + * self.freeze_part = None + * self.normal_part = None + * if self.freeze_fields: # <<<<<<<<<<<<<< + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + * if self.normal_fields: + */ + } + + /* "kivyblocks/dg.pyx":588 + * if self.freeze_fields: + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + * if self.normal_fields: # <<<<<<<<<<<<<< + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "kivyblocks/dg.pyx":589 + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + * if self.normal_fields: + * self.normal_part = DataGridPart(self, False, self.normal_fields) # <<<<<<<<<<<<<< + * + * def getPartFields(self,freeze_flag:bool=False) -> list: + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataGridPart); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normal_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self, Py_False, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self, Py_False, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_self); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, Py_False); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_normal_part, __pyx_t_1) < 0) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":588 + * if self.freeze_fields: + * self.freeze_part = DataGridPart(self,True, self.freeze_fields) + * if self.normal_fields: # <<<<<<<<<<<<<< + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + */ + } + + /* "kivyblocks/dg.pyx":583 + * self.dataloader.do_search(None,kwargs) + * + * def createDataGridPart(self): # <<<<<<<<<<<<<< + * self.freeze_part = None + * self.normal_part = None + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.createDataGridPart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "kivyblocks/dg.pyx":591 + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + * def getPartFields(self,freeze_flag:bool=False) -> list: # <<<<<<<<<<<<<< + * fs = [] + * for f in self.options['fields']: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_49getPartFields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10kivyblocks_2dg_8DataGrid_49getPartFields = {"getPartFields", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10kivyblocks_2dg_8DataGrid_49getPartFields, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10kivyblocks_2dg_8DataGrid_49getPartFields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_freeze_flag = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPartFields (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_freeze_flag,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)((PyObject *)Py_False)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeze_flag); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPartFields") < 0)) __PYX_ERR(0, 591, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_freeze_flag = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPartFields", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 591, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.getPartFields", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10kivyblocks_2dg_8DataGrid_48getPartFields(__pyx_self, __pyx_v_self, __pyx_v_freeze_flag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10kivyblocks_2dg_8DataGrid_48getPartFields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freeze_flag) { + PyObject *__pyx_v_fs = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPartFields", 0); + + /* "kivyblocks/dg.pyx":592 + * + * def getPartFields(self,freeze_flag:bool=False) -> list: + * fs = [] # <<<<<<<<<<<<<< + * for f in self.options['fields']: + * if freeze_flag: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_fs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":593 + * def getPartFields(self,freeze_flag:bool=False) -> list: + * fs = [] + * for f in self.options['fields']: # <<<<<<<<<<<<<< + * if freeze_flag: + * if f.get('freeze',False): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 593, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 593, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_4(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 593, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_2); + __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":594 + * fs = [] + * for f in self.options['fields']: + * if freeze_flag: # <<<<<<<<<<<<<< + * if f.get('freeze',False): + * fs.append(f) + */ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_freeze_flag); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 594, __pyx_L1_error) + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":595 + * for f in self.options['fields']: + * if freeze_flag: + * if f.get('freeze',False): # <<<<<<<<<<<<<< + * fs.append(f) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_5) { + + /* "kivyblocks/dg.pyx":596 + * if freeze_flag: + * if f.get('freeze',False): + * fs.append(f) # <<<<<<<<<<<<<< + * else: + * if not f.get('freeze',False): + */ + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_fs, __pyx_v_f); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 596, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":595 + * for f in self.options['fields']: + * if freeze_flag: + * if f.get('freeze',False): # <<<<<<<<<<<<<< + * fs.append(f) + * else: + */ + } + + /* "kivyblocks/dg.pyx":594 + * fs = [] + * for f in self.options['fields']: + * if freeze_flag: # <<<<<<<<<<<<<< + * if f.get('freeze',False): + * fs.append(f) + */ + goto __pyx_L5; + } + + /* "kivyblocks/dg.pyx":598 + * fs.append(f) + * else: + * if not f.get('freeze',False): # <<<<<<<<<<<<<< + * fs.append(f) + * return fs + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = ((!__pyx_t_5) != 0); + if (__pyx_t_8) { + + /* "kivyblocks/dg.pyx":599 + * else: + * if not f.get('freeze',False): + * fs.append(f) # <<<<<<<<<<<<<< + * return fs + * + */ + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_fs, __pyx_v_f); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 599, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":598 + * fs.append(f) + * else: + * if not f.get('freeze',False): # <<<<<<<<<<<<<< + * fs.append(f) + * return fs + */ + } + } + __pyx_L5:; + + /* "kivyblocks/dg.pyx":593 + * def getPartFields(self,freeze_flag:bool=False) -> list: + * fs = [] + * for f in self.options['fields']: # <<<<<<<<<<<<<< + * if freeze_flag: + * if f.get('freeze',False): + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":600 + * if not f.get('freeze',False): + * fs.append(f) + * return fs # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_fs); + __pyx_r = __pyx_v_fs; + goto __pyx_L0; + + /* "kivyblocks/dg.pyx":591 + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + * def getPartFields(self,freeze_flag:bool=False) -> list: # <<<<<<<<<<<<<< + * fs = [] + * for f in self.options['fields']: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("kivyblocks.dg.DataGrid.getPartFields", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_fs); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_dg(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_dg}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "dg", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0}, + {&__pyx_kp_s_0_df, __pyx_k_0_df, sizeof(__pyx_k_0_df), 0, 0, 1, 0}, + {&__pyx_n_s_App, __pyx_k_App, sizeof(__pyx_k_App), 0, 0, 1, 1}, + {&__pyx_n_s_BGColorBehavior, __pyx_k_BGColorBehavior, sizeof(__pyx_k_BGColorBehavior), 0, 0, 1, 1}, + {&__pyx_n_s_BLabel, __pyx_k_BLabel, sizeof(__pyx_k_BLabel), 0, 0, 1, 1}, + {&__pyx_n_s_BLabel___init, __pyx_k_BLabel___init, sizeof(__pyx_k_BLabel___init), 0, 0, 1, 1}, + {&__pyx_n_s_Blocks, __pyx_k_Blocks, sizeof(__pyx_k_Blocks), 0, 0, 1, 1}, + {&__pyx_n_s_Body, __pyx_k_Body, sizeof(__pyx_k_Body), 0, 0, 1, 1}, + {&__pyx_n_s_Body___init, __pyx_k_Body___init, sizeof(__pyx_k_Body___init), 0, 0, 1, 1}, + {&__pyx_n_s_Body_addRow, __pyx_k_Body_addRow, sizeof(__pyx_k_Body_addRow), 0, 0, 1, 1}, + {&__pyx_n_s_Body_clearRows, __pyx_k_Body_clearRows, sizeof(__pyx_k_Body_clearRows), 0, 0, 1, 1}, + {&__pyx_n_s_Body_delRowById, __pyx_k_Body_delRowById, sizeof(__pyx_k_Body_delRowById), 0, 0, 1, 1}, + {&__pyx_n_s_Body_getRowData, __pyx_k_Body_getRowData, sizeof(__pyx_k_Body_getRowData), 0, 0, 1, 1}, + {&__pyx_n_s_Body_getRowHeight, __pyx_k_Body_getRowHeight, sizeof(__pyx_k_Body_getRowHeight), 0, 0, 1, 1}, + {&__pyx_n_s_BooleanProperty, __pyx_k_BooleanProperty, sizeof(__pyx_k_BooleanProperty), 0, 0, 1, 1}, + {&__pyx_n_s_BoxLayout, __pyx_k_BoxLayout, sizeof(__pyx_k_BoxLayout), 0, 0, 1, 1}, + {&__pyx_n_s_ButtonBehavior, __pyx_k_ButtonBehavior, sizeof(__pyx_k_ButtonBehavior), 0, 0, 1, 1}, + {&__pyx_n_s_CSize, __pyx_k_CSize, sizeof(__pyx_k_CSize), 0, 0, 1, 1}, + {&__pyx_n_s_Cell, __pyx_k_Cell, sizeof(__pyx_k_Cell), 0, 0, 1, 1}, + {&__pyx_n_s_Cell___init, __pyx_k_Cell___init, sizeof(__pyx_k_Cell___init), 0, 0, 1, 1}, + {&__pyx_n_s_Cell_on_press, __pyx_k_Cell_on_press, sizeof(__pyx_k_Cell_on_press), 0, 0, 1, 1}, + {&__pyx_n_s_Clock, __pyx_k_Clock, sizeof(__pyx_k_Clock), 0, 0, 1, 1}, + {&__pyx_n_s_Color, __pyx_k_Color, sizeof(__pyx_k_Color), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid, __pyx_k_DataGrid, sizeof(__pyx_k_DataGrid), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart, __pyx_k_DataGridPart, sizeof(__pyx_k_DataGridPart), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart___init, __pyx_k_DataGridPart___init, sizeof(__pyx_k_DataGridPart___init), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_addRow, __pyx_k_DataGridPart_addRow, sizeof(__pyx_k_DataGridPart_addRow), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_clearRows, __pyx_k_DataGridPart_clearRows, sizeof(__pyx_k_DataGridPart_clearRows), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_getFieldsWidth, __pyx_k_DataGridPart_getFieldsWidth, sizeof(__pyx_k_DataGridPart_getFieldsWidth), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_init, __pyx_k_DataGridPart_init, sizeof(__pyx_k_DataGridPart_init), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_on_size, __pyx_k_DataGridPart_on_size, sizeof(__pyx_k_DataGridPart_on_size), 0, 0, 1, 1}, + {&__pyx_n_s_DataGridPart_setWidth, __pyx_k_DataGridPart_setWidth, sizeof(__pyx_k_DataGridPart_setWidth), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid___init, __pyx_k_DataGrid___init, sizeof(__pyx_k_DataGrid___init), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid__getRowData, __pyx_k_DataGrid__getRowData, sizeof(__pyx_k_DataGrid__getRowData), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_addRow, __pyx_k_DataGrid_addRow, sizeof(__pyx_k_DataGrid_addRow), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_add_page, __pyx_k_DataGrid_add_page, sizeof(__pyx_k_DataGrid_add_page), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_add_page_delay, __pyx_k_DataGrid_add_page_delay, sizeof(__pyx_k_DataGrid_add_page_delay), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_bodyOnSize, __pyx_k_DataGrid_bodyOnSize, sizeof(__pyx_k_DataGrid_bodyOnSize), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_build_tailer, __pyx_k_DataGrid_build_tailer, sizeof(__pyx_k_DataGrid_build_tailer), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_build_tailer_others, __pyx_k_DataGrid_build_tailer_others, sizeof(__pyx_k_DataGrid_build_tailer_others), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_calculateShowRows, __pyx_k_DataGrid_calculateShowRows, sizeof(__pyx_k_DataGrid_calculateShowRows), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_clearRows, __pyx_k_DataGrid_clearRows, sizeof(__pyx_k_DataGrid_clearRows), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_createDataGridPart, __pyx_k_DataGrid_createDataGridPart, sizeof(__pyx_k_DataGrid_createDataGridPart), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_createToolbar, __pyx_k_DataGrid_createToolbar, sizeof(__pyx_k_DataGrid_createToolbar), 0, 0, 1, 1}, + {&__pyx_kp_s_DataGrid_data_format_widgettype, __pyx_k_DataGrid_data_format_widgettype, sizeof(__pyx_k_DataGrid_data_format_widgettype), 0, 0, 1, 0}, + {&__pyx_n_s_DataGrid_delRow, __pyx_k_DataGrid_delRow, sizeof(__pyx_k_DataGrid_delRow), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_delete_page, __pyx_k_DataGrid_delete_page, sizeof(__pyx_k_DataGrid_delete_page), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_getPartFields, __pyx_k_DataGrid_getPartFields, sizeof(__pyx_k_DataGrid_getPartFields), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_getShowRows, __pyx_k_DataGrid_getShowRows, sizeof(__pyx_k_DataGrid_getShowRows), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_getValue, __pyx_k_DataGrid_getValue, sizeof(__pyx_k_DataGrid_getValue), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_loadData, __pyx_k_DataGrid_loadData, sizeof(__pyx_k_DataGrid_loadData), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_loader_info, __pyx_k_DataGrid_loader_info, sizeof(__pyx_k_DataGrid_loader_info), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_locater, __pyx_k_DataGrid_locater, sizeof(__pyx_k_DataGrid_locater), 0, 0, 1, 1}, + {&__pyx_kp_s_DataGrid_need_a_DataLoader, __pyx_k_DataGrid_need_a_DataLoader, sizeof(__pyx_k_DataGrid_need_a_DataLoader), 0, 0, 1, 0}, + {&__pyx_n_s_DataGrid_on_scrollstop, __pyx_k_DataGrid_on_scrollstop, sizeof(__pyx_k_DataGrid_on_scrollstop), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_on_selected, __pyx_k_DataGrid_on_selected, sizeof(__pyx_k_DataGrid_on_selected), 0, 0, 1, 1}, + {&__pyx_kp_s_DataGrid_on_selected_fire, __pyx_k_DataGrid_on_selected_fire, sizeof(__pyx_k_DataGrid_on_selected_fire), 0, 0, 1, 0}, + {&__pyx_n_s_DataGrid_rowHeight, __pyx_k_DataGrid_rowHeight, sizeof(__pyx_k_DataGrid_rowHeight), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_show_infos, __pyx_k_DataGrid_show_infos, sizeof(__pyx_k_DataGrid_show_infos), 0, 0, 1, 1}, + {&__pyx_n_s_DataGrid_update_tailer_info, __pyx_k_DataGrid_update_tailer_info, sizeof(__pyx_k_DataGrid_update_tailer_info), 0, 0, 1, 1}, + {&__pyx_n_s_DictObject, __pyx_k_DictObject, sizeof(__pyx_k_DictObject), 0, 0, 1, 1}, + {&__pyx_n_s_Factory, __pyx_k_Factory, sizeof(__pyx_k_Factory), 0, 0, 1, 1}, + {&__pyx_n_s_Fbo, __pyx_k_Fbo, sizeof(__pyx_k_Fbo), 0, 0, 1, 1}, + {&__pyx_n_s_GridLayout, __pyx_k_GridLayout, sizeof(__pyx_k_GridLayout), 0, 0, 1, 1}, + {&__pyx_n_s_HBox, __pyx_k_HBox, sizeof(__pyx_k_HBox), 0, 0, 1, 1}, + {&__pyx_n_s_Header, __pyx_k_Header, sizeof(__pyx_k_Header), 0, 0, 1, 1}, + {&__pyx_n_s_Header___init, __pyx_k_Header___init, sizeof(__pyx_k_Header___init), 0, 0, 1, 1}, + {&__pyx_n_s_Header_init, __pyx_k_Header_init, sizeof(__pyx_k_Header_init), 0, 0, 1, 1}, + {&__pyx_n_s_Label, __pyx_k_Label, sizeof(__pyx_k_Label), 0, 0, 1, 1}, + {&__pyx_n_s_ListProperty, __pyx_k_ListProperty, sizeof(__pyx_k_ListProperty), 0, 0, 1, 1}, + {&__pyx_n_s_Logger, __pyx_k_Logger, sizeof(__pyx_k_Logger), 0, 0, 1, 1}, + {&__pyx_n_s_Paging, __pyx_k_Paging, sizeof(__pyx_k_Paging), 0, 0, 1, 1}, + {&__pyx_n_s_Rectangle, __pyx_k_Rectangle, sizeof(__pyx_k_Rectangle), 0, 0, 1, 1}, + {&__pyx_n_s_RelatedLoader, __pyx_k_RelatedLoader, sizeof(__pyx_k_RelatedLoader), 0, 0, 1, 1}, + {&__pyx_n_s_Row, __pyx_k_Row, sizeof(__pyx_k_Row), 0, 0, 1, 1}, + {&__pyx_n_s_Row___init, __pyx_k_Row___init, sizeof(__pyx_k_Row___init), 0, 0, 1, 1}, + {&__pyx_n_s_Row_init, __pyx_k_Row_init, sizeof(__pyx_k_Row_init), 0, 0, 1, 1}, + {&__pyx_n_s_Row_selected, __pyx_k_Row_selected, sizeof(__pyx_k_Row_selected), 0, 0, 1, 1}, + {&__pyx_n_s_SUPER, __pyx_k_SUPER, sizeof(__pyx_k_SUPER), 0, 0, 1, 1}, + {&__pyx_n_s_ScrollPanel, __pyx_k_ScrollPanel, sizeof(__pyx_k_ScrollPanel), 0, 0, 1, 1}, + {&__pyx_n_s_ScrollView, __pyx_k_ScrollView, sizeof(__pyx_k_ScrollView), 0, 0, 1, 1}, + {&__pyx_n_s_StringProperty, __pyx_k_StringProperty, sizeof(__pyx_k_StringProperty), 0, 0, 1, 1}, + {&__pyx_n_s_Text, __pyx_k_Text, sizeof(__pyx_k_Text), 0, 0, 1, 1}, + {&__pyx_n_s_TimeCost, __pyx_k_TimeCost, sizeof(__pyx_k_TimeCost), 0, 0, 1, 1}, + {&__pyx_n_s_Toolbar, __pyx_k_Toolbar, sizeof(__pyx_k_Toolbar), 0, 0, 1, 1}, + {&__pyx_n_s_VBox, __pyx_k_VBox, sizeof(__pyx_k_VBox), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetCSS, __pyx_k_WidgetCSS, sizeof(__pyx_k_WidgetCSS), 0, 0, 1, 1}, + {&__pyx_n_s_WidgetReady, __pyx_k_WidgetReady, sizeof(__pyx_k_WidgetReady), 0, 0, 1, 1}, + {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, + {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, + {&__pyx_n_s_absurl, __pyx_k_absurl, sizeof(__pyx_k_absurl), 0, 0, 1, 1}, + {&__pyx_n_s_addRow, __pyx_k_addRow, sizeof(__pyx_k_addRow), 0, 0, 1, 1}, + {&__pyx_n_s_add_page, __pyx_k_add_page, sizeof(__pyx_k_add_page), 0, 0, 1, 1}, + {&__pyx_n_s_add_page_delay, __pyx_k_add_page_delay, sizeof(__pyx_k_add_page_delay), 0, 0, 1, 1}, + {&__pyx_n_s_add_widget, __pyx_k_add_widget, sizeof(__pyx_k_add_widget), 0, 0, 1, 1}, + {&__pyx_n_s_alert, __pyx_k_alert, sizeof(__pyx_k_alert), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_dictObject, __pyx_k_appPublic_dictObject, sizeof(__pyx_k_appPublic_dictObject), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_myTE, __pyx_k_appPublic_myTE, sizeof(__pyx_k_appPublic_myTE), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_timecost, __pyx_k_appPublic_timecost, sizeof(__pyx_k_appPublic_timecost), 0, 0, 1, 1}, + {&__pyx_n_s_appPublic_uniqueID, __pyx_k_appPublic_uniqueID, sizeof(__pyx_k_appPublic_uniqueID), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_kp_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 0}, + {&__pyx_n_s_args_2, __pyx_k_args_2, sizeof(__pyx_k_args_2), 0, 0, 1, 1}, + {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, + {&__pyx_n_s_background_color, __pyx_k_background_color, sizeof(__pyx_k_background_color), 0, 0, 1, 1}, + {&__pyx_n_s_background_rect, __pyx_k_background_rect, sizeof(__pyx_k_background_rect), 0, 0, 1, 1}, + {&__pyx_n_s_bar_width, __pyx_k_bar_width, sizeof(__pyx_k_bar_width), 0, 0, 1, 1}, + {&__pyx_n_s_baseWidget, __pyx_k_baseWidget, sizeof(__pyx_k_baseWidget), 0, 0, 1, 1}, + {&__pyx_n_s_bgcolorbehavior, __pyx_k_bgcolorbehavior, sizeof(__pyx_k_bgcolorbehavior), 0, 0, 1, 1}, + {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1}, + {&__pyx_n_s_bl, __pyx_k_bl, sizeof(__pyx_k_bl), 0, 0, 1, 1}, + {&__pyx_n_s_blocks, __pyx_k_blocks, sizeof(__pyx_k_blocks), 0, 0, 1, 1}, + {&__pyx_n_s_body, __pyx_k_body, sizeof(__pyx_k_body), 0, 0, 1, 1}, + {&__pyx_n_s_bodyOnSize, __pyx_k_bodyOnSize, sizeof(__pyx_k_bodyOnSize), 0, 0, 1, 1}, + {&__pyx_kp_s_body_2, __pyx_k_body_2, sizeof(__pyx_k_body_2), 0, 0, 1, 0}, + {&__pyx_n_s_body_css, __pyx_k_body_css, sizeof(__pyx_k_body_css), 0, 0, 1, 1}, + {&__pyx_n_s_bufferObjects, __pyx_k_bufferObjects, sizeof(__pyx_k_bufferObjects), 0, 0, 1, 1}, + {&__pyx_n_s_build_tailer, __pyx_k_build_tailer, sizeof(__pyx_k_build_tailer), 0, 0, 1, 1}, + {&__pyx_n_s_build_tailer_other, __pyx_k_build_tailer_other, sizeof(__pyx_k_build_tailer_other), 0, 0, 1, 1}, + {&__pyx_n_s_build_tailer_others, __pyx_k_build_tailer_others, sizeof(__pyx_k_build_tailer_others), 0, 0, 1, 1}, + {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, + {&__pyx_n_s_calculateShowRows, __pyx_k_calculateShowRows, sizeof(__pyx_k_calculateShowRows), 0, 0, 1, 1}, + {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1}, + {&__pyx_n_s_canvas, __pyx_k_canvas, sizeof(__pyx_k_canvas), 0, 0, 1, 1}, + {&__pyx_n_s_cell, __pyx_k_cell, sizeof(__pyx_k_cell), 0, 0, 1, 1}, + {&__pyx_n_s_clearRows, __pyx_k_clearRows, sizeof(__pyx_k_clearRows), 0, 0, 1, 1}, + {&__pyx_n_s_clear_widgets, __pyx_k_clear_widgets, sizeof(__pyx_k_clear_widgets), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, + {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, + {&__pyx_n_s_createDataGridPart, __pyx_k_createDataGridPart, sizeof(__pyx_k_createDataGridPart), 0, 0, 1, 1}, + {&__pyx_n_s_createToolbar, __pyx_k_createToolbar, sizeof(__pyx_k_createToolbar), 0, 0, 1, 1}, + {&__pyx_n_s_csscls, __pyx_k_csscls, sizeof(__pyx_k_csscls), 0, 0, 1, 1}, + {&__pyx_n_s_curpage, __pyx_k_curpage, sizeof(__pyx_k_curpage), 0, 0, 1, 1}, + {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, + {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, + {&__pyx_n_s_datagrid, __pyx_k_datagrid, sizeof(__pyx_k_datagrid), 0, 0, 1, 1}, + {&__pyx_n_s_dataloader, __pyx_k_dataloader, sizeof(__pyx_k_dataloader), 0, 0, 1, 1}, + {&__pyx_n_s_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 0, 1, 1}, + {&__pyx_n_s_dec, __pyx_k_dec, sizeof(__pyx_k_dec), 0, 0, 1, 1}, + {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, + {&__pyx_n_s_delRow, __pyx_k_delRow, sizeof(__pyx_k_delRow), 0, 0, 1, 1}, + {&__pyx_n_s_delRowById, __pyx_k_delRowById, sizeof(__pyx_k_delRowById), 0, 0, 1, 1}, + {&__pyx_n_s_delete_page, __pyx_k_delete_page, sizeof(__pyx_k_delete_page), 0, 0, 1, 1}, + {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1}, + {&__pyx_n_s_dg, __pyx_k_dg, sizeof(__pyx_k_dg), 0, 0, 1, 1}, + {&__pyx_kp_s_dg_py_clearRows_called, __pyx_k_dg_py_clearRows_called, sizeof(__pyx_k_dg_py_clearRows_called), 0, 0, 1, 0}, + {&__pyx_kp_s_dg_py_delete_page_called, __pyx_k_dg_py_delete_page_called, sizeof(__pyx_k_dg_py_delete_page_called), 0, 0, 1, 0}, + {&__pyx_n_s_dic, __pyx_k_dic, sizeof(__pyx_k_dic), 0, 0, 1, 1}, + {&__pyx_n_s_dir, __pyx_k_dir, sizeof(__pyx_k_dir), 0, 0, 1, 1}, + {&__pyx_n_s_dispatch, __pyx_k_dispatch, sizeof(__pyx_k_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_do_search, __pyx_k_do_search, sizeof(__pyx_k_do_search), 0, 0, 1, 1}, + {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, + {&__pyx_n_s_dummy, __pyx_k_dummy, sizeof(__pyx_k_dummy), 0, 0, 1, 1}, + {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_f_row, __pyx_k_f_row, sizeof(__pyx_k_f_row), 0, 0, 1, 1}, + {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1}, + {&__pyx_n_s_fbo_rect, __pyx_k_fbo_rect, sizeof(__pyx_k_fbo_rect), 0, 0, 1, 1}, + {&__pyx_n_s_field_widget, __pyx_k_field_widget, sizeof(__pyx_k_field_widget), 0, 0, 1, 1}, + {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1}, + {&__pyx_n_s_fields_width, __pyx_k_fields_width, sizeof(__pyx_k_fields_width), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, + {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1}, + {&__pyx_n_s_font_size, __pyx_k_font_size, sizeof(__pyx_k_font_size), 0, 0, 1, 1}, + {&__pyx_n_s_freeze, __pyx_k_freeze, sizeof(__pyx_k_freeze), 0, 0, 1, 1}, + {&__pyx_n_s_freeze_fields, __pyx_k_freeze_fields, sizeof(__pyx_k_freeze_fields), 0, 0, 1, 1}, + {&__pyx_n_s_freeze_flag, __pyx_k_freeze_flag, sizeof(__pyx_k_freeze_flag), 0, 0, 1, 1}, + {&__pyx_n_s_freeze_part, __pyx_k_freeze_part, sizeof(__pyx_k_freeze_part), 0, 0, 1, 1}, + {&__pyx_n_s_fs, __pyx_k_fs, sizeof(__pyx_k_fs), 0, 0, 1, 1}, + {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_getFieldsWidth, __pyx_k_getFieldsWidth, sizeof(__pyx_k_getFieldsWidth), 0, 0, 1, 1}, + {&__pyx_n_s_getID, __pyx_k_getID, sizeof(__pyx_k_getID), 0, 0, 1, 1}, + {&__pyx_n_s_getLocater, __pyx_k_getLocater, sizeof(__pyx_k_getLocater), 0, 0, 1, 1}, + {&__pyx_n_s_getPartFields, __pyx_k_getPartFields, sizeof(__pyx_k_getPartFields), 0, 0, 1, 1}, + {&__pyx_n_s_getRowData, __pyx_k_getRowData, sizeof(__pyx_k_getRowData), 0, 0, 1, 1}, + {&__pyx_n_s_getRowData_2, __pyx_k_getRowData_2, sizeof(__pyx_k_getRowData_2), 0, 0, 1, 1}, + {&__pyx_n_s_getRowHeight, __pyx_k_getRowHeight, sizeof(__pyx_k_getRowHeight), 0, 0, 1, 1}, + {&__pyx_n_s_getShowRows, __pyx_k_getShowRows, sizeof(__pyx_k_getShowRows), 0, 0, 1, 1}, + {&__pyx_n_s_getValue, __pyx_k_getValue, sizeof(__pyx_k_getValue), 0, 0, 1, 1}, + {&__pyx_kp_s_getValue_return, __pyx_k_getValue_return, sizeof(__pyx_k_getValue_return), 0, 0, 1, 0}, + {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, + {&__pyx_n_s_halign, __pyx_k_halign, sizeof(__pyx_k_halign), 0, 0, 1, 1}, + {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1}, + {&__pyx_n_s_header_css, __pyx_k_header_css, sizeof(__pyx_k_header_css), 0, 0, 1, 1}, + {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1}, + {&__pyx_n_s_horizontal, __pyx_k_horizontal, sizeof(__pyx_k_horizontal), 0, 0, 1, 1}, + {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, + {&__pyx_n_s_i18n, __pyx_k_i18n, sizeof(__pyx_k_i18n), 0, 0, 1, 1}, + {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, + {&__pyx_n_s_idRow, __pyx_k_idRow, sizeof(__pyx_k_idRow), 0, 0, 1, 1}, + {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1}, + {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, + {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, + {&__pyx_n_s_info_names, __pyx_k_info_names, sizeof(__pyx_k_info_names), 0, 0, 1, 1}, + {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, + {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1}, + {&__pyx_n_s_inner, __pyx_k_inner, sizeof(__pyx_k_inner), 0, 0, 1, 1}, + {&__pyx_kp_s_inner_2, __pyx_k_inner_2, sizeof(__pyx_k_inner_2), 0, 0, 1, 0}, + {&__pyx_n_s_inner_3, __pyx_k_inner_3, sizeof(__pyx_k_inner_3), 0, 0, 1, 1}, + {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1}, + {&__pyx_n_s_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1}, + {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, + {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1}, + {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_app, __pyx_k_kivy_app, sizeof(__pyx_k_kivy_app), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_clock, __pyx_k_kivy_clock, sizeof(__pyx_k_kivy_clock), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_factory, __pyx_k_kivy_factory, sizeof(__pyx_k_kivy_factory), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_graphics, __pyx_k_kivy_graphics, sizeof(__pyx_k_kivy_graphics), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_logger, __pyx_k_kivy_logger, sizeof(__pyx_k_kivy_logger), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_properties, __pyx_k_kivy_properties, sizeof(__pyx_k_kivy_properties), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_boxlayout, __pyx_k_kivy_uix_boxlayout, sizeof(__pyx_k_kivy_uix_boxlayout), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_button, __pyx_k_kivy_uix_button, sizeof(__pyx_k_kivy_uix_button), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_gridlayout, __pyx_k_kivy_uix_gridlayout, sizeof(__pyx_k_kivy_uix_gridlayout), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_label, __pyx_k_kivy_uix_label, sizeof(__pyx_k_kivy_uix_label), 0, 0, 1, 1}, + {&__pyx_n_s_kivy_uix_scrollview, __pyx_k_kivy_uix_scrollview, sizeof(__pyx_k_kivy_uix_scrollview), 0, 0, 1, 1}, + {&__pyx_n_s_kivyblocks_dg, __pyx_k_kivyblocks_dg, sizeof(__pyx_k_kivyblocks_dg), 0, 0, 1, 1}, + {&__pyx_kp_s_kivyblocks_dg_pyx, __pyx_k_kivyblocks_dg_pyx, sizeof(__pyx_k_kivyblocks_dg_pyx), 0, 0, 1, 0}, + {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1}, + {&__pyx_kp_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 0}, + {&__pyx_n_s_kwargs_2, __pyx_k_kwargs_2, sizeof(__pyx_k_kwargs_2), 0, 0, 1, 1}, + {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1}, + {&__pyx_n_s_ldr_desc, __pyx_k_ldr_desc, sizeof(__pyx_k_ldr_desc), 0, 0, 1, 1}, + {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, + {&__pyx_n_s_linewidth, __pyx_k_linewidth, sizeof(__pyx_k_linewidth), 0, 0, 1, 1}, + {&__pyx_n_u_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 1, 0, 1}, + {&__pyx_n_s_loadData, __pyx_k_loadData, sizeof(__pyx_k_loadData), 0, 0, 1, 1}, + {&__pyx_n_s_loadNextPage, __pyx_k_loadNextPage, sizeof(__pyx_k_loadNextPage), 0, 0, 1, 1}, + {&__pyx_n_s_loadPreviousPage, __pyx_k_loadPreviousPage, sizeof(__pyx_k_loadPreviousPage), 0, 0, 1, 1}, + {&__pyx_n_s_loaded, __pyx_k_loaded, sizeof(__pyx_k_loaded), 0, 0, 1, 1}, + {&__pyx_n_s_loader_info, __pyx_k_loader_info, sizeof(__pyx_k_loader_info), 0, 0, 1, 1}, + {&__pyx_n_s_loading, __pyx_k_loading, sizeof(__pyx_k_loading), 0, 0, 1, 1}, + {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1}, + {&__pyx_n_s_locater, __pyx_k_locater, sizeof(__pyx_k_locater), 0, 0, 1, 1}, + {&__pyx_n_s_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_max_row, __pyx_k_max_row, sizeof(__pyx_k_max_row), 0, 0, 1, 1}, + {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, + {&__pyx_n_s_middle, __pyx_k_middle, sizeof(__pyx_k_middle), 0, 0, 1, 1}, + {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, + {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_noheader, __pyx_k_noheader, sizeof(__pyx_k_noheader), 0, 0, 1, 1}, + {&__pyx_n_s_normal_fields, __pyx_k_normal_fields, sizeof(__pyx_k_normal_fields), 0, 0, 1, 1}, + {&__pyx_n_s_normal_part, __pyx_k_normal_part, sizeof(__pyx_k_normal_part), 0, 0, 1, 1}, + {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, + {&__pyx_n_s_on_deletepage, __pyx_k_on_deletepage, sizeof(__pyx_k_on_deletepage), 0, 0, 1, 1}, + {&__pyx_n_s_on_newbegin, __pyx_k_on_newbegin, sizeof(__pyx_k_on_newbegin), 0, 0, 1, 1}, + {&__pyx_n_s_on_pageloaded, __pyx_k_on_pageloaded, sizeof(__pyx_k_on_pageloaded), 0, 0, 1, 1}, + {&__pyx_n_s_on_press, __pyx_k_on_press, sizeof(__pyx_k_on_press), 0, 0, 1, 1}, + {&__pyx_n_s_on_scroll_stop, __pyx_k_on_scroll_stop, sizeof(__pyx_k_on_scroll_stop), 0, 0, 1, 1}, + {&__pyx_n_s_on_scrollstop, __pyx_k_on_scrollstop, sizeof(__pyx_k_on_scrollstop), 0, 0, 1, 1}, + {&__pyx_n_s_on_selected, __pyx_k_on_selected, sizeof(__pyx_k_on_selected), 0, 0, 1, 1}, + {&__pyx_n_s_on_size, __pyx_k_on_size, sizeof(__pyx_k_on_size), 0, 0, 1, 1}, + {&__pyx_n_s_on_sizeTask, __pyx_k_on_sizeTask, sizeof(__pyx_k_on_sizeTask), 0, 0, 1, 1}, + {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1}, + {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1}, + {&__pyx_n_s_orientation, __pyx_k_orientation, sizeof(__pyx_k_orientation), 0, 0, 1, 1}, + {&__pyx_n_s_others, __pyx_k_others, sizeof(__pyx_k_others), 0, 0, 1, 1}, + {&__pyx_n_s_page, __pyx_k_page, sizeof(__pyx_k_page), 0, 0, 1, 1}, + {&__pyx_n_s_page_rows, __pyx_k_page_rows, sizeof(__pyx_k_page_rows), 0, 0, 1, 1}, + {&__pyx_n_s_paging, __pyx_k_paging, sizeof(__pyx_k_paging), 0, 0, 1, 1}, + {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1}, + {&__pyx_n_s_part, __pyx_k_part, sizeof(__pyx_k_part), 0, 0, 1, 1}, + {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1}, + {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, + {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, + {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, + {&__pyx_n_s_rd, __pyx_k_rd, sizeof(__pyx_k_rd), 0, 0, 1, 1}, + {&__pyx_n_s_ready, __pyx_k_ready, sizeof(__pyx_k_ready), 0, 0, 1, 1}, + {&__pyx_n_s_rec, __pyx_k_rec, sizeof(__pyx_k_rec), 0, 0, 1, 1}, + {&__pyx_n_s_recs, __pyx_k_recs, sizeof(__pyx_k_recs), 0, 0, 1, 1}, + {&__pyx_n_s_recs1, __pyx_k_recs1, sizeof(__pyx_k_recs1), 0, 0, 1, 1}, + {&__pyx_n_s_recs2, __pyx_k_recs2, sizeof(__pyx_k_recs2), 0, 0, 1, 1}, + {&__pyx_n_s_register_event_type, __pyx_k_register_event_type, sizeof(__pyx_k_register_event_type), 0, 0, 1, 1}, + {&__pyx_n_s_remove_widget, __pyx_k_remove_widget, sizeof(__pyx_k_remove_widget), 0, 0, 1, 1}, + {&__pyx_n_s_rendered, __pyx_k_rendered, sizeof(__pyx_k_rendered), 0, 0, 1, 1}, + {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, + {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1}, + {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, + {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1}, + {&__pyx_n_s_rowHeight, __pyx_k_rowHeight, sizeof(__pyx_k_rowHeight), 0, 0, 1, 1}, + {&__pyx_n_s_row_data, __pyx_k_row_data, sizeof(__pyx_k_row_data), 0, 0, 1, 1}, + {&__pyx_n_s_row_height, __pyx_k_row_height, sizeof(__pyx_k_row_height), 0, 0, 1, 1}, + {&__pyx_n_s_row_id, __pyx_k_row_id, sizeof(__pyx_k_row_id), 0, 0, 1, 1}, + {&__pyx_kp_s_row_selected, __pyx_k_row_selected, sizeof(__pyx_k_row_selected), 0, 0, 1, 0}, + {&__pyx_n_s_row_selected_2, __pyx_k_row_selected_2, sizeof(__pyx_k_row_selected_2), 0, 0, 1, 1}, + {&__pyx_n_s_rowdesc, __pyx_k_rowdesc, sizeof(__pyx_k_rowdesc), 0, 0, 1, 1}, + {&__pyx_n_s_rowheight, __pyx_k_rowheight, sizeof(__pyx_k_rowheight), 0, 0, 1, 1}, + {&__pyx_n_s_rowid, __pyx_k_rowid, sizeof(__pyx_k_rowid), 0, 0, 1, 1}, + {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, + {&__pyx_n_s_schedule_once, __pyx_k_schedule_once, sizeof(__pyx_k_schedule_once), 0, 0, 1, 1}, + {&__pyx_n_s_scroll_x, __pyx_k_scroll_x, sizeof(__pyx_k_scroll_x), 0, 0, 1, 1}, + {&__pyx_n_s_scroll_y, __pyx_k_scroll_y, sizeof(__pyx_k_scroll_y), 0, 0, 1, 1}, + {&__pyx_n_s_scrollpanel, __pyx_k_scrollpanel, sizeof(__pyx_k_scrollpanel), 0, 0, 1, 1}, + {&__pyx_n_s_select_row, __pyx_k_select_row, sizeof(__pyx_k_select_row), 0, 0, 1, 1}, + {&__pyx_n_s_select_rowid, __pyx_k_select_rowid, sizeof(__pyx_k_select_rowid), 0, 0, 1, 1}, + {&__pyx_n_s_selected, __pyx_k_selected, sizeof(__pyx_k_selected), 0, 0, 1, 1}, + {&__pyx_n_s_selected_rowid, __pyx_k_selected_rowid, sizeof(__pyx_k_selected_rowid), 0, 0, 1, 1}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_n_s_setPageRows, __pyx_k_setPageRows, sizeof(__pyx_k_setPageRows), 0, 0, 1, 1}, + {&__pyx_n_s_setSizeOptions, __pyx_k_setSizeOptions, sizeof(__pyx_k_setSizeOptions), 0, 0, 1, 1}, + {&__pyx_n_s_setWidth, __pyx_k_setWidth, sizeof(__pyx_k_setWidth), 0, 0, 1, 1}, + {&__pyx_n_s_show_infos, __pyx_k_show_infos, sizeof(__pyx_k_show_infos), 0, 0, 1, 1}, + {&__pyx_n_s_show_rows, __pyx_k_show_rows, sizeof(__pyx_k_show_rows), 0, 0, 1, 1}, + {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, + {&__pyx_n_s_size_hint, __pyx_k_size_hint, sizeof(__pyx_k_size_hint), 0, 0, 1, 1}, + {&__pyx_n_s_size_hint_x, __pyx_k_size_hint_x, sizeof(__pyx_k_size_hint_x), 0, 0, 1, 1}, + {&__pyx_n_s_size_hint_y, __pyx_k_size_hint_y, sizeof(__pyx_k_size_hint_y), 0, 0, 1, 1}, + {&__pyx_n_s_spacing, __pyx_k_spacing, sizeof(__pyx_k_spacing), 0, 0, 1, 1}, + {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, + {&__pyx_n_s_strdate, __pyx_k_strdate, sizeof(__pyx_k_strdate), 0, 0, 1, 1}, + {&__pyx_n_s_string_template_render, __pyx_k_string_template_render, sizeof(__pyx_k_string_template_render), 0, 0, 1, 1}, + {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, + {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, + {&__pyx_n_s_tailer, __pyx_k_tailer, sizeof(__pyx_k_tailer), 0, 0, 1, 1}, + {&__pyx_n_s_tailer_desc, __pyx_k_tailer_desc, sizeof(__pyx_k_tailer_desc), 0, 0, 1, 1}, + {&__pyx_n_s_tailer_widget, __pyx_k_tailer_widget, sizeof(__pyx_k_tailer_widget), 0, 0, 1, 1}, + {&__pyx_n_s_tailer_widgets, __pyx_k_tailer_widgets, sizeof(__pyx_k_tailer_widgets), 0, 0, 1, 1}, + {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, + {&__pyx_n_s_tb, __pyx_k_tb, sizeof(__pyx_k_tb), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1}, + {&__pyx_n_s_textField, __pyx_k_textField, sizeof(__pyx_k_textField), 0, 0, 1, 1}, + {&__pyx_n_s_texture, __pyx_k_texture, sizeof(__pyx_k_texture), 0, 0, 1, 1}, + {&__pyx_n_s_tf, __pyx_k_tf, sizeof(__pyx_k_tf), 0, 0, 1, 1}, + {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, + {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1}, + {&__pyx_n_s_toolbar, __pyx_k_toolbar, sizeof(__pyx_k_toolbar), 0, 0, 1, 1}, + {&__pyx_n_s_total_cnt, __pyx_k_total_cnt, sizeof(__pyx_k_total_cnt), 0, 0, 1, 1}, + {&__pyx_n_s_txt, __pyx_k_txt, sizeof(__pyx_k_txt), 0, 0, 1, 1}, + {&__pyx_n_s_uitype, __pyx_k_uitype, sizeof(__pyx_k_uitype), 0, 0, 1, 1}, + {&__pyx_n_s_ujson, __pyx_k_ujson, sizeof(__pyx_k_ujson), 0, 0, 1, 1}, + {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_update_tailer_info, __pyx_k_update_tailer_info, sizeof(__pyx_k_update_tailer_info), 0, 0, 1, 1}, + {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1}, + {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, + {&__pyx_n_s_valign, __pyx_k_valign, sizeof(__pyx_k_valign), 0, 0, 1, 1}, + {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, + {&__pyx_n_s_valueField, __pyx_k_valueField, sizeof(__pyx_k_valueField), 0, 0, 1, 1}, + {&__pyx_n_s_vertical, __pyx_k_vertical, sizeof(__pyx_k_vertical), 0, 0, 1, 1}, + {&__pyx_n_s_vf, __pyx_k_vf, sizeof(__pyx_k_vf), 0, 0, 1, 1}, + {&__pyx_n_s_viewer, __pyx_k_viewer, sizeof(__pyx_k_viewer), 0, 0, 1, 1}, + {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, + {&__pyx_n_s_w1, __pyx_k_w1, sizeof(__pyx_k_w1), 0, 0, 1, 1}, + {&__pyx_n_s_widgetBuild, __pyx_k_widgetBuild, sizeof(__pyx_k_widgetBuild), 0, 0, 1, 1}, + {&__pyx_n_s_widget_css, __pyx_k_widget_css, sizeof(__pyx_k_widget_css), 0, 0, 1, 1}, + {&__pyx_n_s_widgettype, __pyx_k_widgettype, sizeof(__pyx_k_widgettype), 0, 0, 1, 1}, + {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, + {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1}, + {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 180, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "kivyblocks/dg.pyx":45 + * return blocks.widgetBuild(dic) + * + * uitype = desc.get('uitype', 'str') # <<<<<<<<<<<<<< + * if uitype is None: + * uitype = desc.get('datatype') + */ + __pyx_tuple_ = PyTuple_Pack(2, __pyx_n_s_uitype, __pyx_n_s_str); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "kivyblocks/dg.pyx":59 + * ) + * if uitype == 'float': + * f = '%%.0%df' % desc.get('dec',2) # <<<<<<<<<<<<<< + * return Text(text=f % float(desc['value']), + * font_size=CSize(1), wrap=True, + */ + __pyx_tuple__2 = PyTuple_Pack(2, __pyx_n_s_dec, __pyx_int_2); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "kivyblocks/dg.pyx":65 + * ) + * if uitype == 'code': + * tf = desc.get('textField','text') # <<<<<<<<<<<<<< + * vf = desc.get('valueField','value') + * v = rec.get(tf,rec.get(vf, ' ')) + */ + __pyx_tuple__3 = PyTuple_Pack(2, __pyx_n_s_textField, __pyx_n_s_text); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "kivyblocks/dg.pyx":66 + * if uitype == 'code': + * tf = desc.get('textField','text') + * vf = desc.get('valueField','value') # <<<<<<<<<<<<<< + * v = rec.get(tf,rec.get(vf, ' ')) + * return Text(text=v, font_size = CSize(1), wrap=True, + */ + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_s_valueField, __pyx_n_s_value); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "kivyblocks/dg.pyx":99 + * if self.row.header: + * csscls=self.row.part.datagrid.header_css + * super().__init__(size_hint=(None,None), # <<<<<<<<<<<<<< + * width = self.desc['width'], + * height = self.row.part.datagrid.rowHeight(), + */ + __pyx_tuple__6 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "kivyblocks/dg.pyx":190 + * SUPER(Body, self, kw) + * self._inner.spacing = self.part.datagrid.linewidth + * self.size_hint=(1,1) # <<<<<<<<<<<<<< + * self.idRow = {} + * self.bind(on_scroll_stop=self.part.datagrid.on_scrollstop) + */ + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "kivyblocks/dg.pyx":249 + * for f in self.fields: + * r = f.copy() + * r['width'] = CSize(f.get('width',10)) # <<<<<<<<<<<<<< + * rd.append(r) + * self.rowdesc = rd + */ + __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_width, __pyx_int_10); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "kivyblocks/dg.pyx":258 + * kw['size_hint'] = (None,None) + * else: + * kw['size_hint'] = (1,None) # <<<<<<<<<<<<<< + * kw['height'] = self.datagrid.rowHeight() + * + */ + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_int_1, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "kivyblocks/dg.pyx":356 + * self.freeze_part = None + * self.normal_part = None + * self.page_rows = self.options.get('page_rows', 60) # <<<<<<<<<<<<<< + * self.params = self.options.get('params',{}) + * self.total_cnt = 0 + */ + __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_page_rows, __pyx_int_60); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "kivyblocks/dg.pyx":360 + * self.total_cnt = 0 + * self.max_row = 0 + * self.row_height = self.options.get('row_height',2) # <<<<<<<<<<<<<< + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) + */ + __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_row_height, __pyx_int_2); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "kivyblocks/dg.pyx":361 + * self.max_row = 0 + * self.row_height = self.options.get('row_height',2) + * self.header_css = self.options.get('header_css','default') # <<<<<<<<<<<<<< + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') + */ + __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_header_css, __pyx_n_s_default); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "kivyblocks/dg.pyx":362 + * self.row_height = self.options.get('row_height',2) + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) # <<<<<<<<<<<<<< + * self.body_css = self.options.get('body_css', 'default') + * self.linewidth = self.options.get('linewidth',1) + */ + __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_noheader, Py_False); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "kivyblocks/dg.pyx":363 + * self.header_css = self.options.get('header_css','default') + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') # <<<<<<<<<<<<<< + * self.linewidth = self.options.get('linewidth',1) + * self.curpage = 0 + */ + __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_body_css, __pyx_n_s_default); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "kivyblocks/dg.pyx":364 + * self.noheader = self.options.get('noheader',False) + * self.body_css = self.options.get('body_css', 'default') + * self.linewidth = self.options.get('linewidth',1) # <<<<<<<<<<<<<< + * self.curpage = 0 + * self.loading = False + */ + __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_linewidth, __pyx_int_1); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + + /* "kivyblocks/dg.pyx":371 + * ldr_desc = options.get('dataloader') + * if not ldr_desc: + * raise Exception('DataGrid need a DataLoader') # <<<<<<<<<<<<<< + * self.dataloader = RelatedLoader(target=self, **ldr_desc) + * self.dataloader.bind(on_deletepage=self.delete_page) + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_DataGrid_need_a_DataLoader); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "kivyblocks/dg.pyx":516 + * self._fbo = Fbo(size=self.size) + * with self._fbo: + * self._background_color = Color(0,0,0,1) # <<<<<<<<<<<<<< + * self._background_rect = Rectangle(size=self.size) + * for r in recs1: + */ + __pyx_tuple__18 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + + /* "kivyblocks/dg.pyx":515 + * recs2 = recs[self.show_rows:] + * self._fbo = Fbo(size=self.size) + * with self._fbo: # <<<<<<<<<<<<<< + * self._background_color = Color(0,0,0,1) + * self._background_rect = Rectangle(size=self.size) + */ + __pyx_tuple__19 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + + /* "kivyblocks/dg.pyx":595 + * for f in self.options['fields']: + * if freeze_flag: + * if f.get('freeze',False): # <<<<<<<<<<<<<< + * fs.append(f) + * else: + */ + __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_freeze, Py_False); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + + /* "kivyblocks/dg.pyx":33 + * from .widget_css import WidgetCSS + * + * def field_widget(desc, rec): # <<<<<<<<<<<<<< + * viewer = desc.get('viewer') + * if viewer: + */ + __pyx_tuple__21 = PyTuple_Pack(11, __pyx_n_s_desc, __pyx_n_s_rec, __pyx_n_s_viewer, __pyx_n_s_rendered, __pyx_n_s_dic, __pyx_n_s_blocks, __pyx_n_s_uitype, __pyx_n_s_f, __pyx_n_s_tf, __pyx_n_s_vf, __pyx_n_s_v); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_field_widget, 33, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 33, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":78 + * + * class BLabel(ButtonBehavior, Text): + * def __init__(self, **kw): # <<<<<<<<<<<<<< + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) + */ + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 78, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":84 + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): + * def __init__(self,row,desc, **kw): # <<<<<<<<<<<<<< + * """ + * desc:{ + */ + __pyx_tuple__25 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_row, __pyx_n_s_desc, __pyx_n_s_kw, __pyx_n_s_csscls, __pyx_n_s_bl); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 84, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":114 + * self.add_widget(bl) + * + * def on_press(self,o=None): # <<<<<<<<<<<<<< + * if not self.row.header: + * self.row.selected() + */ + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_on_press, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + + /* "kivyblocks/dg.pyx":119 + * + * class Row(BoxLayout): + * def __init__(self,part, rowdesc,header=False,data=None, **kw): # <<<<<<<<<<<<<< + * """ + * rowdesc=[ + */ + __pyx_tuple__30 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_rowdesc, __pyx_n_s_header, __pyx_n_s_data, __pyx_n_s_kw, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 119, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + + /* "kivyblocks/dg.pyx":146 + * + * + * def init(self,t): # <<<<<<<<<<<<<< + * w = 0 + * h = 0 + */ + __pyx_tuple__33 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_c, __pyx_n_s_cell); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init_2, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 146, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":157 + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + * + * def selected(self): # <<<<<<<<<<<<<< + * if not hasattr(self,'row_data'): + * return # header + */ + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_selected, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 157, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":168 + * + * class Header(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * SUPER(Header, self, kw) + * self.part = part + */ + __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 168, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":176 + * self.bar_width = 0 + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ + */ + __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_rd, __pyx_n_s_f, __pyx_n_s_i); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init_2, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 176, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":186 + * + * class Body(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * self.part = part + * SUPER(Body, self, kw) + */ + __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 186, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":196 + * self.bar_width = 0 + * + * def addRow(self,id, data,index=0): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + */ + __pyx_tuple__43 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_data, __pyx_n_s_index, __pyx_n_s_rd, __pyx_n_s_row, __pyx_n_s_f); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_addRow, 196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + + /* "kivyblocks/dg.pyx":205 + * return row + * + * def clearRows(self): # <<<<<<<<<<<<<< + * self.idRow = {} + * self.clear_widgets() + */ + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_clearRows, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 205, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":209 + * self.clear_widgets() + * + * def delRowById(self,id): # <<<<<<<<<<<<<< + * row = self.idRow.get(id) + * if row: + */ + __pyx_tuple__48 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_delRowById, 209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 209, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":216 + * del self.idRow[id] + * + * def getRowData(self,rowid): # <<<<<<<<<<<<<< + * return self.idRow[rowid].row_data + * + */ + __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_rowid); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__50); + __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getRowData_2, 216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 216, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":219 + * return self.idRow[rowid].row_data + * + * def getRowHeight(self): # <<<<<<<<<<<<<< + * return self.part.datagrid.rowHeight() + * + */ + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getRowHeight, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 219, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":223 + * + * class DataGridPart(WidgetReady, BoxLayout): + * def __init__(self,dg, freeze_flag, fields): # <<<<<<<<<<<<<< + * self.datagrid = dg + * self.fields = fields + */ + __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_dg, __pyx_n_s_freeze_flag, __pyx_n_s_fields); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 223, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":232 + * self.init(0) + * + * def setWidth(self): # <<<<<<<<<<<<<< + * if self.freeze_flag: + * self.size_hint_x = None + */ + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_setWidth, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 232, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":237 + * self.width = self.getFieldsWidth() + * + * def getFieldsWidth(self): # <<<<<<<<<<<<<< + * if not self.fields_width: + * width = 0 + */ + __pyx_tuple__58 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_width, __pyx_n_s_f); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getFieldsWidth, 237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 237, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":245 + * return self.fields_width + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [] + * for f in self.fields: + */ + __pyx_tuple__60 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_rd, __pyx_n_s_f, __pyx_n_s_r, __pyx_n_s_kw, __pyx_n_s_inner_3); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init_2, 245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 245, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":276 + * size=self.datagrid.bodyOnSize) + * + * def clearRows(self): # <<<<<<<<<<<<<< + * return self.body.clearRows() + * + */ + __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_clearRows, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 276, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":279 + * return self.body.clearRows() + * + * def addRow(self,id, data): # <<<<<<<<<<<<<< + * return self.body.addRow(id, data) + * + */ + __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_data); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_addRow, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 279, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":282 + * return self.body.addRow(id, data) + * + * def on_size(self, o, s=None): # <<<<<<<<<<<<<< + * if not hasattr(self, 'body'): + * return + */ + __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_s); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_on_size, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + + /* "kivyblocks/dg.pyx":343 + * """ + * row_selected = BooleanProperty(False) + * def __init__(self,**options): # <<<<<<<<<<<<<< + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') + */ + __pyx_tuple__69 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_options, __pyx_n_s_ldr_desc, __pyx_n_s_b); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_init, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 343, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":394 + * self.build_tailer(self.options.get('tailer')) + * + * def build_tailer(self, tailer_desc): # <<<<<<<<<<<<<< + * kw = tailer_desc.get('options', {}) + * kw.update({ + */ + __pyx_tuple__71 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tailer_desc, __pyx_n_s_kw, __pyx_n_s_w, __pyx_n_s_w1); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_build_tailer, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 394, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":408 + * w.add_widget(w1) + * + * def update_tailer_info(self, *args): # <<<<<<<<<<<<<< + * if not hasattr(self, 'tailer_widgets'): + * return + */ + __pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args_2, __pyx_n_s_n, __pyx_n_s_w); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_update_tailer_info, 408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 408, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":414 + * w.text = self.loader_info(n) + * + * def show_infos(self, tailer_widget, info_names): # <<<<<<<<<<<<<< + * for n in info_names: + * desc = { + */ + __pyx_tuple__75 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_tailer_widget, __pyx_n_s_info_names, __pyx_n_s_n, __pyx_n_s_desc, __pyx_n_s_w); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_show_infos, 414, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 414, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":429 + * tailer_widget.add_widget(self.tailer_widgets[n]) + * + * def build_tailer_others(desc): # <<<<<<<<<<<<<< + * return Factory.Blocks().widgetBuild(desc) + * + */ + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_build_tailer_others, 429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 429, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":432 + * return Factory.Blocks().widgetBuild(desc) + * + * def loader_info(self, n): # <<<<<<<<<<<<<< + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + */ + __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_txt); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_loader_info, 432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 432, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":440 + * return txt + * + * def locater(self,pos): # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: + */ + __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_locater, 440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 440, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":445 + * self.freeze_part.body.scroll_y = pos + * + * def on_scrollstop(self,o,v=None): # <<<<<<<<<<<<<< + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x + */ + __pyx_tuple__83 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_v); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_on_scrollstop, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + + /* "kivyblocks/dg.pyx":462 + * self.dataloader.loadPreviousPage() + * + * def getValue(self): # <<<<<<<<<<<<<< + * if not self.select_rowid: + * return None + */ + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); + __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getValue, 462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 462, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":467 + * return self._getRowData(self.select_rowid) + * + * def _getRowData(self, rowid): # <<<<<<<<<<<<<< + * d = {} + * if self.freeze_part: + */ + __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_rowid, __pyx_n_s_d); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); + __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getRowData, 467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 467, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":475 + * return DictObject(**d) + * + * def bodyOnSize(self,o,s): # <<<<<<<<<<<<<< + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() + */ + __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_s); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__90); + __Pyx_GIVEREF(__pyx_tuple__90); + __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_bodyOnSize, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 475, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":480 + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + * + * def rowHeight(self): # <<<<<<<<<<<<<< + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) + */ + __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__92); + __Pyx_GIVEREF(__pyx_tuple__92); + __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_rowHeight, 480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 480, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":485 + * return self.rowheight + * + * def calculateShowRows(self,t): # <<<<<<<<<<<<<< + * self.getShowRows() + * self.dataloader.setPageRows(self.show_rows * 2) + */ + __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__94); + __Pyx_GIVEREF(__pyx_tuple__94); + __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_calculateShowRows, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 485, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":489 + * self.dataloader.setPageRows(self.show_rows * 2) + * + * def getShowRows(self): # <<<<<<<<<<<<<< + * if self.show_rows == 0: + * return 60 + */ + __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__96); + __Pyx_GIVEREF(__pyx_tuple__96); + __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getShowRows, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 489, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":495 + * return self.show_rows * 2 + * + * def clearRows(self, *args): # <<<<<<<<<<<<<< + * print('dg.py:clearRows() called') + * if self.freeze_part: + */ + __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args_2); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__98); + __Pyx_GIVEREF(__pyx_tuple__98); + __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_clearRows, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 495, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":501 + * self.normal_part.body.clearRows() + * + * def add_page(self,o,data): # <<<<<<<<<<<<<< + * dir = data['dir'] + * if not self.show_rows: + */ + __pyx_tuple__100 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_data, __pyx_n_s_dir, __pyx_n_s_ids, __pyx_n_s_recs, __pyx_n_s_idx, __pyx_n_s_recs1, __pyx_n_s_recs2, __pyx_n_s_r, __pyx_n_s_id, __pyx_n_s_f); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__100); + __Pyx_GIVEREF(__pyx_tuple__100); + __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_add_page, 501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 501, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":533 + * 'inner=', self.normal_part.body._inner.size) + * + * def add_page_delay(self, data, *args): # <<<<<<<<<<<<<< + * recs = data['data'] + * page = data['page'] + */ + __pyx_tuple__102 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_args_2, __pyx_n_s_recs, __pyx_n_s_page, __pyx_n_s_idx, __pyx_n_s_ids, __pyx_n_s_r, __pyx_n_s_id, __pyx_n_s_x); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__102); + __Pyx_GIVEREF(__pyx_tuple__102); + __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_add_page_delay, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 533, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":552 + * self.locater(x) + * + * def delete_page(self,o,data): # <<<<<<<<<<<<<< + * print('dg.py:delete_page() called') + * for id in data: + */ + __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_data, __pyx_n_s_id); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__104); + __Pyx_GIVEREF(__pyx_tuple__104); + __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_delete_page, 552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 552, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":557 + * self.delRow(id) + * + * def addRow(self,data, **kw): # <<<<<<<<<<<<<< + * id = getID() + * f_row = None + */ + __pyx_tuple__106 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_kw, __pyx_n_s_id, __pyx_n_s_f_row); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__106); + __Pyx_GIVEREF(__pyx_tuple__106); + __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_addRow, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 557, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":565 + * return id + * + * def delRow(self,id,**kw): # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) + */ + __pyx_tuple__108 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__108); + __Pyx_GIVEREF(__pyx_tuple__108); + __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_delRow, 565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 565, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":570 + * self.normal_part.body.delRowById(id) + * + * def createToolbar(self): # <<<<<<<<<<<<<< + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] + */ + __pyx_tuple__110 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__110); + __Pyx_GIVEREF(__pyx_tuple__110); + __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_createToolbar, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 570, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":575 + * self.toolbar = Toolbar(**tb) + * + * def on_selected(self,row): # <<<<<<<<<<<<<< + * print("DataGrid():on_selected fire") + * + */ + __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_row); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__112); + __Pyx_GIVEREF(__pyx_tuple__112); + __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_on_selected, 575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 575, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":578 + * print("DataGrid():on_selected fire") + * + * def loadData(self,*args, **kwargs): # <<<<<<<<<<<<<< + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 + */ + __pyx_tuple__114 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args_2, __pyx_n_s_kwargs_2); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__114); + __Pyx_GIVEREF(__pyx_tuple__114); + __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_loadData, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 578, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":583 + * self.dataloader.do_search(None,kwargs) + * + * def createDataGridPart(self): # <<<<<<<<<<<<<< + * self.freeze_part = None + * self.normal_part = None + */ + __pyx_tuple__116 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__116); + __Pyx_GIVEREF(__pyx_tuple__116); + __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_createDataGridPart, 583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 583, __pyx_L1_error) + + /* "kivyblocks/dg.pyx":591 + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + * def getPartFields(self,freeze_flag:bool=False) -> list: # <<<<<<<<<<<<<< + * fs = [] + * for f in self.options['fields']: + */ + __pyx_tuple__118 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_freeze_flag, __pyx_n_s_fs, __pyx_n_s_f); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__118); + __Pyx_GIVEREF(__pyx_tuple__118); + __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kivyblocks_dg_pyx, __pyx_n_s_getPartFields, 591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_tuple__120 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__120); + __Pyx_GIVEREF(__pyx_tuple__120); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_update.type = (PyObject*)&PyDict_Type; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_float_0_3 = PyFloat_FromDouble(0.3); if (unlikely(!__pyx_float_0_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_001 = PyFloat_FromDouble(0.001); if (unlikely(!__pyx_float_0_001)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_999 = PyFloat_FromDouble(0.999); if (unlikely(!__pyx_float_0_999)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initdg(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initdg(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_dg(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_dg(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_dg(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'dg' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_dg(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("dg", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_kivyblocks__dg) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "kivyblocks.dg")) { + if (unlikely(PyDict_SetItemString(modules, "kivyblocks.dg", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + (void)__Pyx_modinit_type_init_code(); + (void)__Pyx_modinit_type_import_code(); + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "kivyblocks/dg.pyx":1 + * import time # <<<<<<<<<<<<<< + * import ujson as json + * from functools import partial + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":2 + * import time + * import ujson as json # <<<<<<<<<<<<<< + * from functools import partial + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ujson, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":3 + * import time + * import ujson as json + * from functools import partial # <<<<<<<<<<<<<< + * + * from kivy.logger import Logger + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_partial); + __Pyx_GIVEREF(__pyx_n_s_partial); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_partial); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_partial, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":5 + * from functools import partial + * + * from kivy.logger import Logger # <<<<<<<<<<<<<< + * from kivy.uix.gridlayout import GridLayout + * from kivy.uix.boxlayout import BoxLayout + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Logger); + __Pyx_GIVEREF(__pyx_n_s_Logger); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Logger); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_logger, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Logger, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":6 + * + * from kivy.logger import Logger + * from kivy.uix.gridlayout import GridLayout # <<<<<<<<<<<<<< + * from kivy.uix.boxlayout import BoxLayout + * from kivy.uix.scrollview import ScrollView + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_GridLayout); + __Pyx_GIVEREF(__pyx_n_s_GridLayout); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GridLayout); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_uix_gridlayout, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GridLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GridLayout, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":7 + * from kivy.logger import Logger + * from kivy.uix.gridlayout import GridLayout + * from kivy.uix.boxlayout import BoxLayout # <<<<<<<<<<<<<< + * from kivy.uix.scrollview import ScrollView + * from kivy.uix.label import Label + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_BoxLayout); + __Pyx_GIVEREF(__pyx_n_s_BoxLayout); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BoxLayout); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_uix_boxlayout, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BoxLayout, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":8 + * from kivy.uix.gridlayout import GridLayout + * from kivy.uix.boxlayout import BoxLayout + * from kivy.uix.scrollview import ScrollView # <<<<<<<<<<<<<< + * from kivy.uix.label import Label + * from kivy.graphics import Fbo + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_ScrollView); + __Pyx_GIVEREF(__pyx_n_s_ScrollView); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ScrollView); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_uix_scrollview, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ScrollView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ScrollView, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":9 + * from kivy.uix.boxlayout import BoxLayout + * from kivy.uix.scrollview import ScrollView + * from kivy.uix.label import Label # <<<<<<<<<<<<<< + * from kivy.graphics import Fbo + * from kivy.uix.button import ButtonBehavior + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Label); + __Pyx_GIVEREF(__pyx_n_s_Label); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Label); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_uix_label, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Label, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":10 + * from kivy.uix.scrollview import ScrollView + * from kivy.uix.label import Label + * from kivy.graphics import Fbo # <<<<<<<<<<<<<< + * from kivy.uix.button import ButtonBehavior + * from kivy.clock import Clock + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Fbo); + __Pyx_GIVEREF(__pyx_n_s_Fbo); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Fbo); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_graphics, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Fbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Fbo, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":11 + * from kivy.uix.label import Label + * from kivy.graphics import Fbo + * from kivy.uix.button import ButtonBehavior # <<<<<<<<<<<<<< + * from kivy.clock import Clock + * from kivy.properties import BooleanProperty, StringProperty + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_ButtonBehavior); + __Pyx_GIVEREF(__pyx_n_s_ButtonBehavior); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ButtonBehavior); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_uix_button, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ButtonBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ButtonBehavior, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":12 + * from kivy.graphics import Fbo + * from kivy.uix.button import ButtonBehavior + * from kivy.clock import Clock # <<<<<<<<<<<<<< + * from kivy.properties import BooleanProperty, StringProperty + * from kivy.properties import ListProperty + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Clock); + __Pyx_GIVEREF(__pyx_n_s_Clock); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Clock); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_clock, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Clock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Clock, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":13 + * from kivy.uix.button import ButtonBehavior + * from kivy.clock import Clock + * from kivy.properties import BooleanProperty, StringProperty # <<<<<<<<<<<<<< + * from kivy.properties import ListProperty + * from kivy.graphics import Color, Rectangle + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_BooleanProperty); + __Pyx_GIVEREF(__pyx_n_s_BooleanProperty); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BooleanProperty); + __Pyx_INCREF(__pyx_n_s_StringProperty); + __Pyx_GIVEREF(__pyx_n_s_StringProperty); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_StringProperty); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_properties, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BooleanProperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BooleanProperty, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringProperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StringProperty, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":14 + * from kivy.clock import Clock + * from kivy.properties import BooleanProperty, StringProperty + * from kivy.properties import ListProperty # <<<<<<<<<<<<<< + * from kivy.graphics import Color, Rectangle + * from kivy.app import App + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_ListProperty); + __Pyx_GIVEREF(__pyx_n_s_ListProperty); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ListProperty); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_properties, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ListProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ListProperty, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":15 + * from kivy.properties import BooleanProperty, StringProperty + * from kivy.properties import ListProperty + * from kivy.graphics import Color, Rectangle # <<<<<<<<<<<<<< + * from kivy.app import App + * from kivy.factory import Factory + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Color); + __Pyx_GIVEREF(__pyx_n_s_Color); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Color); + __Pyx_INCREF(__pyx_n_s_Rectangle); + __Pyx_GIVEREF(__pyx_n_s_Rectangle); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Rectangle); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_graphics, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Color, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Rectangle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Rectangle, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":16 + * from kivy.properties import ListProperty + * from kivy.graphics import Color, Rectangle + * from kivy.app import App # <<<<<<<<<<<<<< + * from kivy.factory import Factory + * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_App); + __Pyx_GIVEREF(__pyx_n_s_App); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_App); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_kivy_app, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_App); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_App, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":17 + * from kivy.graphics import Color, Rectangle + * from kivy.app import App + * from kivy.factory import Factory # <<<<<<<<<<<<<< + * + * from appPublic.dictObject import DictObject + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Factory); + __Pyx_GIVEREF(__pyx_n_s_Factory); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Factory); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_kivy_factory, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Factory, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":19 + * from kivy.factory import Factory + * + * from appPublic.dictObject import DictObject # <<<<<<<<<<<<<< + * from appPublic.timecost import TimeCost + * from appPublic.uniqueID import getID + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_DictObject); + __Pyx_GIVEREF(__pyx_n_s_DictObject); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DictObject); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_appPublic_dictObject, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_DictObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DictObject, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":20 + * + * from appPublic.dictObject import DictObject + * from appPublic.timecost import TimeCost # <<<<<<<<<<<<<< + * from appPublic.uniqueID import getID + * from appPublic.myTE import string_template_render + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_TimeCost); + __Pyx_GIVEREF(__pyx_n_s_TimeCost); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_TimeCost); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_appPublic_timecost, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TimeCost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeCost, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":21 + * from appPublic.dictObject import DictObject + * from appPublic.timecost import TimeCost + * from appPublic.uniqueID import getID # <<<<<<<<<<<<<< + * from appPublic.myTE import string_template_render + * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_getID); + __Pyx_GIVEREF(__pyx_n_s_getID); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_getID); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_appPublic_uniqueID, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_getID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_getID, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":22 + * from appPublic.timecost import TimeCost + * from appPublic.uniqueID import getID + * from appPublic.myTE import string_template_render # <<<<<<<<<<<<<< + * + * from .utils import CSize, setSizeOptions, loading, loaded, absurl, alert, SUPER + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_string_template_render); + __Pyx_GIVEREF(__pyx_n_s_string_template_render); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_string_template_render); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_appPublic_myTE, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_string_template_render); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_template_render, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":24 + * from appPublic.myTE import string_template_render + * + * from .utils import CSize, setSizeOptions, loading, loaded, absurl, alert, SUPER # <<<<<<<<<<<<<< + * from .baseWidget import Text, HBox, VBox + * from .scrollpanel import ScrollPanel + */ + __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_CSize); + __Pyx_GIVEREF(__pyx_n_s_CSize); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CSize); + __Pyx_INCREF(__pyx_n_s_setSizeOptions); + __Pyx_GIVEREF(__pyx_n_s_setSizeOptions); + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_setSizeOptions); + __Pyx_INCREF(__pyx_n_s_loading); + __Pyx_GIVEREF(__pyx_n_s_loading); + PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_loading); + __Pyx_INCREF(__pyx_n_s_loaded); + __Pyx_GIVEREF(__pyx_n_s_loaded); + PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_loaded); + __Pyx_INCREF(__pyx_n_s_absurl); + __Pyx_GIVEREF(__pyx_n_s_absurl); + PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_absurl); + __Pyx_INCREF(__pyx_n_s_alert); + __Pyx_GIVEREF(__pyx_n_s_alert); + PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_alert); + __Pyx_INCREF(__pyx_n_s_SUPER); + __Pyx_GIVEREF(__pyx_n_s_SUPER); + PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_SUPER); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CSize, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_setSizeOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_setSizeOptions, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_loading); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_loading, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_loaded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_loaded, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_absurl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_absurl, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_alert); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_alert, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SUPER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUPER, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":25 + * + * from .utils import CSize, setSizeOptions, loading, loaded, absurl, alert, SUPER + * from .baseWidget import Text, HBox, VBox # <<<<<<<<<<<<<< + * from .scrollpanel import ScrollPanel + * from .paging import Paging, RelatedLoader + */ + __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Text); + __Pyx_GIVEREF(__pyx_n_s_Text); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Text); + __Pyx_INCREF(__pyx_n_s_HBox); + __Pyx_GIVEREF(__pyx_n_s_HBox); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_HBox); + __Pyx_INCREF(__pyx_n_s_VBox); + __Pyx_GIVEREF(__pyx_n_s_VBox); + PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_VBox); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_baseWidget, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Text, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_HBox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HBox, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_VBox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VBox, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":26 + * from .utils import CSize, setSizeOptions, loading, loaded, absurl, alert, SUPER + * from .baseWidget import Text, HBox, VBox + * from .scrollpanel import ScrollPanel # <<<<<<<<<<<<<< + * from .paging import Paging, RelatedLoader + * from .ready import WidgetReady + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_ScrollPanel); + __Pyx_GIVEREF(__pyx_n_s_ScrollPanel); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ScrollPanel); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_scrollpanel, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ScrollPanel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ScrollPanel, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":27 + * from .baseWidget import Text, HBox, VBox + * from .scrollpanel import ScrollPanel + * from .paging import Paging, RelatedLoader # <<<<<<<<<<<<<< + * from .ready import WidgetReady + * from .toolbar import Toolbar + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Paging); + __Pyx_GIVEREF(__pyx_n_s_Paging); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Paging); + __Pyx_INCREF(__pyx_n_s_RelatedLoader); + __Pyx_GIVEREF(__pyx_n_s_RelatedLoader); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_RelatedLoader); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_paging, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Paging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Paging, __pyx_t_2) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_RelatedLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RelatedLoader, __pyx_t_2) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":28 + * from .scrollpanel import ScrollPanel + * from .paging import Paging, RelatedLoader + * from .ready import WidgetReady # <<<<<<<<<<<<<< + * from .toolbar import Toolbar + * from .bgcolorbehavior import BGColorBehavior + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_WidgetReady); + __Pyx_GIVEREF(__pyx_n_s_WidgetReady); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_WidgetReady); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_ready, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WidgetReady, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":29 + * from .paging import Paging, RelatedLoader + * from .ready import WidgetReady + * from .toolbar import Toolbar # <<<<<<<<<<<<<< + * from .bgcolorbehavior import BGColorBehavior + * from .widget_css import WidgetCSS + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_Toolbar); + __Pyx_GIVEREF(__pyx_n_s_Toolbar); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Toolbar); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_toolbar, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Toolbar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Toolbar, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":30 + * from .ready import WidgetReady + * from .toolbar import Toolbar + * from .bgcolorbehavior import BGColorBehavior # <<<<<<<<<<<<<< + * from .widget_css import WidgetCSS + * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_BGColorBehavior); + __Pyx_GIVEREF(__pyx_n_s_BGColorBehavior); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BGColorBehavior); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_bgcolorbehavior, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_BGColorBehavior); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BGColorBehavior, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":31 + * from .toolbar import Toolbar + * from .bgcolorbehavior import BGColorBehavior + * from .widget_css import WidgetCSS # <<<<<<<<<<<<<< + * + * def field_widget(desc, rec): + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_WidgetCSS); + __Pyx_GIVEREF(__pyx_n_s_WidgetCSS); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WidgetCSS); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_widget_css, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_WidgetCSS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WidgetCSS, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":33 + * from .widget_css import WidgetCSS + * + * def field_widget(desc, rec): # <<<<<<<<<<<<<< + * viewer = desc.get('viewer') + * if viewer: + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10kivyblocks_2dg_1field_widget, NULL, __pyx_n_s_kivyblocks_dg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_field_widget, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":77 + * + * + * class BLabel(ButtonBehavior, Text): # <<<<<<<<<<<<<< + * def __init__(self, **kw): + * ButtonBehavior.__init__(self) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ButtonBehavior); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_BLabel, __pyx_n_s_BLabel, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "kivyblocks/dg.pyx":78 + * + * class BLabel(ButtonBehavior, Text): + * def __init__(self, **kw): # <<<<<<<<<<<<<< + * ButtonBehavior.__init__(self) + * Text.__init__(self,**kw) + */ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_6BLabel_1__init__, 0, __pyx_n_s_BLabel___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":77 + * + * + * class BLabel(ButtonBehavior, Text): # <<<<<<<<<<<<<< + * def __init__(self, **kw): + * ButtonBehavior.__init__(self) + */ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_BLabel, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLabel, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":83 + * self.csscls = 'dummy' + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,row,desc, **kw): + * """ + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ButtonBehavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WidgetCSS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_Cell, __pyx_n_s_Cell, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "kivyblocks/dg.pyx":84 + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): + * def __init__(self,row,desc, **kw): # <<<<<<<<<<<<<< + * """ + * desc:{ + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Cell_1__init__, 0, __pyx_n_s_Cell___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_5); + PyList_Append(__pyx_t_3, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":114 + * self.add_widget(bl) + * + * def on_press(self,o=None): # <<<<<<<<<<<<<< + * if not self.row.header: + * self.row.selected() + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Cell_3on_press, 0, __pyx_n_s_Cell_on_press, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__29); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_on_press, __pyx_t_5) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":83 + * self.csscls = 'dummy' + * + * class Cell(ButtonBehavior, WidgetCSS, BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,row,desc, **kw): + * """ + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Cell, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_3, __pyx_t_5) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cell, __pyx_t_5) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "kivyblocks/dg.pyx":118 + * self.row.selected() + * + * class Row(BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,part, rowdesc,header=False,data=None, **kw): + * """ + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_n_s_Row, __pyx_n_s_Row, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "kivyblocks/dg.pyx":119 + * + * class Row(BoxLayout): + * def __init__(self,part, rowdesc,header=False,data=None, **kw): # <<<<<<<<<<<<<< + * """ + * rowdesc=[ + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_3Row_1__init__, 0, __pyx_n_s_Row___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__32); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":146 + * + * + * def init(self,t): # <<<<<<<<<<<<<< + * w = 0 + * h = 0 + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_3Row_3init, 0, __pyx_n_s_Row_init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":157 + * self.width = w + self.linewidth * (len(self.rowdesc)+1) + * + * def selected(self): # <<<<<<<<<<<<<< + * if not hasattr(self,'row_data'): + * return # header + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_3Row_5selected, 0, __pyx_n_s_Row_selected, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_selected, __pyx_t_5) < 0) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":118 + * self.row.selected() + * + * class Row(BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,part, rowdesc,header=False,data=None, **kw): + * """ + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Row, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Row, __pyx_t_5) < 0) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":167 + * self.part.datagrid.dispatch('on_selected',self) + * + * class Header(WidgetReady, ScrollPanel): # <<<<<<<<<<<<<< + * def __init__(self,part,**kw): + * SUPER(Header, self, kw) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ScrollPanel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_Header, __pyx_n_s_Header, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "kivyblocks/dg.pyx":168 + * + * class Header(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * SUPER(Header, self, kw) + * self.part = part + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_6Header_1__init__, 0, __pyx_n_s_Header___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":176 + * self.bar_width = 0 + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':self.part.fields[i].get('label', \ + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_6Header_3init, 0, __pyx_n_s_Header_init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":167 + * self.part.datagrid.dispatch('on_selected',self) + * + * class Header(WidgetReady, ScrollPanel): # <<<<<<<<<<<<<< + * def __init__(self,part,**kw): + * SUPER(Header, self, kw) + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Header, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Header, __pyx_t_5) < 0) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":185 + * self.height = self.header.height + * + * class Body(WidgetReady, ScrollPanel): # <<<<<<<<<<<<<< + * def __init__(self,part,**kw): + * self.part = part + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ScrollPanel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_n_s_Body, __pyx_n_s_Body, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "kivyblocks/dg.pyx":186 + * + * class Body(WidgetReady, ScrollPanel): + * def __init__(self,part,**kw): # <<<<<<<<<<<<<< + * self.part = part + * SUPER(Body, self, kw) + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_1__init__, 0, __pyx_n_s_Body___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":196 + * self.bar_width = 0 + * + * def addRow(self,id, data,index=0): # <<<<<<<<<<<<<< + * rd = [ f.copy() for f in self.part.rowdesc ] + * [ f.update({'value':data.get(f['name'])}) for f in rd ] + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_3addRow, 0, __pyx_n_s_Body_addRow, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__45); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_addRow, __pyx_t_5) < 0) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":205 + * return row + * + * def clearRows(self): # <<<<<<<<<<<<<< + * self.idRow = {} + * self.clear_widgets() + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_5clearRows, 0, __pyx_n_s_Body_clearRows, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_clearRows, __pyx_t_5) < 0) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":209 + * self.clear_widgets() + * + * def delRowById(self,id): # <<<<<<<<<<<<<< + * row = self.idRow.get(id) + * if row: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_7delRowById, 0, __pyx_n_s_Body_delRowById, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delRowById, __pyx_t_5) < 0) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":216 + * del self.idRow[id] + * + * def getRowData(self,rowid): # <<<<<<<<<<<<<< + * return self.idRow[rowid].row_data + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_9getRowData, 0, __pyx_n_s_Body_getRowData, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getRowData_2, __pyx_t_5) < 0) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":219 + * return self.idRow[rowid].row_data + * + * def getRowHeight(self): # <<<<<<<<<<<<<< + * return self.part.datagrid.rowHeight() + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_4Body_11getRowHeight, 0, __pyx_n_s_Body_getRowHeight, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getRowHeight, __pyx_t_5) < 0) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":185 + * self.height = self.header.height + * + * class Body(WidgetReady, ScrollPanel): # <<<<<<<<<<<<<< + * def __init__(self,part,**kw): + * self.part = part + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Body, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Body, __pyx_t_5) < 0) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":222 + * return self.part.datagrid.rowHeight() + * + * class DataGridPart(WidgetReady, BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,dg, freeze_flag, fields): + * self.datagrid = dg + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_DataGridPart, __pyx_n_s_DataGridPart, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "kivyblocks/dg.pyx":223 + * + * class DataGridPart(WidgetReady, BoxLayout): + * def __init__(self,dg, freeze_flag, fields): # <<<<<<<<<<<<<< + * self.datagrid = dg + * self.fields = fields + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_1__init__, 0, __pyx_n_s_DataGridPart___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":232 + * self.init(0) + * + * def setWidth(self): # <<<<<<<<<<<<<< + * if self.freeze_flag: + * self.size_hint_x = None + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_3setWidth, 0, __pyx_n_s_DataGridPart_setWidth, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_setWidth, __pyx_t_5) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":237 + * self.width = self.getFieldsWidth() + * + * def getFieldsWidth(self): # <<<<<<<<<<<<<< + * if not self.fields_width: + * width = 0 + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_5getFieldsWidth, 0, __pyx_n_s_DataGridPart_getFieldsWidth, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getFieldsWidth, __pyx_t_5) < 0) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":245 + * return self.fields_width + * + * def init(self,t): # <<<<<<<<<<<<<< + * rd = [] + * for f in self.fields: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_7init, 0, __pyx_n_s_DataGridPart_init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":276 + * size=self.datagrid.bodyOnSize) + * + * def clearRows(self): # <<<<<<<<<<<<<< + * return self.body.clearRows() + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_9clearRows, 0, __pyx_n_s_DataGridPart_clearRows, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_clearRows, __pyx_t_5) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":279 + * return self.body.clearRows() + * + * def addRow(self,id, data): # <<<<<<<<<<<<<< + * return self.body.addRow(id, data) + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_11addRow, 0, __pyx_n_s_DataGridPart_addRow, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_addRow, __pyx_t_5) < 0) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":282 + * return self.body.addRow(id, data) + * + * def on_size(self, o, s=None): # <<<<<<<<<<<<<< + * if not hasattr(self, 'body'): + * return + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_12DataGridPart_13on_size, 0, __pyx_n_s_DataGridPart_on_size, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__68); + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_on_size, __pyx_t_5) < 0) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":222 + * return self.part.datagrid.rowHeight() + * + * class DataGridPart(WidgetReady, BoxLayout): # <<<<<<<<<<<<<< + * def __init__(self,dg, freeze_flag, fields): + * self.datagrid = dg + */ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DataGridPart, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataGridPart, __pyx_t_5) < 0) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "kivyblocks/dg.pyx":292 + * + * + * class DataGrid(WidgetReady, BoxLayout): # <<<<<<<<<<<<<< + * """ + * DataGrid data format: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WidgetReady); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BoxLayout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_n_s_DataGrid, __pyx_n_s_DataGrid, (PyObject *) NULL, __pyx_n_s_kivyblocks_dg, __pyx_kp_s_DataGrid_data_format_widgettype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "kivyblocks/dg.pyx":342 + * } + * """ + * row_selected = BooleanProperty(False) # <<<<<<<<<<<<<< + * def __init__(self,**options): + * options['orientation'] = 'vertical' + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_BooleanProperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_False); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_row_selected_2, __pyx_t_5) < 0) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":343 + * """ + * row_selected = BooleanProperty(False) + * def __init__(self,**options): # <<<<<<<<<<<<<< + * options['orientation'] = 'vertical' + * BoxLayout.__init__(self, orientation='vertical') + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_1__init__, 0, __pyx_n_s_DataGrid___init, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":394 + * self.build_tailer(self.options.get('tailer')) + * + * def build_tailer(self, tailer_desc): # <<<<<<<<<<<<<< + * kw = tailer_desc.get('options', {}) + * kw.update({ + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_3build_tailer, 0, __pyx_n_s_DataGrid_build_tailer, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_build_tailer, __pyx_t_5) < 0) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":408 + * w.add_widget(w1) + * + * def update_tailer_info(self, *args): # <<<<<<<<<<<<<< + * if not hasattr(self, 'tailer_widgets'): + * return + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_5update_tailer_info, 0, __pyx_n_s_DataGrid_update_tailer_info, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update_tailer_info, __pyx_t_5) < 0) __PYX_ERR(0, 408, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":414 + * w.text = self.loader_info(n) + * + * def show_infos(self, tailer_widget, info_names): # <<<<<<<<<<<<<< + * for n in info_names: + * desc = { + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_7show_infos, 0, __pyx_n_s_DataGrid_show_infos, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_show_infos, __pyx_t_5) < 0) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":429 + * tailer_widget.add_widget(self.tailer_widgets[n]) + * + * def build_tailer_others(desc): # <<<<<<<<<<<<<< + * return Factory.Blocks().widgetBuild(desc) + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_9build_tailer_others, 0, __pyx_n_s_DataGrid_build_tailer_others, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_build_tailer_others, __pyx_t_5) < 0) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":432 + * return Factory.Blocks().widgetBuild(desc) + * + * def loader_info(self, n): # <<<<<<<<<<<<<< + * if hasattr(self.dataloader, n): + * txt=getattr(self.dataloader, n, 0) + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_11loader_info, 0, __pyx_n_s_DataGrid_loader_info, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loader_info, __pyx_t_5) < 0) __PYX_ERR(0, 432, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":440 + * return txt + * + * def locater(self,pos): # <<<<<<<<<<<<<< + * self.normal_part.body.scroll_y = pos + * if self.freeze_part: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_13locater, 0, __pyx_n_s_DataGrid_locater, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_locater, __pyx_t_5) < 0) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":445 + * self.freeze_part.body.scroll_y = pos + * + * def on_scrollstop(self,o,v=None): # <<<<<<<<<<<<<< + * if not self.noheader and o == self.normal_part.header: + * self.normal_part.body.scroll_x = o.scroll_x + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_15on_scrollstop, 0, __pyx_n_s_DataGrid_on_scrollstop, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__85); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_on_scrollstop, __pyx_t_5) < 0) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":462 + * self.dataloader.loadPreviousPage() + * + * def getValue(self): # <<<<<<<<<<<<<< + * if not self.select_rowid: + * return None + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_17getValue, 0, __pyx_n_s_DataGrid_getValue, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getValue, __pyx_t_5) < 0) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":467 + * return self._getRowData(self.select_rowid) + * + * def _getRowData(self, rowid): # <<<<<<<<<<<<<< + * d = {} + * if self.freeze_part: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_19_getRowData, 0, __pyx_n_s_DataGrid__getRowData, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getRowData, __pyx_t_5) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":475 + * return DictObject(**d) + * + * def bodyOnSize(self,o,s): # <<<<<<<<<<<<<< + * if self.on_sizeTask is not None: + * self.on_sizeTask.cancel() + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_21bodyOnSize, 0, __pyx_n_s_DataGrid_bodyOnSize, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_bodyOnSize, __pyx_t_5) < 0) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":480 + * self.on_sizeTask = Clock.schedule_once(self.calculateShowRows,0.3) + * + * def rowHeight(self): # <<<<<<<<<<<<<< + * if not self.rowheight: + * self.rowheight = CSize(self.row_height) + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_23rowHeight, 0, __pyx_n_s_DataGrid_rowHeight, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_rowHeight, __pyx_t_5) < 0) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":485 + * return self.rowheight + * + * def calculateShowRows(self,t): # <<<<<<<<<<<<<< + * self.getShowRows() + * self.dataloader.setPageRows(self.show_rows * 2) + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_25calculateShowRows, 0, __pyx_n_s_DataGrid_calculateShowRows, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_calculateShowRows, __pyx_t_5) < 0) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":489 + * self.dataloader.setPageRows(self.show_rows * 2) + * + * def getShowRows(self): # <<<<<<<<<<<<<< + * if self.show_rows == 0: + * return 60 + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_27getShowRows, 0, __pyx_n_s_DataGrid_getShowRows, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getShowRows, __pyx_t_5) < 0) __PYX_ERR(0, 489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":495 + * return self.show_rows * 2 + * + * def clearRows(self, *args): # <<<<<<<<<<<<<< + * print('dg.py:clearRows() called') + * if self.freeze_part: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_29clearRows, 0, __pyx_n_s_DataGrid_clearRows, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_clearRows, __pyx_t_5) < 0) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":501 + * self.normal_part.body.clearRows() + * + * def add_page(self,o,data): # <<<<<<<<<<<<<< + * dir = data['dir'] + * if not self.show_rows: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_31add_page, 0, __pyx_n_s_DataGrid_add_page, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_add_page, __pyx_t_5) < 0) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":533 + * 'inner=', self.normal_part.body._inner.size) + * + * def add_page_delay(self, data, *args): # <<<<<<<<<<<<<< + * recs = data['data'] + * page = data['page'] + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_33add_page_delay, 0, __pyx_n_s_DataGrid_add_page_delay, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_add_page_delay, __pyx_t_5) < 0) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":552 + * self.locater(x) + * + * def delete_page(self,o,data): # <<<<<<<<<<<<<< + * print('dg.py:delete_page() called') + * for id in data: + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_35delete_page, 0, __pyx_n_s_DataGrid_delete_page, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delete_page, __pyx_t_5) < 0) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":557 + * self.delRow(id) + * + * def addRow(self,data, **kw): # <<<<<<<<<<<<<< + * id = getID() + * f_row = None + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_37addRow, 0, __pyx_n_s_DataGrid_addRow, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_addRow, __pyx_t_5) < 0) __PYX_ERR(0, 557, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":565 + * return id + * + * def delRow(self,id,**kw): # <<<<<<<<<<<<<< + * if self.freeze_part: + * self.freeze_part.body.delRowById(id) + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_39delRow, 0, __pyx_n_s_DataGrid_delRow, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delRow, __pyx_t_5) < 0) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":570 + * self.normal_part.body.delRowById(id) + * + * def createToolbar(self): # <<<<<<<<<<<<<< + * if 'toolbar' in self.options.keys(): + * tb = self.options['toolbar'] + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_41createToolbar, 0, __pyx_n_s_DataGrid_createToolbar, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_createToolbar, __pyx_t_5) < 0) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":575 + * self.toolbar = Toolbar(**tb) + * + * def on_selected(self,row): # <<<<<<<<<<<<<< + * print("DataGrid():on_selected fire") + * + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_43on_selected, 0, __pyx_n_s_DataGrid_on_selected, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_on_selected, __pyx_t_5) < 0) __PYX_ERR(0, 575, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":578 + * print("DataGrid():on_selected fire") + * + * def loadData(self,*args, **kwargs): # <<<<<<<<<<<<<< + * print('args=', args, 'kwargs=',kwargs) + * kwargs['page'] = 1 + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_45loadData, 0, __pyx_n_s_DataGrid_loadData, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadData, __pyx_t_5) < 0) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":583 + * self.dataloader.do_search(None,kwargs) + * + * def createDataGridPart(self): # <<<<<<<<<<<<<< + * self.freeze_part = None + * self.normal_part = None + */ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_47createDataGridPart, 0, __pyx_n_s_DataGrid_createDataGridPart, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_createDataGridPart, __pyx_t_5) < 0) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "kivyblocks/dg.pyx":591 + * self.normal_part = DataGridPart(self, False, self.normal_fields) + * + * def getPartFields(self,freeze_flag:bool=False) -> list: # <<<<<<<<<<<<<< + * fs = [] + * for f in self.options['fields']: + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_freeze_flag, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 591, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_u_list) < 0) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10kivyblocks_2dg_8DataGrid_49getPartFields, 0, __pyx_n_s_DataGrid_getPartFields, NULL, __pyx_n_s_kivyblocks_dg, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__120); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getPartFields, __pyx_t_3) < 0) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "kivyblocks/dg.pyx":292 + * + * + * class DataGrid(WidgetReady, BoxLayout): # <<<<<<<<<<<<<< + * """ + * DataGrid data format: + */ + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DataGrid, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataGrid, __pyx_t_3) < 0) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "kivyblocks/dg.pyx":1 + * import time # <<<<<<<<<<<<<< + * import ujson as json + * from functools import partial + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init kivyblocks.dg", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init kivyblocks.dg"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* UnpackUnboundCMethod */ +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + if (likely(cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return (*(cfunc->func))(self, arg); + } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { + if (PY_VERSION_HEX >= 0x030700A0) { + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); + } else { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } + return __Pyx__CallUnboundCMethod1(cfunc, self, arg); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(2, self, arg); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { + (void)inplace; + (void)zerodivision_check; + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a + b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + if (likely(cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + #if PY_VERSION_HEX >= 0x030700A0 + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); + #else + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + #if PY_VERSION_HEX >= 0x030700A0 + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(3); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 1, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 2, arg2); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(3, self, arg1, arg2); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = Py_TYPE(iter)->tp_iternext; + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* MergeKeywords */ +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { + PyObject *iter, *key = NULL, *value = NULL; + int source_is_dict, result; + Py_ssize_t orig_length, ppos = 0; + iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict); + if (unlikely(!iter)) { + PyObject *args; + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + args = PyTuple_Pack(1, source_mapping); + if (likely(args)) { + PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); + Py_DECREF(args); + if (likely(fallback)) { + iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict); + Py_DECREF(fallback); + } + } + if (unlikely(!iter)) goto bad; + } + while (1) { + result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); + if (unlikely(result < 0)) goto bad; + if (!result) break; + if (unlikely(PyDict_Contains(kwdict, key))) { + __Pyx_RaiseDoubleKeywordsError("function", key); + result = -1; + } else { + result = PyDict_SetItem(kwdict, key, value); + } + Py_DECREF(key); + Py_DECREF(value); + if (unlikely(result < 0)) goto bad; + } + Py_XDECREF(iter); + return 0; +bad: + Py_XDECREF(iter); + return -1; +} + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetAttr3 */ +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r = __Pyx_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +} + +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; + PyObject *tmp = PyTuple_GET_ITEM(bases, i); + tmptype = Py_TYPE(tmp); +#if PY_MAJOR_VERSION < 3 + if (tmptype == &PyClass_Type) + continue; +#endif + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { +#if PY_MAJOR_VERSION < 3 + metaclass = &PyClass_Type; +#else + metaclass = &PyType_Type; +#endif + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* FetchCommonType */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CythonFunctionShared */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromString(m->func.m_ml->ml_name); +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ +#if PY_MAJOR_VERSION < 3 + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; +#endif + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); + if (prep) { + PyObject *pargs = PyTuple_Pack(2, name, bases); + if (unlikely(!pargs)) { + Py_DECREF(prep); + return NULL; + } + ns = PyObject_Call(prep, pargs, mkw); + Py_DECREF(prep); + Py_DECREF(pargs); + } else { + if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + PyErr_Clear(); + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result, *margs; + PyObject *owned_metaclass = NULL; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + margs = PyTuple_Pack(3, name, bases, dict); + if (unlikely(!margs)) { + result = NULL; + } else { + result = PyObject_Call(metaclass, margs, mkw); + Py_DECREF(margs); + } + Py_XDECREF(owned_metaclass); + return result; +} + +/* CyFunctionClassCell */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions); + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + Py_INCREF(classobj); + m->func_classobj = classobj; +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* Print */ +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +/* PrintOne */ +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/kivyblocks/imgs/checkbox-off.png b/kivyblocks/imgs/checkbox-off.png new file mode 100644 index 0000000000000000000000000000000000000000..0b8bbacb73ff4fdc36f6609f872721c5b2efc41e GIT binary patch literal 7231 zcmeI1Yfw{37RNi+1R|&eP*`6i=m<-xfa?Q90(WO{8BiVrK6s1}%N0g5E3A$q5lC*V z6?I2(ECCUOFk>OQO2o3lLnVoe3cFgw88jdWL;)p>7?4N;BxJigmgSfIy0x{He7Sv- z?sNM5`<%}0-#rl<9X{J(fdc?wcEp!qaR3moNdTrDyy&x@Ou`H8KwS9eK-#)U3&6sO zh_K&p$x0dS_WaRfU~%*4>xTHd_jgP5X_xKnU2+&Z?IIalo-n$CinrCykjn0DolBpa z#{Ajiv%tr@UzOzcy*wUSI~MJFhD>Z}tW)(&hpauGvQKAuX0WL0{C#9bCmKO#vN$a7 z*gmgy{??mVI^{&eP3Bw{5c_qvpe`f{jI-c{0%DRzV;O%vwV4927oAd}3zKE*{2$fO z{GFlHYPC=M`uchc;)FZ+jbBGL1V^<^Uq5#z8ZST%rR+``DvSGP*`AVdk@?r+=pXR(N~=) zbB3vH%?`;WZRf-)V=G=fjXxn%m&()&`A*`k_R7F~U16M*{i@LDi+|>QC097N%6u|0#|QgKC{=E+mc4Et|6*8FzSRznZ(DG~wApGpf}X^`I%WR; zVCdt(eD=Ax6oCs*k%yDw+7``Ob>~(76? zDs^Y7oAA}r)5%|eoRmnxPu@q;U2$<7Wyrs&Zmb_!-98W8?tVM8r=(naLi5ZjbA&i) zD4@wd_;&wlwrHC{F{7qycwbc8lfz50)>(y)t565cY05nKk94Uoax5*_f8`U~Z)?@% zNyhU-li^_cekeCpfxVJ`;vUP9inkUf3G|bL0$*fH4~uvDse&6SDvv^OmBCU4gZf{_ z5|9pqJ{&+NRVs^VFxClJsul-ji>!Mf&@$|n$11E3~5_V5YUUs zB)~KN&V>btinegou9H$0({Etxyy6}w^GV@)(seW1>8sC0QXP=sU=6%k5E7Dp| z5WGcI7ux?6hmaO$BoslKH^fKI!ZO~#SO%T`d5(x1Vr)VwPd6gUf^kYRgd-m?&PRU) z2|5U55>pw@$Sw?V5Uo+V!C@aDizUJ0bJgCFVRPO)DS-_O_d zDBPni4;XWO2Cjd~G>@q}dm+=jMQHST{l7*>M@64tNli~HgK*4X434g1tIu zUN`f_2e|1ec1q%Btk7SxOcg^E$+Mj8mgi1YP8oE)Z%)0KKuVCBJBK%&Ye7oXe~{nBd)#Z)1+hB#^xqGv`qG@ z>LC`k_(Q6^J+eVqZj=Y$k%OOQUX+ceRi%q`H?BHR_Rb@_eFhq2U}8P;Pbq11`QB=- zh|(RX$+&R~WU**%cfItd@Q-9V;qMC#7#j}!LFrvB+pc;y zyLG5tx(;}RDK}IW)V1=nde0%^$GmV+dAnLxry8A-Xp^r8f$_7$mhY4>EVJ|7)s5+j zV${pcrNi=-B5CNm$b5@JwG+0NdmECMJ(TZSv_fxSsqw2 zE8q(NCy@rKq+b)ISXpWMoBD7=!G1x>C3C8uxxcR85oI%_JnQ(pTGr!J`TYE)J(hOS z(@GhdUHUnAv!7y_e^8Zl`GEpp+IOv zmn#c&WmkDE!FM-d#TK==TZ0^)$)tuG<6WI`$ceBTHud8wrIh1zx^led$_eY5U86wp zvUj+aNM1HHk*#|YhVzNHjRcQeCUCKG{-46qC^o+3-3#uE5&`&$*ccrq{hW8?-_dhP A>Hq)$ literal 0 HcmV?d00001 diff --git a/kivyblocks/imgs/checkbox-on.png b/kivyblocks/imgs/checkbox-on.png new file mode 100644 index 0000000000000000000000000000000000000000..6df7ddafcdfd67a9aa32cdf27cbf6fb391cbf02b GIT binary patch literal 16589 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

%5p@>&< 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 z zn>z314h(; z6mmaU^PJC0c4S0aO14Og3lc-+4Yboy?_FKK{(&{>UnUI_SaB$YRj1bGWzm>qQ8}YQ zm&Q>^O)HP3W@qPx$Vw5~Nv|y#Ke;ZvyZ0A7^w-$$MsXpm@mSq9Hs&tRzm*{_E_YU} zCu}?qeD_!yb2J%hVMoMVHMTSCFCLSWwyxZ+E0>hjr+`a(Q6d!%85}6qZ5;|i&=*mA z8A#~E#R&dj>T-v11$)~=rJzn;c?3OqGO}9<|((o1XljGaCgMb zgwFZI9nzNgjO4~M(VY+vD{_t z-IDlvC)IfTnQ!1%C(gU4J*?oQt9P)QDFso!C~K-6!k&iEEGi_ebLOPao7!y8Pn&dG zO03mjrUd% zSZI$sn}3~z{GYc+hM9oMoOZuJK|k>{1U3OKUj3xDb~Mkm>gBRT$K8!%CLnPNdE+yT zIJANV|7Dg*Bs3e;$G$h$omzq(=@ywtc;%N*=$S1iXiyq$=%2BxD$R|7STXt z)3T1!9;kJ~IvC=s%B|_w#il<}y>+ZMxxi8HB{y2(+K1+9pc35157MAqt3_BVpciCf!^}}~pYSig7Z=}MZ@%Jw>qL8L zXmR!~f=k~$`s11DxyzLwXZ8~3o%_oD3qz{zNnYK;C+WS}3c*xCB~rDP`O(gR$Bh$s z0yP=Y*L_ zV2f=Di1(V66IzI6(K2!u2RNJD@LB5Z91V|G7r!RfT*JpgZho}&?0s0gqPgy8Q4+o$ zA75`L&Kh&YRx*SvG-02_1*--|_s5cnfVOSp2q3GUTv%^juDiSa+)1!4(Fbh%rh^@X zQ$6S@K4TVDl#ngXwmd|{w)oe_yWk&tG`7fW3n3FD(<24} zoDGE*A0SaFuMCUW&5nviR!2;nGf6XB*#J@a>zfUym_R$Nbx8$s{L9*|@B9&?K*Bht^o0t$HpW4u=`e{u2{)d)(r8qp6KAP;{>^ zn;(nf1hmaiRlaeQ%&v-8RlpZH$(Q=dd_y6CLV9Y;kFd=bxS6R_@6C#PB3wi%ayM4Kc@cyTwi1mCyCRfNH(1Qpya-EvT|9y^d2wMjut!w^VeImPC_uxbud!RKm@IH^L9%7 zq!&-Q3!7_rmRhV1Vso&hxrI9)9SA0-mn)CFT(93+9OQP%Ep5~IkfG(ez`qO=S$|fA zpDH+h$q|1TD1m{j=o1r|Gi7QbQGfk@+QF69kCvs8Mw8wA)FB_)lwCkn9-Ke*Vhc`_ zbm%=0{wa~jN>P=y?E0TRf&H_y*~w*uP;(f_n{3+63tm>>%qMmCZU;r&CQZ7U%rt!taOI&NSv@-Rew@qw=B>e>X%&;TSYd}jW`N# zoKZ1t+>ZuP3Y>17w4J}B!K&#?Tl=odX=_$~x412xZRZ}=CGvwciWTX1DGb((IDRV5 zRpzKxx-I;&q3_tUvvdPe&QSMSEiWmMopaZ#T41Hw-XjJ|=mkLDyK&|-3}Wd@*h_v| zmjB6Zab9Jw6rnDT@R-K~F6Y9IZejzc>~V?kBSw3?O2~iTpB5iBMmVemX6dGxK5@W3 z5v(rId|2~$&{9+~P?)HRSn&{}Pg6jIbP4Hv8SlE-8qzFge^plp35bORuz;d0XjXPz zXLe;XjzwHz$ymI15`>qC#%Vl1#Qi)Df*YsFCAl6!-JU7Mt;JWC3bqhL&p`1lrVv{z zM#8&|?+>XGCKd}z(bX|8*-27g1c1hmug0vju=tRlePvlGGY*@9)y;f#7eE~dif`Jk zeQ29eB90A9>AFn3bYF6q|D}xi!4rOtGTf-pE0AlRnOqmx?!ePG?GQpV$cD^lMz)VK zq7bV41%9{Mo3cRy5OUnB&!`XZ9ria7?){y;Ete_F+$fOb1L1eh=X01ory>k=w&|m< z{(YIz7m90vF08eCAkZ9s*}uQoFCf0Qt}KW^tgH8iw31kbOJWOf2E1P0h8-mUT!9eh zHQYl3c!49x-gH+&uQRZ-;5KC2LC=9h7(rAQb|FGML&!~+4u)>sK{dv|Zc8FRE+=FH zOwzL~jranp9n1c@q>%7ZLdBlfW}>VBhpei0%NA zUwo9Ivmyj{eBX4gi@CHcngkC+1wz2l&`%R}g}Q^vG~u)ILLp?kxnmL4mtm>xy zHj35Fj1uksn_fx@N{Nu58BzwNl=T{re8V`u)`GbOM;Q{oxhj^t#@4{C!A zG=jme2i9W$50+$^x=Pzdo7#V~Qmy?as!}(nZL;qYvA9Drg?)MTI7#GEK+C4coSi4D zmeo}?@R}Q4#C}-+yD2s-x)o0einD4u~_8C^fXWz0-S%6tyFa|2z3% zt0AibVVh1K@v8G*ICq5X!7h&Pkki{oLPB3<@6U7u-dNxTGWh&vJAX_&2&tAQRTn_? z*=wLl+PhamGhGpu=3W$WKOG679Xl?9HNLN{#V^4gF3sD%4q})*^uw=hIAOwEJnHbh z3$0H$Pll6Xy@zLZcFf}98&sj zuWAy&2QO2s%}Ey)S5>MZIf`xR!~1_PRt)Se0mM`kg-PPGK^S zYtrxBb+T;9ug`{GPK2nZZ93=~Yxcj+BF-JUJ}rWY_S}!VLlFU_f;x9wk2D79s;5)w zlM`)1`TYpx+Jc0*h7~sst=?~D!B2mmpGeMA;%fBd?eiodn z*xP85?uDwhb}LOZk7g|%mHPwz%_9`+&YDqtkQlI@LfIc@GD&|z)CJRjOw`%pF+up{ zqivk0p3v3Ib$au`uk)``b+PDxAmJ%6oW@FnGe=PM%L=S5FeuO;nkEam2a9|C_ul3J z1a<_sM^F0`f^f~z?*beQV9#VTF}<%Y>ZJ<8u6c`5^c7?ATf3-1l>0aO<*_(8D*BPF zgPiMdW$+3~UL;48lmXjs^YeN85z<7z>)@vD!hV%h?z91WO%lsN7Y!0rKqQS=(XVNM zmqYqMY7{0liS#5_-~CWN7yYzlnDrhIQktvp&XUo$Vm>qKH%x;lkNBFF@Nqx|MSrHW zi*0Cq!UE&j+j>v2b*?|%g9UwK{6ne+rqkzAj}KsmBaMt<^+J``P8KB*2us1wR52NF zR2fb8q!ZwB)+@Sr(Yp9kY@(+j;60VU5-&EL5jY#3k?r0arkeTV_D&Jz`3BmY9UIEe z*EE4Q0t)}U1b56bqB;g1E6j$lVFW74KkdHu`I109p|3ZNjZGAyw?V?e*|@#w^V14K z0)Iro1o=3EK}V~-5LON*&?USU(BfOJg4ai?6bSVJopSp+(36f$9y-|DbKh^acxE)6 zsq^7>agQ57t5TjOHyeoyl6<$kP?v*!a@-kpwIYPIso2{&ay7W7>Kh9v_CpRHm_0iL zR)`LQbmcX&em)idVC`ftM-YWTi!}`_qYL!b*!xxlKr4 ziQ=ji0YeTy{wggoo3mbKZeCWj(po~{^#HW!ck=yhO7R}!LTWv%=E z=o^!hf;rCdC0<)xjWmRwVCD-l~v!ivKL_962LFhCPJ58PK|Uw}eJI2{t^S zWNWG=Gz6_}b< z%HwRc)!Jj{S37%|GxJiz@@MiTLTD$Bc2d1HNiNDR+C&IdM1`FSE8Kn4iw82DR5d9% z{-?72!7%DB-F%dVCfYGtj@P8f3T`4sn*vcw3S$oczm#tM%mH@Pa6)xV0*U~GBE{KM zp$#?Jr7gRXYjrjGVnm_BRmC-CCtksHDYMPG|FO+(Lqs+y_zrsm<#ENsg1T7pSH2K} z!E333XCOWtzOlvVwLiUGwoup8F`69Kb~hz~5N+|v)a^EeUH1H>KP3o=h@gCE(j!_p z$qTm1OFU@Ya7SaNmWJZ^2Uk^y!0B-$jHlBi-irY>-EVTwE^dtN2+>F?h1j zzH~f#x=Rzp_*2i>Vexl$FG*ej9U)QyI)JC=2VEoAuemzUZJwa!|2T;ceG>ap7=zjH z=R(Ujv(W1KEM{gvUI>&u_b(&x)xCpO($q5O!3s3>tr?FlpV@As-qYWp&S%VUmJJmn zIeZ+2VE47~;C+TmYHOfiyb1g|Rul91t}G*nBs};MIN+|e5?{Um71l{LvWruJYaCsg zAM5xQgq&M{)R70TUzisTb5vZ*xR{ZwLqLDL4%6HOS|-*?m>BxMMB?mQKdEn4JRJ*z zkf!d8g-m$$OoN_cE`;dV?zf|!Y(=|Y>|sOiIx2+E6G_N4rJf+fPaVHWfNDUM?R_dA^P-|$nn8ZK;K2@M8KEELxSM>1MKqM1dIDHO|p(u9I2aoGH z!Yc)gi)6d)fRhqG)$WLFR5&77trO*I12N=%Pe0na7|1+W-aYRFeJo3ggw_f)%a*w9 z%1vNx`Bz^(_Ix>+7}8eiWBJ~~^jqBdr}@_E-Fy+}2kfLapAsSA4SvcnNoW9GQIGwn z>A|Y)q_^UlO?zUf6%hZq{u{+-dvJFgq|N>w%|-VO=o?zm3R% zoCm7(0;tk6m)@HE1r_Pnl(e{N0fM8Xx`$P-+*BQPDD>$KTedlVkUlHdd6;$DM^mR3 zARne+EL+phaQ%ygGd=IqJ5dENeam=(0W+kq4&FavP+Nwe09?&j_DcK+?=}9gk+#P7jw24R~6i&M&7Xmb|-6s>_amzMI$~jwbochEcvi^#h&<;zh{k){kaElh4%dj1cC+!hb4+5e%t1@DtNv6Q0hsl<+#U^-W%}&b8bOm<%6fMg-}vZ_aU#_ zYafU6^63qkk?ANm^}5R4nxyfacf4<4lzJZ(rM2QRQ;)UD%_V@e4$nv*UHW#fp$w$a>l?dg(;?i$>novEzW5$X8tf#=C?@>L+zA zBVfOUho3_4e#nK}KI<5e6katB2hcZcNlX)WH^k%IW!>H#%d=k`Rm|1sAlJ#R1P86$ z&HDlJS#|Nnw*xy5om^;YI+?Zxtqq~!Pu*|p!kLFJT*Gd{im~>D!Ehl&v;#;`ShCIw z{QbQoyp?_sRM+@y;m#i!K%A^AyZRd}8zeFsp&G&=fn!yv-VN* z7!e~Q&B{yv(L|SBh9$6HF#P-WvyoXs2-Z`m0#DBJQv z`Sd)trmFouRbX{`a7rgmgMbI|kZ?lMFgpk#TpXeIi;{EUqLIL8&ZC!KU~vyUcW3(m zJziL~T>SKac8^XL!jVs%mAl0iynlvB8l91?6*9;NXZW>wx2hVBm^TcK+*ZOzjdTol znz8gA)0oUvq*`E5f^5a&7Nk6&-VD5M?F=ckKxUFfO= zOHhmq!2l{WgYH9~wHyd~v3=#{IMvh{Dgwz(q9VSG@SMkz!{V=_7+lmvWr*&#c>oeT zb!&lcOC!YtCopTea^BIN*Q$d&&lBLMa{ZE(Ljxdip{@oP{W6H-FZBcUlUJO83cT={ zaMh{o;M;0xz{dAoC^`-t>xEZhr3p&cgUzyGlei|8mD@`rhkep_95Z0HfTqOGxX2z#ieVzZRmt%KxqAM8y$m7chBgl zmc0^Oxl*T?cgh!(=$kXlKb=ZAD7DA_n##j zQcr!X`o1Apl9#6&L#ttC++|iv;9Zt?J0oiPEv2Mtgrn2p{kKnf@@!EO?zu?Fj}5(c zadXWG*WsEkcw!&4OWd$QFF}O!H6w7On|3A`Vd)kkNNMWZAmyFIJvE6(Y$l(9Q=gQu zT6!0JP{?u$Qrtt zu!Fa1dT~+aY@~Dp0O7;(Q(I3U_3gSWwEJ#d!3g>U%sHB2ti*;R>UEBD$#~B_0K)Wa zu%zOnc_m$4JZFb%j6~2O0O!Z~)`NUFt2&qeml_;#m426v3q}#U$?9i@R&U(~nlmn3 zpN&Kmg$WHN@Q=2mq&j&h4}*TmUi`$P?}Kas7o;r5U-23U~^ykm3`_LXcRceq(R&bV;}B*p2Lk+o5B_JvR(db zTgV&D+pN`1wT<|TY((thZzFe4cBCl3P^fT2fbMtA?&>fXI8;z_pr#&ABmko!CY%^H z-vW0MU1Dp}oBv$7{5%erli@ zvmr*`hapN6PVyXsyQRIkTrbW&nQlm{QEyT&f4Kvf2Jty9S-DOKxj!1qB`rQtcNb_I zO{Jo+|BP}G-x;`$Ru7CUx@@3I9;JlBeF%=;HCn5>ySuQNFh8~SuZ#?O1UCNLCEpnw zT}+7Zdj^SGnQUmf58VTQIQl-vE%WgvD5GzwM7@A5zX;p%W#X@)#W&oBMhv+^XRrvW zo~@GI4g|Qj-bdH-ON#Yg;jD(1pwp81vI2U)J9JCoLMrUoRNun92rqJwe!sB@62M>T z5nDSvwx5K@mngA3*~5b*@C@fj6?QE0H)fU;_5wi8*S>GOjiC5rm{Bm|^q}ip?~>%z z=|;4Hfdbb6e61U~!sM}#sz>&x#87GG=ghcP>J9H3SM3_r+)ep#)jGLLzDjH13ig{Z z!aWU=DZbD9w8QTMIIG}D%i$-wk9$GvPa13l&*5cw9fUZIM^+SmmE%o}@3Mm#hTyhQ z-92-3YR(YgZ`LPgxC_1=*iY~Q#dNXNap9vrS#`z#owM@Tw^(L`BQm~rIOTmu6jr+L zWmnfZfl8_R4pAn!#a|KyN~?P|*Y$$XamH;=?I&7T%>`~z^Um%wzl*aH^1tjpDVWX;(BACOz?-+Hu#``#2sK0KCkCuHfswH6Q2f3`^-TCp5#%R)YfRalpyr zHQa+|Nrzon!vi3-e2X-5t0b}JEC(!J4e&% G=KlfE0^ETB literal 0 HcmV?d00001 diff --git a/kivyblocks/toolbar.py b/kivyblocks/toolbar.py index 5379638..bb87824 100644 --- a/kivyblocks/toolbar.py +++ b/kivyblocks/toolbar.py @@ -135,10 +135,8 @@ class Toolbar(ScrollPanel): print(w, 'children=', len(w.children)) if t.get('deletable', False): x = ClickableImage(source=blockImage('delete.png'), - img_kw={ - "size_hint":(None, None), - "size":CSize(1,1) - } + size_hint=(None,None), + size=CSize(1,1) ) x.data = (w, t) x.bind(on_press=self.delete_tool)