/* Generated by Cython 0.24 */

#define 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 < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_24"
#include <stddef.h>
#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
#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_CPYTHON 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
  #define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#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"
  #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 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
#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_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_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #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_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_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(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#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
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? 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
#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
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#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) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#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
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#ifndef CYTHON_INLINE
  #if 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 defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#if PY_MAJOR_VERSION >= 3
  #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

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__bsd__dialog
#define __PYX_HAVE_API__bsd__dialog
#include "string.h"
#include "stdlib.h"
#include "stdint.h"
#include "sys/types.h"
#include "stdio.h"
#include "limits.h"
#include "unistd.h"
#include "fnmatch.h"
#include "sys/uio.h"
#include "sys/param.h"
#include "sys/socket.h"
#include "netinet/in.h"
#include "sys/mount.h"
#include "sys/time.h"
#include "time.h"
#include "sys/resource.h"
#include "sys/user.h"
#include "libutil.h"
#include "libprocstat.h"
#include "sys/sysctl.h"
#include "sys/linker.h"
#include "sys/extattr.h"
#include "sys/acl.h"
#include "sys/bus.h"
#include "sys/syslog.h"
#include "devinfo.h"
#include "kvm.h"
#include "net/if.h"
#include "net/bpf.h"
#include "dlg_keys.h"
#include "dialog.h"
#include "sys/event.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#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_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#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_DEFAULT 0
#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)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #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) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _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 char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE 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_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((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)
#if PY_MAJOR_VERSION < 3
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);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#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)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#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));
    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 PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
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[] = {
  "bsd/dialog.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_3bsd_6dialog_FormItem;

/* "bsd/dialog.pyx":314
 *       return retval
 * 
 * cdef class FormItem(object):             # <<<<<<<<<<<<<<
 *       """
 *       Item for a form (this includes password forms).
 */
struct __pyx_obj_3bsd_6dialog_FormItem {
  PyObject_HEAD
  struct __pyx_vtabstruct_3bsd_6dialog_FormItem *__pyx_vtab;
  PyObject *_label;
  PyObject *_value;
  PyObject *_help;
  PyObject *_hidden;
  PyObject *_readonly;
};



struct __pyx_vtabstruct_3bsd_6dialog_FormItem {
  PyObject *(*Pack1)(struct __pyx_obj_3bsd_6dialog_FormItem *, DIALOG_FORMITEM *);
};
static struct __pyx_vtabstruct_3bsd_6dialog_FormItem *__pyx_vtabptr_3bsd_6dialog_FormItem;

/* --- 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_COMPILING_IN_CPYTHON
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);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *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

/* PyObjectLookupSpecial.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
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

/* 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);

/* 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

/* PyThreadStateGet.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* SaveResetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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_COMPILING_IN_CPYTHON
#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_COMPILING_IN_CPYTHON
#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);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(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

/* 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);

/* 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);

/* PyObjectSetAttrStr.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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) {
    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);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* IncludeStringH.proto */
#include <string.h>

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* 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);

/* 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 CYTHON_INLINE 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);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyIntBinop.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* ListAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
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

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* 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);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#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;
    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_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);

/* 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);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);

/* 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 unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static PyObject *__pyx_f_3bsd_6dialog_8FormItem_Pack1(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, DIALOG_FORMITEM *__pyx_v_dst); /* proto*/

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'cython' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'posix.types' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from 'defs' */

/* Module declarations from 'bsd.dialog' */
static PyTypeObject *__pyx_ptype_3bsd_6dialog_FormItem = 0;
static void *__pyx_v_3bsd_6dialog_stupid_gauge;
static PyObject *__pyx_f_3bsd_6dialog__clear_dialog_state(void); /*proto*/
static PyObject *__pyx_f_3bsd_6dialog_UnpackFormItem(DIALOG_FORMITEM *); /*proto*/
static PyObject *__pyx_f_3bsd_6dialog_PackFormItem(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "bsd.dialog"
int __pyx_module_is_main_bsd__dialog = 0;

/* Implementation of 'bsd.dialog' */
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_range;
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_f[] = "f";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_l[] = "l";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_p[] = "p";
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_No[] = "No";
static const char __pyx_k_OK[] = "OK";
static const char __pyx_k__2[] = "\n";
static const char __pyx_k__5[] = "";
static const char __pyx_k_ci[] = "ci";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_rv[] = "rv";
static const char __pyx_k_Yes[] = "Yes";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_msg[] = "msg";
static const char __pyx_k_pct[] = "_pct";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_run[] = "run";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_txt[] = "txt";
static const char __pyx_k_Form[] = "Form";
static const char __pyx_k_Menu[] = "Menu";
static const char __pyx_k_Pack[] = "Pack";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_help[] = "help";
static const char __pyx_k_incr[] = "incr";
static const char __pyx_k_indx[] = "indx";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_pctg[] = "pctg";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_text[] = "text";
static const char __pyx_k_thlp[] = "thlp";
static const char __pyx_k_tnam[] = "tnam";
static const char __pyx_k_tstr[] = "tstr";
static const char __pyx_k_ttxt[] = "ttxt";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_Gauge[] = "Gauge";
static const char __pyx_k_LogIt[] = "LogIt";
static const char __pyx_k_YesNo[] = "YesNo";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_coord[] = "_coord";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_items[] = "_items";
static const char __pyx_k_label[] = "label";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_radio[] = "_radio";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_title[] = "title";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_Cancel[] = "Cancel";
static const char __pyx_k_Dialog[] = "Dialog";
static const char __pyx_k_HIDDEN[] = "HIDDEN";
static const char __pyx_k_base_y[] = "base_y";
static const char __pyx_k_choice[] = "choice";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_help_2[] = "_help";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_prompt[] = "prompt";
static const char __pyx_k_result[] = "_result";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_text_2[] = "_text";
static const char __pyx_k_wait_2[] = "_wait";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_label_2[] = "_label";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_state_2[] = "_state";
static const char __pyx_k_title_2[] = "_title";
static const char __pyx_k_width_2[] = "_width";
static const char __pyx_k_Form_run[] = "Form.run";
static const char __pyx_k_ListItem[] = "ListItem";
static const char __pyx_k_Menu_run[] = "Menu.run";
static const char __pyx_k_READONLY[] = "READONLY";
static const char __pyx_k_height_2[] = "_height";
static const char __pyx_k_hidden_2[] = "_hidden";
static const char __pyx_k_no_label[] = "no_label";
static const char __pyx_k_ok_label[] = "ok_label";
static const char __pyx_k_position[] = "position";
static const char __pyx_k_prompt_2[] = "_prompt";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_readonly[] = "readonly";
static const char __pyx_k_result_2[] = "result";
static const char __pyx_k_CheckList[] = "CheckList";
static const char __pyx_k_Exception[] = "Exception";
static const char __pyx_k_FormInput[] = "FormInput";
static const char __pyx_k_FormLabel[] = "FormLabel";
static const char __pyx_k_Gauge_run[] = "Gauge.run";
static const char __pyx_k_RadioList[] = "RadioList";
static const char __pyx_k_YesNo_run[] = "YesNo.run";
static const char __pyx_k_default_2[] = "_default";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_max_input[] = "_max_input";
static const char __pyx_k_max_label[] = "max_label";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_yes_label[] = "yes_label";
static const char __pyx_k_DialogType[] = "DialogType";
static const char __pyx_k_Dialog_run[] = "Dialog.run";
static const char __pyx_k_MessageBox[] = "MessageBox";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_bsd_dialog[] = "bsd.dialog";
static const char __pyx_k_form_items[] = "form_items";
static const char __pyx_k_list_items[] = "list_items";
static const char __pyx_k_menu_items[] = "menu_items";
static const char __pyx_k_percentage[] = "percentage";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_self_label[] = "self.label = {}";
static const char __pyx_k_temp_value[] = "temp_value";
static const char __pyx_k_DialogError[] = "DialogError";
static const char __pyx_k_Form___init[] = "Form.__init__";
static const char __pyx_k_Form_result[] = "Form.result";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_Menu___init[] = "Menu.__init__";
static const char __pyx_k_Menu_result[] = "Menu.result";
static const char __pyx_k_fiLoopValue[] = "fiLoopValue";
static const char __pyx_k_form_height[] = "form_height";
static const char __pyx_k_list_height[] = "list_height";
static const char __pyx_k_menu_height[] = "menu_height";
static const char __pyx_k_packed_item[] = "packed_item";
static const char __pyx_k_DialogEscape[] = "DialogEscape";
static const char __pyx_k_Dialog_clear[] = "Dialog.clear";
static const char __pyx_k_Dialog_title[] = "Dialog.title";
static const char __pyx_k_Dialog_width[] = "Dialog.width";
static const char __pyx_k_Gauge___init[] = "Gauge.__init__";
static const char __pyx_k_Gauge_result[] = "Gauge.result";
static const char __pyx_k_PackFormItem[] = "PackFormItem({})";
static const char __pyx_k_YesNo___init[] = "YesNo.__init__";
static const char __pyx_k_cancel_label[] = "cancel_label";
static const char __pyx_k_current_item[] = "current_item";
static const char __pyx_k_tmp_help_str[] = "tmp_help_str";
static const char __pyx_k_tmp_name_str[] = "tmp_name_str";
static const char __pyx_k_tmp_text_str[] = "tmp_text_str";
static const char __pyx_k_CheckList_run[] = "CheckList.run";
static const char __pyx_k_Dialog___init[] = "Dialog.__init__";
static const char __pyx_k_Dialog_height[] = "Dialog.height";
static const char __pyx_k_Dialog_prompt[] = "Dialog.prompt";
static const char __pyx_k_Dialog_result[] = "Dialog.result";
static const char __pyx_k_ListItem_help[] = "ListItem.help";
static const char __pyx_k_ListItem_text[] = "ListItem.text";
static const char __pyx_k_YesNo_default[] = "YesNo.default";
static const char __pyx_k_form_height_2[] = "_form_height";
static const char __pyx_k_list_height_2[] = "_list_height";
static const char __pyx_k_maximum_input[] = "maximum_input";
static const char __pyx_k_menu_height_2[] = "_menu_height";
static const char __pyx_k_DialogEscape_2[] = "DialogEscape<>";
static const char __pyx_k_ListItem_label[] = "ListItem.label";
static const char __pyx_k_ListItem_state[] = "ListItem.state";
static const char __pyx_k_MessageBox_run[] = "MessageBox.run";
static const char __pyx_k_current_choice[] = "current_choice";
static const char __pyx_k_tmp_dialog_log[] = "/tmp/dialog.log";
static const char __pyx_k_Dialog_no_label[] = "Dialog.no_label";
static const char __pyx_k_Dialog_ok_label[] = "Dialog.ok_label";
static const char __pyx_k_FormInput___str[] = "FormInput.__str__";
static const char __pyx_k_FormInput_value[] = "FormInput.value";
static const char __pyx_k_FormLabel___str[] = "FormLabel.__str__";
static const char __pyx_k_FormLabel_label[] = "FormLabel.label";
static const char __pyx_k_FormLabel_width[] = "FormLabel.width";
static const char __pyx_k_Form_form_items[] = "Form.form_items";
static const char __pyx_k_ListItem___init[] = "ListItem.__init__";
static const char __pyx_k_Menu_menu_items[] = "Menu.menu_items";
static const char __pyx_k_MessageBox_wait[] = "MessageBox.wait";
static const char __pyx_k_CheckList___init[] = "CheckList.__init__";
static const char __pyx_k_CheckList_result[] = "CheckList.result";
static const char __pyx_k_Dialog_yes_label[] = "Dialog.yes_label";
static const char __pyx_k_FormInput___init[] = "FormInput.__init__";
static const char __pyx_k_FormInput___repr[] = "FormInput.__repr__";
static const char __pyx_k_FormInput_hidden[] = "FormInput.hidden";
static const char __pyx_k_FormLabel___init[] = "FormLabel.__init__";
static const char __pyx_k_FormLabel___repr[] = "FormLabel.__repr__";
static const char __pyx_k_Form_form_height[] = "Form.form_height";
static const char __pyx_k_Gauge_percentage[] = "Gauge.percentage";
static const char __pyx_k_Menu_menu_height[] = "Menu.menu_height";
static const char __pyx_k_MessageBox_label[] = "MessageBox.label";
static const char __pyx_k_RadioList___init[] = "RadioList.__init__";
static const char __pyx_k_DialogError___str[] = "DialogError.__str__";
static const char __pyx_k_MessageBox___init[] = "MessageBox.__init__";
static const char __pyx_k_tmp_stupid_string[] = "tmp_stupid_string";
static const char __pyx_k_DialogError___init[] = "DialogError.__init__";
static const char __pyx_k_DialogEscape___str[] = "DialogEscape.__str__";
static const char __pyx_k_FormLabel_position[] = "FormLabel.position";
static const char __pyx_k_yes_label_no_label[] = "yes_label = {}, no_label = {}";
static const char __pyx_k_DialogEscape___init[] = "DialogEscape.__init__";
static const char __pyx_k_Dialog_cancel_label[] = "Dialog.cancel_label";
static const char __pyx_k_CheckList_list_items[] = "CheckList.list_items";
static const char __pyx_k_Escape_out_of_dialog[] = "Escape out of dialog";
static const char __pyx_k_Unknown_return_value[] = "Unknown return value";
static const char __pyx_k_formbox_UP_FORM_PREV[] = "formbox UP FORM_PREV";
static const char __pyx_k_CheckList_list_height[] = "CheckList.list_height";
static const char __pyx_k_formbox_TAB_FORM_NEXT[] = "formbox TAB FORM_NEXT";
static const char __pyx_k_formbox_DOWN_FORM_NEXT[] = "formbox DOWN FORM_NEXT";
static const char __pyx_k_formfield_UP_FORM_PREV[] = "formfield UP FORM_PREV";
static const char __pyx_k_FormInput_maximum_input[] = "FormInput.maximum_input";
static const char __pyx_k_formfield_TAB_FORM_NEXT[] = "formfield TAB FORM_NEXT";
static const char __pyx_k_DialogError_code_message[] = "DialogError<code={}, message={}>";
static const char __pyx_k_FormLabel_width_position[] = "FormLabel({}, width={}, position={})";
static const char __pyx_k_formfield_DOWN_FORM_NEXT[] = "formfield DOWN FORM_NEXT";
static const char __pyx_k_Unknown_dialog_return_value[] = "Unknown dialog return value {}";
static const char __pyx_k_save_vars_buffer_state_buffer[] = "save:  vars_buffer = {}, state_buffer = {}";
static const char __pyx_k_Dialog_window_with_two_options[] = "\n      Dialog window with two options (default \"Yes\" and \"No\").\n      By default, the Yes button is selected.\n      ";
static const char __pyx_k_FormInput_value_width_position[] = "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>";
static const char __pyx_k_FormItem_value_hidden_readonly[] = "FormItem({}, value={}, hidden={}, readonly={})";
static const char __pyx_k_FormLabel_label_width_position[] = "<FormLabel(label={}, width={}, position={})>";
static const char __pyx_k_Form_items_must_contain_values[] = "Form items must contain values";
static const char __pyx_k_A_checklist_needs_item_to_check[] = "A checklist needs item to check";
static const char __pyx_k_A_wrapper_object_for_checklists[] = "\n      A wrapper object for checklists / radio boxes.\n      Each item has a label, descriptive text, optional help,\n      and a state.\n      ";
static const char __pyx_k_A_wrapper_object_for_form_input[] = "\n      A wrapper object for form input fields, which are a superset\n      of label fields.  (They have maximum input widths in addition\n      do display width.  Also, instead of \"label\" the text field is\n      called \"value.\")\n      ";
static const char __pyx_k_A_wrapper_object_for_form_label[] = "\n      A wrapper object for form labels (and base class for input).\n      This provides the name and x/y coordinates.\n      ";
static const char __pyx_k_FormItem_label_value_help_hidde[] = "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>";
static const char __pyx_k_Menu_must_have_items_to_display[] = "Menu must have items to display";
static const char __pyx_k_Python_interface_to_libdialog_N[] = "\n      Python interface to libdialog.\n      Note that libdialog is AWFUL:  it relies on multiple\n      global-state variables.  We try to work around that\n      as best we can.  Also, we only allow one window at\n      a time.\n      ";
static const char __pyx_k_usr_nas_source_py_bsd_bsd_dialo[] = "/usr/nas_source/py-bsd/bsd/dialog.pyx";
static const char __pyx_k_Could_not_allocate_items_for_men[] = "Could not allocate {} items for menu";
static const char __pyx_k_FormInput_width_position_maximum[] = "FormInput({}, width={}, position={}, maximum_input={}, readonly={})";
static const char __pyx_k_restore_vars_buffer_state_buffer[] = "restore:  vars_buffer = {}, state_buffer = {}";
static PyObject *__pyx_kp_s_A_checklist_needs_item_to_check;
static PyObject *__pyx_kp_s_A_wrapper_object_for_checklists;
static PyObject *__pyx_kp_s_A_wrapper_object_for_form_input;
static PyObject *__pyx_kp_s_A_wrapper_object_for_form_label;
static PyObject *__pyx_n_s_Cancel;
static PyObject *__pyx_n_s_CheckList;
static PyObject *__pyx_n_s_CheckList___init;
static PyObject *__pyx_n_s_CheckList_list_height;
static PyObject *__pyx_n_s_CheckList_list_items;
static PyObject *__pyx_n_s_CheckList_result;
static PyObject *__pyx_n_s_CheckList_run;
static PyObject *__pyx_kp_s_Could_not_allocate_items_for_men;
static PyObject *__pyx_n_s_Dialog;
static PyObject *__pyx_n_s_DialogError;
static PyObject *__pyx_n_s_DialogError___init;
static PyObject *__pyx_n_s_DialogError___str;
static PyObject *__pyx_kp_s_DialogError_code_message;
static PyObject *__pyx_n_s_DialogEscape;
static PyObject *__pyx_kp_s_DialogEscape_2;
static PyObject *__pyx_n_s_DialogEscape___init;
static PyObject *__pyx_n_s_DialogEscape___str;
static PyObject *__pyx_n_s_DialogType;
static PyObject *__pyx_n_s_Dialog___init;
static PyObject *__pyx_n_s_Dialog_cancel_label;
static PyObject *__pyx_n_s_Dialog_clear;
static PyObject *__pyx_n_s_Dialog_height;
static PyObject *__pyx_n_s_Dialog_no_label;
static PyObject *__pyx_n_s_Dialog_ok_label;
static PyObject *__pyx_n_s_Dialog_prompt;
static PyObject *__pyx_n_s_Dialog_result;
static PyObject *__pyx_n_s_Dialog_run;
static PyObject *__pyx_n_s_Dialog_title;
static PyObject *__pyx_n_s_Dialog_width;
static PyObject *__pyx_kp_s_Dialog_window_with_two_options;
static PyObject *__pyx_n_s_Dialog_yes_label;
static PyObject *__pyx_kp_s_Escape_out_of_dialog;
static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_n_s_Form;
static PyObject *__pyx_n_s_FormInput;
static PyObject *__pyx_n_s_FormInput___init;
static PyObject *__pyx_n_s_FormInput___repr;
static PyObject *__pyx_n_s_FormInput___str;
static PyObject *__pyx_n_s_FormInput_hidden;
static PyObject *__pyx_n_s_FormInput_maximum_input;
static PyObject *__pyx_n_s_FormInput_value;
static PyObject *__pyx_kp_s_FormInput_value_width_position;
static PyObject *__pyx_kp_s_FormInput_width_position_maximum;
static PyObject *__pyx_kp_s_FormItem_label_value_help_hidde;
static PyObject *__pyx_kp_s_FormItem_value_hidden_readonly;
static PyObject *__pyx_n_s_FormLabel;
static PyObject *__pyx_n_s_FormLabel___init;
static PyObject *__pyx_n_s_FormLabel___repr;
static PyObject *__pyx_n_s_FormLabel___str;
static PyObject *__pyx_n_s_FormLabel_label;
static PyObject *__pyx_kp_s_FormLabel_label_width_position;
static PyObject *__pyx_n_s_FormLabel_position;
static PyObject *__pyx_n_s_FormLabel_width;
static PyObject *__pyx_kp_s_FormLabel_width_position;
static PyObject *__pyx_n_s_Form___init;
static PyObject *__pyx_n_s_Form_form_height;
static PyObject *__pyx_n_s_Form_form_items;
static PyObject *__pyx_kp_s_Form_items_must_contain_values;
static PyObject *__pyx_n_s_Form_result;
static PyObject *__pyx_n_s_Form_run;
static PyObject *__pyx_n_s_Gauge;
static PyObject *__pyx_n_s_Gauge___init;
static PyObject *__pyx_n_s_Gauge_percentage;
static PyObject *__pyx_n_s_Gauge_result;
static PyObject *__pyx_n_s_Gauge_run;
static PyObject *__pyx_n_s_HIDDEN;
static PyObject *__pyx_n_s_IntEnum;
static PyObject *__pyx_n_s_ListItem;
static PyObject *__pyx_n_s_ListItem___init;
static PyObject *__pyx_n_s_ListItem_help;
static PyObject *__pyx_n_s_ListItem_label;
static PyObject *__pyx_n_s_ListItem_state;
static PyObject *__pyx_n_s_ListItem_text;
static PyObject *__pyx_n_s_LogIt;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_Menu;
static PyObject *__pyx_n_s_Menu___init;
static PyObject *__pyx_n_s_Menu_menu_height;
static PyObject *__pyx_n_s_Menu_menu_items;
static PyObject *__pyx_kp_s_Menu_must_have_items_to_display;
static PyObject *__pyx_n_s_Menu_result;
static PyObject *__pyx_n_s_Menu_run;
static PyObject *__pyx_n_s_MessageBox;
static PyObject *__pyx_n_s_MessageBox___init;
static PyObject *__pyx_n_s_MessageBox_label;
static PyObject *__pyx_n_s_MessageBox_run;
static PyObject *__pyx_n_s_MessageBox_wait;
static PyObject *__pyx_n_s_No;
static PyObject *__pyx_n_s_OK;
static PyObject *__pyx_n_s_Pack;
static PyObject *__pyx_kp_s_PackFormItem;
static PyObject *__pyx_kp_s_Python_interface_to_libdialog_N;
static PyObject *__pyx_n_s_READONLY;
static PyObject *__pyx_n_s_RadioList;
static PyObject *__pyx_n_s_RadioList___init;
static PyObject *__pyx_kp_s_Unknown_dialog_return_value;
static PyObject *__pyx_kp_s_Unknown_return_value;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Yes;
static PyObject *__pyx_n_s_YesNo;
static PyObject *__pyx_n_s_YesNo___init;
static PyObject *__pyx_n_s_YesNo_default;
static PyObject *__pyx_n_s_YesNo_run;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_s__5;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_base_y;
static PyObject *__pyx_n_s_bsd_dialog;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_s_cancel_label;
static PyObject *__pyx_n_s_choice;
static PyObject *__pyx_n_s_ci;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_coord;
static PyObject *__pyx_n_s_current_choice;
static PyObject *__pyx_n_s_current_item;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_default_2;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_fiLoopValue;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_form_height;
static PyObject *__pyx_n_s_form_height_2;
static PyObject *__pyx_n_s_form_items;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_kp_s_formbox_DOWN_FORM_NEXT;
static PyObject *__pyx_kp_s_formbox_TAB_FORM_NEXT;
static PyObject *__pyx_kp_s_formbox_UP_FORM_PREV;
static PyObject *__pyx_kp_s_formfield_DOWN_FORM_NEXT;
static PyObject *__pyx_kp_s_formfield_TAB_FORM_NEXT;
static PyObject *__pyx_kp_s_formfield_UP_FORM_PREV;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_n_s_height;
static PyObject *__pyx_n_s_height_2;
static PyObject *__pyx_n_s_help;
static PyObject *__pyx_n_s_help_2;
static PyObject *__pyx_n_s_hidden;
static PyObject *__pyx_n_s_hidden_2;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_incr;
static PyObject *__pyx_n_s_indx;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_label;
static PyObject *__pyx_n_s_label_2;
static PyObject *__pyx_n_s_list_height;
static PyObject *__pyx_n_s_list_height_2;
static PyObject *__pyx_n_s_list_items;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max_input;
static PyObject *__pyx_n_s_max_label;
static PyObject *__pyx_n_s_maximum_input;
static PyObject *__pyx_n_s_menu_height;
static PyObject *__pyx_n_s_menu_height_2;
static PyObject *__pyx_n_s_menu_items;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_no_label;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_ok_label;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_n_s_packed_item;
static PyObject *__pyx_n_s_pct;
static PyObject *__pyx_n_s_pctg;
static PyObject *__pyx_n_s_percentage;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_position;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_prompt;
static PyObject *__pyx_n_s_prompt_2;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_radio;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_readonly;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_kp_s_restore_vars_buffer_state_buffer;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_result_2;
static PyObject *__pyx_n_s_run;
static PyObject *__pyx_n_s_rv;
static PyObject *__pyx_kp_s_save_vars_buffer_state_buffer;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_kp_s_self_label;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_state_2;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_temp_value;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_text;
static PyObject *__pyx_n_s_text_2;
static PyObject *__pyx_n_s_thlp;
static PyObject *__pyx_n_s_title;
static PyObject *__pyx_n_s_title_2;
static PyObject *__pyx_kp_s_tmp_dialog_log;
static PyObject *__pyx_n_s_tmp_help_str;
static PyObject *__pyx_n_s_tmp_name_str;
static PyObject *__pyx_n_s_tmp_stupid_string;
static PyObject *__pyx_n_s_tmp_text_str;
static PyObject *__pyx_n_s_tnam;
static PyObject *__pyx_n_s_tstr;
static PyObject *__pyx_n_s_ttxt;
static PyObject *__pyx_n_s_txt;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_wait;
static PyObject *__pyx_n_s_wait_2;
static PyObject *__pyx_n_s_width;
static PyObject *__pyx_n_s_width_2;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_yes_label;
static PyObject *__pyx_kp_s_yes_label_no_label;
static PyObject *__pyx_pf_3bsd_6dialog_LogIt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_11DialogError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_11DialogError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_12DialogEscape___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_12DialogEscape_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_width, PyObject *__pyx_v_position); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_6label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_8label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_10width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_12width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_14position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_16position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_text, PyObject *__pyx_v_help, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_2label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_4label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_6text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_8text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_10help(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_12help(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_14state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_16state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_width, PyObject *__pyx_v_position, PyObject *__pyx_v_maximum_input, PyObject *__pyx_v_readonly, PyObject *__pyx_v_hidden); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_6value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_8value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_10maximum_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_12maximum_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_14hidden(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_16hidden(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem___init__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_value, PyObject *__pyx_v_help, PyObject *__pyx_v_hidden, PyObject *__pyx_v_readonly); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_2__str__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_4__repr__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_5label___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem_5label_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_5value___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem_5value_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_4help___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem_4help_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_6hidden___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem_6hidden_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_8readonly___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_6dialog_8FormItem_8readonly_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_6Pack(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_2run(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_4result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_6title(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_8title(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_10prompt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_12prompt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_14height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_16height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_18width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_20width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_22ok_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_24ok_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_26no_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_28no_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_30yes_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_32yes_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_34cancel_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_36cancel_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_38clear(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5YesNo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_4default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_6default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_2label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_4label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_6wait(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_8wait(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_2menu_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_4menu_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_6menu_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_8menu_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Menu_12result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_2list_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_4list_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_6list_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_8list_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_12result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5Gauge___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_2percentage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_4percentage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pctg); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_6run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_8result(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_9RadioList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_2form_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_4form_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_6form_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_8form_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_6dialog_4Form_12result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_tp_new_3bsd_6dialog_FormItem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_10;
static PyObject *__pyx_tuple_;
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__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
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__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
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__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__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
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__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
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__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__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;

/* "bsd/dialog.pyx":13
 * cdef void *stupid_gauge
 * 
 * def LogIt(msg):             # <<<<<<<<<<<<<<
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_1LogIt(PyObject *__pyx_self, PyObject *__pyx_v_msg); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_1LogIt = {"LogIt", (PyCFunction)__pyx_pw_3bsd_6dialog_1LogIt, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_1LogIt(PyObject *__pyx_self, PyObject *__pyx_v_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LogIt (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_LogIt(__pyx_self, ((PyObject *)__pyx_v_msg));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_LogIt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg) {
  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;
  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;
  __Pyx_RefNannySetupContext("LogIt", 0);

  /* "bsd/dialog.pyx":14
 * 
 * def LogIt(msg):
 *       with open("/tmp/dialog.log", "a") as f:             # <<<<<<<<<<<<<<
 *             f.write(msg)
 *             f.write("\n")
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L3_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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:*/ {
          __pyx_v_f = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "bsd/dialog.pyx":15
 * def LogIt(msg):
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)             # <<<<<<<<<<<<<<
 *             f.write("\n")
 * 
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && 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);
            }
          }
          if (!__pyx_t_3) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_msg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
          } else {
            __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_v_msg);
            __Pyx_GIVEREF(__pyx_v_msg);
            PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_msg);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __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;

          /* "bsd/dialog.pyx":16
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 *             f.write("\n")             # <<<<<<<<<<<<<<
 * 
 * class DialogType(enum.IntEnum):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "bsd/dialog.pyx":14
 * 
 * def LogIt(msg):
 *       with open("/tmp/dialog.log", "a") as f:             # <<<<<<<<<<<<<<
 *             f.write(msg)
 *             f.write("\n")
 */
        }
        __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_L14_try_end;
        __pyx_L7_error:;
        __Pyx_PyThreadState_assign
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("bsd.dialog.LogIt", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 14, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14, __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, 14, __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_4);
            __Pyx_XGIVEREF(__pyx_t_5);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_5);
            __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; 
            __PYX_ERR(0, 14, __pyx_L9_except_error)
          }
          __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_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_PyThreadState_assign
        __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_PyThreadState_assign
        __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_L14_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_2) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__4, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L18;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L1_error;
    __pyx_L18:;
  }

  /* "bsd/dialog.pyx":13
 * cdef void *stupid_gauge
 * 
 * def LogIt(msg):             # <<<<<<<<<<<<<<
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 */

  /* 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_AddTraceback("bsd.dialog.LogIt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":23
 * 
 * class DialogError(Exception):
 *       def __init__(self, code=0, message=None):             # <<<<<<<<<<<<<<
 *             self.code = code
 *             self.message = message
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_11DialogError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_11DialogError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_11DialogError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_11DialogError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_message,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 23, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_code = values[1];
    __pyx_v_message = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.DialogError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_11DialogError___init__(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_message);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_11DialogError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":24
 * class DialogError(Exception):
 *       def __init__(self, code=0, message=None):
 *             self.code = code             # <<<<<<<<<<<<<<
 *             self.message = message
 *       def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_code) < 0) __PYX_ERR(0, 24, __pyx_L1_error)

  /* "bsd/dialog.pyx":25
 *       def __init__(self, code=0, message=None):
 *             self.code = code
 *             self.message = message             # <<<<<<<<<<<<<<
 *       def __str__(self):
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 25, __pyx_L1_error)

  /* "bsd/dialog.pyx":23
 * 
 * class DialogError(Exception):
 *       def __init__(self, code=0, message=None):             # <<<<<<<<<<<<<<
 *             self.code = code
 *             self.message = message
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.DialogError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":26
 *             self.code = code
 *             self.message = message
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_11DialogError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_11DialogError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3bsd_6dialog_11DialogError_3__str__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_11DialogError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_11DialogError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_11DialogError_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;
  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 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/dialog.pyx":27
 *             self.message = message
 *       def __str__(self):
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)             # <<<<<<<<<<<<<<
 * 
 * class DialogEscape(DialogError):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_DialogError_code_message, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":26
 *             self.code = code
 *             self.message = message
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd.dialog.DialogError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":30
 * 
 * class DialogEscape(DialogError):
 *       def __init__(self):             # <<<<<<<<<<<<<<
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_12DialogEscape_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_12DialogEscape_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_12DialogEscape_1__init__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_12DialogEscape_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_12DialogEscape___init__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_12DialogEscape___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;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":31
 * class DialogEscape(DialogError):
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")             # <<<<<<<<<<<<<<
 *       def __str__(self):
 *             return "DialogEscape<>"
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogEscape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __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, 31, __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, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(DLG_EXIT_ESC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31, __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_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s_Escape_out_of_dialog);
  __Pyx_GIVEREF(__pyx_kp_s_Escape_out_of_dialog);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_kp_s_Escape_out_of_dialog);
  __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, 31, __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;

  /* "bsd/dialog.pyx":30
 * 
 * class DialogEscape(DialogError):
 *       def __init__(self):             # <<<<<<<<<<<<<<
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):
 */

  /* 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("bsd.dialog.DialogEscape.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":32
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogEscape<>"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_12DialogEscape_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_12DialogEscape_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3bsd_6dialog_12DialogEscape_3__str__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_12DialogEscape_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_12DialogEscape_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_12DialogEscape_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/dialog.pyx":33
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):
 *             return "DialogEscape<>"             # <<<<<<<<<<<<<<
 * 
 * class FormLabel(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_s_DialogEscape_2);
  __pyx_r = __pyx_kp_s_DialogEscape_2;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":32
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogEscape<>"
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":40
 *       This provides the name and x/y coordinates.
 *       """
 *       def __init__(self, label, width=None, position=None):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.width = width if width else len(label) + 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_position = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_label,&__pyx_n_s_width,&__pyx_n_s_position,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_label)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 40, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_width);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_position);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 40, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_label = values[1];
    __pyx_v_width = values[2];
    __pyx_v_position = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 40, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel___init__(__pyx_self, __pyx_v_self, __pyx_v_label, __pyx_v_width, __pyx_v_position);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_width, PyObject *__pyx_v_position) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":41
 *       """
 *       def __init__(self, label, width=None, position=None):
 *             self.label = label             # <<<<<<<<<<<<<<
 *             self.width = width if width else len(label) + 1
 *             self.position = position
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label, __pyx_v_label) < 0) __PYX_ERR(0, 41, __pyx_L1_error)

  /* "bsd/dialog.pyx":42
 *       def __init__(self, label, width=None, position=None):
 *             self.label = label
 *             self.width = width if width else len(label) + 1             # <<<<<<<<<<<<<<
 *             self.position = position
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_width); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 42, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_width);
    __pyx_t_1 = __pyx_v_width;
  } else {
    __pyx_t_3 = PyObject_Length(__pyx_v_label); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 42, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_3 + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":43
 *             self.label = label
 *             self.width = width if width else len(label) + 1
 *             self.position = position             # <<<<<<<<<<<<<<
 * 
 *       def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_position, __pyx_v_position) < 0) __PYX_ERR(0, 43, __pyx_L1_error)

  /* "bsd/dialog.pyx":40
 *       This provides the name and x/y coordinates.
 *       """
 *       def __init__(self, label, width=None, position=None):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.width = width if width else len(label) + 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_4);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":45
 *             self.position = position
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_3__str__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_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;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/dialog.pyx":46
 * 
 *       def __str__(self):
 *             return "<FormLabel(label={}, width={}, position={})>".format(             # <<<<<<<<<<<<<<
 *                   self.label, self.width, self.position)
 *       def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormLabel_label_width_position, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":47
 *       def __str__(self):
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)             # <<<<<<<<<<<<<<
 *       def __repr__(self):
 *             return "FormLabel({}, width={}, position={})".format(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 46, __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_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __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;

  /* "bsd/dialog.pyx":45
 *             self.position = position
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":48
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormLabel({}, width={}, position={})".format(
 *                   self.label, self.width, self.position)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_4__repr__(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;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/dialog.pyx":49
 *                   self.label, self.width, self.position)
 *       def __repr__(self):
 *             return "FormLabel({}, width={}, position={})".format(             # <<<<<<<<<<<<<<
 *                   self.label, self.width, self.position)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormLabel_width_position, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":50
 *       def __repr__(self):
 *             return "FormLabel({}, width={}, position={})".format(
 *                   self.label, self.width, self.position)             # <<<<<<<<<<<<<<
 * 
 *       """
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 49, __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_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __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;

  /* "bsd/dialog.pyx":48
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormLabel({}, width={}, position={})".format(
 *                   self.label, self.width, self.position)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":57
 *       """
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_7label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_7label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_7label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_7label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_6label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_6label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":58
 *       @property
 *       def label(self):
 *             return self._label             # <<<<<<<<<<<<<<
 *       @label.setter
 *       def label(self, l):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":57
 *       """
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":60
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       """
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_9label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_9label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_9label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_9label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, 1); __PYX_ERR(0, 60, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "label") < 0)) __PYX_ERR(0, 60, __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_l = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 60, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_8label(__pyx_self, __pyx_v_self, __pyx_v_l);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_8label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":61
 *       @label.setter
 *       def label(self, l):
 *             self._label = l             # <<<<<<<<<<<<<<
 *       """
 *       Label width is how wide on screen to use for the label.
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label_2, __pyx_v_l) < 0) __PYX_ERR(0, 61, __pyx_L1_error)

  /* "bsd/dialog.pyx":60
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       """
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":69
 *       """
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_11width(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_11width = {"width", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_11width, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_11width(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_10width(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_10width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("width", 0);

  /* "bsd/dialog.pyx":70
 *       @property
 *       def width(self):
 *             return self._width             # <<<<<<<<<<<<<<
 *       @width.setter
 *       def width(self, w):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":69
 *       """
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":72
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_13width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_13width = {"width", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_13width, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_13width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_w = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_w,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("width", 1, 2, 2, 1); __PYX_ERR(0, 72, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "width") < 0)) __PYX_ERR(0, 72, __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_w = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("width", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 72, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_12width(__pyx_self, __pyx_v_self, __pyx_v_w);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_12width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width", 0);

  /* "bsd/dialog.pyx":73
 *       @width.setter
 *       def width(self, w):
 *             self._width = w             # <<<<<<<<<<<<<<
 * 
 *       """
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width_2, __pyx_v_w) < 0) __PYX_ERR(0, 73, __pyx_L1_error)

  /* "bsd/dialog.pyx":72
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":82
 *       """
 *       @property
 *       def position(self):             # <<<<<<<<<<<<<<
 *             return self._coord
 *       @position.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_15position(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_15position = {"position", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_15position, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_15position(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("position (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_14position(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_14position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("position", 0);

  /* "bsd/dialog.pyx":83
 *       @property
 *       def position(self):
 *             return self._coord             # <<<<<<<<<<<<<<
 *       @position.setter
 *       def position(self, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coord); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":82
 *       """
 *       @property
 *       def position(self):             # <<<<<<<<<<<<<<
 *             return self._coord
 *       @position.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormLabel.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":85
 *             return self._coord
 *       @position.setter
 *       def position(self, c):             # <<<<<<<<<<<<<<
 *             self._coord = c
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_17position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormLabel_17position = {"position", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormLabel_17position, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormLabel_17position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_c = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("position (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_c,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("position", 1, 2, 2, 1); __PYX_ERR(0, 85, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "position") < 0)) __PYX_ERR(0, 85, __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_c = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("position", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 85, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormLabel_16position(__pyx_self, __pyx_v_self, __pyx_v_c);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormLabel_16position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("position", 0);

  /* "bsd/dialog.pyx":86
 *       @position.setter
 *       def position(self, c):
 *             self._coord = c             # <<<<<<<<<<<<<<
 * 
 * class ListItem(object):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coord, __pyx_v_c) < 0) __PYX_ERR(0, 86, __pyx_L1_error)

  /* "bsd/dialog.pyx":85
 *             return self._coord
 *       @position.setter
 *       def position(self, c):             # <<<<<<<<<<<<<<
 *             self._coord = c
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormLabel.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":94
 *       and a state.
 *       """
 *       def __init__(self, label, text, help=None, state=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.text = text
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_help = 0;
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_label,&__pyx_n_s_text,&__pyx_n_s_help,&__pyx_n_s_state,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((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  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_label)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 94, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 94, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_help);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      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 {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        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_label = values[1];
    __pyx_v_text = values[2];
    __pyx_v_help = values[3];
    __pyx_v_state = 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, 94, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem___init__(__pyx_self, __pyx_v_self, __pyx_v_label, __pyx_v_text, __pyx_v_help, __pyx_v_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_text, PyObject *__pyx_v_help, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":95
 *       """
 *       def __init__(self, label, text, help=None, state=False):
 *             self.label = label             # <<<<<<<<<<<<<<
 *             self.text = text
 *             self.help = help
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label, __pyx_v_label) < 0) __PYX_ERR(0, 95, __pyx_L1_error)

  /* "bsd/dialog.pyx":96
 *       def __init__(self, label, text, help=None, state=False):
 *             self.label = label
 *             self.text = text             # <<<<<<<<<<<<<<
 *             self.help = help
 *             self.state = state
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(0, 96, __pyx_L1_error)

  /* "bsd/dialog.pyx":97
 *             self.label = label
 *             self.text = text
 *             self.help = help             # <<<<<<<<<<<<<<
 *             self.state = state
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_help, __pyx_v_help) < 0) __PYX_ERR(0, 97, __pyx_L1_error)

  /* "bsd/dialog.pyx":98
 *             self.text = text
 *             self.help = help
 *             self.state = state             # <<<<<<<<<<<<<<
 *       @property
 *       def label(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_state, __pyx_v_state) < 0) __PYX_ERR(0, 98, __pyx_L1_error)

  /* "bsd/dialog.pyx":94
 *       and a state.
 *       """
 *       def __init__(self, label, text, help=None, state=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.text = text
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":100
 *             self.state = state
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_3label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_3label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_3label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_3label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_2label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_2label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":101
 *       @property
 *       def label(self):
 *             return self._label             # <<<<<<<<<<<<<<
 *       @label.setter
 *       def label(self, l):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":100
 *             self.state = state
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.ListItem.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":103
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_5label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_5label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_5label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_5label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, 1); __PYX_ERR(0, 103, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "label") < 0)) __PYX_ERR(0, 103, __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_l = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 103, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_4label(__pyx_self, __pyx_v_self, __pyx_v_l);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_4label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":104
 *       @label.setter
 *       def label(self, l):
 *             self._label = l             # <<<<<<<<<<<<<<
 *       @property
 *       def text(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label_2, __pyx_v_l) < 0) __PYX_ERR(0, 104, __pyx_L1_error)

  /* "bsd/dialog.pyx":103
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       @property
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":106
 *             self._label = l
 *       @property
 *       def text(self):             # <<<<<<<<<<<<<<
 *             return self._text
 *       @text.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_7text(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_7text = {"text", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_7text, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_7text(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_6text(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_6text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("text", 0);

  /* "bsd/dialog.pyx":107
 *       @property
 *       def text(self):
 *             return self._text             # <<<<<<<<<<<<<<
 *       @text.setter
 *       def text(self, t):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_text_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":106
 *             self._label = l
 *       @property
 *       def text(self):             # <<<<<<<<<<<<<<
 *             return self._text
 *       @text.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.ListItem.text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":109
 *             return self._text
 *       @text.setter
 *       def text(self, t):             # <<<<<<<<<<<<<<
 *             self._text = t
 *       @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_9text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_9text = {"text", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_9text, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_9text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_t = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text (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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("text", 1, 2, 2, 1); __PYX_ERR(0, 109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text") < 0)) __PYX_ERR(0, 109, __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("text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_8text(__pyx_self, __pyx_v_self, __pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_8text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text", 0);

  /* "bsd/dialog.pyx":110
 *       @text.setter
 *       def text(self, t):
 *             self._text = t             # <<<<<<<<<<<<<<
 *       @property
 *       def help(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_text_2, __pyx_v_t) < 0) __PYX_ERR(0, 110, __pyx_L1_error)

  /* "bsd/dialog.pyx":109
 *             return self._text
 *       @text.setter
 *       def text(self, t):             # <<<<<<<<<<<<<<
 *             self._text = t
 *       @property
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":112
 *             self._text = t
 *       @property
 *       def help(self):             # <<<<<<<<<<<<<<
 *             return self._help
 *       @help.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_11help(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_11help = {"help", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_11help, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_11help(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("help (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_10help(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_10help(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("help", 0);

  /* "bsd/dialog.pyx":113
 *       @property
 *       def help(self):
 *             return self._help             # <<<<<<<<<<<<<<
 *       @help.setter
 *       def help(self, h):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_help_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":112
 *             self._text = t
 *       @property
 *       def help(self):             # <<<<<<<<<<<<<<
 *             return self._help
 *       @help.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.ListItem.help", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":115
 *             return self._help
 *       @help.setter
 *       def help(self, h):             # <<<<<<<<<<<<<<
 *             self._help = h
 *       @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_13help(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_13help = {"help", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_13help, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_13help(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("help (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_h,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("help", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "help") < 0)) __PYX_ERR(0, 115, __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_h = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("help", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 115, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.help", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_12help(__pyx_self, __pyx_v_self, __pyx_v_h);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_12help(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("help", 0);

  /* "bsd/dialog.pyx":116
 *       @help.setter
 *       def help(self, h):
 *             self._help = h             # <<<<<<<<<<<<<<
 *       @property
 *       def state(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_help_2, __pyx_v_h) < 0) __PYX_ERR(0, 116, __pyx_L1_error)

  /* "bsd/dialog.pyx":115
 *             return self._help
 *       @help.setter
 *       def help(self, h):             # <<<<<<<<<<<<<<
 *             self._help = h
 *       @property
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.help", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":118
 *             self._help = h
 *       @property
 *       def state(self):             # <<<<<<<<<<<<<<
 *             return self._state
 *       @state.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_15state(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_15state = {"state", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_15state, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_15state(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("state (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_14state(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_14state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("state", 0);

  /* "bsd/dialog.pyx":119
 *       @property
 *       def state(self):
 *             return self._state             # <<<<<<<<<<<<<<
 *       @state.setter
 *       def state(self, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_state_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":118
 *             self._help = h
 *       @property
 *       def state(self):             # <<<<<<<<<<<<<<
 *             return self._state
 *       @state.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.ListItem.state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":121
 *             return self._state
 *       @state.setter
 *       def state(self, b):             # <<<<<<<<<<<<<<
 *             self._state = bool(b)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_17state(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_8ListItem_17state = {"state", (PyCFunction)__pyx_pw_3bsd_6dialog_8ListItem_17state, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_8ListItem_17state(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("state (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_b,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("state", 1, 2, 2, 1); __PYX_ERR(0, 121, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "state") < 0)) __PYX_ERR(0, 121, __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_b = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("state", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 121, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.ListItem.state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8ListItem_16state(__pyx_self, __pyx_v_self, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8ListItem_16state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("state", 0);

  /* "bsd/dialog.pyx":122
 *       @state.setter
 *       def state(self, b):
 *             self._state = bool(b)             # <<<<<<<<<<<<<<
 * 
 * class FormInput(FormLabel):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 122, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_state_2, __pyx_t_2) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":121
 *             return self._state
 *       @state.setter
 *       def state(self, b):             # <<<<<<<<<<<<<<
 *             self._state = bool(b)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.ListItem.state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":131
 *       called "value.")
 *       """
 *       def __init__(self, value="",             # <<<<<<<<<<<<<<
 *                    width=None,
 *                    position=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_position = 0;
  PyObject *__pyx_v_maximum_input = 0;
  PyObject *__pyx_v_readonly = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_width,&__pyx_n_s_position,&__pyx_n_s_maximum_input,&__pyx_n_s_readonly,&__pyx_n_s_hidden,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s__5));

    /* "bsd/dialog.pyx":132
 *       """
 *       def __init__(self, value="",
 *                    width=None,             # <<<<<<<<<<<<<<
 *                    position=None,
 *                    maximum_input=None,
 */
    values[2] = ((PyObject *)((PyObject *)Py_None));

    /* "bsd/dialog.pyx":133
 *       def __init__(self, value="",
 *                    width=None,
 *                    position=None,             # <<<<<<<<<<<<<<
 *                    maximum_input=None,
 *                    readonly=False,
 */
    values[3] = ((PyObject *)((PyObject *)Py_None));

    /* "bsd/dialog.pyx":134
 *                    width=None,
 *                    position=None,
 *                    maximum_input=None,             # <<<<<<<<<<<<<<
 *                    readonly=False,
 *                    hidden=False):
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));

    /* "bsd/dialog.pyx":135
 *                    position=None,
 *                    maximum_input=None,
 *                    readonly=False,             # <<<<<<<<<<<<<<
 *                    hidden=False):
 *             super(FormInput, self).__init__(value, width=width, position=position)
 */
    values[5] = ((PyObject *)((PyObject *)Py_False));

    /* "bsd/dialog.pyx":136
 *                    maximum_input=None,
 *                    readonly=False,
 *                    hidden=False):             # <<<<<<<<<<<<<<
 *             super(FormInput, self).__init__(value, width=width, position=position)
 *             self.maximum_input = maximum_input
 */
    values[6] = ((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  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_width);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_position);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maximum_input);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_readonly);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 131, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_width = values[2];
    __pyx_v_position = values[3];
    __pyx_v_maximum_input = values[4];
    __pyx_v_readonly = values[5];
    __pyx_v_hidden = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 131, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput___init__(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_width, __pyx_v_position, __pyx_v_maximum_input, __pyx_v_readonly, __pyx_v_hidden);

  /* "bsd/dialog.pyx":131
 *       called "value.")
 *       """
 *       def __init__(self, value="",             # <<<<<<<<<<<<<<
 *                    width=None,
 *                    position=None,
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_width, PyObject *__pyx_v_position, PyObject *__pyx_v_maximum_input, PyObject *__pyx_v_readonly, PyObject *__pyx_v_hidden) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":137
 *                    readonly=False,
 *                    hidden=False):
 *             super(FormInput, self).__init__(value, width=width, position=position)             # <<<<<<<<<<<<<<
 *             self.maximum_input = maximum_input
 *             self.readonly = readonly
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormInput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __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_init); 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_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_width, __pyx_v_width) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_position) < 0) __PYX_ERR(0, 137, __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, 137, __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;

  /* "bsd/dialog.pyx":138
 *                    hidden=False):
 *             super(FormInput, self).__init__(value, width=width, position=position)
 *             self.maximum_input = maximum_input             # <<<<<<<<<<<<<<
 *             self.readonly = readonly
 *             self.hidden = hidden
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_maximum_input, __pyx_v_maximum_input) < 0) __PYX_ERR(0, 138, __pyx_L1_error)

  /* "bsd/dialog.pyx":139
 *             super(FormInput, self).__init__(value, width=width, position=position)
 *             self.maximum_input = maximum_input
 *             self.readonly = readonly             # <<<<<<<<<<<<<<
 *             self.hidden = hidden
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readonly, __pyx_v_readonly) < 0) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "bsd/dialog.pyx":140
 *             self.maximum_input = maximum_input
 *             self.readonly = readonly
 *             self.hidden = hidden             # <<<<<<<<<<<<<<
 * 
 *       def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hidden, __pyx_v_hidden) < 0) __PYX_ERR(0, 140, __pyx_L1_error)

  /* "bsd/dialog.pyx":131
 *       called "value.")
 *       """
 *       def __init__(self, value="",             # <<<<<<<<<<<<<<
 *                    width=None,
 *                    position=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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("bsd.dialog.FormInput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":142
 *             self.hidden = hidden
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_3__str__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_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;
  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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/dialog.pyx":143
 * 
 *       def __str__(self):
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(             # <<<<<<<<<<<<<<
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormInput_value_width_position, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":144
 *       def __str__(self):
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)             # <<<<<<<<<<<<<<
 * 
 *       def __repr__(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readonly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 143, __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_3);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":142
 *             self.hidden = hidden
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("bsd.dialog.FormInput.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":146
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_4__repr__(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;
  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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/dialog.pyx":147
 * 
 *       def __repr__(self):
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(             # <<<<<<<<<<<<<<
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormInput_width_position_maximum, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":148
 *       def __repr__(self):
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readonly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __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_3);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":146
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("bsd.dialog.FormInput.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":157
 *       """
 *       @property
 *       def value(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @value.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_7value(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_7value = {"value", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_7value, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_7value(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_6value(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_6value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("value", 0);

  /* "bsd/dialog.pyx":158
 *       @property
 *       def value(self):
 *             return self._label             # <<<<<<<<<<<<<<
 *       @value.setter
 *       def value(self, v):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":157
 *       """
 *       @property
 *       def value(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @value.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormInput.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":160
 *             return self._label
 *       @value.setter
 *       def value(self, v):             # <<<<<<<<<<<<<<
 *             self._label = v
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_9value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_9value = {"value", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_9value, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_9value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_v,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("value", 1, 2, 2, 1); __PYX_ERR(0, 160, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "value") < 0)) __PYX_ERR(0, 160, __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_v = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 160, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_8value(__pyx_self, __pyx_v_self, __pyx_v_v);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_8value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value", 0);

  /* "bsd/dialog.pyx":161
 *       @value.setter
 *       def value(self, v):
 *             self._label = v             # <<<<<<<<<<<<<<
 * 
 *       """
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label_2, __pyx_v_v) < 0) __PYX_ERR(0, 161, __pyx_L1_error)

  /* "bsd/dialog.pyx":160
 *             return self._label
 *       @value.setter
 *       def value(self, v):             # <<<<<<<<<<<<<<
 *             self._label = v
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":169
 *       """
 *       @property
 *       def maximum_input(self):             # <<<<<<<<<<<<<<
 *             return self._max_input
 *       @maximum_input.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_11maximum_input(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_11maximum_input = {"maximum_input", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_11maximum_input, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_11maximum_input(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maximum_input (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_10maximum_input(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_10maximum_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("maximum_input", 0);

  /* "bsd/dialog.pyx":170
 *       @property
 *       def maximum_input(self):
 *             return self._max_input             # <<<<<<<<<<<<<<
 *       @maximum_input.setter
 *       def maximum_input(self, m):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":169
 *       """
 *       @property
 *       def maximum_input(self):             # <<<<<<<<<<<<<<
 *             return self._max_input
 *       @maximum_input.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormInput.maximum_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":172
 *             return self._max_input
 *       @maximum_input.setter
 *       def maximum_input(self, m):             # <<<<<<<<<<<<<<
 *             self._max_input = m
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_13maximum_input(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_13maximum_input = {"maximum_input", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_13maximum_input, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_13maximum_input(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maximum_input (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_m,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("maximum_input", 1, 2, 2, 1); __PYX_ERR(0, 172, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximum_input") < 0)) __PYX_ERR(0, 172, __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_m = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maximum_input", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.maximum_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_12maximum_input(__pyx_self, __pyx_v_self, __pyx_v_m);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_12maximum_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maximum_input", 0);

  /* "bsd/dialog.pyx":173
 *       @maximum_input.setter
 *       def maximum_input(self, m):
 *             self._max_input = m             # <<<<<<<<<<<<<<
 * 
 *       """
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_input, __pyx_v_m) < 0) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "bsd/dialog.pyx":172
 *             return self._max_input
 *       @maximum_input.setter
 *       def maximum_input(self, m):             # <<<<<<<<<<<<<<
 *             self._max_input = m
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.maximum_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":180
 *       """
 *       @property
 *       def hidden(self):             # <<<<<<<<<<<<<<
 *             return self._hidden
 *       @hidden.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_15hidden(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_15hidden = {"hidden", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_15hidden, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_15hidden(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hidden (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_14hidden(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_14hidden(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("hidden", 0);

  /* "bsd/dialog.pyx":181
 *       @property
 *       def hidden(self):
 *             return self._hidden             # <<<<<<<<<<<<<<
 *       @hidden.setter
 *       def hidden(self, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hidden_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":180
 *       """
 *       @property
 *       def hidden(self):             # <<<<<<<<<<<<<<
 *             return self._hidden
 *       @hidden.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormInput.hidden", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":183
 *             return self._hidden
 *       @hidden.setter
 *       def hidden(self, b):             # <<<<<<<<<<<<<<
 *             self._hidden = bool(b)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_17hidden(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9FormInput_17hidden = {"hidden", (PyCFunction)__pyx_pw_3bsd_6dialog_9FormInput_17hidden, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9FormInput_17hidden(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hidden (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_b,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hidden", 1, 2, 2, 1); __PYX_ERR(0, 183, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hidden") < 0)) __PYX_ERR(0, 183, __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_b = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hidden", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 183, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormInput.hidden", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9FormInput_16hidden(__pyx_self, __pyx_v_self, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9FormInput_16hidden(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("hidden", 0);

  /* "bsd/dialog.pyx":184
 *       @hidden.setter
 *       def hidden(self, b):
 *             self._hidden = bool(b)             # <<<<<<<<<<<<<<
 * 
 * cdef _clear_dialog_state():
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 184, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hidden_2, __pyx_t_2) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":183
 *             return self._hidden
 *       @hidden.setter
 *       def hidden(self, b):             # <<<<<<<<<<<<<<
 *             self._hidden = bool(b)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.FormInput.hidden", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":186
 *             self._hidden = bool(b)
 * 
 * cdef _clear_dialog_state():             # <<<<<<<<<<<<<<
 *       memset(<void*>&defs.dialog_state, 0, sizeof(defs.dialog_state))
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))
 */

static PyObject *__pyx_f_3bsd_6dialog__clear_dialog_state(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_clear_dialog_state", 0);

  /* "bsd/dialog.pyx":187
 * 
 * cdef _clear_dialog_state():
 *       memset(<void*>&defs.dialog_state, 0, sizeof(defs.dialog_state))             # <<<<<<<<<<<<<<
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))
 * 
 */
  memset(((void *)(&dialog_state)), 0, (sizeof(dialog_state)));

  /* "bsd/dialog.pyx":188
 * cdef _clear_dialog_state():
 *       memset(<void*>&defs.dialog_state, 0, sizeof(defs.dialog_state))
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))             # <<<<<<<<<<<<<<
 * 
 * cdef UnpackFormItem(defs.DIALOG_FORMITEM *item):
 */
  memset(((void *)(&dialog_vars)), 0, (sizeof(dialog_vars)));

  /* "bsd/dialog.pyx":186
 *             self._hidden = bool(b)
 * 
 * cdef _clear_dialog_state():             # <<<<<<<<<<<<<<
 *       memset(<void*>&defs.dialog_state, 0, sizeof(defs.dialog_state))
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":190
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))
 * 
 * cdef UnpackFormItem(defs.DIALOG_FORMITEM *item):             # <<<<<<<<<<<<<<
 *       if False:
 *             with open("/tmp/form.log", "a") as f:
 */

static PyObject *__pyx_f_3bsd_6dialog_UnpackFormItem(DIALOG_FORMITEM *__pyx_v_item) {
  int __pyx_v_pos_x;
  int __pyx_v_pos_y;
  PyObject *__pyx_v_pos = NULL;
  PyObject *__pyx_v_label = NULL;
  PyObject *__pyx_v_value = 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;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("UnpackFormItem", 0);

  /* "bsd/dialog.pyx":210
 *                         item.help_free))
 * 
 *       pos_x = item.name_x             # <<<<<<<<<<<<<<
 *       pos_y = item.name_y
 *       if pos_x == 0 and pos_y == 0:
 */
  __pyx_t_1 = __pyx_v_item->name_x;
  __pyx_v_pos_x = __pyx_t_1;

  /* "bsd/dialog.pyx":211
 * 
 *       pos_x = item.name_x
 *       pos_y = item.name_y             # <<<<<<<<<<<<<<
 *       if pos_x == 0 and pos_y == 0:
 *             pos = None
 */
  __pyx_t_1 = __pyx_v_item->name_y;
  __pyx_v_pos_y = __pyx_t_1;

  /* "bsd/dialog.pyx":212
 *       pos_x = item.name_x
 *       pos_y = item.name_y
 *       if pos_x == 0 and pos_y == 0:             # <<<<<<<<<<<<<<
 *             pos = None
 *       else:
 */
  __pyx_t_3 = ((__pyx_v_pos_x == 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_v_pos_y == 0) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":213
 *       pos_y = item.name_y
 *       if pos_x == 0 and pos_y == 0:
 *             pos = None             # <<<<<<<<<<<<<<
 *       else:
 *             pos = (pos_x, pos_y)
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_pos = Py_None;

    /* "bsd/dialog.pyx":212
 *       pos_x = item.name_x
 *       pos_y = item.name_y
 *       if pos_x == 0 and pos_y == 0:             # <<<<<<<<<<<<<<
 *             pos = None
 *       else:
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":215
 *             pos = None
 *       else:
 *             pos = (pos_x, pos_y)             # <<<<<<<<<<<<<<
 *       label = FormLabel(item.name.decode('utf-8'),
 *                         width=item.name_len,
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pos_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pos_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_v_pos = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":216
 *       else:
 *             pos = (pos_x, pos_y)
 *       label = FormLabel(item.name.decode('utf-8'),             # <<<<<<<<<<<<<<
 *                         width=item.name_len,
 *                         position=pos)
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormLabel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __pyx_v_item->name;
  __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":217
 *             pos = (pos_x, pos_y)
 *       label = FormLabel(item.name.decode('utf-8'),
 *                         width=item.name_len,             # <<<<<<<<<<<<<<
 *                         position=pos)
 *       pos_x = item.text_x
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_item->name_len); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_width, __pyx_t_8) < 0) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":218
 *       label = FormLabel(item.name.decode('utf-8'),
 *                         width=item.name_len,
 *                         position=pos)             # <<<<<<<<<<<<<<
 *       pos_x = item.text_x
 *       pos_y = item.text_y
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 217, __pyx_L1_error)

  /* "bsd/dialog.pyx":216
 *       else:
 *             pos = (pos_x, pos_y)
 *       label = FormLabel(item.name.decode('utf-8'),             # <<<<<<<<<<<<<<
 *                         width=item.name_len,
 *                         position=pos)
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_label = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":219
 *                         width=item.name_len,
 *                         position=pos)
 *       pos_x = item.text_x             # <<<<<<<<<<<<<<
 *       pos_y = item.text_y
 *       if pos_x == 0 and pos_y == 0:
 */
  __pyx_t_1 = __pyx_v_item->text_x;
  __pyx_v_pos_x = __pyx_t_1;

  /* "bsd/dialog.pyx":220
 *                         position=pos)
 *       pos_x = item.text_x
 *       pos_y = item.text_y             # <<<<<<<<<<<<<<
 *       if pos_x == 0 and pos_y == 0:
 *             pos = None
 */
  __pyx_t_1 = __pyx_v_item->text_y;
  __pyx_v_pos_y = __pyx_t_1;

  /* "bsd/dialog.pyx":221
 *       pos_x = item.text_x
 *       pos_y = item.text_y
 *       if pos_x == 0 and pos_y == 0:             # <<<<<<<<<<<<<<
 *             pos = None
 *       else:
 */
  __pyx_t_3 = ((__pyx_v_pos_x == 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_v_pos_y == 0) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":222
 *       pos_y = item.text_y
 *       if pos_x == 0 and pos_y == 0:
 *             pos = None             # <<<<<<<<<<<<<<
 *       else:
 *             pos = (pos_x, pos_y)
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF_SET(__pyx_v_pos, Py_None);

    /* "bsd/dialog.pyx":221
 *       pos_x = item.text_x
 *       pos_y = item.text_y
 *       if pos_x == 0 and pos_y == 0:             # <<<<<<<<<<<<<<
 *             pos = None
 *       else:
 */
    goto __pyx_L6;
  }

  /* "bsd/dialog.pyx":224
 *             pos = None
 *       else:
 *             pos = (pos_x, pos_y)             # <<<<<<<<<<<<<<
 * 
 *       value = FormInput(item.text.decode('utf-8'),
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_pos_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pos_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
    __pyx_t_8 = 0;
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "bsd/dialog.pyx":226
 *             pos = (pos_x, pos_y)
 * 
 *       value = FormInput(item.text.decode('utf-8'),             # <<<<<<<<<<<<<<
 *                         width=item.text_flen,
 *                         position=pos,
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormInput); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __pyx_v_item->text;
  __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":227
 * 
 *       value = FormInput(item.text.decode('utf-8'),
 *                         width=item.text_flen,             # <<<<<<<<<<<<<<
 *                         position=pos,
 *                         maximum_input=item.text_ilen,
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_item->text_flen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_width, __pyx_t_6) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":228
 *       value = FormInput(item.text.decode('utf-8'),
 *                         width=item.text_flen,
 *                         position=pos,             # <<<<<<<<<<<<<<
 *                         maximum_input=item.text_ilen,
 *                         hidden=(item.type == 1))
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 227, __pyx_L1_error)

  /* "bsd/dialog.pyx":229
 *                         width=item.text_flen,
 *                         position=pos,
 *                         maximum_input=item.text_ilen,             # <<<<<<<<<<<<<<
 *                         hidden=(item.type == 1))
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_item->text_ilen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_maximum_input, __pyx_t_6) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":230
 *                         position=pos,
 *                         maximum_input=item.text_ilen,
 *                         hidden=(item.type == 1))             # <<<<<<<<<<<<<<
 * 
 *       if False:
 */
  __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_v_item->type == 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_hidden, __pyx_t_6) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":226
 *             pos = (pos_x, pos_y)
 * 
 *       value = FormInput(item.text.decode('utf-8'),             # <<<<<<<<<<<<<<
 *                         width=item.text_flen,
 *                         position=pos,
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_value = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":237
 *                   f.write("\tvalue = {}\n".format(value))
 * 
 *       return FormItem(label, value=value,             # <<<<<<<<<<<<<<
 *                       help=item.help.decode('utf-8') if item.help else None,
 *                       hidden=bool(item.type & DialogType.HIDDEN),
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_label);
  __Pyx_GIVEREF(__pyx_v_label);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_label);
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 237, __pyx_L1_error)

  /* "bsd/dialog.pyx":238
 * 
 *       return FormItem(label, value=value,
 *                       help=item.help.decode('utf-8') if item.help else None,             # <<<<<<<<<<<<<<
 *                       hidden=bool(item.type & DialogType.HIDDEN),
 *                       readonly=bool(item.type & DialogType.READONLY))
 */
  if ((__pyx_v_item->help != 0)) {
    __pyx_t_7 = __pyx_v_item->help;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_8 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_8 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_help, __pyx_t_8) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":239
 *       return FormItem(label, value=value,
 *                       help=item.help.decode('utf-8') if item.help else None,
 *                       hidden=bool(item.type & DialogType.HIDDEN),             # <<<<<<<<<<<<<<
 *                       readonly=bool(item.type & DialogType.READONLY))
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_item->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_HIDDEN); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_And(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_hidden, __pyx_t_4) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":240
 *                       help=item.help.decode('utf-8') if item.help else None,
 *                       hidden=bool(item.type & DialogType.HIDDEN),
 *                       readonly=bool(item.type & DialogType.READONLY))             # <<<<<<<<<<<<<<
 * 
 * cdef PackFormItem(item):
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_item->type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogType); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_READONLY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_And(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_readonly, __pyx_t_9) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "bsd/dialog.pyx":237
 *                   f.write("\tvalue = {}\n".format(value))
 * 
 *       return FormItem(label, value=value,             # <<<<<<<<<<<<<<
 *                       help=item.help.decode('utf-8') if item.help else None,
 *                       hidden=bool(item.type & DialogType.HIDDEN),
 */
  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3bsd_6dialog_FormItem), __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":190
 *       memset(<void*>&defs.dialog_vars, 0, sizeof(defs.dialog_vars))
 * 
 * cdef UnpackFormItem(defs.DIALOG_FORMITEM *item):             # <<<<<<<<<<<<<<
 *       if False:
 *             with open("/tmp/form.log", "a") as f:
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("bsd.dialog.UnpackFormItem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_label);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":242
 *                       readonly=bool(item.type & DialogType.READONLY))
 * 
 * cdef PackFormItem(item):             # <<<<<<<<<<<<<<
 *       cdef defs.DIALOG_FORMITEM *c_item
 *       print("PackFormItem({})".format(item))
 */

static PyObject *__pyx_f_3bsd_6dialog_PackFormItem(PyObject *__pyx_v_item) {
  DIALOG_FORMITEM *__pyx_v_c_item;
  PyObject *__pyx_v_retval = 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;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  size_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("PackFormItem", 0);

  /* "bsd/dialog.pyx":244
 * cdef PackFormItem(item):
 *       cdef defs.DIALOG_FORMITEM *c_item
 *       print("PackFormItem({})".format(item))             # <<<<<<<<<<<<<<
 *       c_item = <defs.DIALOG_FORMITEM*>calloc(1, sizeof(defs.DIALOG_FORMITEM))
 *       c_item.name = strdup(item.label.label.encode('utf-8'))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_PackFormItem, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_item);
    __Pyx_GIVEREF(__pyx_v_item);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_item);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __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 (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":245
 *       cdef defs.DIALOG_FORMITEM *c_item
 *       print("PackFormItem({})".format(item))
 *       c_item = <defs.DIALOG_FORMITEM*>calloc(1, sizeof(defs.DIALOG_FORMITEM))             # <<<<<<<<<<<<<<
 *       c_item.name = strdup(item.label.label.encode('utf-8'))
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 */
  __pyx_v_c_item = ((DIALOG_FORMITEM *)calloc(1, (sizeof(DIALOG_FORMITEM))));

  /* "bsd/dialog.pyx":246
 *       print("PackFormItem({})".format(item))
 *       c_item = <defs.DIALOG_FORMITEM*>calloc(1, sizeof(defs.DIALOG_FORMITEM))
 *       c_item.name = strdup(item.label.label.encode('utf-8'))             # <<<<<<<<<<<<<<
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 *       c_item.name_free = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __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_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error)
  __pyx_v_c_item->name = strdup(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":247
 *       c_item = <defs.DIALOG_FORMITEM*>calloc(1, sizeof(defs.DIALOG_FORMITEM))
 *       c_item.name = strdup(item.label.label.encode('utf-8'))
 *       c_item.name_len = item.label.width or strlen(c_item.name)             # <<<<<<<<<<<<<<
 *       c_item.name_free = True
 *       if item.label.position:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 247, __pyx_L1_error)
  if (!__pyx_t_7) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_8;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_9 = strlen(__pyx_v_c_item->name);
  __pyx_t_6 = __pyx_t_9;
  __pyx_L3_bool_binop_done:;
  __pyx_v_c_item->name_len = __pyx_t_6;

  /* "bsd/dialog.pyx":248
 *       c_item.name = strdup(item.label.label.encode('utf-8'))
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 *       c_item.name_free = True             # <<<<<<<<<<<<<<
 *       if item.label.position:
 *             (c_item.name_x, c_item.name_y) = item.label.position
 */
  __pyx_v_c_item->name_free = 1;

  /* "bsd/dialog.pyx":249
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 *       c_item.name_free = True
 *       if item.label.position:             # <<<<<<<<<<<<<<
 *             (c_item.name_x, c_item.name_y) = item.label.position
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":250
 *       c_item.name_free = True
 *       if item.label.position:
 *             (c_item.name_x, c_item.name_y) = item.label.position             # <<<<<<<<<<<<<<
 * 
 *       c_item.text = strdup(item.value.value.encode('utf-8'))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 250, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 2) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 250, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c_item->name_x = __pyx_t_6;
    __pyx_v_c_item->name_y = __pyx_t_8;

    /* "bsd/dialog.pyx":249
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 *       c_item.name_free = True
 *       if item.label.position:             # <<<<<<<<<<<<<<
 *             (c_item.name_x, c_item.name_y) = item.label.position
 * 
 */
  }

  /* "bsd/dialog.pyx":252
 *             (c_item.name_x, c_item.name_y) = item.label.position
 * 
 *       c_item.text = strdup(item.value.value.encode('utf-8'))             # <<<<<<<<<<<<<<
 *       c_item.text_free = True
 *       if item.value.width:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __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_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __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__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L1_error)
  __pyx_v_c_item->text = strdup(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":253
 * 
 *       c_item.text = strdup(item.value.value.encode('utf-8'))
 *       c_item.text_free = True             # <<<<<<<<<<<<<<
 *       if item.value.width:
 *             c_item.text_len = item.value.width
 */
  __pyx_v_c_item->text_free = 1;

  /* "bsd/dialog.pyx":254
 *       c_item.text = strdup(item.value.value.encode('utf-8'))
 *       c_item.text_free = True
 *       if item.value.width:             # <<<<<<<<<<<<<<
 *             c_item.text_len = item.value.width
 *             c_item.text_flen = item.value.width
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":255
 *       c_item.text_free = True
 *       if item.value.width:
 *             c_item.text_len = item.value.width             # <<<<<<<<<<<<<<
 *             c_item.text_flen = item.value.width
 *       elif item.value.readonly:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c_item->text_len = __pyx_t_8;

    /* "bsd/dialog.pyx":256
 *       if item.value.width:
 *             c_item.text_len = item.value.width
 *             c_item.text_flen = item.value.width             # <<<<<<<<<<<<<<
 *       elif item.value.readonly:
 *             c_item.text_len = 0
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_c_item->text_flen = __pyx_t_8;

    /* "bsd/dialog.pyx":254
 *       c_item.text = strdup(item.value.value.encode('utf-8'))
 *       c_item.text_free = True
 *       if item.value.width:             # <<<<<<<<<<<<<<
 *             c_item.text_len = item.value.width
 *             c_item.text_flen = item.value.width
 */
    goto __pyx_L8;
  }

  /* "bsd/dialog.pyx":257
 *             c_item.text_len = item.value.width
 *             c_item.text_flen = item.value.width
 *       elif item.value.readonly:             # <<<<<<<<<<<<<<
 *             c_item.text_len = 0
 *       else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_readonly); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":258
 *             c_item.text_flen = item.value.width
 *       elif item.value.readonly:
 *             c_item.text_len = 0             # <<<<<<<<<<<<<<
 *       else:
 *             c_item.text_len = strlen(c_item.text)
 */
    __pyx_v_c_item->text_len = 0;

    /* "bsd/dialog.pyx":257
 *             c_item.text_len = item.value.width
 *             c_item.text_flen = item.value.width
 *       elif item.value.readonly:             # <<<<<<<<<<<<<<
 *             c_item.text_len = 0
 *       else:
 */
    goto __pyx_L8;
  }

  /* "bsd/dialog.pyx":260
 *             c_item.text_len = 0
 *       else:
 *             c_item.text_len = strlen(c_item.text)             # <<<<<<<<<<<<<<
 * 
 *       if item.value.maximum_input:
 */
  /*else*/ {
    __pyx_v_c_item->text_len = strlen(__pyx_v_c_item->text);
  }
  __pyx_L8:;

  /* "bsd/dialog.pyx":262
 *             c_item.text_len = strlen(c_item.text)
 * 
 *       if item.value.maximum_input:             # <<<<<<<<<<<<<<
 *             c_item.text_ilen = item.value.maximum_input
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":263
 * 
 *       if item.value.maximum_input:
 *             c_item.text_ilen = item.value.maximum_input             # <<<<<<<<<<<<<<
 * 
 *       if item.help:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c_item->text_ilen = __pyx_t_8;

    /* "bsd/dialog.pyx":262
 *             c_item.text_len = strlen(c_item.text)
 * 
 *       if item.value.maximum_input:             # <<<<<<<<<<<<<<
 *             c_item.text_ilen = item.value.maximum_input
 * 
 */
  }

  /* "bsd/dialog.pyx":265
 *             c_item.text_ilen = item.value.maximum_input
 * 
 *       if item.help:             # <<<<<<<<<<<<<<
 *             c_item.help = strdup(item.help.encode('utf-8'))
 *             c_item.help_free = True
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_help); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":266
 * 
 *       if item.help:
 *             c_item.help = strdup(item.help.encode('utf-8'))             # <<<<<<<<<<<<<<
 *             c_item.help_free = True
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_help); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __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__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error)
    __pyx_v_c_item->help = strdup(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "bsd/dialog.pyx":267
 *       if item.help:
 *             c_item.help = strdup(item.help.encode('utf-8'))
 *             c_item.help_free = True             # <<<<<<<<<<<<<<
 * 
 *       if item.value.hidden:
 */
    __pyx_v_c_item->help_free = 1;

    /* "bsd/dialog.pyx":265
 *             c_item.text_ilen = item.value.maximum_input
 * 
 *       if item.help:             # <<<<<<<<<<<<<<
 *             c_item.help = strdup(item.help.encode('utf-8'))
 *             c_item.help_free = True
 */
  }

  /* "bsd/dialog.pyx":269
 *             c_item.help_free = True
 * 
 *       if item.value.hidden:             # <<<<<<<<<<<<<<
 *             c_item.type = 1
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":270
 * 
 *       if item.value.hidden:
 *             c_item.type = 1             # <<<<<<<<<<<<<<
 * 
 *       if False:
 */
    __pyx_v_c_item->type = 1;

    /* "bsd/dialog.pyx":269
 *             c_item.help_free = True
 * 
 *       if item.value.hidden:             # <<<<<<<<<<<<<<
 *             c_item.type = 1
 * 
 */
  }

  /* "bsd/dialog.pyx":291
 *                         c_item.help_free))
 * 
 *       retval = <bytes>(<char*>c_item)[:sizeof(defs.DIALOG_FORMITEM)]             # <<<<<<<<<<<<<<
 *       free(<void*>c_item)
 *       if False:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char *)__pyx_v_c_item) + 0, (sizeof(DIALOG_FORMITEM)) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_retval = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":292
 * 
 *       retval = <bytes>(<char*>c_item)[:sizeof(defs.DIALOG_FORMITEM)]
 *       free(<void*>c_item)             # <<<<<<<<<<<<<<
 *       if False:
 *             c_item = <defs.DIALOG_FORMITEM*><char*>retval
 */
  free(((void *)__pyx_v_c_item));

  /* "bsd/dialog.pyx":312
 *                         c_item.help or "(null)",
 *                         c_item.help_free))
 *       return retval             # <<<<<<<<<<<<<<
 * 
 * cdef class FormItem(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_retval);
  __pyx_r = __pyx_v_retval;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":242
 *                       readonly=bool(item.type & DialogType.READONLY))
 * 
 * cdef PackFormItem(item):             # <<<<<<<<<<<<<<
 *       cdef defs.DIALOG_FORMITEM *c_item
 *       print("PackFormItem({})".format(item))
 */

  /* 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("bsd.dialog.PackFormItem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_retval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":336
 *             _readonly
 * 
 *       def __init__(self, label, value=None, help=None, hidden=False, readonly=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.value = value
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_help = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_readonly = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_value,&__pyx_n_s_help,&__pyx_n_s_hidden,&__pyx_n_s_readonly,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((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  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_label)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_help);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_readonly);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 336, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_value = values[1];
    __pyx_v_help = values[2];
    __pyx_v_hidden = values[3];
    __pyx_v_readonly = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 336, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.FormItem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem___init__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), __pyx_v_label, __pyx_v_value, __pyx_v_help, __pyx_v_hidden, __pyx_v_readonly);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem___init__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_value, PyObject *__pyx_v_help, PyObject *__pyx_v_hidden, PyObject *__pyx_v_readonly) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":337
 * 
 *       def __init__(self, label, value=None, help=None, hidden=False, readonly=False):
 *             self.label = label             # <<<<<<<<<<<<<<
 *             self.value = value
 *             self.help = help
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label, __pyx_v_label) < 0) __PYX_ERR(0, 337, __pyx_L1_error)

  /* "bsd/dialog.pyx":338
 *       def __init__(self, label, value=None, help=None, hidden=False, readonly=False):
 *             self.label = label
 *             self.value = value             # <<<<<<<<<<<<<<
 *             self.help = help
 *             self.hidden = hidden
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 338, __pyx_L1_error)

  /* "bsd/dialog.pyx":339
 *             self.label = label
 *             self.value = value
 *             self.help = help             # <<<<<<<<<<<<<<
 *             self.hidden = hidden
 *             self.readonly = readonly
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_help, __pyx_v_help) < 0) __PYX_ERR(0, 339, __pyx_L1_error)

  /* "bsd/dialog.pyx":340
 *             self.value = value
 *             self.help = help
 *             self.hidden = hidden             # <<<<<<<<<<<<<<
 *             self.readonly = readonly
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hidden, __pyx_v_hidden) < 0) __PYX_ERR(0, 340, __pyx_L1_error)

  /* "bsd/dialog.pyx":341
 *             self.help = help
 *             self.hidden = hidden
 *             self.readonly = readonly             # <<<<<<<<<<<<<<
 * 
 *       def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_readonly, __pyx_v_readonly) < 0) __PYX_ERR(0, 341, __pyx_L1_error)

  /* "bsd/dialog.pyx":336
 *             _readonly
 * 
 *       def __init__(self, label, value=None, help=None, hidden=False, readonly=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.FormItem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":343
 *             self.readonly = readonly
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_2__str__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_2__str__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/dialog.pyx":344
 * 
 *       def __str__(self):
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(             # <<<<<<<<<<<<<<
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 *       def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormItem_label_value_help_hidde, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":345
 *       def __str__(self):
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)             # <<<<<<<<<<<<<<
 *       def __repr__(self):
 *             return "FormItem({}, value={}, hidden={}, readonly={})".format(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_help); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hidden); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_readonly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 344, __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_3);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":343
 *             self.readonly = readonly
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("bsd.dialog.FormItem.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":346
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormItem({}, value={}, hidden={}, readonly={})".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_4__repr__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_4__repr__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/dialog.pyx":347
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 *       def __repr__(self):
 *             return "FormItem({}, value={}, hidden={}, readonly={})".format(             # <<<<<<<<<<<<<<
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FormItem_value_hidden_readonly, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":348
 *       def __repr__(self):
 *             return "FormItem({}, value={}, hidden={}, readonly={})".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)             # <<<<<<<<<<<<<<
 * 
 *       property label:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_help); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hidden); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_readonly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 347, __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_3);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":346
 *             return "<FormItem<label={}, value={}, help={}, hidden={}, readonly={}>".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormItem({}, value={}, hidden={}, readonly={})".format(
 *                   self.label, self.value, self.help, self.hidden, self.readonly)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("bsd.dialog.FormItem.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":351
 * 
 *       property label:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._label
 *           def __set__(self, n):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5label_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5label_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_5label___get__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_5label___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/dialog.pyx":352
 *       property label:
 *           def __get__(self):
 *                 return self._label             # <<<<<<<<<<<<<<
 *           def __set__(self, n):
 *                 self._label = n
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_label);
  __pyx_r = __pyx_v_self->_label;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":351
 * 
 *       property label:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._label
 *           def __set__(self, n):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":353
 *           def __get__(self):
 *                 return self._label
 *           def __set__(self, n):             # <<<<<<<<<<<<<<
 *                 self._label = n
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_5label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_5label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_5label_2__set__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), ((PyObject *)__pyx_v_n));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem_5label_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_n) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "bsd/dialog.pyx":354
 *                 return self._label
 *           def __set__(self, n):
 *                 self._label = n             # <<<<<<<<<<<<<<
 * 
 *       property value:
 */
  __Pyx_INCREF(__pyx_v_n);
  __Pyx_GIVEREF(__pyx_v_n);
  __Pyx_GOTREF(__pyx_v_self->_label);
  __Pyx_DECREF(__pyx_v_self->_label);
  __pyx_v_self->_label = __pyx_v_n;

  /* "bsd/dialog.pyx":353
 *           def __get__(self):
 *                 return self._label
 *           def __set__(self, n):             # <<<<<<<<<<<<<<
 *                 self._label = n
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":357
 * 
 *       property value:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._value
 *           def __set__(self, v):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_5value___get__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_5value___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/dialog.pyx":358
 *       property value:
 *           def __get__(self):
 *                 return self._value             # <<<<<<<<<<<<<<
 *           def __set__(self, v):
 *                 self._value = v
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_value);
  __pyx_r = __pyx_v_self->_value;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":357
 * 
 *       property value:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._value
 *           def __set__(self, v):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":359
 *           def __get__(self):
 *                 return self._value
 *           def __set__(self, v):             # <<<<<<<<<<<<<<
 *                 self._value = v
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_5value_2__set__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem_5value_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "bsd/dialog.pyx":360
 *                 return self._value
 *           def __set__(self, v):
 *                 self._value = v             # <<<<<<<<<<<<<<
 * 
 *       property help:
 */
  __Pyx_INCREF(__pyx_v_v);
  __Pyx_GIVEREF(__pyx_v_v);
  __Pyx_GOTREF(__pyx_v_self->_value);
  __Pyx_DECREF(__pyx_v_self->_value);
  __pyx_v_self->_value = __pyx_v_v;

  /* "bsd/dialog.pyx":359
 *           def __get__(self):
 *                 return self._value
 *           def __set__(self, v):             # <<<<<<<<<<<<<<
 *                 self._value = v
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":363
 * 
 *       property help:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._help
 *           def __set__(self, v):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_4help_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_4help_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_4help___get__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_4help___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/dialog.pyx":364
 *       property help:
 *           def __get__(self):
 *                 return self._help             # <<<<<<<<<<<<<<
 *           def __set__(self, v):
 *                 self._help = v
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_help);
  __pyx_r = __pyx_v_self->_help;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":363
 * 
 *       property help:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._help
 *           def __set__(self, v):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":365
 *           def __get__(self):
 *                 return self._help
 *           def __set__(self, v):             # <<<<<<<<<<<<<<
 *                 self._help = v
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_4help_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_4help_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_4help_2__set__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem_4help_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "bsd/dialog.pyx":366
 *                 return self._help
 *           def __set__(self, v):
 *                 self._help = v             # <<<<<<<<<<<<<<
 * 
 *       property hidden:
 */
  __Pyx_INCREF(__pyx_v_v);
  __Pyx_GIVEREF(__pyx_v_v);
  __Pyx_GOTREF(__pyx_v_self->_help);
  __Pyx_DECREF(__pyx_v_self->_help);
  __pyx_v_self->_help = __pyx_v_v;

  /* "bsd/dialog.pyx":365
 *           def __get__(self):
 *                 return self._help
 *           def __set__(self, v):             # <<<<<<<<<<<<<<
 *                 self._help = v
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":369
 * 
 *       property hidden:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._hidden
 *           def __set__(self, b):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_6hidden_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_6hidden_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_6hidden___get__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_6hidden___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/dialog.pyx":370
 *       property hidden:
 *           def __get__(self):
 *                 return self._hidden             # <<<<<<<<<<<<<<
 *           def __set__(self, b):
 *                 self._hidden = bool(b)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_hidden);
  __pyx_r = __pyx_v_self->_hidden;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":369
 * 
 *       property hidden:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._hidden
 *           def __set__(self, b):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":371
 *           def __get__(self):
 *                 return self._hidden
 *           def __set__(self, b):             # <<<<<<<<<<<<<<
 *                 self._hidden = bool(b)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_6hidden_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_6hidden_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_6hidden_2__set__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), ((PyObject *)__pyx_v_b));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem_6hidden_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "bsd/dialog.pyx":372
 *                 return self._hidden
 *           def __set__(self, b):
 *                 self._hidden = bool(b)             # <<<<<<<<<<<<<<
 * 
 *       property readonly:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 372, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_hidden);
  __Pyx_DECREF(__pyx_v_self->_hidden);
  __pyx_v_self->_hidden = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":371
 *           def __get__(self):
 *                 return self._hidden
 *           def __set__(self, b):             # <<<<<<<<<<<<<<
 *                 self._hidden = bool(b)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.FormItem.hidden.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":375
 * 
 *       property readonly:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._readonly
 *           def __set__(self, b):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_8readonly_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_8readonly_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_8readonly___get__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_8readonly___get__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/dialog.pyx":376
 *       property readonly:
 *           def __get__(self):
 *                 return self._readonly             # <<<<<<<<<<<<<<
 *           def __set__(self, b):
 *                 self._readonly = bool(b)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_readonly);
  __pyx_r = __pyx_v_self->_readonly;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":375
 * 
 *       property readonly:
 *           def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self._readonly
 *           def __set__(self, b):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":377
 *           def __get__(self):
 *                 return self._readonly
 *           def __set__(self, b):             # <<<<<<<<<<<<<<
 *                 self._readonly = bool(b)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_6dialog_8FormItem_8readonly_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static int __pyx_pw_3bsd_6dialog_8FormItem_8readonly_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_8readonly_2__set__(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self), ((PyObject *)__pyx_v_b));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_6dialog_8FormItem_8readonly_2__set__(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "bsd/dialog.pyx":378
 *                 return self._readonly
 *           def __set__(self, b):
 *                 self._readonly = bool(b)             # <<<<<<<<<<<<<<
 * 
 *       def Pack(self):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 378, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_readonly);
  __Pyx_DECREF(__pyx_v_self->_readonly);
  __pyx_v_self->_readonly = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":377
 *           def __get__(self):
 *                 return self._readonly
 *           def __set__(self, b):             # <<<<<<<<<<<<<<
 *                 self._readonly = bool(b)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.FormItem.readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":380
 *                 self._readonly = bool(b)
 * 
 *       def Pack(self):             # <<<<<<<<<<<<<<
 *             return PackFormItem(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_7Pack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_6dialog_8FormItem_7Pack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Pack (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_8FormItem_6Pack(((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_8FormItem_6Pack(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Pack", 0);

  /* "bsd/dialog.pyx":381
 * 
 *       def Pack(self):
 *             return PackFormItem(self)             # <<<<<<<<<<<<<<
 * 
 *       cdef Pack1(self, defs.DIALOG_FORMITEM *dst):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_3bsd_6dialog_PackFormItem(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":380
 *                 self._readonly = bool(b)
 * 
 *       def Pack(self):             # <<<<<<<<<<<<<<
 *             return PackFormItem(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.FormItem.Pack", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":383
 *             return PackFormItem(self)
 * 
 *       cdef Pack1(self, defs.DIALOG_FORMITEM *dst):             # <<<<<<<<<<<<<<
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))
 *             print("self.label = {}".format(self.label))
 */

static PyObject *__pyx_f_3bsd_6dialog_8FormItem_Pack1(struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_self, DIALOG_FORMITEM *__pyx_v_dst) {
  PyObject *__pyx_v_name_coord = NULL;
  PyObject *__pyx_v_text_coord = 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;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  char *__pyx_t_12;
  size_t __pyx_t_13;
  unsigned int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  __Pyx_RefNannySetupContext("Pack1", 0);

  /* "bsd/dialog.pyx":384
 * 
 *       cdef Pack1(self, defs.DIALOG_FORMITEM *dst):
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))             # <<<<<<<<<<<<<<
 *             print("self.label = {}".format(self.label))
 *             dst.name = strdup(self.label.label.encode('utf-8'))
 */
  memset(__pyx_v_dst, 0, (sizeof(DIALOG_FORMITEM)));

  /* "bsd/dialog.pyx":385
 *       cdef Pack1(self, defs.DIALOG_FORMITEM *dst):
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))
 *             print("self.label = {}".format(self.label))             # <<<<<<<<<<<<<<
 *             dst.name = strdup(self.label.label.encode('utf-8'))
 *             dst.name_len = strlen(dst.name)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_self_label, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __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;
  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":386
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))
 *             print("self.label = {}".format(self.label))
 *             dst.name = strdup(self.label.label.encode('utf-8'))             # <<<<<<<<<<<<<<
 *             dst.name_len = strlen(dst.name)
 *             dst.name_free = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __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_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 386, __pyx_L1_error)
  __pyx_v_dst->name = strdup(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":387
 *             print("self.label = {}".format(self.label))
 *             dst.name = strdup(self.label.label.encode('utf-8'))
 *             dst.name_len = strlen(dst.name)             # <<<<<<<<<<<<<<
 *             dst.name_free = True
 *             name_coord = self.label.position
 */
  __pyx_v_dst->name_len = strlen(__pyx_v_dst->name);

  /* "bsd/dialog.pyx":388
 *             dst.name = strdup(self.label.label.encode('utf-8'))
 *             dst.name_len = strlen(dst.name)
 *             dst.name_free = True             # <<<<<<<<<<<<<<
 *             name_coord = self.label.position
 *             if name_coord is None:
 */
  __pyx_v_dst->name_free = 1;

  /* "bsd/dialog.pyx":389
 *             dst.name_len = strlen(dst.name)
 *             dst.name_free = True
 *             name_coord = self.label.position             # <<<<<<<<<<<<<<
 *             if name_coord is None:
 *                   # The caller has to clean this up
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_name_coord = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":390
 *             dst.name_free = True
 *             name_coord = self.label.position
 *             if name_coord is None:             # <<<<<<<<<<<<<<
 *                   # The caller has to clean this up
 *                   dst.name_x = 0
 */
  __pyx_t_7 = (__pyx_v_name_coord == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "bsd/dialog.pyx":392
 *             if name_coord is None:
 *                   # The caller has to clean this up
 *                   dst.name_x = 0             # <<<<<<<<<<<<<<
 *                   dst.name_y = 0
 *             else:
 */
    __pyx_v_dst->name_x = 0;

    /* "bsd/dialog.pyx":393
 *                   # The caller has to clean this up
 *                   dst.name_x = 0
 *                   dst.name_y = 0             # <<<<<<<<<<<<<<
 *             else:
 *                   (dst.name_x, dst.name_y) = name_coord
 */
    __pyx_v_dst->name_y = 0;

    /* "bsd/dialog.pyx":390
 *             dst.name_free = True
 *             name_coord = self.label.position
 *             if name_coord is None:             # <<<<<<<<<<<<<<
 *                   # The caller has to clean this up
 *                   dst.name_x = 0
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":395
 *                   dst.name_y = 0
 *             else:
 *                   (dst.name_x, dst.name_y) = name_coord             # <<<<<<<<<<<<<<
 *             dst.text = strdup(self.value.value.encode('utf-8')) if self.value else strdup("")
 *             dst.text_len = strlen(dst.text) if dst.text else 30
 */
  /*else*/ {
    if ((likely(PyTuple_CheckExact(__pyx_v_name_coord))) || (PyList_CheckExact(__pyx_v_name_coord))) {
      PyObject* sequence = __pyx_v_name_coord;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 395, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_v_name_coord); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 395, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_dst->name_x = __pyx_t_10;
    __pyx_v_dst->name_y = __pyx_t_11;
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":396
 *             else:
 *                   (dst.name_x, dst.name_y) = name_coord
 *             dst.text = strdup(self.value.value.encode('utf-8')) if self.value else strdup("")             # <<<<<<<<<<<<<<
 *             dst.text_len = strlen(dst.text) if dst.text else 30
 *             dst.text_free = True
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, NULL); 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_t_6 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error)
    __pyx_t_12 = strdup(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_12 = strdup(((char const *)""));
  }
  __pyx_v_dst->text = __pyx_t_12;

  /* "bsd/dialog.pyx":397
 *                   (dst.name_x, dst.name_y) = name_coord
 *             dst.text = strdup(self.value.value.encode('utf-8')) if self.value else strdup("")
 *             dst.text_len = strlen(dst.text) if dst.text else 30             # <<<<<<<<<<<<<<
 *             dst.text_free = True
 *             text_coord = self.value.position
 */
  if ((__pyx_v_dst->text != 0)) {
    __pyx_t_13 = strlen(__pyx_v_dst->text);
  } else {
    __pyx_t_13 = 30;
  }
  __pyx_v_dst->text_len = __pyx_t_13;

  /* "bsd/dialog.pyx":398
 *             dst.text = strdup(self.value.value.encode('utf-8')) if self.value else strdup("")
 *             dst.text_len = strlen(dst.text) if dst.text else 30
 *             dst.text_free = True             # <<<<<<<<<<<<<<
 *             text_coord = self.value.position
 *             if text_coord is None:
 */
  __pyx_v_dst->text_free = 1;

  /* "bsd/dialog.pyx":399
 *             dst.text_len = strlen(dst.text) if dst.text else 30
 *             dst.text_free = True
 *             text_coord = self.value.position             # <<<<<<<<<<<<<<
 *             if text_coord is None:
 *                   # The caller has to clean this up
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_text_coord = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":400
 *             dst.text_free = True
 *             text_coord = self.value.position
 *             if text_coord is None:             # <<<<<<<<<<<<<<
 *                   # The caller has to clean this up
 *                   dst.text_x = 0
 */
  __pyx_t_8 = (__pyx_v_text_coord == Py_None);
  __pyx_t_7 = (__pyx_t_8 != 0);
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":402
 *             if text_coord is None:
 *                   # The caller has to clean this up
 *                   dst.text_x = 0             # <<<<<<<<<<<<<<
 *                   dst.text_y = 0
 *             else:
 */
    __pyx_v_dst->text_x = 0;

    /* "bsd/dialog.pyx":403
 *                   # The caller has to clean this up
 *                   dst.text_x = 0
 *                   dst.text_y = 0             # <<<<<<<<<<<<<<
 *             else:
 *                   (dst.text_x, dst.text_y) = text_coord
 */
    __pyx_v_dst->text_y = 0;

    /* "bsd/dialog.pyx":400
 *             dst.text_free = True
 *             text_coord = self.value.position
 *             if text_coord is None:             # <<<<<<<<<<<<<<
 *                   # The caller has to clean this up
 *                   dst.text_x = 0
 */
    goto __pyx_L6;
  }

  /* "bsd/dialog.pyx":405
 *                   dst.text_y = 0
 *             else:
 *                   (dst.text_x, dst.text_y) = text_coord             # <<<<<<<<<<<<<<
 * 
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL
 */
  /*else*/ {
    if ((likely(PyTuple_CheckExact(__pyx_v_text_coord))) || (PyList_CheckExact(__pyx_v_text_coord))) {
      PyObject* sequence = __pyx_v_text_coord;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 405, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_v_text_coord); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 405, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_dst->text_x = __pyx_t_11;
    __pyx_v_dst->text_y = __pyx_t_10;
  }
  __pyx_L6:;

  /* "bsd/dialog.pyx":407
 *                   (dst.text_x, dst.text_y) = text_coord
 * 
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL             # <<<<<<<<<<<<<<
 *             if dst.help:
 *                   dst.help_free = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_help); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_help); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
    __pyx_t_12 = strdup(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_12 = ((char *)NULL);
  }
  __pyx_v_dst->help = __pyx_t_12;

  /* "bsd/dialog.pyx":408
 * 
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL
 *             if dst.help:             # <<<<<<<<<<<<<<
 *                   dst.help_free = True
 *             if self.hidden:
 */
  __pyx_t_7 = (__pyx_v_dst->help != 0);
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":409
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL
 *             if dst.help:
 *                   dst.help_free = True             # <<<<<<<<<<<<<<
 *             if self.hidden:
 *                   dst.type |= DialogType.HIDDEN
 */
    __pyx_v_dst->help_free = 1;

    /* "bsd/dialog.pyx":408
 * 
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL
 *             if dst.help:             # <<<<<<<<<<<<<<
 *                   dst.help_free = True
 *             if self.hidden:
 */
  }

  /* "bsd/dialog.pyx":410
 *             if dst.help:
 *                   dst.help_free = True
 *             if self.hidden:             # <<<<<<<<<<<<<<
 *                   dst.type |= DialogType.HIDDEN
 *             if self.readonly:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":411
 *                   dst.help_free = True
 *             if self.hidden:
 *                   dst.type |= DialogType.HIDDEN             # <<<<<<<<<<<<<<
 *             if self.readonly:
 *                   dst.type |= DialogType.READONLY
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dst->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_HIDDEN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __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_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_dst->type = __pyx_t_14;

    /* "bsd/dialog.pyx":410
 *             if dst.help:
 *                   dst.help_free = True
 *             if self.hidden:             # <<<<<<<<<<<<<<
 *                   dst.type |= DialogType.HIDDEN
 *             if self.readonly:
 */
  }

  /* "bsd/dialog.pyx":412
 *             if self.hidden:
 *                   dst.type |= DialogType.HIDDEN
 *             if self.readonly:             # <<<<<<<<<<<<<<
 *                   dst.type |= DialogType.READONLY
 *             else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_readonly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "bsd/dialog.pyx":413
 *                   dst.type |= DialogType.HIDDEN
 *             if self.readonly:
 *                   dst.type |= DialogType.READONLY             # <<<<<<<<<<<<<<
 *             else:
 *                   if self.value.width is None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dst->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_READONLY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceOr(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __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_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dst->type = __pyx_t_14;

    /* "bsd/dialog.pyx":412
 *             if self.hidden:
 *                   dst.type |= DialogType.HIDDEN
 *             if self.readonly:             # <<<<<<<<<<<<<<
 *                   dst.type |= DialogType.READONLY
 *             else:
 */
    goto __pyx_L11;
  }

  /* "bsd/dialog.pyx":415
 *                   dst.type |= DialogType.READONLY
 *             else:
 *                   if self.value.width is None:             # <<<<<<<<<<<<<<
 *                         dst.text_flen = len(self.value.value) + 10
 *                   if not self.value.maximum_input:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = (__pyx_t_1 == Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "bsd/dialog.pyx":416
 *             else:
 *                   if self.value.width is None:
 *                         dst.text_flen = len(self.value.value) + 10             # <<<<<<<<<<<<<<
 *                   if not self.value.maximum_input:
 *                         dst.text_ilen = 0
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 416, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_dst->text_flen = (__pyx_t_15 + 10);

      /* "bsd/dialog.pyx":415
 *                   dst.type |= DialogType.READONLY
 *             else:
 *                   if self.value.width is None:             # <<<<<<<<<<<<<<
 *                         dst.text_flen = len(self.value.value) + 10
 *                   if not self.value.maximum_input:
 */
    }

    /* "bsd/dialog.pyx":417
 *                   if self.value.width is None:
 *                         dst.text_flen = len(self.value.value) + 10
 *                   if not self.value.maximum_input:             # <<<<<<<<<<<<<<
 *                         dst.text_ilen = 0
 *                   else:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = ((!__pyx_t_8) != 0);
    if (__pyx_t_7) {

      /* "bsd/dialog.pyx":418
 *                         dst.text_flen = len(self.value.value) + 10
 *                   if not self.value.maximum_input:
 *                         dst.text_ilen = 0             # <<<<<<<<<<<<<<
 *                   else:
 *                         dst.text_ilen = self.value.maximum_input
 */
      __pyx_v_dst->text_ilen = 0;

      /* "bsd/dialog.pyx":417
 *                   if self.value.width is None:
 *                         dst.text_flen = len(self.value.value) + 10
 *                   if not self.value.maximum_input:             # <<<<<<<<<<<<<<
 *                         dst.text_ilen = 0
 *                   else:
 */
      goto __pyx_L13;
    }

    /* "bsd/dialog.pyx":420
 *                         dst.text_ilen = 0
 *                   else:
 *                         dst.text_ilen = self.value.maximum_input             # <<<<<<<<<<<<<<
 * 
 * """
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maximum_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_dst->text_ilen = __pyx_t_10;
    }
    __pyx_L13:;
  }
  __pyx_L11:;

  /* "bsd/dialog.pyx":383
 *             return PackFormItem(self)
 * 
 *       cdef Pack1(self, defs.DIALOG_FORMITEM *dst):             # <<<<<<<<<<<<<<
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))
 *             print("self.label = {}".format(self.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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd.dialog.FormItem.Pack1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_coord);
  __Pyx_XDECREF(__pyx_v_text_coord);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":434
 *       return (<bytes>vars_buffer, <bytes>state_buffer)
 * """
 * cdef _save_dialog_state():             # <<<<<<<<<<<<<<
 *       vars_buffer = <bytes>(<char*>&defs.dialog_vars)[:sizeof(defs.DIALOG_VARS)]
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]
 */

static PyObject *__pyx_f_3bsd_6dialog__save_dialog_state(void) {
  PyObject *__pyx_v_vars_buffer = NULL;
  PyObject *__pyx_v_state_buffer = 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 = NULL;
  __Pyx_RefNannySetupContext("_save_dialog_state", 0);

  /* "bsd/dialog.pyx":435
 * """
 * cdef _save_dialog_state():
 *       vars_buffer = <bytes>(<char*>&defs.dialog_vars)[:sizeof(defs.DIALOG_VARS)]             # <<<<<<<<<<<<<<
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]
 *       print("save:  vars_buffer = {}, state_buffer = {}".format(vars_buffer, state_buffer))
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char *)(&dialog_vars)) + 0, (sizeof(DIALOG_VARS)) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vars_buffer = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":436
 * cdef _save_dialog_state():
 *       vars_buffer = <bytes>(<char*>&defs.dialog_vars)[:sizeof(defs.DIALOG_VARS)]
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]             # <<<<<<<<<<<<<<
 *       print("save:  vars_buffer = {}, state_buffer = {}".format(vars_buffer, state_buffer))
 *       return (vars_buffer, state_buffer)
 */
  __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((char *)(&dialog_state)) + 0, (sizeof(DIALOG_STATE)) - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_state_buffer = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":437
 *       vars_buffer = <bytes>(<char*>&defs.dialog_vars)[:sizeof(defs.DIALOG_VARS)]
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]
 *       print("save:  vars_buffer = {}, state_buffer = {}".format(vars_buffer, state_buffer))             # <<<<<<<<<<<<<<
 *       return (vars_buffer, state_buffer)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_save_vars_buffer_state_buffer, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __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_vars_buffer);
  __Pyx_GIVEREF(__pyx_v_vars_buffer);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_vars_buffer);
  __Pyx_INCREF(__pyx_v_state_buffer);
  __Pyx_GIVEREF(__pyx_v_state_buffer);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_state_buffer);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); 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_2); __pyx_t_2 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":438
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]
 *       print("save:  vars_buffer = {}, state_buffer = {}".format(vars_buffer, state_buffer))
 *       return (vars_buffer, state_buffer)             # <<<<<<<<<<<<<<
 * 
 * cdef _restore_dialog_state(state):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_vars_buffer);
  __Pyx_GIVEREF(__pyx_v_vars_buffer);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_vars_buffer);
  __Pyx_INCREF(__pyx_v_state_buffer);
  __Pyx_GIVEREF(__pyx_v_state_buffer);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_state_buffer);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":434
 *       return (<bytes>vars_buffer, <bytes>state_buffer)
 * """
 * cdef _save_dialog_state():             # <<<<<<<<<<<<<<
 *       vars_buffer = <bytes>(<char*>&defs.dialog_vars)[:sizeof(defs.DIALOG_VARS)]
 *       state_buffer = <bytes>(<char*>&defs.dialog_state)[:sizeof(defs.DIALOG_STATE)]
 */

  /* 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("bsd.dialog._save_dialog_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vars_buffer);
  __Pyx_XDECREF(__pyx_v_state_buffer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":440
 *       return (vars_buffer, state_buffer)
 * 
 * cdef _restore_dialog_state(state):             # <<<<<<<<<<<<<<
 *       print("restore:  vars_buffer = {}, state_buffer = {}".format(state[0], state[1]))
 *       memcpy(<void*>&defs.dialog_vars, <void*>state[0], sizeof(defs.DIALOG_VARS))
 */

static PyObject *__pyx_f_3bsd_6dialog__restore_dialog_state(PyObject *__pyx_v_state) {
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("_restore_dialog_state", 0);

  /* "bsd/dialog.pyx":441
 * 
 * cdef _restore_dialog_state(state):
 *       print("restore:  vars_buffer = {}, state_buffer = {}".format(state[0], state[1]))             # <<<<<<<<<<<<<<
 *       memcpy(<void*>&defs.dialog_vars, <void*>state[0], sizeof(defs.DIALOG_VARS))
 *       memcpy(<void*>&defs.dialog_state, <void*>state[1], sizeof(defs.DIALOG_STATE))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_restore_vars_buffer_state_buffer, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __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;
  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":442
 * cdef _restore_dialog_state(state):
 *       print("restore:  vars_buffer = {}, state_buffer = {}".format(state[0], state[1]))
 *       memcpy(<void*>&defs.dialog_vars, <void*>state[0], sizeof(defs.DIALOG_VARS))             # <<<<<<<<<<<<<<
 *       memcpy(<void*>&defs.dialog_state, <void*>state[1], sizeof(defs.DIALOG_STATE))
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  memcpy(((void *)(&dialog_vars)), ((void *)__pyx_t_1), (sizeof(DIALOG_VARS)));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":443
 *       print("restore:  vars_buffer = {}, state_buffer = {}".format(state[0], state[1]))
 *       memcpy(<void*>&defs.dialog_vars, <void*>state[0], sizeof(defs.DIALOG_VARS))
 *       memcpy(<void*>&defs.dialog_state, <void*>state[1], sizeof(defs.DIALOG_STATE))             # <<<<<<<<<<<<<<
 * 
 * class Dialog(object):
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  memcpy(((void *)(&dialog_state)), ((void *)__pyx_t_1), (sizeof(DIALOG_STATE)));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":440
 *       return (vars_buffer, state_buffer)
 * 
 * cdef _restore_dialog_state(state):             # <<<<<<<<<<<<<<
 *       print("restore:  vars_buffer = {}, state_buffer = {}".format(state[0], state[1]))
 *       memcpy(<void*>&defs.dialog_vars, <void*>state[0], sizeof(defs.DIALOG_VARS))
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd.dialog._restore_dialog_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":453
 *       a time.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             self.title = title
 *             self.prompt = prompt
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 453, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 453, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 453, __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_title = values[1];
    __pyx_v_prompt = 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, 453, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.Dialog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":454
 *       """
 *       def __init__(self, title, prompt, **kwargs):
 *             self.title = title             # <<<<<<<<<<<<<<
 *             self.prompt = prompt
 *             self.height = kwargs.pop("height", 10)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_title, __pyx_v_title) < 0) __PYX_ERR(0, 454, __pyx_L1_error)

  /* "bsd/dialog.pyx":455
 *       def __init__(self, title, prompt, **kwargs):
 *             self.title = title
 *             self.prompt = prompt             # <<<<<<<<<<<<<<
 *             self.height = kwargs.pop("height", 10)
 *             self.width = kwargs.pop("width", len(self.title) + 10)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_prompt, __pyx_v_prompt) < 0) __PYX_ERR(0, 455, __pyx_L1_error)

  /* "bsd/dialog.pyx":456
 *             self.title = title
 *             self.prompt = prompt
 *             self.height = kwargs.pop("height", 10)             # <<<<<<<<<<<<<<
 *             self.width = kwargs.pop("width", len(self.title) + 10)
 *             self._result = None
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_height, __pyx_t_2) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":457
 *             self.prompt = prompt
 *             self.height = kwargs.pop("height", 10)
 *             self.width = kwargs.pop("width", len(self.title) + 10)             # <<<<<<<<<<<<<<
 *             self._result = None
 *             _clear_dialog_state()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_4 + 10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_4 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __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_n_s_width);
  __Pyx_GIVEREF(__pyx_n_s_width);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_n_s_width);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_2) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":458
 *             self.height = kwargs.pop("height", 10)
 *             self.width = kwargs.pop("width", len(self.title) + 10)
 *             self._result = None             # <<<<<<<<<<<<<<
 *             _clear_dialog_state()
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_None) < 0) __PYX_ERR(0, 458, __pyx_L1_error)

  /* "bsd/dialog.pyx":459
 *             self.width = kwargs.pop("width", len(self.title) + 10)
 *             self._result = None
 *             _clear_dialog_state()             # <<<<<<<<<<<<<<
 * 
 *             # I'm not sure these make any sense
 */
  __pyx_t_2 = __pyx_f_3bsd_6dialog__clear_dialog_state(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":464
 *             #defs.dialog_state.input = kwargs.pop("input", defs.stdin)
 *             #defs.dialog_state.output = kwargs.pop("output", defs.stdout)
 *             defs.dialog_state.input = defs.stdin             # <<<<<<<<<<<<<<
 *             defs.dialog_state.output = defs.stdout
 * 
 */
  dialog_state.input = stdin;

  /* "bsd/dialog.pyx":465
 *             #defs.dialog_state.output = kwargs.pop("output", defs.stdout)
 *             defs.dialog_state.input = defs.stdin
 *             defs.dialog_state.output = defs.stdout             # <<<<<<<<<<<<<<
 * 
 *             self.ok_label = kwargs.pop("ok_label", None)
 */
  dialog_state.output = stdout;

  /* "bsd/dialog.pyx":467
 *             defs.dialog_state.output = defs.stdout
 * 
 *             self.ok_label = kwargs.pop("ok_label", None)             # <<<<<<<<<<<<<<
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __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_ok_label, __pyx_t_1) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":468
 * 
 *             self.ok_label = kwargs.pop("ok_label", None)
 *             self.no_label = kwargs.pop("no_label", None)             # <<<<<<<<<<<<<<
 *             self.yes_label = kwargs.pop("yes_label", None)
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_no_label, __pyx_t_2) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":469
 *             self.ok_label = kwargs.pop("ok_label", None)
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)             # <<<<<<<<<<<<<<
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __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_yes_label, __pyx_t_1) < 0) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":470
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)
 *             self.cancel_label = kwargs.pop("cancel_label", None)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cancel_label, __pyx_t_2) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":453
 *       a time.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             self.title = title
 *             self.prompt = prompt
 */

  /* 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_AddTraceback("bsd.dialog.Dialog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":472
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_3run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_3run, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_2run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_2run(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":473
 * 
 *       def run(self):
 *             return None             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":472
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":476
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_5result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_5result = {"result", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_5result, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_5result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_4result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_4result(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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("result", 0);

  /* "bsd/dialog.pyx":478
 *       def result(self):
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self._result = self.run()
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __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) {

    /* "bsd/dialog.pyx":479
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:
 *                   self._result = self.run()             # <<<<<<<<<<<<<<
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 *             if self._result == defs.DLG_EXIT_OK:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __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_result, __pyx_t_1) < 0) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":478
 *       def result(self):
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self._result = self.run()
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 */
  }

  /* "bsd/dialog.pyx":481
 *                   self._result = self.run()
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 *             if self._result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = True
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(DLG_EXIT_OK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":482
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 *             if self._result == defs.DLG_EXIT_OK:
 *                   self._result = True             # <<<<<<<<<<<<<<
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 *                   self._result = False
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_True) < 0) __PYX_ERR(0, 482, __pyx_L1_error)

    /* "bsd/dialog.pyx":481
 *                   self._result = self.run()
 *             # Translate OK->True, CANCEL->False, ESC->DialogEscape, other to DialogError
 *             if self._result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = True
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 */
    goto __pyx_L4;
  }

  /* "bsd/dialog.pyx":483
 *             if self._result == defs.DLG_EXIT_OK:
 *                   self._result = True
 *             elif self._result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = False
 *             elif self._result == defs.DLG_EXIT_ESC:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_From_int(DLG_EXIT_CANCEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":484
 *                   self._result = True
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 *                   self._result = False             # <<<<<<<<<<<<<<
 *             elif self._result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_False) < 0) __PYX_ERR(0, 484, __pyx_L1_error)

    /* "bsd/dialog.pyx":483
 *             if self._result == defs.DLG_EXIT_OK:
 *                   self._result = True
 *             elif self._result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = False
 *             elif self._result == defs.DLG_EXIT_ESC:
 */
    goto __pyx_L4;
  }

  /* "bsd/dialog.pyx":485
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 *                   self._result = False
 *             elif self._result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(DLG_EXIT_ESC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":486
 *                   self._result = False
 *             elif self._result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape             # <<<<<<<<<<<<<<
 *             else:
 *                   raise DialogError(code=self._result, message="Unknown dialog return value {}".format(self._result))
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogEscape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 486, __pyx_L1_error)

    /* "bsd/dialog.pyx":485
 *             elif self._result == defs.DLG_EXIT_CANCEL:
 *                   self._result = False
 *             elif self._result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
  }

  /* "bsd/dialog.pyx":488
 *                   raise DialogEscape
 *             else:
 *                   raise DialogError(code=self._result, message="Unknown dialog return value {}".format(self._result))             # <<<<<<<<<<<<<<
 *             return self._result
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_code, __pyx_t_1) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_dialog_return_value, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_message, __pyx_t_1) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 488, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "bsd/dialog.pyx":489
 *             else:
 *                   raise DialogError(code=self._result, message="Unknown dialog return value {}".format(self._result))
 *             return self._result             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":476
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("bsd.dialog.Dialog.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":492
 * 
 *       @property
 *       def title(self):             # <<<<<<<<<<<<<<
 *             return self._title
 *       @title.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_7title(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_7title = {"title", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_7title, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_7title(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("title (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_6title(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_6title(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("title", 0);

  /* "bsd/dialog.pyx":493
 *       @property
 *       def title(self):
 *             return self._title             # <<<<<<<<<<<<<<
 *       @title.setter
 *       def title(self, t):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":492
 * 
 *       @property
 *       def title(self):             # <<<<<<<<<<<<<<
 *             return self._title
 *       @title.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Dialog.title", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":495
 *             return self._title
 *       @title.setter
 *       def title(self, t):             # <<<<<<<<<<<<<<
 *             self._title = t
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_9title(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_9title = {"title", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_9title, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_9title(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_t = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("title (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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("title", 1, 2, 2, 1); __PYX_ERR(0, 495, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "title") < 0)) __PYX_ERR(0, 495, __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("title", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 495, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.title", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_8title(__pyx_self, __pyx_v_self, __pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_8title(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("title", 0);

  /* "bsd/dialog.pyx":496
 *       @title.setter
 *       def title(self, t):
 *             self._title = t             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_title_2, __pyx_v_t) < 0) __PYX_ERR(0, 496, __pyx_L1_error)

  /* "bsd/dialog.pyx":495
 *             return self._title
 *       @title.setter
 *       def title(self, t):             # <<<<<<<<<<<<<<
 *             self._title = t
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.title", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":499
 * 
 *       @property
 *       def prompt(self):             # <<<<<<<<<<<<<<
 *             return self._prompt
 *       @prompt.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_11prompt(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_11prompt = {"prompt", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_11prompt, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_11prompt(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prompt (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_10prompt(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_10prompt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("prompt", 0);

  /* "bsd/dialog.pyx":500
 *       @property
 *       def prompt(self):
 *             return self._prompt             # <<<<<<<<<<<<<<
 *       @prompt.setter
 *       def prompt(self, p):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":499
 * 
 *       @property
 *       def prompt(self):             # <<<<<<<<<<<<<<
 *             return self._prompt
 *       @prompt.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Dialog.prompt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":502
 *             return self._prompt
 *       @prompt.setter
 *       def prompt(self, p):             # <<<<<<<<<<<<<<
 *             self._prompt = p
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_13prompt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_13prompt = {"prompt", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_13prompt, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_13prompt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prompt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_p,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("prompt", 1, 2, 2, 1); __PYX_ERR(0, 502, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prompt") < 0)) __PYX_ERR(0, 502, __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_p = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 502, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.prompt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_12prompt(__pyx_self, __pyx_v_self, __pyx_v_p);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_12prompt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prompt", 0);

  /* "bsd/dialog.pyx":503
 *       @prompt.setter
 *       def prompt(self, p):
 *             self._prompt = p             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_prompt_2, __pyx_v_p) < 0) __PYX_ERR(0, 503, __pyx_L1_error)

  /* "bsd/dialog.pyx":502
 *             return self._prompt
 *       @prompt.setter
 *       def prompt(self, p):             # <<<<<<<<<<<<<<
 *             self._prompt = p
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.prompt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":506
 * 
 *       @property
 *       def height(self):             # <<<<<<<<<<<<<<
 *             return self._height
 *       @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_15height(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_15height = {"height", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_15height, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_15height(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("height (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_14height(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_14height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("height", 0);

  /* "bsd/dialog.pyx":507
 *       @property
 *       def height(self):
 *             return self._height             # <<<<<<<<<<<<<<
 *       @height.setter
 *       def height(self, h):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":506
 * 
 *       @property
 *       def height(self):             # <<<<<<<<<<<<<<
 *             return self._height
 *       @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Dialog.height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":509
 *             return self._height
 *       @height.setter
 *       def height(self, h):             # <<<<<<<<<<<<<<
 *             self._height = h
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_17height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_17height = {"height", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_17height, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_17height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("height (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_h,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("height", 1, 2, 2, 1); __PYX_ERR(0, 509, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "height") < 0)) __PYX_ERR(0, 509, __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_h = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("height", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 509, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_16height(__pyx_self, __pyx_v_self, __pyx_v_h);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_16height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("height", 0);

  /* "bsd/dialog.pyx":510
 *       @height.setter
 *       def height(self, h):
 *             self._height = h             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_height_2, __pyx_v_h) < 0) __PYX_ERR(0, 510, __pyx_L1_error)

  /* "bsd/dialog.pyx":509
 *             return self._height
 *       @height.setter
 *       def height(self, h):             # <<<<<<<<<<<<<<
 *             self._height = h
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":513
 * 
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_19width(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_19width = {"width", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_19width, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_19width(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_18width(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_18width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("width", 0);

  /* "bsd/dialog.pyx":514
 *       @property
 *       def width(self):
 *             return self._width             # <<<<<<<<<<<<<<
 *       @width.setter
 *       def width(self, w):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":513
 * 
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Dialog.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":516
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_21width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_21width = {"width", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_21width, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_21width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_w = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_w,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("width", 1, 2, 2, 1); __PYX_ERR(0, 516, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "width") < 0)) __PYX_ERR(0, 516, __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_w = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("width", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 516, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_20width(__pyx_self, __pyx_v_self, __pyx_v_w);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_20width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("width", 0);

  /* "bsd/dialog.pyx":517
 *       @width.setter
 *       def width(self, w):
 *             self._width = w             # <<<<<<<<<<<<<<
 * 
 *       """
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width_2, __pyx_v_w) < 0) __PYX_ERR(0, 517, __pyx_L1_error)

  /* "bsd/dialog.pyx":516
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":523
 *       """
 *       @property
 *       def ok_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_23ok_label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_23ok_label = {"ok_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_23ok_label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_23ok_label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ok_label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_22ok_label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_22ok_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  char *__pyx_v_tstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ok_label", 0);

  /* "bsd/dialog.pyx":524
 *       @property
 *       def ok_label(self):
 *             tstr = defs.dialog_vars.ok_label             # <<<<<<<<<<<<<<
 *             if tstr:
 *                   return tstr.decode('utf-8')
 */
  __pyx_t_1 = dialog_vars.ok_label;
  __pyx_v_tstr = __pyx_t_1;

  /* "bsd/dialog.pyx":525
 *       def ok_label(self):
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  __pyx_t_2 = (__pyx_v_tstr != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":526
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:
 *                   return tstr.decode('utf-8')             # <<<<<<<<<<<<<<
 *             else:
 *                   return "OK"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_tstr, 0, strlen(__pyx_v_tstr), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "bsd/dialog.pyx":525
 *       def ok_label(self):
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  }

  /* "bsd/dialog.pyx":528
 *                   return tstr.decode('utf-8')
 *             else:
 *                   return "OK"             # <<<<<<<<<<<<<<
 *       @ok_label.setter
 *       def ok_label(self, txt):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_OK);
    __pyx_r = __pyx_n_s_OK;
    goto __pyx_L0;
  }

  /* "bsd/dialog.pyx":523
 *       """
 *       @property
 *       def ok_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.ok_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":530
 *                   return "OK"
 *       @ok_label.setter
 *       def ok_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_25ok_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_25ok_label = {"ok_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_25ok_label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_25ok_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_txt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ok_label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_txt,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_txt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ok_label", 1, 2, 2, 1); __PYX_ERR(0, 530, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ok_label") < 0)) __PYX_ERR(0, 530, __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_txt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ok_label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.ok_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_24ok_label(__pyx_self, __pyx_v_self, __pyx_v_txt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_24ok_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt) {
  PyObject *__pyx_v_tmp_stupid_string = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  __Pyx_RefNannySetupContext("ok_label", 0);

  /* "bsd/dialog.pyx":531
 *       @ok_label.setter
 *       def ok_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_txt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":532
 *       def ok_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_txt, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp_stupid_string = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "bsd/dialog.pyx":533
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)             # <<<<<<<<<<<<<<
 *             else:
 *                   free(defs.dialog_vars.ok_label)
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_tmp_stupid_string); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error)
    dialog_vars.ok_label = strdup(__pyx_t_4);

    /* "bsd/dialog.pyx":531
 *       @ok_label.setter
 *       def ok_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":535
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)
 *             else:
 *                   free(defs.dialog_vars.ok_label)             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.ok_label = <char*>NULL
 * 
 */
  /*else*/ {
    free(dialog_vars.ok_label);

    /* "bsd/dialog.pyx":536
 *             else:
 *                   free(defs.dialog_vars.ok_label)
 *                   defs.dialog_vars.ok_label = <char*>NULL             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    dialog_vars.ok_label = ((char *)NULL);
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":530
 *                   return "OK"
 *       @ok_label.setter
 *       def ok_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

  /* 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_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.ok_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp_stupid_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":539
 * 
 *       @property
 *       def no_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_27no_label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_27no_label = {"no_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_27no_label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_27no_label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("no_label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_26no_label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_26no_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  char *__pyx_v_tstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("no_label", 0);

  /* "bsd/dialog.pyx":540
 *       @property
 *       def no_label(self):
 *             tstr = defs.dialog_vars.no_label             # <<<<<<<<<<<<<<
 *             if tstr:
 *                   return tstr.decode('utf-8')
 */
  __pyx_t_1 = dialog_vars.no_label;
  __pyx_v_tstr = __pyx_t_1;

  /* "bsd/dialog.pyx":541
 *       def no_label(self):
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  __pyx_t_2 = (__pyx_v_tstr != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":542
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:
 *                   return tstr.decode('utf-8')             # <<<<<<<<<<<<<<
 *             else:
 *                   return "No"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_tstr, 0, strlen(__pyx_v_tstr), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "bsd/dialog.pyx":541
 *       def no_label(self):
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  }

  /* "bsd/dialog.pyx":544
 *                   return tstr.decode('utf-8')
 *             else:
 *                   return "No"             # <<<<<<<<<<<<<<
 *       @no_label.setter
 *       def no_label(self, txt):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_No);
    __pyx_r = __pyx_n_s_No;
    goto __pyx_L0;
  }

  /* "bsd/dialog.pyx":539
 * 
 *       @property
 *       def no_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.no_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":546
 *                   return "No"
 *       @no_label.setter
 *       def no_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_29no_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_29no_label = {"no_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_29no_label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_29no_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_txt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("no_label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_txt,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_txt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("no_label", 1, 2, 2, 1); __PYX_ERR(0, 546, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "no_label") < 0)) __PYX_ERR(0, 546, __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_txt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("no_label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 546, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.no_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_28no_label(__pyx_self, __pyx_v_self, __pyx_v_txt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_28no_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt) {
  PyObject *__pyx_v_tmp_stupid_string = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  __Pyx_RefNannySetupContext("no_label", 0);

  /* "bsd/dialog.pyx":547
 *       @no_label.setter
 *       def no_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_txt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":548
 *       def no_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_txt, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp_stupid_string = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "bsd/dialog.pyx":549
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)             # <<<<<<<<<<<<<<
 *             else:
 *                   free(defs.dialog_vars.no_label)
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_tmp_stupid_string); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L1_error)
    dialog_vars.no_label = strdup(__pyx_t_4);

    /* "bsd/dialog.pyx":547
 *       @no_label.setter
 *       def no_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":551
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)
 *             else:
 *                   free(defs.dialog_vars.no_label)             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.no_label = <char*>NULL
 * 
 */
  /*else*/ {
    free(dialog_vars.no_label);

    /* "bsd/dialog.pyx":552
 *             else:
 *                   free(defs.dialog_vars.no_label)
 *                   defs.dialog_vars.no_label = <char*>NULL             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    dialog_vars.no_label = ((char *)NULL);
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":546
 *                   return "No"
 *       @no_label.setter
 *       def no_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

  /* 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_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.no_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp_stupid_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":555
 * 
 *       @property
 *       def yes_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_31yes_label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_31yes_label = {"yes_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_31yes_label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_31yes_label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("yes_label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_30yes_label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_30yes_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  char *__pyx_v_tstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("yes_label", 0);

  /* "bsd/dialog.pyx":556
 *       @property
 *       def yes_label(self):
 *             tstr = defs.dialog_vars.yes_label             # <<<<<<<<<<<<<<
 *             if tstr:
 *                   return tstr.decode('utf-8')
 */
  __pyx_t_1 = dialog_vars.yes_label;
  __pyx_v_tstr = __pyx_t_1;

  /* "bsd/dialog.pyx":557
 *       def yes_label(self):
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  __pyx_t_2 = (__pyx_v_tstr != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":558
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:
 *                   return tstr.decode('utf-8')             # <<<<<<<<<<<<<<
 *             else:
 *                   return "Yes"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_tstr, 0, strlen(__pyx_v_tstr), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "bsd/dialog.pyx":557
 *       def yes_label(self):
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  }

  /* "bsd/dialog.pyx":560
 *                   return tstr.decode('utf-8')
 *             else:
 *                   return "Yes"             # <<<<<<<<<<<<<<
 *       @yes_label.setter
 *       def yes_label(self, txt):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_Yes);
    __pyx_r = __pyx_n_s_Yes;
    goto __pyx_L0;
  }

  /* "bsd/dialog.pyx":555
 * 
 *       @property
 *       def yes_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.yes_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":562
 *                   return "Yes"
 *       @yes_label.setter
 *       def yes_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_33yes_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_33yes_label = {"yes_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_33yes_label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_33yes_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_txt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("yes_label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_txt,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_txt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("yes_label", 1, 2, 2, 1); __PYX_ERR(0, 562, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yes_label") < 0)) __PYX_ERR(0, 562, __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_txt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("yes_label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 562, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.yes_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_32yes_label(__pyx_self, __pyx_v_self, __pyx_v_txt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_32yes_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt) {
  PyObject *__pyx_v_tmp_stupid_string = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  __Pyx_RefNannySetupContext("yes_label", 0);

  /* "bsd/dialog.pyx":563
 *       @yes_label.setter
 *       def yes_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_txt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 563, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":564
 *       def yes_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_txt, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp_stupid_string = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "bsd/dialog.pyx":565
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)             # <<<<<<<<<<<<<<
 *             else:
 *                   free(defs.dialog_vars.yes_label)
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_tmp_stupid_string); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L1_error)
    dialog_vars.yes_label = strdup(__pyx_t_4);

    /* "bsd/dialog.pyx":563
 *       @yes_label.setter
 *       def yes_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":567
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)
 *             else:
 *                   free(defs.dialog_vars.yes_label)             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.yes_label = <char*>NULL
 * 
 */
  /*else*/ {
    free(dialog_vars.yes_label);

    /* "bsd/dialog.pyx":568
 *             else:
 *                   free(defs.dialog_vars.yes_label)
 *                   defs.dialog_vars.yes_label = <char*>NULL             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    dialog_vars.yes_label = ((char *)NULL);
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":562
 *                   return "Yes"
 *       @yes_label.setter
 *       def yes_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

  /* 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_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.yes_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp_stupid_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":571
 * 
 *       @property
 *       def cancel_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_35cancel_label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_35cancel_label = {"cancel_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_35cancel_label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_35cancel_label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel_label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_34cancel_label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_34cancel_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  char *__pyx_v_tstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("cancel_label", 0);

  /* "bsd/dialog.pyx":572
 *       @property
 *       def cancel_label(self):
 *             tstr = defs.dialog_vars.cancel_label             # <<<<<<<<<<<<<<
 *             if tstr:
 *                   return tstr.decode('utf-8')
 */
  __pyx_t_1 = dialog_vars.cancel_label;
  __pyx_v_tstr = __pyx_t_1;

  /* "bsd/dialog.pyx":573
 *       def cancel_label(self):
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  __pyx_t_2 = (__pyx_v_tstr != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":574
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:
 *                   return tstr.decode('utf-8')             # <<<<<<<<<<<<<<
 *             else:
 *                   return "Cancel"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_tstr, 0, strlen(__pyx_v_tstr), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "bsd/dialog.pyx":573
 *       def cancel_label(self):
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:             # <<<<<<<<<<<<<<
 *                   return tstr.decode('utf-8')
 *             else:
 */
  }

  /* "bsd/dialog.pyx":576
 *                   return tstr.decode('utf-8')
 *             else:
 *                   return "Cancel"             # <<<<<<<<<<<<<<
 *       @cancel_label.setter
 *       def cancel_label(self, txt):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_Cancel);
    __pyx_r = __pyx_n_s_Cancel;
    goto __pyx_L0;
  }

  /* "bsd/dialog.pyx":571
 * 
 *       @property
 *       def cancel_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.cancel_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":578
 *                   return "Cancel"
 *       @cancel_label.setter
 *       def cancel_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_37cancel_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_37cancel_label = {"cancel_label", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_37cancel_label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_37cancel_label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_txt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel_label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_txt,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_txt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cancel_label", 1, 2, 2, 1); __PYX_ERR(0, 578, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_label") < 0)) __PYX_ERR(0, 578, __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_txt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cancel_label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 578, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Dialog.cancel_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_36cancel_label(__pyx_self, __pyx_v_self, __pyx_v_txt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_36cancel_label(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_txt) {
  PyObject *__pyx_v_tmp_stupid_string = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  __Pyx_RefNannySetupContext("cancel_label", 0);

  /* "bsd/dialog.pyx":579
 *       @cancel_label.setter
 *       def cancel_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_txt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 579, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":580
 *       def cancel_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_txt, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp_stupid_string = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "bsd/dialog.pyx":581
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)             # <<<<<<<<<<<<<<
 *             else:
 *                   free(defs.dialog_vars.cancel_label)
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_tmp_stupid_string); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
    dialog_vars.cancel_label = strdup(__pyx_t_4);

    /* "bsd/dialog.pyx":579
 *       @cancel_label.setter
 *       def cancel_label(self, txt):
 *             if txt:             # <<<<<<<<<<<<<<
 *                   tmp_stupid_string = txt.encode('utf-8')
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":583
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)
 *             else:
 *                   free(defs.dialog_vars.cancel_label)             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.cancel_label = <char*>NULL
 * 
 */
  /*else*/ {
    free(dialog_vars.cancel_label);

    /* "bsd/dialog.pyx":584
 *             else:
 *                   free(defs.dialog_vars.cancel_label)
 *                   defs.dialog_vars.cancel_label = <char*>NULL             # <<<<<<<<<<<<<<
 * 
 *       def clear(self):
 */
    dialog_vars.cancel_label = ((char *)NULL);
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":578
 *                   return "Cancel"
 *       @cancel_label.setter
 *       def cancel_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */

  /* 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_3);
  __Pyx_AddTraceback("bsd.dialog.Dialog.cancel_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp_stupid_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":586
 *                   defs.dialog_vars.cancel_label = <char*>NULL
 * 
 *       def clear(self):             # <<<<<<<<<<<<<<
 *             defs.dlg_clear()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_39clear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_6Dialog_39clear = {"clear", (PyCFunction)__pyx_pw_3bsd_6dialog_6Dialog_39clear, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_6Dialog_39clear(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_6Dialog_38clear(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_6Dialog_38clear(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear", 0);

  /* "bsd/dialog.pyx":587
 * 
 *       def clear(self):
 *             defs.dlg_clear()             # <<<<<<<<<<<<<<
 * 
 * class YesNo(Dialog):
 */
  dlg_clear();

  /* "bsd/dialog.pyx":586
 *                   defs.dialog_vars.cancel_label = <char*>NULL
 * 
 *       def clear(self):             # <<<<<<<<<<<<<<
 *             defs.dlg_clear()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":594
 *       By default, the Yes button is selected.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5YesNo_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_5YesNo_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 594, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 594, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 594, __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_title = values[1];
    __pyx_v_prompt = 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, 594, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.YesNo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_5YesNo___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5YesNo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":595
 *       """
 *       def __init__(self, title, prompt, **kwargs):
 *             super(YesNo, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             self.default = kwargs.pop("default", False)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_YesNo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":596
 *       def __init__(self, title, prompt, **kwargs):
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __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_default, __pyx_t_1) < 0) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":594
 *       By default, the Yes button is selected.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)
 */

  /* 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("bsd.dialog.YesNo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":598
 *             self.default = kwargs.pop("default", False)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Do all the work.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_3bsd_6dialog_5YesNo_2run[] = "\n            Do all the work.\n            ";
static PyMethodDef __pyx_mdef_3bsd_6dialog_5YesNo_3run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_5YesNo_3run, METH_O, __pyx_doc_3bsd_6dialog_5YesNo_2run};
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_5YesNo_2run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  int __pyx_v_rv;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  char const *__pyx_t_9;
  char const *__pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":602
 *             Do all the work.
 *             """
 *             print("yes_label = {}, no_label = {}".format(             # <<<<<<<<<<<<<<
 *                   self.yes_label, self.no_label))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_yes_label_no_label, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/dialog.pyx":603
 *             """
 *             print("yes_label = {}, no_label = {}".format(
 *                   self.yes_label, self.no_label))             # <<<<<<<<<<<<<<
 * 
 *             if self.default:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_yes_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_no_label); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __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;
  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":605
 *                   self.yes_label, self.no_label))
 * 
 *             if self.default:             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.defaultno = False
 *             else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "bsd/dialog.pyx":606
 * 
 *             if self.default:
 *                   defs.dialog_vars.defaultno = False             # <<<<<<<<<<<<<<
 *             else:
 *                   defs.dialog_vars.defaultno = True
 */
    dialog_vars.defaultno = 0;

    /* "bsd/dialog.pyx":605
 *                   self.yes_label, self.no_label))
 * 
 *             if self.default:             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.defaultno = False
 *             else:
 */
    goto __pyx_L3;
  }

  /* "bsd/dialog.pyx":608
 *                   defs.dialog_vars.defaultno = False
 *             else:
 *                   defs.dialog_vars.defaultno = True             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.default_button = defs.DLG_EXIT_CANCEL
 * 
 */
  /*else*/ {
    dialog_vars.defaultno = 1;

    /* "bsd/dialog.pyx":609
 *             else:
 *                   defs.dialog_vars.defaultno = True
 *                   defs.dialog_vars.default_button = defs.DLG_EXIT_CANCEL             # <<<<<<<<<<<<<<
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 */
    dialog_vars.default_button = DLG_EXIT_CANCEL;
  }
  __pyx_L3:;

  /* "bsd/dialog.pyx":611
 *                   defs.dialog_vars.default_button = defs.DLG_EXIT_CANCEL
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)             # <<<<<<<<<<<<<<
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),
 *                                    self.prompt.encode("utf-8"),
 */
  init_dialog(dialog_state.input, dialog_state.output);

  /* "bsd/dialog.pyx":612
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode("utf-8"),
 *                                    self.height, self.width)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "bsd/dialog.pyx":613
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),
 *                                    self.prompt.encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width)
 *             defs.end_dialog()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __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_7, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)

  /* "bsd/dialog.pyx":614
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),
 *                                    self.prompt.encode("utf-8"),
 *                                    self.height, self.width)             # <<<<<<<<<<<<<<
 *             defs.end_dialog()
 *             return rv
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":612
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode("utf-8"),
 *                                    self.height, self.width)
 */
  __pyx_v_rv = dialog_yesno(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":615
 *                                    self.prompt.encode("utf-8"),
 *                                    self.height, self.width)
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 *             return rv
 * 
 */
  end_dialog();

  /* "bsd/dialog.pyx":616
 *                                    self.height, self.width)
 *             defs.end_dialog()
 *             return rv             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":598
 *             self.default = kwargs.pop("default", False)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Do all the work.
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd.dialog.YesNo.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":619
 * 
 *       @property
 *       def default(self):             # <<<<<<<<<<<<<<
 *             return self._default
 *       @default.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_5default(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5YesNo_5default = {"default", (PyCFunction)__pyx_pw_3bsd_6dialog_5YesNo_5default, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_5default(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_5YesNo_4default(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_4default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("default", 0);

  /* "bsd/dialog.pyx":620
 *       @property
 *       def default(self):
 *             return self._default             # <<<<<<<<<<<<<<
 *       @default.setter
 *       def default(self, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":619
 * 
 *       @property
 *       def default(self):             # <<<<<<<<<<<<<<
 *             return self._default
 *       @default.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.YesNo.default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":622
 *             return self._default
 *       @default.setter
 *       def default(self, b):             # <<<<<<<<<<<<<<
 *             self._default = b
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_7default(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5YesNo_7default = {"default", (PyCFunction)__pyx_pw_3bsd_6dialog_5YesNo_7default, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5YesNo_7default(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_b,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("default", 1, 2, 2, 1); __PYX_ERR(0, 622, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "default") < 0)) __PYX_ERR(0, 622, __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_b = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("default", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 622, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.YesNo.default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_5YesNo_6default(__pyx_self, __pyx_v_self, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5YesNo_6default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default", 0);

  /* "bsd/dialog.pyx":623
 *       @default.setter
 *       def default(self, b):
 *             self._default = b             # <<<<<<<<<<<<<<
 * 
 * class MessageBox(Dialog):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_default_2, __pyx_v_b) < 0) __PYX_ERR(0, 623, __pyx_L1_error)

  /* "bsd/dialog.pyx":622
 *             return self._default
 *       @default.setter
 *       def default(self, b):             # <<<<<<<<<<<<<<
 *             self._default = b
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.YesNo.default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":627
 * class MessageBox(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             """
 *             Display a message, with an OK button.  (Use the label if set.)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3bsd_6dialog_10MessageBox___init__[] = "\n            Display a message, with an OK button.  (Use the label if set.)\n            ";
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3bsd_6dialog_10MessageBox___init__};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 627, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 627, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 627, __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_title = values[1];
    __pyx_v_prompt = 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, 627, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.MessageBox.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":631
 *             Display a message, with an OK button.  (Use the label if set.)
 *             """
 *             super(MessageBox, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             self.label = kwargs.pop("label", None)
 *             self.wait = kwargs.pop("wait", True)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MessageBox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":632
 *             """
 *             super(MessageBox, self).__init__(title, prompt, **kwargs)
 *             self.label = kwargs.pop("label", None)             # <<<<<<<<<<<<<<
 *             self.wait = kwargs.pop("wait", True)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __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_label, __pyx_t_1) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":633
 *             super(MessageBox, self).__init__(title, prompt, **kwargs)
 *             self.label = kwargs.pop("label", None)
 *             self.wait = kwargs.pop("wait", True)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wait, __pyx_t_3) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/dialog.pyx":627
 * class MessageBox(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             """
 *             Display a message, with an OK button.  (Use the label if set.)
 */

  /* 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("bsd.dialog.MessageBox.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":636
 * 
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_3label(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_3label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_3label, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_3label(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox_2label(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_2label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":637
 *       @property
 *       def label(self):
 *             return self._label             # <<<<<<<<<<<<<<
 *       @label.setter
 *       def label(self, l):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_label_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":636
 * 
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.MessageBox.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":639
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_5label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_5label = {"label", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_5label, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_5label(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, 1); __PYX_ERR(0, 639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "label") < 0)) __PYX_ERR(0, 639, __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_l = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("label", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.MessageBox.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox_4label(__pyx_self, __pyx_v_self, __pyx_v_l);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_4label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("label", 0);

  /* "bsd/dialog.pyx":640
 *       @label.setter
 *       def label(self, l):
 *             self._label = l             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_label_2, __pyx_v_l) < 0) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "bsd/dialog.pyx":639
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.MessageBox.label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":643
 * 
 *       @property
 *       def wait(self):             # <<<<<<<<<<<<<<
 *             return self._wait
 *       @wait.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_7wait(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_7wait = {"wait", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_7wait, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_7wait(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox_6wait(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_6wait(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("wait", 0);

  /* "bsd/dialog.pyx":644
 *       @property
 *       def wait(self):
 *             return self._wait             # <<<<<<<<<<<<<<
 *       @wait.setter
 *       def wait(self, w):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wait_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":643
 * 
 *       @property
 *       def wait(self):             # <<<<<<<<<<<<<<
 *             return self._wait
 *       @wait.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.MessageBox.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":646
 *             return self._wait
 *       @wait.setter
 *       def wait(self, w):             # <<<<<<<<<<<<<<
 *             self._wait = bool(w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_9wait(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_9wait = {"wait", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_9wait, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_9wait(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_w = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_w,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wait", 1, 2, 2, 1); __PYX_ERR(0, 646, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") < 0)) __PYX_ERR(0, 646, __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_w = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wait", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 646, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.MessageBox.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox_8wait(__pyx_self, __pyx_v_self, __pyx_v_w);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_8wait(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("wait", 0);

  /* "bsd/dialog.pyx":647
 *       @wait.setter
 *       def wait(self, w):
 *             self._wait = bool(w)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_w); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wait_2, __pyx_t_2) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":646
 *             return self._wait
 *       @wait.setter
 *       def wait(self, w):             # <<<<<<<<<<<<<<
 *             self._wait = bool(w)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.MessageBox.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":649
 *             self._wait = bool(w)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if self.width is None:
 *                   self.width = len(self.title) + 10
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_11run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_10MessageBox_11run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_10MessageBox_11run, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_10MessageBox_11run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_10MessageBox_10run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_10MessageBox_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  int __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  char const *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":650
 * 
 *       def run(self):
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __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) {

    /* "bsd/dialog.pyx":651
 *       def run(self):
 *             if self.width is None:
 *                   self.width = len(self.title) + 10             # <<<<<<<<<<<<<<
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 + 10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_1) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":650
 * 
 *       def run(self):
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  }

  /* "bsd/dialog.pyx":653
 *                   self.width = len(self.title) + 10
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)             # <<<<<<<<<<<<<<
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),
 */
  init_dialog(dialog_state.input, dialog_state.output);

  /* "bsd/dialog.pyx":654
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.wait)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __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_5, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 654, __pyx_L1_error)

  /* "bsd/dialog.pyx":655
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.height, self.width, self.wait)
 *             defs.end_dialog()
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_t_5); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 655, __pyx_L1_error)

  /* "bsd/dialog.pyx":656
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.wait)             # <<<<<<<<<<<<<<
 *             defs.end_dialog()
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wait); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":654
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.wait)
 */
  __pyx_v_result = dialog_msgbox(__pyx_t_6, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":657
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.wait)
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 * 
 *             if result in (defs.DLG_EXIT_OK, defs.DLG_EXIT_CANCEL):
 */
  end_dialog();

  /* "bsd/dialog.pyx":659
 *             defs.end_dialog()
 * 
 *             if result in (defs.DLG_EXIT_OK, defs.DLG_EXIT_CANCEL):             # <<<<<<<<<<<<<<
 *                   return defs.DLG_EXIT_OK
 *             return result
 */
  switch (__pyx_v_result) {
    case DLG_EXIT_OK:
    case DLG_EXIT_CANCEL:

    /* "bsd/dialog.pyx":660
 * 
 *             if result in (defs.DLG_EXIT_OK, defs.DLG_EXIT_CANCEL):
 *                   return defs.DLG_EXIT_OK             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyInt_From_int(DLG_EXIT_OK); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "bsd/dialog.pyx":659
 *             defs.end_dialog()
 * 
 *             if result in (defs.DLG_EXIT_OK, defs.DLG_EXIT_CANCEL):             # <<<<<<<<<<<<<<
 *                   return defs.DLG_EXIT_OK
 *             return result
 */
    break;
    default: break;
  }

  /* "bsd/dialog.pyx":661
 *             if result in (defs.DLG_EXIT_OK, defs.DLG_EXIT_CANCEL):
 *                   return defs.DLG_EXIT_OK
 *             return result             # <<<<<<<<<<<<<<
 * 
 * class Menu(Dialog):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":649
 *             self._wait = bool(w)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if self.width is None:
 *                   self.width = len(self.title) + 10
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd.dialog.MessageBox.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":664
 * 
 * class Menu(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 664, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 664, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 664, __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_title = values[1];
    __pyx_v_prompt = 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, 664, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":665
 * class Menu(Dialog):
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Menu, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             # Note that these can be set later
 *             self.menu_height = kwargs.pop("menu_height", None)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":667
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 *             self.menu_height = kwargs.pop("menu_height", None)             # <<<<<<<<<<<<<<
 *             self.menu_items = kwargs.pop("menu_items", None)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __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_menu_height, __pyx_t_1) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":668
 *             # Note that these can be set later
 *             self.menu_height = kwargs.pop("menu_height", None)
 *             self.menu_items = kwargs.pop("menu_items", None)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_menu_items, __pyx_t_3) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/dialog.pyx":664
 * 
 * class Menu(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 */

  /* 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("bsd.dialog.Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":671
 * 
 *       @property
 *       def menu_height(self):             # <<<<<<<<<<<<<<
 *             return self._menu_height
 *       @menu_height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_3menu_height(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_3menu_height = {"menu_height", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_3menu_height, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_3menu_height(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_height (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_2menu_height(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_2menu_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("menu_height", 0);

  /* "bsd/dialog.pyx":672
 *       @property
 *       def menu_height(self):
 *             return self._menu_height             # <<<<<<<<<<<<<<
 *       @menu_height.setter
 *       def menu_height(self, m):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_height_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":671
 * 
 *       @property
 *       def menu_height(self):             # <<<<<<<<<<<<<<
 *             return self._menu_height
 *       @menu_height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":674
 *             return self._menu_height
 *       @menu_height.setter
 *       def menu_height(self, m):             # <<<<<<<<<<<<<<
 *             self._menu_height = m
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_5menu_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_5menu_height = {"menu_height", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_5menu_height, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_5menu_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_height (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_m,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("menu_height", 1, 2, 2, 1); __PYX_ERR(0, 674, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "menu_height") < 0)) __PYX_ERR(0, 674, __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_m = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("menu_height", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_4menu_height(__pyx_self, __pyx_v_self, __pyx_v_m);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_4menu_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_height", 0);

  /* "bsd/dialog.pyx":675
 *       @menu_height.setter
 *       def menu_height(self, m):
 *             self._menu_height = m             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_menu_height_2, __pyx_v_m) < 0) __PYX_ERR(0, 675, __pyx_L1_error)

  /* "bsd/dialog.pyx":674
 *             return self._menu_height
 *       @menu_height.setter
 *       def menu_height(self, m):             # <<<<<<<<<<<<<<
 *             self._menu_height = m
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":678
 * 
 *       @property
 *       def menu_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @menu_items.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_7menu_items(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_7menu_items = {"menu_items", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_7menu_items, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_7menu_items(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_items (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_6menu_items(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_6menu_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("menu_items", 0);

  /* "bsd/dialog.pyx":679
 *       @property
 *       def menu_items(self):
 *             return self._items             # <<<<<<<<<<<<<<
 *       @menu_items.setter
 *       def menu_items(self, i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":678
 * 
 *       @property
 *       def menu_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @menu_items.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":681
 *             return self._items
 *       @menu_items.setter
 *       def menu_items(self, i):             # <<<<<<<<<<<<<<
 *             self._items = i
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_9menu_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_9menu_items = {"menu_items", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_9menu_items, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_9menu_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_items (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_i,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("menu_items", 1, 2, 2, 1); __PYX_ERR(0, 681, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "menu_items") < 0)) __PYX_ERR(0, 681, __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_i = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("menu_items", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 681, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_8menu_items(__pyx_self, __pyx_v_self, __pyx_v_i);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_8menu_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("menu_items", 0);

  /* "bsd/dialog.pyx":682
 *       @menu_items.setter
 *       def menu_items(self, i):
 *             self._items = i             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_items, __pyx_v_i) < 0) __PYX_ERR(0, 682, __pyx_L1_error)

  /* "bsd/dialog.pyx":681
 *             return self._items
 *       @menu_items.setter
 *       def menu_items(self, i):             # <<<<<<<<<<<<<<
 *             self._items = i
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Menu.menu_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":684
 *             self._items = i
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_11run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_11run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_11run, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_11run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_10run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  DIALOG_LISTITEM *__pyx_v_list_items;
  int __pyx_v_current_item;
  PyObject *__pyx_v_indx = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_tmp_name_str = NULL;
  PyObject *__pyx_v_tmp_text_str = NULL;
  int __pyx_v_result;
  PyObject *__pyx_v_rv = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  char const *__pyx_t_10;
  Py_ssize_t __pyx_t_11;
  long __pyx_t_12;
  char const *__pyx_t_13;
  char const *__pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  char *__pyx_t_18;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":685
 * 
 *       def run(self):
 *             if not self.menu_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("Menu must have items to display")
 *             cdef defs.DIALOG_LISTITEM *list_items
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __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, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":686
 *       def run(self):
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")             # <<<<<<<<<<<<<<
 *             cdef defs.DIALOG_LISTITEM *list_items
 *             cdef int current_item = 0
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 686, __pyx_L1_error)

    /* "bsd/dialog.pyx":685
 * 
 *       def run(self):
 *             if not self.menu_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("Menu must have items to display")
 *             cdef defs.DIALOG_LISTITEM *list_items
 */
  }

  /* "bsd/dialog.pyx":688
 *                   raise ValueError("Menu must have items to display")
 *             cdef defs.DIALOG_LISTITEM *list_items
 *             cdef int current_item = 0             # <<<<<<<<<<<<<<
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.menu_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 */
  __pyx_v_current_item = 0;

  /* "bsd/dialog.pyx":690
 *             cdef int current_item = 0
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.menu_items) + 1, sizeof(defs.DIALOG_LISTITEM))             # <<<<<<<<<<<<<<
 *             if list_items == NULL:
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_list_items = ((DIALOG_LISTITEM *)calloc((__pyx_t_4 + 1), (sizeof(DIALOG_LISTITEM))));

  /* "bsd/dialog.pyx":691
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.menu_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 *             if list_items == NULL:             # <<<<<<<<<<<<<<
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))
 * 
 */
  __pyx_t_3 = ((__pyx_v_list_items == NULL) != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":692
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.menu_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 *             if list_items == NULL:
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))             # <<<<<<<<<<<<<<
 * 
 *             for indx, item in enumerate(self.menu_items):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Could_not_allocate_items_for_men, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_4 + 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __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_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 692, __pyx_L1_error)

    /* "bsd/dialog.pyx":691
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.menu_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 *             if list_items == NULL:             # <<<<<<<<<<<<<<
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))
 * 
 */
  }

  /* "bsd/dialog.pyx":694
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))
 * 
 *             for indx, item in enumerate(self.menu_items):             # <<<<<<<<<<<<<<
 *                   tmp_name_str = str(indx + 1).encode('utf-8')
 *                   tmp_text_str = item.label.encode('utf-8')
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 694, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_8))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 694, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 694, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_9(__pyx_t_8);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 694, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":695
 * 
 *             for indx, item in enumerate(self.menu_items):
 *                   tmp_name_str = str(indx + 1).encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_text_str = item.label.encode('utf-8')
 *                   list_items[indx].name = strdup(tmp_name_str)
 */
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_indx, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp_name_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":696
 *             for indx, item in enumerate(self.menu_items):
 *                   tmp_name_str = str(indx + 1).encode('utf-8')
 *                   tmp_text_str = item.label.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp_text_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":697
 *                   tmp_name_str = str(indx + 1).encode('utf-8')
 *                   tmp_text_str = item.label.encode('utf-8')
 *                   list_items[indx].name = strdup(tmp_name_str)             # <<<<<<<<<<<<<<
 *                   list_items[indx].text = strdup(tmp_text_str)
 * 
 */
    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_tmp_name_str); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).name = strdup(__pyx_t_10);

    /* "bsd/dialog.pyx":698
 *                   tmp_text_str = item.label.encode('utf-8')
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)             # <<<<<<<<<<<<<<
 * 
 *             if self.width is None:
 */
    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_tmp_text_str); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).text = strdup(__pyx_t_10);

    /* "bsd/dialog.pyx":694
 *                   raise MemoryError("Could not allocate {} items for menu".format(len(self.menu_items) + 1))
 * 
 *             for indx, item in enumerate(self.menu_items):             # <<<<<<<<<<<<<<
 *                   tmp_name_str = str(indx + 1).encode('utf-8')
 *                   tmp_text_str = item.label.encode('utf-8')
 */
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":700
 *                   list_items[indx].text = strdup(tmp_text_str)
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":701
 * 
 *             if self.width is None:
 *                   self.width = len(self.title) + 10             # <<<<<<<<<<<<<<
 * 
 *             if self.menu_height is None:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 + 10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_1) < 0) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":700
 *                   list_items[indx].text = strdup(tmp_text_str)
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  }

  /* "bsd/dialog.pyx":703
 *                   self.width = len(self.title) + 10
 * 
 *             if self.menu_height is None:             # <<<<<<<<<<<<<<
 *                   self.menu_height = len(self.menu_items)
 *             if self.menu_height > self.height:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __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) {

    /* "bsd/dialog.pyx":704
 * 
 *             if self.menu_height is None:
 *                   self.menu_height = len(self.menu_items)             # <<<<<<<<<<<<<<
 *             if self.menu_height > self.height:
 *                   self.menu_height = max(self.height - 5, 1)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_menu_height, __pyx_t_1) < 0) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":703
 *                   self.width = len(self.title) + 10
 * 
 *             if self.menu_height is None:             # <<<<<<<<<<<<<<
 *                   self.menu_height = len(self.menu_items)
 *             if self.menu_height > self.height:
 */
  }

  /* "bsd/dialog.pyx":705
 *             if self.menu_height is None:
 *                   self.menu_height = len(self.menu_items)
 *             if self.menu_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.menu_height = max(self.height - 5, 1)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":706
 *                   self.menu_height = len(self.menu_items)
 *             if self.menu_height > self.height:
 *                   self.menu_height = max(self.height - 5, 1)             # <<<<<<<<<<<<<<
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 */
    __pyx_t_12 = 1;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_3) {
      __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_5 = __pyx_t_8;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_menu_height, __pyx_t_8) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "bsd/dialog.pyx":705
 *             if self.menu_height is None:
 *                   self.menu_height = len(self.menu_items)
 *             if self.menu_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.menu_height = max(self.height - 5, 1)
 * 
 */
  }

  /* "bsd/dialog.pyx":708
 *                   self.menu_height = max(self.height - 5, 1)
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)             # <<<<<<<<<<<<<<
 *             result = defs.dlg_menu(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),
 */
  init_dialog(dialog_state.input, dialog_state.output);

  /* "bsd/dialog.pyx":709
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_menu(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.menu_height,
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_t_8); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 709, __pyx_L1_error)

  /* "bsd/dialog.pyx":710
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_menu(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width, self.menu_height,
 *                                    len(self.menu_items),
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_5); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)

  /* "bsd/dialog.pyx":711
 *             result = defs.dlg_menu(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.menu_height,             # <<<<<<<<<<<<<<
 *                                    len(self.menu_items),
 *                                    list_items,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_height); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":712
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.menu_height,
 *                                    len(self.menu_items),             # <<<<<<<<<<<<<<
 *                                    list_items,
 *                                    &current_item,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":709
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_menu(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.menu_height,
 */
  __pyx_v_result = dlg_menu(__pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_4, __pyx_v_list_items, (&__pyx_v_current_item), (&dlg_dummy_menutext));
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":716
 *                                    &current_item,
 *                                    &defs.dlg_dummy_menutext)
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 * 
 *             # current_item has the selected choice.
 */
  end_dialog();

  /* "bsd/dialog.pyx":719
 * 
 *             # current_item has the selected choice.
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   rv = list_items[current_item].text.decode('utf-8')
 *             else:
 */
  __pyx_t_3 = ((__pyx_v_result == DLG_EXIT_OK) != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":720
 *             # current_item has the selected choice.
 *             if result == defs.DLG_EXIT_OK:
 *                   rv = list_items[current_item].text.decode('utf-8')             # <<<<<<<<<<<<<<
 *             else:
 *                   rv = None
 */
    __pyx_t_18 = (__pyx_v_list_items[__pyx_v_current_item]).text;
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_18, 0, strlen(__pyx_t_18), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_v_rv = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":719
 * 
 *             # current_item has the selected choice.
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   rv = list_items[current_item].text.decode('utf-8')
 *             else:
 */
    goto __pyx_L10;
  }

  /* "bsd/dialog.pyx":722
 *                   rv = list_items[current_item].text.decode('utf-8')
 *             else:
 *                   rv = None             # <<<<<<<<<<<<<<
 * 
 *             for i in range(len(self.menu_items)):
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_rv = Py_None;
  }
  __pyx_L10:;

  /* "bsd/dialog.pyx":724
 *                   rv = None
 * 
 *             for i in range(len(self.menu_items)):             # <<<<<<<<<<<<<<
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_menu_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_4; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "bsd/dialog.pyx":725
 * 
 *             for i in range(len(self.menu_items)):
 *                   free(list_items[i].name)             # <<<<<<<<<<<<<<
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)
 */
    free((__pyx_v_list_items[__pyx_v_i]).name);

    /* "bsd/dialog.pyx":726
 *             for i in range(len(self.menu_items)):
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)             # <<<<<<<<<<<<<<
 *                   free(list_items[i].help)
 *             free(list_items)
 */
    free((__pyx_v_list_items[__pyx_v_i]).text);

    /* "bsd/dialog.pyx":727
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)             # <<<<<<<<<<<<<<
 *             free(list_items)
 * 
 */
    free((__pyx_v_list_items[__pyx_v_i]).help);
  }

  /* "bsd/dialog.pyx":728
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)
 *             free(list_items)             # <<<<<<<<<<<<<<
 * 
 *             if result == defs.DLG_EXIT_OK:
 */
  free(__pyx_v_list_items);

  /* "bsd/dialog.pyx":730
 *             free(list_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
  switch (__pyx_v_result) {
    case DLG_EXIT_OK:

    /* "bsd/dialog.pyx":731
 * 
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_v_rv) < 0) __PYX_ERR(0, 731, __pyx_L1_error)

    /* "bsd/dialog.pyx":730
 *             free(list_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
    break;

    /* "bsd/dialog.pyx":732
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    case DLG_EXIT_CANCEL:

    /* "bsd/dialog.pyx":733
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_None) < 0) __PYX_ERR(0, 733, __pyx_L1_error)

    /* "bsd/dialog.pyx":732
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    break;

    /* "bsd/dialog.pyx":734
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    case DLG_EXIT_ESC:

    /* "bsd/dialog.pyx":735
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape             # <<<<<<<<<<<<<<
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogEscape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 735, __pyx_L1_error)

    /* "bsd/dialog.pyx":734
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    break;
    default:

    /* "bsd/dialog.pyx":737
 *                   raise DialogEscape
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_code, __pyx_t_6) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_message, __pyx_kp_s_Unknown_return_value) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 737, __pyx_L1_error)
    break;
  }

  /* "bsd/dialog.pyx":684
 *             self._items = i
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd.dialog.Menu.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_indx);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_tmp_name_str);
  __Pyx_XDECREF(__pyx_v_tmp_text_str);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":740
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_13result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Menu_13result = {"result", (PyCFunction)__pyx_pw_3bsd_6dialog_4Menu_13result, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Menu_13result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Menu_12result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Menu_12result(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;
  __Pyx_RefNannySetupContext("result", 0);

  /* "bsd/dialog.pyx":741
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __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) {

    /* "bsd/dialog.pyx":742
 *       def result(self):
 *             if self._result is None:
 *                   self.run()             # <<<<<<<<<<<<<<
 *             return self._result
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __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;

    /* "bsd/dialog.pyx":741
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  }

  /* "bsd/dialog.pyx":743
 *             if self._result is None:
 *                   self.run()
 *             return self._result             # <<<<<<<<<<<<<<
 * 
 * class CheckList(Dialog):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":740
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd.dialog.Menu.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":747
 * class CheckList(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 747, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 747, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 747, __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_title = values[1];
    __pyx_v_prompt = 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, 747, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.CheckList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":748
 * 
 *       def __init__(self, title, prompt, **kwargs):
 *             super(CheckList, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *             self.list_height = kwargs.pop("list_height", None)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CheckList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":750
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 *             self.list_height = kwargs.pop("list_height", None)             # <<<<<<<<<<<<<<
 *             self.list_items = kwargs.pop("list_items", None)
 *             self._radio = False
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __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_list_height, __pyx_t_1) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":751
 * 
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)             # <<<<<<<<<<<<<<
 *             self._radio = False
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_list_items, __pyx_t_3) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/dialog.pyx":752
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)
 *             self._radio = False             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_radio, Py_False) < 0) __PYX_ERR(0, 752, __pyx_L1_error)

  /* "bsd/dialog.pyx":747
 * class CheckList(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 */

  /* 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("bsd.dialog.CheckList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":755
 * 
 *       @property
 *       def list_height(self):             # <<<<<<<<<<<<<<
 *             return self._list_height
 *       @list_height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_3list_height(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_3list_height = {"list_height", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_3list_height, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_3list_height(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_height (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_2list_height(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_2list_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("list_height", 0);

  /* "bsd/dialog.pyx":756
 *       @property
 *       def list_height(self):
 *             return self._list_height             # <<<<<<<<<<<<<<
 *       @list_height.setter
 *       def list_height(self, h):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_height_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":755
 * 
 *       @property
 *       def list_height(self):             # <<<<<<<<<<<<<<
 *             return self._list_height
 *       @list_height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":758
 *             return self._list_height
 *       @list_height.setter
 *       def list_height(self, h):             # <<<<<<<<<<<<<<
 *             self._list_height = h
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_5list_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_5list_height = {"list_height", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_5list_height, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_5list_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_height (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_h,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("list_height", 1, 2, 2, 1); __PYX_ERR(0, 758, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_height") < 0)) __PYX_ERR(0, 758, __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_h = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("list_height", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 758, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_4list_height(__pyx_self, __pyx_v_self, __pyx_v_h);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_4list_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_height", 0);

  /* "bsd/dialog.pyx":759
 *       @list_height.setter
 *       def list_height(self, h):
 *             self._list_height = h             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_list_height_2, __pyx_v_h) < 0) __PYX_ERR(0, 759, __pyx_L1_error)

  /* "bsd/dialog.pyx":758
 *             return self._list_height
 *       @list_height.setter
 *       def list_height(self, h):             # <<<<<<<<<<<<<<
 *             self._list_height = h
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":762
 * 
 *       @property
 *       def list_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @list_items.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_7list_items(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_7list_items = {"list_items", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_7list_items, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_7list_items(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_items (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_6list_items(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_6list_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("list_items", 0);

  /* "bsd/dialog.pyx":763
 *       @property
 *       def list_items(self):
 *             return self._items             # <<<<<<<<<<<<<<
 *       @list_items.setter
 *       def list_items(self, l):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":762
 * 
 *       @property
 *       def list_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @list_items.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":765
 *             return self._items
 *       @list_items.setter
 *       def list_items(self, l):             # <<<<<<<<<<<<<<
 *             self._items = l
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_9list_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_9list_items = {"list_items", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_9list_items, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_9list_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_items (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("list_items", 1, 2, 2, 1); __PYX_ERR(0, 765, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list_items") < 0)) __PYX_ERR(0, 765, __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_l = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("list_items", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 765, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_8list_items(__pyx_self, __pyx_v_self, __pyx_v_l);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_8list_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_items", 0);

  /* "bsd/dialog.pyx":766
 *       @list_items.setter
 *       def list_items(self, l):
 *             self._items = l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_items, __pyx_v_l) < 0) __PYX_ERR(0, 766, __pyx_L1_error)

  /* "bsd/dialog.pyx":765
 *             return self._items
 *       @list_items.setter
 *       def list_items(self, l):             # <<<<<<<<<<<<<<
 *             self._items = l
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.CheckList.list_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":769
 * 
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_11run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_11run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_11run, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_11run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_10run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  DIALOG_LISTITEM *__pyx_v_list_items;
  int __pyx_v_current_choice;
  PyObject *__pyx_v_indx = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_tmp_name_str = NULL;
  PyObject *__pyx_v_tmp_text_str = NULL;
  PyObject *__pyx_v_tmp_help_str = NULL;
  int __pyx_v_result;
  PyObject *__pyx_v_rv = NULL;
  Py_ssize_t __pyx_v_i;
  char *__pyx_v_tnam;
  char *__pyx_v_ttxt;
  char *__pyx_v_thlp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  char const *__pyx_t_10;
  Py_ssize_t __pyx_t_11;
  char *__pyx_t_12;
  int __pyx_t_13;
  long __pyx_t_14;
  char const *__pyx_t_15;
  char const *__pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":770
 * 
 *       def run(self):
 *             if not self.list_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("A checklist needs item to check")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __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, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":771
 *       def run(self):
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")             # <<<<<<<<<<<<<<
 * 
 *             cdef defs.DIALOG_LISTITEM *list_items;
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 771, __pyx_L1_error)

    /* "bsd/dialog.pyx":770
 * 
 *       def run(self):
 *             if not self.list_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("A checklist needs item to check")
 * 
 */
  }

  /* "bsd/dialog.pyx":774
 * 
 *             cdef defs.DIALOG_LISTITEM *list_items;
 *             cdef int current_choice = 0             # <<<<<<<<<<<<<<
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.list_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 */
  __pyx_v_current_choice = 0;

  /* "bsd/dialog.pyx":776
 *             cdef int current_choice = 0
 * 
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.list_items) + 1, sizeof(defs.DIALOG_LISTITEM))             # <<<<<<<<<<<<<<
 * 
 *             for indx, item in enumerate(self.list_items):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_list_items = ((DIALOG_LISTITEM *)calloc((__pyx_t_4 + 1), (sizeof(DIALOG_LISTITEM))));

  /* "bsd/dialog.pyx":778
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.list_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 * 
 *             for indx, item in enumerate(self.list_items):             # <<<<<<<<<<<<<<
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 778, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_6);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 778, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":779
 * 
 *             for indx, item in enumerate(self.list_items):
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_3) {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_label); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_INCREF(__pyx_kp_s__5);
      __pyx_t_5 = __pyx_kp_s__5;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp_name_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":780
 *             for indx, item in enumerate(self.list_items):
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 *                   list_items[indx].name = strdup(tmp_name_str)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_text); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_3) {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_text); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_INCREF(__pyx_kp_s__5);
      __pyx_t_5 = __pyx_kp_s__5;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp_text_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":781
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None             # <<<<<<<<<<<<<<
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_help); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_3) {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_help); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_5 = Py_None;
    }
    __Pyx_XDECREF_SET(__pyx_v_tmp_help_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":782
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 *                   list_items[indx].name = strdup(tmp_name_str)             # <<<<<<<<<<<<<<
 *                   list_items[indx].text = strdup(tmp_text_str)
 *                   list_items[indx].help = strdup(tmp_help_str) if tmp_help_str else <char*>NULL
 */
    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_tmp_name_str); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).name = strdup(__pyx_t_10);

    /* "bsd/dialog.pyx":783
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)             # <<<<<<<<<<<<<<
 *                   list_items[indx].help = strdup(tmp_help_str) if tmp_help_str else <char*>NULL
 *                   list_items[indx].state = item.state
 */
    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_tmp_text_str); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).text = strdup(__pyx_t_10);

    /* "bsd/dialog.pyx":784
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)
 *                   list_items[indx].help = strdup(tmp_help_str) if tmp_help_str else <char*>NULL             # <<<<<<<<<<<<<<
 *                   list_items[indx].state = item.state
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_tmp_help_str); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
    if (__pyx_t_3) {
      __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_tmp_help_str); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L1_error)
      __pyx_t_12 = strdup(__pyx_t_10);
    } else {
      __pyx_t_12 = ((char *)NULL);
    }
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).help = __pyx_t_12;

    /* "bsd/dialog.pyx":785
 *                   list_items[indx].text = strdup(tmp_text_str)
 *                   list_items[indx].help = strdup(tmp_help_str) if tmp_help_str else <char*>NULL
 *                   list_items[indx].state = item.state             # <<<<<<<<<<<<<<
 * 
 *             if self.width is None:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
    (__pyx_v_list_items[__pyx_t_11]).state = __pyx_t_13;

    /* "bsd/dialog.pyx":778
 *             list_items = <defs.DIALOG_LISTITEM*>calloc(len(self.list_items) + 1, sizeof(defs.DIALOG_LISTITEM))
 * 
 *             for indx, item in enumerate(self.list_items):             # <<<<<<<<<<<<<<
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":787
 *                   list_items[indx].state = item.state
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":788
 * 
 *             if self.width is None:
 *                   self.width = len(self.title) + 10             # <<<<<<<<<<<<<<
 * 
 *             if self.list_height is None:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 + 10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_1) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":787
 *                   list_items[indx].state = item.state
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  }

  /* "bsd/dialog.pyx":790
 *                   self.width = len(self.title) + 10
 * 
 *             if self.list_height is None:             # <<<<<<<<<<<<<<
 *                   self.list_height = len(self.list_items)
 *             if self.list_height > self.height:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __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) {

    /* "bsd/dialog.pyx":791
 * 
 *             if self.list_height is None:
 *                   self.list_height = len(self.list_items)             # <<<<<<<<<<<<<<
 *             if self.list_height > self.height:
 *                   self.list_height = max(self.height - 5, 1)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_list_height, __pyx_t_1) < 0) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":790
 *                   self.width = len(self.title) + 10
 * 
 *             if self.list_height is None:             # <<<<<<<<<<<<<<
 *                   self.list_height = len(self.list_items)
 *             if self.list_height > self.height:
 */
  }

  /* "bsd/dialog.pyx":792
 *             if self.list_height is None:
 *                   self.list_height = len(self.list_items)
 *             if self.list_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.list_height = max(self.height - 5, 1)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":793
 *                   self.list_height = len(self.list_items)
 *             if self.list_height > self.height:
 *                   self.list_height = max(self.height - 5, 1)             # <<<<<<<<<<<<<<
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 */
    __pyx_t_14 = 1;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_3) {
      __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = __pyx_t_6;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_list_height, __pyx_t_6) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "bsd/dialog.pyx":792
 *             if self.list_height is None:
 *                   self.list_height = len(self.list_items)
 *             if self.list_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.list_height = max(self.height - 5, 1)
 * 
 */
  }

  /* "bsd/dialog.pyx":795
 *                   self.list_height = max(self.height - 5, 1)
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)             # <<<<<<<<<<<<<<
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),
 */
  init_dialog(dialog_state.input, dialog_state.output);

  /* "bsd/dialog.pyx":796
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.list_height,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_15 = __Pyx_PyObject_AsString(__pyx_t_6); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error)

  /* "bsd/dialog.pyx":797
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.height, self.width, self.list_height,
 *                                         len(self.list_items),
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = __Pyx_PyObject_AsString(__pyx_t_5); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error)

  /* "bsd/dialog.pyx":798
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.list_height,             # <<<<<<<<<<<<<<
 *                                         len(self.list_items),
 *                                         list_items, <char*>NULL,
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_height); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":799
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.list_height,
 *                                         len(self.list_items),             # <<<<<<<<<<<<<<
 *                                         list_items, <char*>NULL,
 *                                         defs.FLAG_RADIO if self._radio else defs.FLAG_CHECK,
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":801
 *                                         len(self.list_items),
 *                                         list_items, <char*>NULL,
 *                                         defs.FLAG_RADIO if self._radio else defs.FLAG_CHECK,             # <<<<<<<<<<<<<<
 *                                         &current_choice)
 *             defs.end_dialog()
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_radio); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_3) {
    __pyx_t_19 = FLAG_RADIO;
  } else {
    __pyx_t_19 = FLAG_CHECK;
  }

  /* "bsd/dialog.pyx":796
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.list_height,
 */
  __pyx_v_result = dlg_checklist(__pyx_t_15, __pyx_t_16, __pyx_t_13, __pyx_t_17, __pyx_t_18, __pyx_t_4, __pyx_v_list_items, ((char *)NULL), __pyx_t_19, (&__pyx_v_current_choice));
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":803
 *                                         defs.FLAG_RADIO if self._radio else defs.FLAG_CHECK,
 *                                         &current_choice)
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 * 
 *             rv = []
 */
  end_dialog();

  /* "bsd/dialog.pyx":805
 *             defs.end_dialog()
 * 
 *             rv = []             # <<<<<<<<<<<<<<
 *             for i in range(len(self.list_items)):
 *                   if list_items[i].state:
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_rv = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":806
 * 
 *             rv = []
 *             for i in range(len(self.list_items)):             # <<<<<<<<<<<<<<
 *                   if list_items[i].state:
 *                         tnam = list_items[i].name
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_list_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_4; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "bsd/dialog.pyx":807
 *             rv = []
 *             for i in range(len(self.list_items)):
 *                   if list_items[i].state:             # <<<<<<<<<<<<<<
 *                         tnam = list_items[i].name
 *                         ttxt = list_items[i].text
 */
    __pyx_t_3 = ((__pyx_v_list_items[__pyx_v_i]).state != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":808
 *             for i in range(len(self.list_items)):
 *                   if list_items[i].state:
 *                         tnam = list_items[i].name             # <<<<<<<<<<<<<<
 *                         ttxt = list_items[i].text
 *                         thlp = list_items[i].help
 */
      __pyx_t_12 = (__pyx_v_list_items[__pyx_v_i]).name;
      __pyx_v_tnam = __pyx_t_12;

      /* "bsd/dialog.pyx":809
 *                   if list_items[i].state:
 *                         tnam = list_items[i].name
 *                         ttxt = list_items[i].text             # <<<<<<<<<<<<<<
 *                         thlp = list_items[i].help
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,
 */
      __pyx_t_12 = (__pyx_v_list_items[__pyx_v_i]).text;
      __pyx_v_ttxt = __pyx_t_12;

      /* "bsd/dialog.pyx":810
 *                         tnam = list_items[i].name
 *                         ttxt = list_items[i].text
 *                         thlp = list_items[i].help             # <<<<<<<<<<<<<<
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,
 *                                            ttxt.decode('utf-8') if ttxt else None,
 */
      __pyx_t_12 = (__pyx_v_list_items[__pyx_v_i]).help;
      __pyx_v_thlp = __pyx_t_12;

      /* "bsd/dialog.pyx":811
 *                         ttxt = list_items[i].text
 *                         thlp = list_items[i].help
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,             # <<<<<<<<<<<<<<
 *                                            ttxt.decode('utf-8') if ttxt else None,
 *                                            help=thlp.decode('utf-8') if thlp else None,
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ListItem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if ((__pyx_v_tnam != 0)) {
        __pyx_t_8 = __Pyx_decode_c_string(__pyx_v_tnam, 0, strlen(__pyx_v_tnam), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __pyx_t_8;
        __pyx_t_8 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_6 = Py_None;
      }

      /* "bsd/dialog.pyx":812
 *                         thlp = list_items[i].help
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,
 *                                            ttxt.decode('utf-8') if ttxt else None,             # <<<<<<<<<<<<<<
 *                                            help=thlp.decode('utf-8') if thlp else None,
 *                                            state=True))
 */
      if ((__pyx_v_ttxt != 0)) {
        __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_ttxt, 0, strlen(__pyx_v_ttxt), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __pyx_t_1;
        __pyx_t_1 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_8 = Py_None;
      }

      /* "bsd/dialog.pyx":811
 *                         ttxt = list_items[i].text
 *                         thlp = list_items[i].help
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,             # <<<<<<<<<<<<<<
 *                                            ttxt.decode('utf-8') if ttxt else None,
 *                                            help=thlp.decode('utf-8') if thlp else None,
 */
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
      __pyx_t_6 = 0;
      __pyx_t_8 = 0;

      /* "bsd/dialog.pyx":813
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,
 *                                            ttxt.decode('utf-8') if ttxt else None,
 *                                            help=thlp.decode('utf-8') if thlp else None,             # <<<<<<<<<<<<<<
 *                                            state=True))
 *                   free(list_items[i].name)
 */
      __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if ((__pyx_v_thlp != 0)) {
        __pyx_t_9 = __Pyx_decode_c_string(__pyx_v_thlp, 0, strlen(__pyx_v_thlp), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 813, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __pyx_t_9;
        __pyx_t_9 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_6 = Py_None;
      }
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_help, __pyx_t_6) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "bsd/dialog.pyx":814
 *                                            ttxt.decode('utf-8') if ttxt else None,
 *                                            help=thlp.decode('utf-8') if thlp else None,
 *                                            state=True))             # <<<<<<<<<<<<<<
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)
 */
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_state, Py_True) < 0) __PYX_ERR(0, 813, __pyx_L1_error)

      /* "bsd/dialog.pyx":811
 *                         ttxt = list_items[i].text
 *                         thlp = list_items[i].help
 *                         rv.append(ListItem(tnam.decode('utf-8') if tnam else None,             # <<<<<<<<<<<<<<
 *                                            ttxt.decode('utf-8') if ttxt else None,
 *                                            help=thlp.decode('utf-8') if thlp else None,
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __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;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_t_6); if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "bsd/dialog.pyx":807
 *             rv = []
 *             for i in range(len(self.list_items)):
 *                   if list_items[i].state:             # <<<<<<<<<<<<<<
 *                         tnam = list_items[i].name
 *                         ttxt = list_items[i].text
 */
    }

    /* "bsd/dialog.pyx":815
 *                                            help=thlp.decode('utf-8') if thlp else None,
 *                                            state=True))
 *                   free(list_items[i].name)             # <<<<<<<<<<<<<<
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)
 */
    free((__pyx_v_list_items[__pyx_v_i]).name);

    /* "bsd/dialog.pyx":816
 *                                            state=True))
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)             # <<<<<<<<<<<<<<
 *                   free(list_items[i].help)
 *             free(list_items)
 */
    free((__pyx_v_list_items[__pyx_v_i]).text);

    /* "bsd/dialog.pyx":817
 *                   free(list_items[i].name)
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)             # <<<<<<<<<<<<<<
 *             free(list_items)
 * 
 */
    free((__pyx_v_list_items[__pyx_v_i]).help);
  }

  /* "bsd/dialog.pyx":818
 *                   free(list_items[i].text)
 *                   free(list_items[i].help)
 *             free(list_items)             # <<<<<<<<<<<<<<
 * 
 *             if result == defs.DLG_EXIT_OK:
 */
  free(__pyx_v_list_items);

  /* "bsd/dialog.pyx":820
 *             free(list_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
  switch (__pyx_v_result) {
    case DLG_EXIT_OK:

    /* "bsd/dialog.pyx":821
 * 
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_v_rv) < 0) __PYX_ERR(0, 821, __pyx_L1_error)

    /* "bsd/dialog.pyx":820
 *             free(list_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
    break;

    /* "bsd/dialog.pyx":822
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    case DLG_EXIT_CANCEL:

    /* "bsd/dialog.pyx":823
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_None) < 0) __PYX_ERR(0, 823, __pyx_L1_error)

    /* "bsd/dialog.pyx":822
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    break;

    /* "bsd/dialog.pyx":824
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    case DLG_EXIT_ESC:

    /* "bsd/dialog.pyx":825
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape             # <<<<<<<<<<<<<<
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogEscape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 825, __pyx_L1_error)

    /* "bsd/dialog.pyx":824
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    break;
    default:

    /* "bsd/dialog.pyx":827
 *                   raise DialogEscape
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_code, __pyx_t_1) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_message, __pyx_kp_s_Unknown_return_value) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 827, __pyx_L1_error)
    break;
  }

  /* "bsd/dialog.pyx":769
 * 
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("bsd.dialog.CheckList.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_indx);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_tmp_name_str);
  __Pyx_XDECREF(__pyx_v_tmp_text_str);
  __Pyx_XDECREF(__pyx_v_tmp_help_str);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":830
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_13result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9CheckList_13result = {"result", (PyCFunction)__pyx_pw_3bsd_6dialog_9CheckList_13result, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9CheckList_13result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_9CheckList_12result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9CheckList_12result(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;
  __Pyx_RefNannySetupContext("result", 0);

  /* "bsd/dialog.pyx":831
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __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) {

    /* "bsd/dialog.pyx":832
 *       def result(self):
 *             if self._result is None:
 *                   self.run()             # <<<<<<<<<<<<<<
 *             return self._result
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __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;

    /* "bsd/dialog.pyx":831
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  }

  /* "bsd/dialog.pyx":833
 *             if self._result is None:
 *                   self.run()
 *             return self._result             # <<<<<<<<<<<<<<
 * 
 * class Gauge(Dialog):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":830
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd.dialog.CheckList.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":836
 * 
 * class Gauge(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 0)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5Gauge_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_5Gauge_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 836, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 836, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 836, __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_title = values[1];
    __pyx_v_prompt = 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, 836, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.Gauge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_5Gauge___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5Gauge___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":837
 * class Gauge(Dialog):
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Gauge, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             self._pct = kwargs.pop("percentage", 0)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Gauge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":838
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 0)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __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_pct, __pyx_t_1) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":836
 * 
 * class Gauge(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 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("bsd.dialog.Gauge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":841
 * 
 *       @property
 *       def percentage(self):             # <<<<<<<<<<<<<<
 *             return self._pct
 *       @percentage.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_3percentage(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5Gauge_3percentage = {"percentage", (PyCFunction)__pyx_pw_3bsd_6dialog_5Gauge_3percentage, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_3percentage(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("percentage (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_5Gauge_2percentage(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_2percentage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("percentage", 0);

  /* "bsd/dialog.pyx":842
 *       @property
 *       def percentage(self):
 *             return self._pct             # <<<<<<<<<<<<<<
 *       @percentage.setter
 *       def percentage(self, pctg):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":841
 * 
 *       @property
 *       def percentage(self):             # <<<<<<<<<<<<<<
 *             return self._pct
 *       @percentage.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Gauge.percentage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":844
 *             return self._pct
 *       @percentage.setter
 *       def percentage(self, pctg):             # <<<<<<<<<<<<<<
 *             self._pct = pctg
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_5percentage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5Gauge_5percentage = {"percentage", (PyCFunction)__pyx_pw_3bsd_6dialog_5Gauge_5percentage, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_5percentage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pctg = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("percentage (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pctg,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pctg)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("percentage", 1, 2, 2, 1); __PYX_ERR(0, 844, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "percentage") < 0)) __PYX_ERR(0, 844, __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_pctg = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("percentage", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 844, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Gauge.percentage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_5Gauge_4percentage(__pyx_self, __pyx_v_self, __pyx_v_pctg);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_4percentage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pctg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("percentage", 0);

  /* "bsd/dialog.pyx":845
 *       @percentage.setter
 *       def percentage(self, pctg):
 *             self._pct = pctg             # <<<<<<<<<<<<<<
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pct, __pyx_v_pctg) < 0) __PYX_ERR(0, 845, __pyx_L1_error)

  /* "bsd/dialog.pyx":847
 *             self._pct = pctg
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  dlg_update_gauge(__pyx_v_3bsd_6dialog_stupid_gauge, __pyx_t_2);

  /* "bsd/dialog.pyx":844
 *             return self._pct
 *       @percentage.setter
 *       def percentage(self, pctg):             # <<<<<<<<<<<<<<
 *             self._pct = pctg
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Gauge.percentage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":849
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Allocate the gauge.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_7run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_3bsd_6dialog_5Gauge_6run[] = "\n            Allocate the gauge.\n            Unlike the other classes, this one can't clean up until it's done.\n            ";
static PyMethodDef __pyx_mdef_3bsd_6dialog_5Gauge_7run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_5Gauge_7run, METH_O, __pyx_doc_3bsd_6dialog_5Gauge_6run};
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_7run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_5Gauge_6run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_6run(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;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":855
 *             """
 *             global stupid_gauge
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)             # <<<<<<<<<<<<<<
 *             # This is a hack as well
 *             defs.dialog_state.pipe_input = defs.fopen("/dev/null", "r")
 */
  init_dialog(dialog_state.input, dialog_state.output);

  /* "bsd/dialog.pyx":857
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             # This is a hack as well
 *             defs.dialog_state.pipe_input = defs.fopen("/dev/null", "r")             # <<<<<<<<<<<<<<
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),
 */
  dialog_state.pipe_input = fopen(((char const *)"/dev/null"), ((char const *)"r"));

  /* "bsd/dialog.pyx":859
 *             defs.dialog_state.pipe_input = defs.fopen("/dev/null", "r")
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                                    self.prompt.encode('utf-8'),
 *                                                    self.height, self.width, self.percentage)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 859, __pyx_L1_error)

  /* "bsd/dialog.pyx":860
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),
 *                                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                                    self.height, self.width, self.percentage)
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error)

  /* "bsd/dialog.pyx":861
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),
 *                                                    self.prompt.encode('utf-8'),
 *                                                    self.height, self.width, self.percentage)             # <<<<<<<<<<<<<<
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_percentage); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":859
 *             defs.dialog_state.pipe_input = defs.fopen("/dev/null", "r")
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                                    self.prompt.encode('utf-8'),
 *                                                    self.height, self.width, self.percentage)
 */
  __pyx_v_3bsd_6dialog_stupid_gauge = dlg_allocate_gauge(__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/dialog.pyx":862
 *                                                    self.prompt.encode('utf-8'),
 *                                                    self.height, self.width, self.percentage)
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)             # <<<<<<<<<<<<<<
 *       @property
 *       def result(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_percentage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  dlg_update_gauge(__pyx_v_3bsd_6dialog_stupid_gauge, __pyx_t_8);

  /* "bsd/dialog.pyx":849
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Allocate the gauge.
 */

  /* 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_AddTraceback("bsd.dialog.Gauge.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":864
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             global stupid_gauge
 *             if stupid_gauge:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_9result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_5Gauge_9result = {"result", (PyCFunction)__pyx_pw_3bsd_6dialog_5Gauge_9result, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_5Gauge_9result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_5Gauge_8result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_5Gauge_8result(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("result", 0);

  /* "bsd/dialog.pyx":866
 *       def result(self):
 *             global stupid_gauge
 *             if stupid_gauge:             # <<<<<<<<<<<<<<
 * #                  defs.dlg_free_gauge(<void*>self._gauge)
 * #                  self._gauge = <defs.uintptr_t>NULL
 */
  __pyx_t_1 = (__pyx_v_3bsd_6dialog_stupid_gauge != 0);
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":869
 * #                  defs.dlg_free_gauge(<void*>self._gauge)
 * #                  self._gauge = <defs.uintptr_t>NULL
 *                   defs.dlg_free_gauge(stupid_gauge)             # <<<<<<<<<<<<<<
 *                   stupid_gauge = NULL
 *             if defs.dialog_state.pipe_input:
 */
    dlg_free_gauge(__pyx_v_3bsd_6dialog_stupid_gauge);

    /* "bsd/dialog.pyx":870
 * #                  self._gauge = <defs.uintptr_t>NULL
 *                   defs.dlg_free_gauge(stupid_gauge)
 *                   stupid_gauge = NULL             # <<<<<<<<<<<<<<
 *             if defs.dialog_state.pipe_input:
 *                   #defs.fclose(defs.dialog_state.pipe_input)
 */
    __pyx_v_3bsd_6dialog_stupid_gauge = NULL;

    /* "bsd/dialog.pyx":866
 *       def result(self):
 *             global stupid_gauge
 *             if stupid_gauge:             # <<<<<<<<<<<<<<
 * #                  defs.dlg_free_gauge(<void*>self._gauge)
 * #                  self._gauge = <defs.uintptr_t>NULL
 */
  }

  /* "bsd/dialog.pyx":871
 *                   defs.dlg_free_gauge(stupid_gauge)
 *                   stupid_gauge = NULL
 *             if defs.dialog_state.pipe_input:             # <<<<<<<<<<<<<<
 *                   #defs.fclose(defs.dialog_state.pipe_input)
 *                   defs.dialog_state.pipe_input = NULL
 */
  __pyx_t_1 = (dialog_state.pipe_input != 0);
  if (__pyx_t_1) {

    /* "bsd/dialog.pyx":873
 *             if defs.dialog_state.pipe_input:
 *                   #defs.fclose(defs.dialog_state.pipe_input)
 *                   defs.dialog_state.pipe_input = NULL             # <<<<<<<<<<<<<<
 *             defs.end_dialog()
 *             return defs.DLG_EXIT_OK
 */
    dialog_state.pipe_input = NULL;

    /* "bsd/dialog.pyx":871
 *                   defs.dlg_free_gauge(stupid_gauge)
 *                   stupid_gauge = NULL
 *             if defs.dialog_state.pipe_input:             # <<<<<<<<<<<<<<
 *                   #defs.fclose(defs.dialog_state.pipe_input)
 *                   defs.dialog_state.pipe_input = NULL
 */
  }

  /* "bsd/dialog.pyx":874
 *                   #defs.fclose(defs.dialog_state.pipe_input)
 *                   defs.dialog_state.pipe_input = NULL
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 *             return defs.DLG_EXIT_OK
 * 
 */
  end_dialog();

  /* "bsd/dialog.pyx":875
 *                   defs.dialog_state.pipe_input = NULL
 *             defs.end_dialog()
 *             return defs.DLG_EXIT_OK             # <<<<<<<<<<<<<<
 * 
 * class RadioList(CheckList):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(DLG_EXIT_OK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":864
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             global stupid_gauge
 *             if stupid_gauge:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd.dialog.Gauge.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":878
 * 
 * class RadioList(CheckList):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_9RadioList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_9RadioList_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_9RadioList_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_9RadioList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 878, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 878, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 878, __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_title = values[1];
    __pyx_v_prompt = 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, 878, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.RadioList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_9RadioList___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_9RadioList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":879
 * class RadioList(CheckList):
 *       def __init__(self, title, prompt, **kwargs):
 *             super(RadioList, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             self._radio = True
 *             self.list_height = kwargs.pop("list_height", None)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RadioList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":880
 *       def __init__(self, title, prompt, **kwargs):
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True             # <<<<<<<<<<<<<<
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_radio, Py_True) < 0) __PYX_ERR(0, 880, __pyx_L1_error)

  /* "bsd/dialog.pyx":881
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 *             self.list_height = kwargs.pop("list_height", None)             # <<<<<<<<<<<<<<
 *             self.list_items = kwargs.pop("list_items", None)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __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_list_height, __pyx_t_1) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":882
 *             self._radio = True
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)             # <<<<<<<<<<<<<<
 * 
 * class Form(Dialog):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_list_items, __pyx_t_3) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/dialog.pyx":878
 * 
 * class RadioList(CheckList):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 */

  /* 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("bsd.dialog.RadioList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":885
 * 
 * class Form(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_title = 0;
  PyObject *__pyx_v_prompt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_title,&__pyx_n_s_prompt,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_title)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 885, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prompt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 885, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 885, __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_title = values[1];
    __pyx_v_prompt = 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, 885, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("bsd.dialog.Form.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form___init__(__pyx_self, __pyx_v_self, __pyx_v_title, __pyx_v_prompt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_prompt, 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "bsd/dialog.pyx":886
 * class Form(Dialog):
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Form, self).__init__(title, prompt, **kwargs)             # <<<<<<<<<<<<<<
 *             self.form_height = kwargs.pop("form_height", None)
 *             self.form_items = kwargs.pop("form_items", None)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Form); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __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(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __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_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_title);
  __Pyx_INCREF(__pyx_v_prompt);
  __Pyx_GIVEREF(__pyx_v_prompt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_prompt);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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;

  /* "bsd/dialog.pyx":887
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)             # <<<<<<<<<<<<<<
 *             self.form_items = kwargs.pop("form_items", None)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __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_form_height, __pyx_t_1) < 0) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":888
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)
 *             self.form_items = kwargs.pop("form_items", None)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_form_items, __pyx_t_3) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/dialog.pyx":885
 * 
 * class Form(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd.dialog.Form.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":891
 * 
 *       @property
 *       def form_height(self):             # <<<<<<<<<<<<<<
 *             return self._form_height
 *       @form_height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_3form_height(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_3form_height = {"form_height", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_3form_height, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_3form_height(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_height (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_2form_height(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_2form_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("form_height", 0);

  /* "bsd/dialog.pyx":892
 *       @property
 *       def form_height(self):
 *             return self._form_height             # <<<<<<<<<<<<<<
 *       @form_height.setter
 *       def form_height(self, h):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_height_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":891
 * 
 *       @property
 *       def form_height(self):             # <<<<<<<<<<<<<<
 *             return self._form_height
 *       @form_height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Form.form_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":894
 *             return self._form_height
 *       @form_height.setter
 *       def form_height(self, h):             # <<<<<<<<<<<<<<
 *             self._form_height = h
 *       @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_5form_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_5form_height = {"form_height", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_5form_height, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_5form_height(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_height (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_h,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("form_height", 1, 2, 2, 1); __PYX_ERR(0, 894, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_height") < 0)) __PYX_ERR(0, 894, __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_h = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("form_height", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 894, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Form.form_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_4form_height(__pyx_self, __pyx_v_self, __pyx_v_h);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_4form_height(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_height", 0);

  /* "bsd/dialog.pyx":895
 *       @form_height.setter
 *       def form_height(self, h):
 *             self._form_height = h             # <<<<<<<<<<<<<<
 *       @property
 *       def form_items(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_form_height_2, __pyx_v_h) < 0) __PYX_ERR(0, 895, __pyx_L1_error)

  /* "bsd/dialog.pyx":894
 *             return self._form_height
 *       @form_height.setter
 *       def form_height(self, h):             # <<<<<<<<<<<<<<
 *             self._form_height = h
 *       @property
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Form.form_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":897
 *             self._form_height = h
 *       @property
 *       def form_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @form_items.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_7form_items(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_7form_items = {"form_items", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_7form_items, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_7form_items(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_items (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_6form_items(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_6form_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("form_items", 0);

  /* "bsd/dialog.pyx":898
 *       @property
 *       def form_items(self):
 *             return self._items             # <<<<<<<<<<<<<<
 *       @form_items.setter
 *       def form_items(self, f):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":897
 *             self._form_height = h
 *       @property
 *       def form_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @form_items.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd.dialog.Form.form_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":900
 *             return self._items
 *       @form_items.setter
 *       def form_items(self, f):             # <<<<<<<<<<<<<<
 *             self._items = f
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_9form_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_9form_items = {"form_items", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_9form_items, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_9form_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_items (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_f,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("form_items", 1, 2, 2, 1); __PYX_ERR(0, 900, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_items") < 0)) __PYX_ERR(0, 900, __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_f = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("form_items", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 900, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd.dialog.Form.form_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_8form_items(__pyx_self, __pyx_v_self, __pyx_v_f);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_8form_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("form_items", 0);

  /* "bsd/dialog.pyx":901
 *       @form_items.setter
 *       def form_items(self, f):
 *             self._items = f             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_items, __pyx_v_f) < 0) __PYX_ERR(0, 901, __pyx_L1_error)

  /* "bsd/dialog.pyx":900
 *             return self._items
 *       @form_items.setter
 *       def form_items(self, f):             # <<<<<<<<<<<<<<
 *             self._items = f
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd.dialog.Form.form_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":903
 *             self._items = f
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_11run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_11run = {"run", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_11run, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_11run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_10run(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  DIALOG_FORMITEM *__pyx_v_form_items;
  DIALOG_FORMITEM *__pyx_v_packed_item;
  int __pyx_v_choice;
  struct __pyx_obj_3bsd_6dialog_FormItem *__pyx_v_fiLoopValue = 0;
  PyObject *__pyx_v_base_y = NULL;
  PyObject *__pyx_v_max_label = NULL;
  PyObject *__pyx_v_indx = NULL;
  PyObject *__pyx_v_temp_value = NULL;
  PyObject *__pyx_v_incr = NULL;
  int __pyx_v_result;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  char *__pyx_t_11;
  int __pyx_t_12;
  long __pyx_t_13;
  char const *__pyx_t_14;
  char const *__pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  __Pyx_RefNannySetupContext("run", 0);

  /* "bsd/dialog.pyx":904
 * 
 *       def run(self):
 *             if not self.form_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("Form items must contain values")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __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, 904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":905
 *       def run(self):
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")             # <<<<<<<<<<<<<<
 * 
 *             cdef defs.DIALOG_FORMITEM *form_items
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 905, __pyx_L1_error)

    /* "bsd/dialog.pyx":904
 * 
 *       def run(self):
 *             if not self.form_items:             # <<<<<<<<<<<<<<
 *                   raise ValueError("Form items must contain values")
 * 
 */
  }

  /* "bsd/dialog.pyx":913
 *             cdef FormItem fiLoopValue
 * 
 *             form_items = <defs.DIALOG_FORMITEM*>calloc(len(self.form_items) + 1, sizeof(defs.DIALOG_FORMITEM))             # <<<<<<<<<<<<<<
 * 
 *             base_y = 1
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_form_items = ((DIALOG_FORMITEM *)calloc((__pyx_t_4 + 1), (sizeof(DIALOG_FORMITEM))));

  /* "bsd/dialog.pyx":915
 *             form_items = <defs.DIALOG_FORMITEM*>calloc(len(self.form_items) + 1, sizeof(defs.DIALOG_FORMITEM))
 * 
 *             base_y = 1             # <<<<<<<<<<<<<<
 *             # We're going to cycle through the items to find the maximum label length
 *             max_label = 0
 */
  __Pyx_INCREF(__pyx_int_1);
  __pyx_v_base_y = __pyx_int_1;

  /* "bsd/dialog.pyx":917
 *             base_y = 1
 *             # We're going to cycle through the items to find the maximum label length
 *             max_label = 0             # <<<<<<<<<<<<<<
 *             for fiLoopValue in self.form_items:
 *                   if len(fiLoopValue.label.label) > max_label:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_max_label = __pyx_int_0;

  /* "bsd/dialog.pyx":918
 *             # We're going to cycle through the items to find the maximum label length
 *             max_label = 0
 *             for fiLoopValue in self.form_items:             # <<<<<<<<<<<<<<
 *                   if len(fiLoopValue.label.label) > max_label:
 *                         max_label = len(fiLoopValue.label.label)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 918, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3bsd_6dialog_FormItem))))) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fiLoopValue, ((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":919
 *             max_label = 0
 *             for fiLoopValue in self.form_items:
 *                   if len(fiLoopValue.label.label) > max_label:             # <<<<<<<<<<<<<<
 *                         max_label = len(fiLoopValue.label.label)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_fiLoopValue), __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_max_label, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":920
 *             for fiLoopValue in self.form_items:
 *                   if len(fiLoopValue.label.label) > max_label:
 *                         max_label = len(fiLoopValue.label.label)             # <<<<<<<<<<<<<<
 * 
 *             for indx, fiLoopValue in enumerate(self.form_items):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_fiLoopValue), __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_max_label, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "bsd/dialog.pyx":919
 *             max_label = 0
 *             for fiLoopValue in self.form_items:
 *                   if len(fiLoopValue.label.label) > max_label:             # <<<<<<<<<<<<<<
 *                         max_label = len(fiLoopValue.label.label)
 * 
 */
    }

    /* "bsd/dialog.pyx":918
 *             # We're going to cycle through the items to find the maximum label length
 *             max_label = 0
 *             for fiLoopValue in self.form_items:             # <<<<<<<<<<<<<<
 *                   if len(fiLoopValue.label.label) > max_label:
 *                         max_label = len(fiLoopValue.label.label)
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":922
 *                         max_label = len(fiLoopValue.label.label)
 * 
 *             for indx, fiLoopValue in enumerate(self.form_items):             # <<<<<<<<<<<<<<
 *                   temp_value = fiLoopValue.Pack()
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_5 = __pyx_int_0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 922, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 922, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 922, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_3bsd_6dialog_FormItem))))) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fiLoopValue, ((struct __pyx_obj_3bsd_6dialog_FormItem *)__pyx_t_7));
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_5);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "bsd/dialog.pyx":923
 * 
 *             for indx, fiLoopValue in enumerate(self.form_items):
 *                   temp_value = fiLoopValue.Pack()             # <<<<<<<<<<<<<<
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_fiLoopValue), __pyx_n_s_Pack); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 923, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 923, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_temp_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "bsd/dialog.pyx":924
 *             for indx, fiLoopValue in enumerate(self.form_items):
 *                   temp_value = fiLoopValue.Pack()
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value             # <<<<<<<<<<<<<<
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))
 *                   incr = 0
 */
    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_temp_value); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
    __pyx_v_packed_item = ((DIALOG_FORMITEM *)((char *)__pyx_t_11));

    /* "bsd/dialog.pyx":925
 *                   temp_value = fiLoopValue.Pack()
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))             # <<<<<<<<<<<<<<
 *                   incr = 0
 *                   if form_items[indx].name_y == 0:
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L1_error)
    memcpy(((void *)(&(__pyx_v_form_items[__pyx_t_8]))), ((void *)__pyx_v_packed_item), (sizeof(DIALOG_FORMITEM)));

    /* "bsd/dialog.pyx":926
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))
 *                   incr = 0             # <<<<<<<<<<<<<<
 *                   if form_items[indx].name_y == 0:
 *                         form_items[indx].name_y = base_y
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_XDECREF_SET(__pyx_v_incr, __pyx_int_0);

    /* "bsd/dialog.pyx":927
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))
 *                   incr = 0
 *                   if form_items[indx].name_y == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].name_y = base_y
 *                         incr = 1
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 927, __pyx_L1_error)
    __pyx_t_3 = (((__pyx_v_form_items[__pyx_t_8]).name_y == 0) != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":928
 *                   incr = 0
 *                   if form_items[indx].name_y == 0:
 *                         form_items[indx].name_y = base_y             # <<<<<<<<<<<<<<
 *                         incr = 1
 *                   if form_items[indx].text_y == 0:
 */
      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_base_y); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 928, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 928, __pyx_L1_error)
      (__pyx_v_form_items[__pyx_t_8]).name_y = __pyx_t_12;

      /* "bsd/dialog.pyx":929
 *                   if form_items[indx].name_y == 0:
 *                         form_items[indx].name_y = base_y
 *                         incr = 1             # <<<<<<<<<<<<<<
 *                   if form_items[indx].text_y == 0:
 *                         form_items[indx].text_y = base_y
 */
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_DECREF_SET(__pyx_v_incr, __pyx_int_1);

      /* "bsd/dialog.pyx":927
 *                   memcpy(<void*>&form_items[indx], <void*>packed_item, sizeof(defs.DIALOG_FORMITEM))
 *                   incr = 0
 *                   if form_items[indx].name_y == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].name_y = base_y
 *                         incr = 1
 */
    }

    /* "bsd/dialog.pyx":930
 *                         form_items[indx].name_y = base_y
 *                         incr = 1
 *                   if form_items[indx].text_y == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].text_y = base_y
 *                         incr = 1
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L1_error)
    __pyx_t_3 = (((__pyx_v_form_items[__pyx_t_8]).text_y == 0) != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":931
 *                         incr = 1
 *                   if form_items[indx].text_y == 0:
 *                         form_items[indx].text_y = base_y             # <<<<<<<<<<<<<<
 *                         incr = 1
 *                   if form_items[indx].text_x == 0:
 */
      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_base_y); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L1_error)
      (__pyx_v_form_items[__pyx_t_8]).text_y = __pyx_t_12;

      /* "bsd/dialog.pyx":932
 *                   if form_items[indx].text_y == 0:
 *                         form_items[indx].text_y = base_y
 *                         incr = 1             # <<<<<<<<<<<<<<
 *                   if form_items[indx].text_x == 0:
 *                         form_items[indx].text_x = max_label + 3
 */
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_DECREF_SET(__pyx_v_incr, __pyx_int_1);

      /* "bsd/dialog.pyx":930
 *                         form_items[indx].name_y = base_y
 *                         incr = 1
 *                   if form_items[indx].text_y == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].text_y = base_y
 *                         incr = 1
 */
    }

    /* "bsd/dialog.pyx":933
 *                         form_items[indx].text_y = base_y
 *                         incr = 1
 *                   if form_items[indx].text_x == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].text_x = max_label + 3
 *                   base_y  += incr
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L1_error)
    __pyx_t_3 = (((__pyx_v_form_items[__pyx_t_8]).text_x == 0) != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":934
 *                         incr = 1
 *                   if form_items[indx].text_x == 0:
 *                         form_items[indx].text_x = max_label + 3             # <<<<<<<<<<<<<<
 *                   base_y  += incr
 * 
 */
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_max_label, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
      (__pyx_v_form_items[__pyx_t_8]).text_x = __pyx_t_12;

      /* "bsd/dialog.pyx":933
 *                         form_items[indx].text_y = base_y
 *                         incr = 1
 *                   if form_items[indx].text_x == 0:             # <<<<<<<<<<<<<<
 *                         form_items[indx].text_x = max_label + 3
 *                   base_y  += incr
 */
    }

    /* "bsd/dialog.pyx":935
 *                   if form_items[indx].text_x == 0:
 *                         form_items[indx].text_x = max_label + 3
 *                   base_y  += incr             # <<<<<<<<<<<<<<
 * 
 *             if self.width is None:
 */
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_base_y, __pyx_v_incr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_base_y, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "bsd/dialog.pyx":922
 *                         max_label = len(fiLoopValue.label.label)
 * 
 *             for indx, fiLoopValue in enumerate(self.form_items):             # <<<<<<<<<<<<<<
 *                   temp_value = fiLoopValue.Pack()
 *                   packed_item = <defs.DIALOG_FORMITEM*><char*>temp_value
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":937
 *                   base_y  += incr
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = (__pyx_t_5 == Py_None);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "bsd/dialog.pyx":938
 * 
 *             if self.width is None:
 *                   self.width = len(self.title) + 10             # <<<<<<<<<<<<<<
 * 
 *             if self.form_height is None:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_4 + 10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_width, __pyx_t_5) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":937
 *                   base_y  += incr
 * 
 *             if self.width is None:             # <<<<<<<<<<<<<<
 *                   self.width = len(self.title) + 10
 * 
 */
  }

  /* "bsd/dialog.pyx":940
 *                   self.width = len(self.title) + 10
 * 
 *             if self.form_height is None:             # <<<<<<<<<<<<<<
 *                   self.form_height = len(self.form_items)
 *             if self.form_height > self.height:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = (__pyx_t_5 == Py_None);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":941
 * 
 *             if self.form_height is None:
 *                   self.form_height = len(self.form_items)             # <<<<<<<<<<<<<<
 *             if self.form_height > self.height:
 *                   self.form_height = max(self.height - 5, 1)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_form_height, __pyx_t_5) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "bsd/dialog.pyx":940
 *                   self.width = len(self.title) + 10
 * 
 *             if self.form_height is None:             # <<<<<<<<<<<<<<
 *                   self.form_height = len(self.form_items)
 *             if self.form_height > self.height:
 */
  }

  /* "bsd/dialog.pyx":942
 *             if self.form_height is None:
 *                   self.form_height = len(self.form_items)
 *             if self.form_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.form_height = max(self.height - 5, 1)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_3) {

    /* "bsd/dialog.pyx":943
 *                   self.form_height = len(self.form_items)
 *             if self.form_height > self.height:
 *                   self.form_height = max(self.height - 5, 1)             # <<<<<<<<<<<<<<
 * 
 *             defs.init_dialog(defs.stdin, defs.stdout)
 */
    __pyx_t_13 = 1;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_3) {
      __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __pyx_t_9;
      __pyx_t_9 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = __pyx_t_1;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __pyx_t_7;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_form_height, __pyx_t_1) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/dialog.pyx":942
 *             if self.form_height is None:
 *                   self.form_height = len(self.form_items)
 *             if self.form_height > self.height:             # <<<<<<<<<<<<<<
 *                   self.form_height = max(self.height - 5, 1)
 * 
 */
  }

  /* "bsd/dialog.pyx":945
 *                   self.form_height = max(self.height - 5, 1)
 * 
 *             defs.init_dialog(defs.stdin, defs.stdout)             # <<<<<<<<<<<<<<
 *             defs.dlg_put_backtitle()
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 */
  init_dialog(stdin, stdout);

  /* "bsd/dialog.pyx":946
 * 
 *             defs.init_dialog(defs.stdin, defs.stdout)
 *             defs.dlg_put_backtitle()             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 */
  dlg_put_backtitle();

  /* "bsd/dialog.pyx":947
 *             defs.init_dialog(defs.stdin, defs.stdout)
 *             defs.dlg_put_backtitle()
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formfield_TAB_FORM_NEXT, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_7); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":948
 *             defs.dlg_put_backtitle()
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formfield_DOWN_FORM_NEXT, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":949
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formfield_UP_FORM_PREV, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_7); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":950
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formbox_TAB_FORM_NEXT, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":951
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 *             defs.dialog_state.visit_items = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formbox_DOWN_FORM_NEXT, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_7); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":952
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dialog_state.visit_items = True
 *             defs.dialog_state.visit_cols = 1
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_formbox_UP_FORM_PREV, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
  dlg_parse_bindkey(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":953
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 *             defs.dialog_state.visit_items = True             # <<<<<<<<<<<<<<
 *             defs.dialog_state.visit_cols = 1
 *             defs.dialog_vars.insecure = 1
 */
  dialog_state.visit_items = 1;

  /* "bsd/dialog.pyx":954
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 *             defs.dialog_state.visit_items = True
 *             defs.dialog_state.visit_cols = 1             # <<<<<<<<<<<<<<
 *             defs.dialog_vars.insecure = 1
 *             defs.dialog_vars.default_button = -1
 */
  dialog_state.visit_cols = 1;

  /* "bsd/dialog.pyx":955
 *             defs.dialog_state.visit_items = True
 *             defs.dialog_state.visit_cols = 1
 *             defs.dialog_vars.insecure = 1             # <<<<<<<<<<<<<<
 *             defs.dialog_vars.default_button = -1
 * 
 */
  dialog_vars.insecure = 1;

  /* "bsd/dialog.pyx":956
 *             defs.dialog_state.visit_cols = 1
 *             defs.dialog_vars.insecure = 1
 *             defs.dialog_vars.default_button = -1             # <<<<<<<<<<<<<<
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),
 */
  dialog_vars.default_button = -1;

  /* "bsd/dialog.pyx":958
 *             defs.dialog_vars.default_button = -1
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.form_height,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error)

  /* "bsd/dialog.pyx":959
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width, self.form_height,
 *                                    len(self.form_items),
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prompt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_15 = __Pyx_PyObject_AsString(__pyx_t_7); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)

  /* "bsd/dialog.pyx":960
 *             result = defs.dlg_form(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.form_height,             # <<<<<<<<<<<<<<
 *                                    len(self.form_items),
 *                                    form_items, &choice)
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_height); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_width); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_height); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "bsd/dialog.pyx":961
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.form_height,
 *                                    len(self.form_items),             # <<<<<<<<<<<<<<
 *                                    form_items, &choice)
 *             defs.end_dialog()
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "bsd/dialog.pyx":958
 *             defs.dialog_vars.default_button = -1
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.form_height,
 */
  __pyx_v_result = dlg_form(__pyx_t_14, __pyx_t_15, __pyx_t_12, __pyx_t_16, __pyx_t_17, __pyx_t_4, __pyx_v_form_items, (&__pyx_v_choice));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":963
 *                                    len(self.form_items),
 *                                    form_items, &choice)
 *             defs.end_dialog()             # <<<<<<<<<<<<<<
 * 
 *             rv = []
 */
  end_dialog();

  /* "bsd/dialog.pyx":965
 *             defs.end_dialog()
 * 
 *             rv = []             # <<<<<<<<<<<<<<
 *             for indx in range(len(self.form_items)):
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_rv = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":966
 * 
 *             rv = []
 *             for indx in range(len(self.form_items)):             # <<<<<<<<<<<<<<
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 *                   if form_items[indx].name_free:
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_form_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 966, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "bsd/dialog.pyx":967
 *             rv = []
 *             for indx in range(len(self.form_items)):
 *                   rv.append(UnpackFormItem(&form_items[indx]))             # <<<<<<<<<<<<<<
 *                   if form_items[indx].name_free:
 *                         free(form_items[indx].name)
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_3bsd_6dialog_UnpackFormItem((&(__pyx_v_form_items[__pyx_t_8]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_t_7); if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "bsd/dialog.pyx":968
 *             for indx in range(len(self.form_items)):
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 *                   if form_items[indx].name_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].name)
 *                   if form_items[indx].text_free:
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_v_form_items[__pyx_t_8]).name_free != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":969
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 *                   if form_items[indx].name_free:
 *                         free(form_items[indx].name)             # <<<<<<<<<<<<<<
 *                   if form_items[indx].text_free:
 *                         free(form_items[indx].text)
 */
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L1_error)
      free((__pyx_v_form_items[__pyx_t_8]).name);

      /* "bsd/dialog.pyx":968
 *             for indx in range(len(self.form_items)):
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 *                   if form_items[indx].name_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].name)
 *                   if form_items[indx].text_free:
 */
    }

    /* "bsd/dialog.pyx":970
 *                   if form_items[indx].name_free:
 *                         free(form_items[indx].name)
 *                   if form_items[indx].text_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].text)
 *                   if form_items[indx].help and form_items[indx].help_free:
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_v_form_items[__pyx_t_8]).text_free != 0);
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":971
 *                         free(form_items[indx].name)
 *                   if form_items[indx].text_free:
 *                         free(form_items[indx].text)             # <<<<<<<<<<<<<<
 *                   if form_items[indx].help and form_items[indx].help_free:
 *                         free(form_items[indx].help)
 */
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 971, __pyx_L1_error)
      free((__pyx_v_form_items[__pyx_t_8]).text);

      /* "bsd/dialog.pyx":970
 *                   if form_items[indx].name_free:
 *                         free(form_items[indx].name)
 *                   if form_items[indx].text_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].text)
 *                   if form_items[indx].help and form_items[indx].help_free:
 */
    }

    /* "bsd/dialog.pyx":972
 *                   if form_items[indx].text_free:
 *                         free(form_items[indx].text)
 *                   if form_items[indx].help and form_items[indx].help_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].help)
 * 
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_form_items[__pyx_t_8]).help != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_form_items[__pyx_t_8]).help_free != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_3) {

      /* "bsd/dialog.pyx":973
 *                         free(form_items[indx].text)
 *                   if form_items[indx].help and form_items[indx].help_free:
 *                         free(form_items[indx].help)             # <<<<<<<<<<<<<<
 * 
 *             free(form_items)
 */
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_indx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error)
      free((__pyx_v_form_items[__pyx_t_8]).help);

      /* "bsd/dialog.pyx":972
 *                   if form_items[indx].text_free:
 *                         free(form_items[indx].text)
 *                   if form_items[indx].help and form_items[indx].help_free:             # <<<<<<<<<<<<<<
 *                         free(form_items[indx].help)
 * 
 */
    }

    /* "bsd/dialog.pyx":966
 * 
 *             rv = []
 *             for indx in range(len(self.form_items)):             # <<<<<<<<<<<<<<
 *                   rv.append(UnpackFormItem(&form_items[indx]))
 *                   if form_items[indx].name_free:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":975
 *                         free(form_items[indx].help)
 * 
 *             free(form_items)             # <<<<<<<<<<<<<<
 * 
 *             if result == defs.DLG_EXIT_OK:
 */
  free(__pyx_v_form_items);

  /* "bsd/dialog.pyx":977
 *             free(form_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
  switch (__pyx_v_result) {
    case DLG_EXIT_OK:

    /* "bsd/dialog.pyx":978
 * 
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_v_rv) < 0) __PYX_ERR(0, 978, __pyx_L1_error)

    /* "bsd/dialog.pyx":977
 *             free(form_items)
 * 
 *             if result == defs.DLG_EXIT_OK:             # <<<<<<<<<<<<<<
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 */
    break;

    /* "bsd/dialog.pyx":979
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    case DLG_EXIT_CANCEL:

    /* "bsd/dialog.pyx":980
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None             # <<<<<<<<<<<<<<
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, Py_None) < 0) __PYX_ERR(0, 980, __pyx_L1_error)

    /* "bsd/dialog.pyx":979
 *             if result == defs.DLG_EXIT_OK:
 *                   self._result = rv
 *             elif result == defs.DLG_EXIT_CANCEL:             # <<<<<<<<<<<<<<
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 */
    break;

    /* "bsd/dialog.pyx":981
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    case DLG_EXIT_ESC:

    /* "bsd/dialog.pyx":982
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:
 *                   raise DialogEscape             # <<<<<<<<<<<<<<
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogEscape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 982, __pyx_L1_error)

    /* "bsd/dialog.pyx":981
 *             elif result == defs.DLG_EXIT_CANCEL:
 *                   self._result = None
 *             elif result == defs.DLG_EXIT_ESC:             # <<<<<<<<<<<<<<
 *                   raise DialogEscape
 *             else:
 */
    break;
    default:

    /* "bsd/dialog.pyx":984
 *                   raise DialogEscape
 *             else:
 *                   raise DialogError(code=result, message="Unknown return value")             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_code, __pyx_t_9) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_message, __pyx_kp_s_Unknown_return_value) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __PYX_ERR(0, 984, __pyx_L1_error)
    break;
  }

  /* "bsd/dialog.pyx":903
 *             self._items = f
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("bsd.dialog.Form.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fiLoopValue);
  __Pyx_XDECREF(__pyx_v_base_y);
  __Pyx_XDECREF(__pyx_v_max_label);
  __Pyx_XDECREF(__pyx_v_indx);
  __Pyx_XDECREF(__pyx_v_temp_value);
  __Pyx_XDECREF(__pyx_v_incr);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/dialog.pyx":987
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_6dialog_4Form_13result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_6dialog_4Form_13result = {"result", (PyCFunction)__pyx_pw_3bsd_6dialog_4Form_13result, METH_O, 0};
static PyObject *__pyx_pw_3bsd_6dialog_4Form_13result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_6dialog_4Form_12result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_6dialog_4Form_12result(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;
  __Pyx_RefNannySetupContext("result", 0);

  /* "bsd/dialog.pyx":988
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __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) {

    /* "bsd/dialog.pyx":989
 *       def result(self):
 *             if self._result is None:
 *                   self.run()             # <<<<<<<<<<<<<<
 *             return self._result
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __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;

    /* "bsd/dialog.pyx":988
 *       @property
 *       def result(self):
 *             if self._result is None:             # <<<<<<<<<<<<<<
 *                   self.run()
 *             return self._result
 */
  }

  /* "bsd/dialog.pyx":990
 *             if self._result is None:
 *                   self.run()
 *             return self._result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/dialog.pyx":987
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd.dialog.Form.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_3bsd_6dialog_FormItem __pyx_vtable_3bsd_6dialog_FormItem;

static PyObject *__pyx_tp_new_3bsd_6dialog_FormItem(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3bsd_6dialog_FormItem *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3bsd_6dialog_FormItem *)o);
  p->__pyx_vtab = __pyx_vtabptr_3bsd_6dialog_FormItem;
  p->_label = Py_None; Py_INCREF(Py_None);
  p->_value = Py_None; Py_INCREF(Py_None);
  p->_help = Py_None; Py_INCREF(Py_None);
  p->_hidden = Py_None; Py_INCREF(Py_None);
  p->_readonly = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3bsd_6dialog_FormItem(PyObject *o) {
  struct __pyx_obj_3bsd_6dialog_FormItem *p = (struct __pyx_obj_3bsd_6dialog_FormItem *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_label);
  Py_CLEAR(p->_value);
  Py_CLEAR(p->_help);
  Py_CLEAR(p->_hidden);
  Py_CLEAR(p->_readonly);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_3bsd_6dialog_FormItem(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_6dialog_FormItem *p = (struct __pyx_obj_3bsd_6dialog_FormItem *)o;
  if (p->_label) {
    e = (*v)(p->_label, a); if (e) return e;
  }
  if (p->_value) {
    e = (*v)(p->_value, a); if (e) return e;
  }
  if (p->_help) {
    e = (*v)(p->_help, a); if (e) return e;
  }
  if (p->_hidden) {
    e = (*v)(p->_hidden, a); if (e) return e;
  }
  if (p->_readonly) {
    e = (*v)(p->_readonly, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_6dialog_FormItem(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_6dialog_FormItem *p = (struct __pyx_obj_3bsd_6dialog_FormItem *)o;
  tmp = ((PyObject*)p->_label);
  p->_label = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_value);
  p->_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_help);
  p->_help = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_hidden);
  p->_hidden = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_readonly);
  p->_readonly = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3bsd_6dialog_8FormItem_label(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_6dialog_8FormItem_5label_1__get__(o);
}

static int __pyx_setprop_3bsd_6dialog_8FormItem_label(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3bsd_6dialog_8FormItem_5label_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_3bsd_6dialog_8FormItem_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_6dialog_8FormItem_5value_1__get__(o);
}

static int __pyx_setprop_3bsd_6dialog_8FormItem_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3bsd_6dialog_8FormItem_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_3bsd_6dialog_8FormItem_help(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_6dialog_8FormItem_4help_1__get__(o);
}

static int __pyx_setprop_3bsd_6dialog_8FormItem_help(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3bsd_6dialog_8FormItem_4help_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_3bsd_6dialog_8FormItem_hidden(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_6dialog_8FormItem_6hidden_1__get__(o);
}

static int __pyx_setprop_3bsd_6dialog_8FormItem_hidden(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3bsd_6dialog_8FormItem_6hidden_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_3bsd_6dialog_8FormItem_readonly(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_6dialog_8FormItem_8readonly_1__get__(o);
}

static int __pyx_setprop_3bsd_6dialog_8FormItem_readonly(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3bsd_6dialog_8FormItem_8readonly_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_3bsd_6dialog_FormItem[] = {
  {"Pack", (PyCFunction)__pyx_pw_3bsd_6dialog_8FormItem_7Pack, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_6dialog_FormItem[] = {
  {(char *)"label", __pyx_getprop_3bsd_6dialog_8FormItem_label, __pyx_setprop_3bsd_6dialog_8FormItem_label, (char *)0, 0},
  {(char *)"value", __pyx_getprop_3bsd_6dialog_8FormItem_value, __pyx_setprop_3bsd_6dialog_8FormItem_value, (char *)0, 0},
  {(char *)"help", __pyx_getprop_3bsd_6dialog_8FormItem_help, __pyx_setprop_3bsd_6dialog_8FormItem_help, (char *)0, 0},
  {(char *)"hidden", __pyx_getprop_3bsd_6dialog_8FormItem_hidden, __pyx_setprop_3bsd_6dialog_8FormItem_hidden, (char *)0, 0},
  {(char *)"readonly", __pyx_getprop_3bsd_6dialog_8FormItem_readonly, __pyx_setprop_3bsd_6dialog_8FormItem_readonly, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_6dialog_FormItem = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd.dialog.FormItem", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_6dialog_FormItem), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_6dialog_FormItem, /*tp_dealloc*/
  0, /*tp_print*/
  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
  __pyx_pw_3bsd_6dialog_8FormItem_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3bsd_6dialog_8FormItem_3__str__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n      Item for a form (this includes password forms).\n      A form item consists of a label and input field (see the\n      appropriate classes above), as well as some optional\n      flag fields.\n\n      If the coordinates for the label and input fields are not\n      specified (the object returns None), then the code will\n      attempt to figure out a good location for them.  If they\n      are specified, then those values will be used.  You should\n      not mix, as the code isn't that smart:  the items are put\n      at a progressively higher location, and the X location for\n      input fields is based on the largest width of the label.\n      ", /*tp_doc*/
  __pyx_tp_traverse_3bsd_6dialog_FormItem, /*tp_traverse*/
  __pyx_tp_clear_3bsd_6dialog_FormItem, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_6dialog_FormItem, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_6dialog_FormItem, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3bsd_6dialog_8FormItem_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_6dialog_FormItem, /*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
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "dialog",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_A_checklist_needs_item_to_check, __pyx_k_A_checklist_needs_item_to_check, sizeof(__pyx_k_A_checklist_needs_item_to_check), 0, 0, 1, 0},
  {&__pyx_kp_s_A_wrapper_object_for_checklists, __pyx_k_A_wrapper_object_for_checklists, sizeof(__pyx_k_A_wrapper_object_for_checklists), 0, 0, 1, 0},
  {&__pyx_kp_s_A_wrapper_object_for_form_input, __pyx_k_A_wrapper_object_for_form_input, sizeof(__pyx_k_A_wrapper_object_for_form_input), 0, 0, 1, 0},
  {&__pyx_kp_s_A_wrapper_object_for_form_label, __pyx_k_A_wrapper_object_for_form_label, sizeof(__pyx_k_A_wrapper_object_for_form_label), 0, 0, 1, 0},
  {&__pyx_n_s_Cancel, __pyx_k_Cancel, sizeof(__pyx_k_Cancel), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList, __pyx_k_CheckList, sizeof(__pyx_k_CheckList), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList___init, __pyx_k_CheckList___init, sizeof(__pyx_k_CheckList___init), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList_list_height, __pyx_k_CheckList_list_height, sizeof(__pyx_k_CheckList_list_height), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList_list_items, __pyx_k_CheckList_list_items, sizeof(__pyx_k_CheckList_list_items), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList_result, __pyx_k_CheckList_result, sizeof(__pyx_k_CheckList_result), 0, 0, 1, 1},
  {&__pyx_n_s_CheckList_run, __pyx_k_CheckList_run, sizeof(__pyx_k_CheckList_run), 0, 0, 1, 1},
  {&__pyx_kp_s_Could_not_allocate_items_for_men, __pyx_k_Could_not_allocate_items_for_men, sizeof(__pyx_k_Could_not_allocate_items_for_men), 0, 0, 1, 0},
  {&__pyx_n_s_Dialog, __pyx_k_Dialog, sizeof(__pyx_k_Dialog), 0, 0, 1, 1},
  {&__pyx_n_s_DialogError, __pyx_k_DialogError, sizeof(__pyx_k_DialogError), 0, 0, 1, 1},
  {&__pyx_n_s_DialogError___init, __pyx_k_DialogError___init, sizeof(__pyx_k_DialogError___init), 0, 0, 1, 1},
  {&__pyx_n_s_DialogError___str, __pyx_k_DialogError___str, sizeof(__pyx_k_DialogError___str), 0, 0, 1, 1},
  {&__pyx_kp_s_DialogError_code_message, __pyx_k_DialogError_code_message, sizeof(__pyx_k_DialogError_code_message), 0, 0, 1, 0},
  {&__pyx_n_s_DialogEscape, __pyx_k_DialogEscape, sizeof(__pyx_k_DialogEscape), 0, 0, 1, 1},
  {&__pyx_kp_s_DialogEscape_2, __pyx_k_DialogEscape_2, sizeof(__pyx_k_DialogEscape_2), 0, 0, 1, 0},
  {&__pyx_n_s_DialogEscape___init, __pyx_k_DialogEscape___init, sizeof(__pyx_k_DialogEscape___init), 0, 0, 1, 1},
  {&__pyx_n_s_DialogEscape___str, __pyx_k_DialogEscape___str, sizeof(__pyx_k_DialogEscape___str), 0, 0, 1, 1},
  {&__pyx_n_s_DialogType, __pyx_k_DialogType, sizeof(__pyx_k_DialogType), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog___init, __pyx_k_Dialog___init, sizeof(__pyx_k_Dialog___init), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_cancel_label, __pyx_k_Dialog_cancel_label, sizeof(__pyx_k_Dialog_cancel_label), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_clear, __pyx_k_Dialog_clear, sizeof(__pyx_k_Dialog_clear), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_height, __pyx_k_Dialog_height, sizeof(__pyx_k_Dialog_height), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_no_label, __pyx_k_Dialog_no_label, sizeof(__pyx_k_Dialog_no_label), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_ok_label, __pyx_k_Dialog_ok_label, sizeof(__pyx_k_Dialog_ok_label), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_prompt, __pyx_k_Dialog_prompt, sizeof(__pyx_k_Dialog_prompt), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_result, __pyx_k_Dialog_result, sizeof(__pyx_k_Dialog_result), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_run, __pyx_k_Dialog_run, sizeof(__pyx_k_Dialog_run), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_title, __pyx_k_Dialog_title, sizeof(__pyx_k_Dialog_title), 0, 0, 1, 1},
  {&__pyx_n_s_Dialog_width, __pyx_k_Dialog_width, sizeof(__pyx_k_Dialog_width), 0, 0, 1, 1},
  {&__pyx_kp_s_Dialog_window_with_two_options, __pyx_k_Dialog_window_with_two_options, sizeof(__pyx_k_Dialog_window_with_two_options), 0, 0, 1, 0},
  {&__pyx_n_s_Dialog_yes_label, __pyx_k_Dialog_yes_label, sizeof(__pyx_k_Dialog_yes_label), 0, 0, 1, 1},
  {&__pyx_kp_s_Escape_out_of_dialog, __pyx_k_Escape_out_of_dialog, sizeof(__pyx_k_Escape_out_of_dialog), 0, 0, 1, 0},
  {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
  {&__pyx_n_s_Form, __pyx_k_Form, sizeof(__pyx_k_Form), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput, __pyx_k_FormInput, sizeof(__pyx_k_FormInput), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput___init, __pyx_k_FormInput___init, sizeof(__pyx_k_FormInput___init), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput___repr, __pyx_k_FormInput___repr, sizeof(__pyx_k_FormInput___repr), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput___str, __pyx_k_FormInput___str, sizeof(__pyx_k_FormInput___str), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput_hidden, __pyx_k_FormInput_hidden, sizeof(__pyx_k_FormInput_hidden), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput_maximum_input, __pyx_k_FormInput_maximum_input, sizeof(__pyx_k_FormInput_maximum_input), 0, 0, 1, 1},
  {&__pyx_n_s_FormInput_value, __pyx_k_FormInput_value, sizeof(__pyx_k_FormInput_value), 0, 0, 1, 1},
  {&__pyx_kp_s_FormInput_value_width_position, __pyx_k_FormInput_value_width_position, sizeof(__pyx_k_FormInput_value_width_position), 0, 0, 1, 0},
  {&__pyx_kp_s_FormInput_width_position_maximum, __pyx_k_FormInput_width_position_maximum, sizeof(__pyx_k_FormInput_width_position_maximum), 0, 0, 1, 0},
  {&__pyx_kp_s_FormItem_label_value_help_hidde, __pyx_k_FormItem_label_value_help_hidde, sizeof(__pyx_k_FormItem_label_value_help_hidde), 0, 0, 1, 0},
  {&__pyx_kp_s_FormItem_value_hidden_readonly, __pyx_k_FormItem_value_hidden_readonly, sizeof(__pyx_k_FormItem_value_hidden_readonly), 0, 0, 1, 0},
  {&__pyx_n_s_FormLabel, __pyx_k_FormLabel, sizeof(__pyx_k_FormLabel), 0, 0, 1, 1},
  {&__pyx_n_s_FormLabel___init, __pyx_k_FormLabel___init, sizeof(__pyx_k_FormLabel___init), 0, 0, 1, 1},
  {&__pyx_n_s_FormLabel___repr, __pyx_k_FormLabel___repr, sizeof(__pyx_k_FormLabel___repr), 0, 0, 1, 1},
  {&__pyx_n_s_FormLabel___str, __pyx_k_FormLabel___str, sizeof(__pyx_k_FormLabel___str), 0, 0, 1, 1},
  {&__pyx_n_s_FormLabel_label, __pyx_k_FormLabel_label, sizeof(__pyx_k_FormLabel_label), 0, 0, 1, 1},
  {&__pyx_kp_s_FormLabel_label_width_position, __pyx_k_FormLabel_label_width_position, sizeof(__pyx_k_FormLabel_label_width_position), 0, 0, 1, 0},
  {&__pyx_n_s_FormLabel_position, __pyx_k_FormLabel_position, sizeof(__pyx_k_FormLabel_position), 0, 0, 1, 1},
  {&__pyx_n_s_FormLabel_width, __pyx_k_FormLabel_width, sizeof(__pyx_k_FormLabel_width), 0, 0, 1, 1},
  {&__pyx_kp_s_FormLabel_width_position, __pyx_k_FormLabel_width_position, sizeof(__pyx_k_FormLabel_width_position), 0, 0, 1, 0},
  {&__pyx_n_s_Form___init, __pyx_k_Form___init, sizeof(__pyx_k_Form___init), 0, 0, 1, 1},
  {&__pyx_n_s_Form_form_height, __pyx_k_Form_form_height, sizeof(__pyx_k_Form_form_height), 0, 0, 1, 1},
  {&__pyx_n_s_Form_form_items, __pyx_k_Form_form_items, sizeof(__pyx_k_Form_form_items), 0, 0, 1, 1},
  {&__pyx_kp_s_Form_items_must_contain_values, __pyx_k_Form_items_must_contain_values, sizeof(__pyx_k_Form_items_must_contain_values), 0, 0, 1, 0},
  {&__pyx_n_s_Form_result, __pyx_k_Form_result, sizeof(__pyx_k_Form_result), 0, 0, 1, 1},
  {&__pyx_n_s_Form_run, __pyx_k_Form_run, sizeof(__pyx_k_Form_run), 0, 0, 1, 1},
  {&__pyx_n_s_Gauge, __pyx_k_Gauge, sizeof(__pyx_k_Gauge), 0, 0, 1, 1},
  {&__pyx_n_s_Gauge___init, __pyx_k_Gauge___init, sizeof(__pyx_k_Gauge___init), 0, 0, 1, 1},
  {&__pyx_n_s_Gauge_percentage, __pyx_k_Gauge_percentage, sizeof(__pyx_k_Gauge_percentage), 0, 0, 1, 1},
  {&__pyx_n_s_Gauge_result, __pyx_k_Gauge_result, sizeof(__pyx_k_Gauge_result), 0, 0, 1, 1},
  {&__pyx_n_s_Gauge_run, __pyx_k_Gauge_run, sizeof(__pyx_k_Gauge_run), 0, 0, 1, 1},
  {&__pyx_n_s_HIDDEN, __pyx_k_HIDDEN, sizeof(__pyx_k_HIDDEN), 0, 0, 1, 1},
  {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem, __pyx_k_ListItem, sizeof(__pyx_k_ListItem), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem___init, __pyx_k_ListItem___init, sizeof(__pyx_k_ListItem___init), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem_help, __pyx_k_ListItem_help, sizeof(__pyx_k_ListItem_help), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem_label, __pyx_k_ListItem_label, sizeof(__pyx_k_ListItem_label), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem_state, __pyx_k_ListItem_state, sizeof(__pyx_k_ListItem_state), 0, 0, 1, 1},
  {&__pyx_n_s_ListItem_text, __pyx_k_ListItem_text, sizeof(__pyx_k_ListItem_text), 0, 0, 1, 1},
  {&__pyx_n_s_LogIt, __pyx_k_LogIt, sizeof(__pyx_k_LogIt), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_Menu, __pyx_k_Menu, sizeof(__pyx_k_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Menu___init, __pyx_k_Menu___init, sizeof(__pyx_k_Menu___init), 0, 0, 1, 1},
  {&__pyx_n_s_Menu_menu_height, __pyx_k_Menu_menu_height, sizeof(__pyx_k_Menu_menu_height), 0, 0, 1, 1},
  {&__pyx_n_s_Menu_menu_items, __pyx_k_Menu_menu_items, sizeof(__pyx_k_Menu_menu_items), 0, 0, 1, 1},
  {&__pyx_kp_s_Menu_must_have_items_to_display, __pyx_k_Menu_must_have_items_to_display, sizeof(__pyx_k_Menu_must_have_items_to_display), 0, 0, 1, 0},
  {&__pyx_n_s_Menu_result, __pyx_k_Menu_result, sizeof(__pyx_k_Menu_result), 0, 0, 1, 1},
  {&__pyx_n_s_Menu_run, __pyx_k_Menu_run, sizeof(__pyx_k_Menu_run), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBox, __pyx_k_MessageBox, sizeof(__pyx_k_MessageBox), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBox___init, __pyx_k_MessageBox___init, sizeof(__pyx_k_MessageBox___init), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBox_label, __pyx_k_MessageBox_label, sizeof(__pyx_k_MessageBox_label), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBox_run, __pyx_k_MessageBox_run, sizeof(__pyx_k_MessageBox_run), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBox_wait, __pyx_k_MessageBox_wait, sizeof(__pyx_k_MessageBox_wait), 0, 0, 1, 1},
  {&__pyx_n_s_No, __pyx_k_No, sizeof(__pyx_k_No), 0, 0, 1, 1},
  {&__pyx_n_s_OK, __pyx_k_OK, sizeof(__pyx_k_OK), 0, 0, 1, 1},
  {&__pyx_n_s_Pack, __pyx_k_Pack, sizeof(__pyx_k_Pack), 0, 0, 1, 1},
  {&__pyx_kp_s_PackFormItem, __pyx_k_PackFormItem, sizeof(__pyx_k_PackFormItem), 0, 0, 1, 0},
  {&__pyx_kp_s_Python_interface_to_libdialog_N, __pyx_k_Python_interface_to_libdialog_N, sizeof(__pyx_k_Python_interface_to_libdialog_N), 0, 0, 1, 0},
  {&__pyx_n_s_READONLY, __pyx_k_READONLY, sizeof(__pyx_k_READONLY), 0, 0, 1, 1},
  {&__pyx_n_s_RadioList, __pyx_k_RadioList, sizeof(__pyx_k_RadioList), 0, 0, 1, 1},
  {&__pyx_n_s_RadioList___init, __pyx_k_RadioList___init, sizeof(__pyx_k_RadioList___init), 0, 0, 1, 1},
  {&__pyx_kp_s_Unknown_dialog_return_value, __pyx_k_Unknown_dialog_return_value, sizeof(__pyx_k_Unknown_dialog_return_value), 0, 0, 1, 0},
  {&__pyx_kp_s_Unknown_return_value, __pyx_k_Unknown_return_value, sizeof(__pyx_k_Unknown_return_value), 0, 0, 1, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Yes, __pyx_k_Yes, sizeof(__pyx_k_Yes), 0, 0, 1, 1},
  {&__pyx_n_s_YesNo, __pyx_k_YesNo, sizeof(__pyx_k_YesNo), 0, 0, 1, 1},
  {&__pyx_n_s_YesNo___init, __pyx_k_YesNo___init, sizeof(__pyx_k_YesNo___init), 0, 0, 1, 1},
  {&__pyx_n_s_YesNo_default, __pyx_k_YesNo_default, sizeof(__pyx_k_YesNo_default), 0, 0, 1, 1},
  {&__pyx_n_s_YesNo_run, __pyx_k_YesNo_run, sizeof(__pyx_k_YesNo_run), 0, 0, 1, 1},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_base_y, __pyx_k_base_y, sizeof(__pyx_k_base_y), 0, 0, 1, 1},
  {&__pyx_n_s_bsd_dialog, __pyx_k_bsd_dialog, sizeof(__pyx_k_bsd_dialog), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_cancel_label, __pyx_k_cancel_label, sizeof(__pyx_k_cancel_label), 0, 0, 1, 1},
  {&__pyx_n_s_choice, __pyx_k_choice, sizeof(__pyx_k_choice), 0, 0, 1, 1},
  {&__pyx_n_s_ci, __pyx_k_ci, sizeof(__pyx_k_ci), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_coord, __pyx_k_coord, sizeof(__pyx_k_coord), 0, 0, 1, 1},
  {&__pyx_n_s_current_choice, __pyx_k_current_choice, sizeof(__pyx_k_current_choice), 0, 0, 1, 1},
  {&__pyx_n_s_current_item, __pyx_k_current_item, sizeof(__pyx_k_current_item), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_default_2, __pyx_k_default_2, sizeof(__pyx_k_default_2), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 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_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 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_fiLoopValue, __pyx_k_fiLoopValue, sizeof(__pyx_k_fiLoopValue), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_form_height, __pyx_k_form_height, sizeof(__pyx_k_form_height), 0, 0, 1, 1},
  {&__pyx_n_s_form_height_2, __pyx_k_form_height_2, sizeof(__pyx_k_form_height_2), 0, 0, 1, 1},
  {&__pyx_n_s_form_items, __pyx_k_form_items, sizeof(__pyx_k_form_items), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_kp_s_formbox_DOWN_FORM_NEXT, __pyx_k_formbox_DOWN_FORM_NEXT, sizeof(__pyx_k_formbox_DOWN_FORM_NEXT), 0, 0, 1, 0},
  {&__pyx_kp_s_formbox_TAB_FORM_NEXT, __pyx_k_formbox_TAB_FORM_NEXT, sizeof(__pyx_k_formbox_TAB_FORM_NEXT), 0, 0, 1, 0},
  {&__pyx_kp_s_formbox_UP_FORM_PREV, __pyx_k_formbox_UP_FORM_PREV, sizeof(__pyx_k_formbox_UP_FORM_PREV), 0, 0, 1, 0},
  {&__pyx_kp_s_formfield_DOWN_FORM_NEXT, __pyx_k_formfield_DOWN_FORM_NEXT, sizeof(__pyx_k_formfield_DOWN_FORM_NEXT), 0, 0, 1, 0},
  {&__pyx_kp_s_formfield_TAB_FORM_NEXT, __pyx_k_formfield_TAB_FORM_NEXT, sizeof(__pyx_k_formfield_TAB_FORM_NEXT), 0, 0, 1, 0},
  {&__pyx_kp_s_formfield_UP_FORM_PREV, __pyx_k_formfield_UP_FORM_PREV, sizeof(__pyx_k_formfield_UP_FORM_PREV), 0, 0, 1, 0},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
  {&__pyx_n_s_height_2, __pyx_k_height_2, sizeof(__pyx_k_height_2), 0, 0, 1, 1},
  {&__pyx_n_s_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 0, 1, 1},
  {&__pyx_n_s_help_2, __pyx_k_help_2, sizeof(__pyx_k_help_2), 0, 0, 1, 1},
  {&__pyx_n_s_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 0, 1, 1},
  {&__pyx_n_s_hidden_2, __pyx_k_hidden_2, sizeof(__pyx_k_hidden_2), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_incr, __pyx_k_incr, sizeof(__pyx_k_incr), 0, 0, 1, 1},
  {&__pyx_n_s_indx, __pyx_k_indx, sizeof(__pyx_k_indx), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 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_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {&__pyx_n_s_label_2, __pyx_k_label_2, sizeof(__pyx_k_label_2), 0, 0, 1, 1},
  {&__pyx_n_s_list_height, __pyx_k_list_height, sizeof(__pyx_k_list_height), 0, 0, 1, 1},
  {&__pyx_n_s_list_height_2, __pyx_k_list_height_2, sizeof(__pyx_k_list_height_2), 0, 0, 1, 1},
  {&__pyx_n_s_list_items, __pyx_k_list_items, sizeof(__pyx_k_list_items), 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_max_input, __pyx_k_max_input, sizeof(__pyx_k_max_input), 0, 0, 1, 1},
  {&__pyx_n_s_max_label, __pyx_k_max_label, sizeof(__pyx_k_max_label), 0, 0, 1, 1},
  {&__pyx_n_s_maximum_input, __pyx_k_maximum_input, sizeof(__pyx_k_maximum_input), 0, 0, 1, 1},
  {&__pyx_n_s_menu_height, __pyx_k_menu_height, sizeof(__pyx_k_menu_height), 0, 0, 1, 1},
  {&__pyx_n_s_menu_height_2, __pyx_k_menu_height_2, sizeof(__pyx_k_menu_height_2), 0, 0, 1, 1},
  {&__pyx_n_s_menu_items, __pyx_k_menu_items, sizeof(__pyx_k_menu_items), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
  {&__pyx_n_s_no_label, __pyx_k_no_label, sizeof(__pyx_k_no_label), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_ok_label, __pyx_k_ok_label, sizeof(__pyx_k_ok_label), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 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_packed_item, __pyx_k_packed_item, sizeof(__pyx_k_packed_item), 0, 0, 1, 1},
  {&__pyx_n_s_pct, __pyx_k_pct, sizeof(__pyx_k_pct), 0, 0, 1, 1},
  {&__pyx_n_s_pctg, __pyx_k_pctg, sizeof(__pyx_k_pctg), 0, 0, 1, 1},
  {&__pyx_n_s_percentage, __pyx_k_percentage, sizeof(__pyx_k_percentage), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 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_prompt, __pyx_k_prompt, sizeof(__pyx_k_prompt), 0, 0, 1, 1},
  {&__pyx_n_s_prompt_2, __pyx_k_prompt_2, sizeof(__pyx_k_prompt_2), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_radio, __pyx_k_radio, sizeof(__pyx_k_radio), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_readonly, __pyx_k_readonly, sizeof(__pyx_k_readonly), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_kp_s_restore_vars_buffer_state_buffer, __pyx_k_restore_vars_buffer_state_buffer, sizeof(__pyx_k_restore_vars_buffer_state_buffer), 0, 0, 1, 0},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_result_2, __pyx_k_result_2, sizeof(__pyx_k_result_2), 0, 0, 1, 1},
  {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
  {&__pyx_n_s_rv, __pyx_k_rv, sizeof(__pyx_k_rv), 0, 0, 1, 1},
  {&__pyx_kp_s_save_vars_buffer_state_buffer, __pyx_k_save_vars_buffer_state_buffer, sizeof(__pyx_k_save_vars_buffer_state_buffer), 0, 0, 1, 0},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_kp_s_self_label, __pyx_k_self_label, sizeof(__pyx_k_self_label), 0, 0, 1, 0},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_state_2, __pyx_k_state_2, sizeof(__pyx_k_state_2), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 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_temp_value, __pyx_k_temp_value, sizeof(__pyx_k_temp_value), 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_text_2, __pyx_k_text_2, sizeof(__pyx_k_text_2), 0, 0, 1, 1},
  {&__pyx_n_s_thlp, __pyx_k_thlp, sizeof(__pyx_k_thlp), 0, 0, 1, 1},
  {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
  {&__pyx_n_s_title_2, __pyx_k_title_2, sizeof(__pyx_k_title_2), 0, 0, 1, 1},
  {&__pyx_kp_s_tmp_dialog_log, __pyx_k_tmp_dialog_log, sizeof(__pyx_k_tmp_dialog_log), 0, 0, 1, 0},
  {&__pyx_n_s_tmp_help_str, __pyx_k_tmp_help_str, sizeof(__pyx_k_tmp_help_str), 0, 0, 1, 1},
  {&__pyx_n_s_tmp_name_str, __pyx_k_tmp_name_str, sizeof(__pyx_k_tmp_name_str), 0, 0, 1, 1},
  {&__pyx_n_s_tmp_stupid_string, __pyx_k_tmp_stupid_string, sizeof(__pyx_k_tmp_stupid_string), 0, 0, 1, 1},
  {&__pyx_n_s_tmp_text_str, __pyx_k_tmp_text_str, sizeof(__pyx_k_tmp_text_str), 0, 0, 1, 1},
  {&__pyx_n_s_tnam, __pyx_k_tnam, sizeof(__pyx_k_tnam), 0, 0, 1, 1},
  {&__pyx_n_s_tstr, __pyx_k_tstr, sizeof(__pyx_k_tstr), 0, 0, 1, 1},
  {&__pyx_n_s_ttxt, __pyx_k_ttxt, sizeof(__pyx_k_ttxt), 0, 0, 1, 1},
  {&__pyx_n_s_txt, __pyx_k_txt, sizeof(__pyx_k_txt), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_k_usr_nas_source_py_bsd_bsd_dialo, sizeof(__pyx_k_usr_nas_source_py_bsd_bsd_dialo), 0, 0, 1, 0},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {&__pyx_n_s_wait_2, __pyx_k_wait_2, sizeof(__pyx_k_wait_2), 0, 0, 1, 1},
  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {&__pyx_n_s_width_2, __pyx_k_width_2, sizeof(__pyx_k_width_2), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_yes_label, __pyx_k_yes_label, sizeof(__pyx_k_yes_label), 0, 0, 1, 1},
  {&__pyx_kp_s_yes_label_no_label, __pyx_k_yes_label_no_label, sizeof(__pyx_k_yes_label_no_label), 0, 0, 1, 0},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) __PYX_ERR(0, 22, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 35, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 56, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 14, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 31, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 694, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 724, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "bsd/dialog.pyx":14
 * 
 * def LogIt(msg):
 *       with open("/tmp/dialog.log", "a") as f:             # <<<<<<<<<<<<<<
 *             f.write(msg)
 *             f.write("\n")
 */
  __pyx_tuple_ = PyTuple_Pack(2, __pyx_kp_s_tmp_dialog_log, __pyx_n_s_a); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "bsd/dialog.pyx":16
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 *             f.write("\n")             # <<<<<<<<<<<<<<
 * 
 * class DialogType(enum.IntEnum):
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "bsd/dialog.pyx":14
 * 
 * def LogIt(msg):
 *       with open("/tmp/dialog.log", "a") as f:             # <<<<<<<<<<<<<<
 *             f.write(msg)
 *             f.write("\n")
 */
  __pyx_tuple__4 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "bsd/dialog.pyx":246
 *       print("PackFormItem({})".format(item))
 *       c_item = <defs.DIALOG_FORMITEM*>calloc(1, sizeof(defs.DIALOG_FORMITEM))
 *       c_item.name = strdup(item.label.label.encode('utf-8'))             # <<<<<<<<<<<<<<
 *       c_item.name_len = item.label.width or strlen(c_item.name)
 *       c_item.name_free = True
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "bsd/dialog.pyx":252
 *             (c_item.name_x, c_item.name_y) = item.label.position
 * 
 *       c_item.text = strdup(item.value.value.encode('utf-8'))             # <<<<<<<<<<<<<<
 *       c_item.text_free = True
 *       if item.value.width:
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "bsd/dialog.pyx":266
 * 
 *       if item.help:
 *             c_item.help = strdup(item.help.encode('utf-8'))             # <<<<<<<<<<<<<<
 *             c_item.help_free = True
 * 
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "bsd/dialog.pyx":386
 *             memset(dst, 0, sizeof(defs.DIALOG_FORMITEM))
 *             print("self.label = {}".format(self.label))
 *             dst.name = strdup(self.label.label.encode('utf-8'))             # <<<<<<<<<<<<<<
 *             dst.name_len = strlen(dst.name)
 *             dst.name_free = True
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "bsd/dialog.pyx":396
 *             else:
 *                   (dst.name_x, dst.name_y) = name_coord
 *             dst.text = strdup(self.value.value.encode('utf-8')) if self.value else strdup("")             # <<<<<<<<<<<<<<
 *             dst.text_len = strlen(dst.text) if dst.text else 30
 *             dst.text_free = True
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "bsd/dialog.pyx":407
 *                   (dst.text_x, dst.text_y) = text_coord
 * 
 *             dst.help = strdup(self.help.encode('utf-8')) if self.help else <char*>NULL             # <<<<<<<<<<<<<<
 *             if dst.help:
 *                   dst.help_free = True
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "bsd/dialog.pyx":456
 *             self.title = title
 *             self.prompt = prompt
 *             self.height = kwargs.pop("height", 10)             # <<<<<<<<<<<<<<
 *             self.width = kwargs.pop("width", len(self.title) + 10)
 *             self._result = None
 */
  __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_height, __pyx_int_10); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "bsd/dialog.pyx":467
 *             defs.dialog_state.output = defs.stdout
 * 
 *             self.ok_label = kwargs.pop("ok_label", None)             # <<<<<<<<<<<<<<
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)
 */
  __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_ok_label, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "bsd/dialog.pyx":468
 * 
 *             self.ok_label = kwargs.pop("ok_label", None)
 *             self.no_label = kwargs.pop("no_label", None)             # <<<<<<<<<<<<<<
 *             self.yes_label = kwargs.pop("yes_label", None)
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 */
  __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_no_label, Py_None); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "bsd/dialog.pyx":469
 *             self.ok_label = kwargs.pop("ok_label", None)
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)             # <<<<<<<<<<<<<<
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_yes_label, Py_None); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "bsd/dialog.pyx":470
 *             self.no_label = kwargs.pop("no_label", None)
 *             self.yes_label = kwargs.pop("yes_label", None)
 *             self.cancel_label = kwargs.pop("cancel_label", None)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_cancel_label, Py_None); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "bsd/dialog.pyx":532
 *       def ok_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.ok_label = strdup(tmp_stupid_string)
 *             else:
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "bsd/dialog.pyx":548
 *       def no_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.no_label = strdup(tmp_stupid_string)
 *             else:
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "bsd/dialog.pyx":564
 *       def yes_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.yes_label = strdup(tmp_stupid_string)
 *             else:
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "bsd/dialog.pyx":580
 *       def cancel_label(self, txt):
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   defs.dialog_vars.cancel_label = strdup(tmp_stupid_string)
 *             else:
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "bsd/dialog.pyx":596
 *       def __init__(self, title, prompt, **kwargs):
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)             # <<<<<<<<<<<<<<
 * 
 *       def run(self):
 */
  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_default, Py_False); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "bsd/dialog.pyx":612
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode("utf-8"),
 *                                    self.height, self.width)
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "bsd/dialog.pyx":613
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             rv = defs.dialog_yesno(self.title.encode("utf-8"),
 *                                    self.prompt.encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width)
 *             defs.end_dialog()
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "bsd/dialog.pyx":632
 *             """
 *             super(MessageBox, self).__init__(title, prompt, **kwargs)
 *             self.label = kwargs.pop("label", None)             # <<<<<<<<<<<<<<
 *             self.wait = kwargs.pop("wait", True)
 * 
 */
  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_s_label, Py_None); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "bsd/dialog.pyx":633
 *             super(MessageBox, self).__init__(title, prompt, **kwargs)
 *             self.label = kwargs.pop("label", None)
 *             self.wait = kwargs.pop("wait", True)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_wait, Py_True); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "bsd/dialog.pyx":654
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.wait)
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "bsd/dialog.pyx":655
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dialog_msgbox(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.height, self.width, self.wait)
 *             defs.end_dialog()
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "bsd/dialog.pyx":667
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 *             self.menu_height = kwargs.pop("menu_height", None)             # <<<<<<<<<<<<<<
 *             self.menu_items = kwargs.pop("menu_items", None)
 * 
 */
  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_menu_height, Py_None); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "bsd/dialog.pyx":668
 *             # Note that these can be set later
 *             self.menu_height = kwargs.pop("menu_height", None)
 *             self.menu_items = kwargs.pop("menu_items", None)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_menu_items, Py_None); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "bsd/dialog.pyx":686
 *       def run(self):
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")             # <<<<<<<<<<<<<<
 *             cdef defs.DIALOG_LISTITEM *list_items
 *             cdef int current_item = 0
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Menu_must_have_items_to_display); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "bsd/dialog.pyx":695
 * 
 *             for indx, item in enumerate(self.menu_items):
 *                   tmp_name_str = str(indx + 1).encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_text_str = item.label.encode('utf-8')
 *                   list_items[indx].name = strdup(tmp_name_str)
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "bsd/dialog.pyx":696
 *             for indx, item in enumerate(self.menu_items):
 *                   tmp_name_str = str(indx + 1).encode('utf-8')
 *                   tmp_text_str = item.label.encode('utf-8')             # <<<<<<<<<<<<<<
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "bsd/dialog.pyx":709
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_menu(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.menu_height,
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "bsd/dialog.pyx":710
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_menu(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width, self.menu_height,
 *                                    len(self.menu_items),
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "bsd/dialog.pyx":750
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 *             self.list_height = kwargs.pop("list_height", None)             # <<<<<<<<<<<<<<
 *             self.list_items = kwargs.pop("list_items", None)
 *             self._radio = False
 */
  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_list_height, Py_None); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "bsd/dialog.pyx":751
 * 
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)             # <<<<<<<<<<<<<<
 *             self._radio = False
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_list_items, Py_None); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "bsd/dialog.pyx":771
 *       def run(self):
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")             # <<<<<<<<<<<<<<
 * 
 *             cdef defs.DIALOG_LISTITEM *list_items;
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_A_checklist_needs_item_to_check); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "bsd/dialog.pyx":779
 * 
 *             for indx, item in enumerate(self.list_items):
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "bsd/dialog.pyx":780
 *             for indx, item in enumerate(self.list_items):
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')             # <<<<<<<<<<<<<<
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None
 *                   list_items[indx].name = strdup(tmp_name_str)
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "bsd/dialog.pyx":781
 *                   tmp_name_str = (item.label if item.label else "").encode('utf-8')
 *                   tmp_text_str = (item.text if item.text else "").encode('utf-8')
 *                   tmp_help_str = item.help.encode('utf-8') if item.help else None             # <<<<<<<<<<<<<<
 *                   list_items[indx].name = strdup(tmp_name_str)
 *                   list_items[indx].text = strdup(tmp_text_str)
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "bsd/dialog.pyx":796
 * 
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.prompt.encode('utf-8'),
 *                                         self.height, self.width, self.list_height,
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "bsd/dialog.pyx":797
 *             defs.init_dialog(defs.dialog_state.input, defs.dialog_state.output)
 *             result = defs.dlg_checklist(self.title.encode('utf-8'),
 *                                         self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                         self.height, self.width, self.list_height,
 *                                         len(self.list_items),
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "bsd/dialog.pyx":838
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 0)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_percentage, __pyx_int_0); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "bsd/dialog.pyx":859
 *             defs.dialog_state.pipe_input = defs.fopen("/dev/null", "r")
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                                    self.prompt.encode('utf-8'),
 *                                                    self.height, self.width, self.percentage)
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "bsd/dialog.pyx":860
 *             # was self._gauge
 *             stupid_gauge = defs.dlg_allocate_gauge(self.title.encode('utf-8'),
 *                                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                                    self.height, self.width, self.percentage)
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "bsd/dialog.pyx":881
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 *             self.list_height = kwargs.pop("list_height", None)             # <<<<<<<<<<<<<<
 *             self.list_items = kwargs.pop("list_items", None)
 * 
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_list_height, Py_None); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "bsd/dialog.pyx":882
 *             self._radio = True
 *             self.list_height = kwargs.pop("list_height", None)
 *             self.list_items = kwargs.pop("list_items", None)             # <<<<<<<<<<<<<<
 * 
 * class Form(Dialog):
 */
  __pyx_tuple__47 = PyTuple_Pack(2, __pyx_n_s_list_items, Py_None); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "bsd/dialog.pyx":887
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)             # <<<<<<<<<<<<<<
 *             self.form_items = kwargs.pop("form_items", None)
 * 
 */
  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_form_height, Py_None); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "bsd/dialog.pyx":888
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)
 *             self.form_items = kwargs.pop("form_items", None)             # <<<<<<<<<<<<<<
 * 
 *       @property
 */
  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_form_items, Py_None); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "bsd/dialog.pyx":905
 *       def run(self):
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")             # <<<<<<<<<<<<<<
 * 
 *             cdef defs.DIALOG_FORMITEM *form_items
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_Form_items_must_contain_values); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "bsd/dialog.pyx":947
 *             defs.init_dialog(defs.stdin, defs.stdout)
 *             defs.dlg_put_backtitle()
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "bsd/dialog.pyx":948
 *             defs.dlg_put_backtitle()
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "bsd/dialog.pyx":949
 *             defs.dlg_parse_bindkey("formfield TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "bsd/dialog.pyx":950
 *             defs.dlg_parse_bindkey("formfield DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "bsd/dialog.pyx":951
 *             defs.dlg_parse_bindkey("formfield UP FORM_PREV".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))
 *             defs.dialog_state.visit_items = True
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "bsd/dialog.pyx":952
 *             defs.dlg_parse_bindkey("formbox TAB FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox DOWN FORM_NEXT".encode('utf-8'))
 *             defs.dlg_parse_bindkey("formbox UP FORM_PREV".encode('utf-8'))             # <<<<<<<<<<<<<<
 *             defs.dialog_state.visit_items = True
 *             defs.dialog_state.visit_cols = 1
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "bsd/dialog.pyx":958
 *             defs.dialog_vars.default_button = -1
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.prompt.encode('utf-8'),
 *                                    self.height, self.width, self.form_height,
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "bsd/dialog.pyx":959
 * 
 *             result = defs.dlg_form(self.title.encode('utf-8'),
 *                                    self.prompt.encode('utf-8'),             # <<<<<<<<<<<<<<
 *                                    self.height, self.width, self.form_height,
 *                                    len(self.form_items),
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "bsd/dialog.pyx":13
 * cdef void *stupid_gauge
 * 
 * def LogIt(msg):             # <<<<<<<<<<<<<<
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 */
  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_msg, __pyx_n_s_f); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_LogIt, 13, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 13, __pyx_L1_error)

  /* "bsd/dialog.pyx":23
 * 
 * class DialogError(Exception):
 *       def __init__(self, code=0, message=None):             # <<<<<<<<<<<<<<
 *             self.code = code
 *             self.message = message
 */
  __pyx_tuple__61 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_message); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 23, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 23, __pyx_L1_error)
  __pyx_tuple__63 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "bsd/dialog.pyx":26
 *             self.code = code
 *             self.message = message
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_str, 26, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 26, __pyx_L1_error)

  /* "bsd/dialog.pyx":30
 * 
 * class DialogEscape(DialogError):
 *       def __init__(self):             # <<<<<<<<<<<<<<
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 30, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 30, __pyx_L1_error)

  /* "bsd/dialog.pyx":32
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogEscape<>"
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_str, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "bsd/dialog.pyx":40
 *       This provides the name and x/y coordinates.
 *       """
 *       def __init__(self, label, width=None, position=None):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.width = width if width else len(label) + 1
 */
  __pyx_tuple__70 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_label, __pyx_n_s_width, __pyx_n_s_position); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 40, __pyx_L1_error)
  __pyx_tuple__72 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "bsd/dialog.pyx":45
 *             self.position = position
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_str, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "bsd/dialog.pyx":48
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormLabel({}, width={}, position={})".format(
 *                   self.label, self.width, self.position)
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_repr, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 48, __pyx_L1_error)

  /* "bsd/dialog.pyx":57
 *       """
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 57, __pyx_L1_error)

  /* "bsd/dialog.pyx":60
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       """
 */
  __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_l); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 60, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "bsd/dialog.pyx":69
 *       """
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_width, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 69, __pyx_L1_error)

  /* "bsd/dialog.pyx":72
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_w); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_width, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 72, __pyx_L1_error)

  /* "bsd/dialog.pyx":82
 *       """
 *       @property
 *       def position(self):             # <<<<<<<<<<<<<<
 *             return self._coord
 *       @position.setter
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_position, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 82, __pyx_L1_error)

  /* "bsd/dialog.pyx":85
 *             return self._coord
 *       @position.setter
 *       def position(self, c):             # <<<<<<<<<<<<<<
 *             self._coord = c
 * 
 */
  __pyx_tuple__87 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_position, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 85, __pyx_L1_error)

  /* "bsd/dialog.pyx":94
 *       and a state.
 *       """
 *       def __init__(self, label, text, help=None, state=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.text = text
 */
  __pyx_tuple__89 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_label, __pyx_n_s_text, __pyx_n_s_help, __pyx_n_s_state); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 94, __pyx_L1_error)
  __pyx_tuple__91 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "bsd/dialog.pyx":100
 *             self.state = state
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 100, __pyx_L1_error)

  /* "bsd/dialog.pyx":103
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       @property
 */
  __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_l); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 103, __pyx_L1_error)

  /* "bsd/dialog.pyx":106
 *             self._label = l
 *       @property
 *       def text(self):             # <<<<<<<<<<<<<<
 *             return self._text
 *       @text.setter
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_text, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 106, __pyx_L1_error)

  /* "bsd/dialog.pyx":109
 *             return self._text
 *       @text.setter
 *       def text(self, t):             # <<<<<<<<<<<<<<
 *             self._text = t
 *       @property
 */
  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_text, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 109, __pyx_L1_error)

  /* "bsd/dialog.pyx":112
 *             self._text = t
 *       @property
 *       def help(self):             # <<<<<<<<<<<<<<
 *             return self._help
 *       @help.setter
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_help, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 112, __pyx_L1_error)

  /* "bsd/dialog.pyx":115
 *             return self._help
 *       @help.setter
 *       def help(self, h):             # <<<<<<<<<<<<<<
 *             self._help = h
 *       @property
 */
  __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_help, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 115, __pyx_L1_error)

  /* "bsd/dialog.pyx":118
 *             self._help = h
 *       @property
 *       def state(self):             # <<<<<<<<<<<<<<
 *             return self._state
 *       @state.setter
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_state, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 118, __pyx_L1_error)

  /* "bsd/dialog.pyx":121
 *             return self._state
 *       @state.setter
 *       def state(self, b):             # <<<<<<<<<<<<<<
 *             self._state = bool(b)
 * 
 */
  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_b); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_state, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 121, __pyx_L1_error)

  /* "bsd/dialog.pyx":131
 *       called "value.")
 *       """
 *       def __init__(self, value="",             # <<<<<<<<<<<<<<
 *                    width=None,
 *                    position=None,
 */
  __pyx_tuple__108 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_width, __pyx_n_s_position, __pyx_n_s_maximum_input, __pyx_n_s_readonly, __pyx_n_s_hidden); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 131, __pyx_L1_error)
  __pyx_tuple__110 = PyTuple_Pack(6, ((PyObject*)__pyx_kp_s__5), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "bsd/dialog.pyx":142
 *             self.hidden = hidden
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_str, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 142, __pyx_L1_error)

  /* "bsd/dialog.pyx":146
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_repr, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 146, __pyx_L1_error)

  /* "bsd/dialog.pyx":157
 *       """
 *       @property
 *       def value(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @value.setter
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_value, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 157, __pyx_L1_error)

  /* "bsd/dialog.pyx":160
 *             return self._label
 *       @value.setter
 *       def value(self, v):             # <<<<<<<<<<<<<<
 *             self._label = v
 * 
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_v); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_value, 160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 160, __pyx_L1_error)

  /* "bsd/dialog.pyx":169
 *       """
 *       @property
 *       def maximum_input(self):             # <<<<<<<<<<<<<<
 *             return self._max_input
 *       @maximum_input.setter
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_maximum_input, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 169, __pyx_L1_error)

  /* "bsd/dialog.pyx":172
 *             return self._max_input
 *       @maximum_input.setter
 *       def maximum_input(self, m):             # <<<<<<<<<<<<<<
 *             self._max_input = m
 * 
 */
  __pyx_tuple__121 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_m); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_maximum_input, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 172, __pyx_L1_error)

  /* "bsd/dialog.pyx":180
 *       """
 *       @property
 *       def hidden(self):             # <<<<<<<<<<<<<<
 *             return self._hidden
 *       @hidden.setter
 */
  __pyx_tuple__123 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_hidden, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 180, __pyx_L1_error)

  /* "bsd/dialog.pyx":183
 *             return self._hidden
 *       @hidden.setter
 *       def hidden(self, b):             # <<<<<<<<<<<<<<
 *             self._hidden = bool(b)
 * 
 */
  __pyx_tuple__125 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_b); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_hidden, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 183, __pyx_L1_error)

  /* "bsd/dialog.pyx":453
 *       a time.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             self.title = title
 *             self.prompt = prompt
 */
  __pyx_tuple__127 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 453, __pyx_L1_error)

  /* "bsd/dialog.pyx":472
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 472, __pyx_L1_error)

  /* "bsd/dialog.pyx":476
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_result_2, 476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 476, __pyx_L1_error)

  /* "bsd/dialog.pyx":492
 * 
 *       @property
 *       def title(self):             # <<<<<<<<<<<<<<
 *             return self._title
 *       @title.setter
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_title, 492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 492, __pyx_L1_error)

  /* "bsd/dialog.pyx":495
 *             return self._title
 *       @title.setter
 *       def title(self, t):             # <<<<<<<<<<<<<<
 *             self._title = t
 * 
 */
  __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_title, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "bsd/dialog.pyx":499
 * 
 *       @property
 *       def prompt(self):             # <<<<<<<<<<<<<<
 *             return self._prompt
 *       @prompt.setter
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_prompt, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 499, __pyx_L1_error)

  /* "bsd/dialog.pyx":502
 *             return self._prompt
 *       @prompt.setter
 *       def prompt(self, p):             # <<<<<<<<<<<<<<
 *             self._prompt = p
 * 
 */
  __pyx_tuple__139 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_p); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_prompt, 502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 502, __pyx_L1_error)

  /* "bsd/dialog.pyx":506
 * 
 *       @property
 *       def height(self):             # <<<<<<<<<<<<<<
 *             return self._height
 *       @height.setter
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_height, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 506, __pyx_L1_error)

  /* "bsd/dialog.pyx":509
 *             return self._height
 *       @height.setter
 *       def height(self, h):             # <<<<<<<<<<<<<<
 *             self._height = h
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_height, 509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 509, __pyx_L1_error)

  /* "bsd/dialog.pyx":513
 * 
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_width, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 513, __pyx_L1_error)

  /* "bsd/dialog.pyx":516
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */
  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_w); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_width, 516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 516, __pyx_L1_error)

  /* "bsd/dialog.pyx":523
 *       """
 *       @property
 *       def ok_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:
 */
  __pyx_tuple__149 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_ok_label, 523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 523, __pyx_L1_error)

  /* "bsd/dialog.pyx":530
 *                   return "OK"
 *       @ok_label.setter
 *       def ok_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_txt, __pyx_n_s_tmp_stupid_string); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_ok_label, 530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 530, __pyx_L1_error)

  /* "bsd/dialog.pyx":539
 * 
 *       @property
 *       def no_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:
 */
  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_no_label, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 539, __pyx_L1_error)

  /* "bsd/dialog.pyx":546
 *                   return "No"
 *       @no_label.setter
 *       def no_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_txt, __pyx_n_s_tmp_stupid_string); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_no_label, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 546, __pyx_L1_error)

  /* "bsd/dialog.pyx":555
 * 
 *       @property
 *       def yes_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:
 */
  __pyx_tuple__157 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_yes_label, 555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "bsd/dialog.pyx":562
 *                   return "Yes"
 *       @yes_label.setter
 *       def yes_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_tuple__159 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_txt, __pyx_n_s_tmp_stupid_string); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_yes_label, 562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 562, __pyx_L1_error)

  /* "bsd/dialog.pyx":571
 * 
 *       @property
 *       def cancel_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_cancel_label, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 571, __pyx_L1_error)

  /* "bsd/dialog.pyx":578
 *                   return "Cancel"
 *       @cancel_label.setter
 *       def cancel_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_tuple__163 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_txt, __pyx_n_s_tmp_stupid_string); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_cancel_label, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 578, __pyx_L1_error)

  /* "bsd/dialog.pyx":586
 *                   defs.dialog_vars.cancel_label = <char*>NULL
 * 
 *       def clear(self):             # <<<<<<<<<<<<<<
 *             defs.dlg_clear()
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_clear, 586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 586, __pyx_L1_error)

  /* "bsd/dialog.pyx":594
 *       By default, the Yes button is selected.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)
 */
  __pyx_tuple__167 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 594, __pyx_L1_error)

  /* "bsd/dialog.pyx":598
 *             self.default = kwargs.pop("default", False)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Do all the work.
 */
  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 598, __pyx_L1_error)

  /* "bsd/dialog.pyx":619
 * 
 *       @property
 *       def default(self):             # <<<<<<<<<<<<<<
 *             return self._default
 *       @default.setter
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_default, 619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 619, __pyx_L1_error)

  /* "bsd/dialog.pyx":622
 *             return self._default
 *       @default.setter
 *       def default(self, b):             # <<<<<<<<<<<<<<
 *             self._default = b
 * 
 */
  __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_b); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_default, 622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 622, __pyx_L1_error)

  /* "bsd/dialog.pyx":627
 * class MessageBox(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             """
 *             Display a message, with an OK button.  (Use the label if set.)
 */
  __pyx_tuple__175 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "bsd/dialog.pyx":636
 * 
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 636, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 636, __pyx_L1_error)

  /* "bsd/dialog.pyx":639
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 * 
 */
  __pyx_tuple__179 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_l); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_label, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 639, __pyx_L1_error)

  /* "bsd/dialog.pyx":643
 * 
 *       @property
 *       def wait(self):             # <<<<<<<<<<<<<<
 *             return self._wait
 *       @wait.setter
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_wait, 643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 643, __pyx_L1_error)

  /* "bsd/dialog.pyx":646
 *             return self._wait
 *       @wait.setter
 *       def wait(self, w):             # <<<<<<<<<<<<<<
 *             self._wait = bool(w)
 * 
 */
  __pyx_tuple__183 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_w); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_wait, 646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 646, __pyx_L1_error)

  /* "bsd/dialog.pyx":649
 *             self._wait = bool(w)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if self.width is None:
 *                   self.width = len(self.title) + 10
 */
  __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result_2); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 649, __pyx_L1_error)

  /* "bsd/dialog.pyx":664
 * 
 * class Menu(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 */
  __pyx_tuple__187 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 664, __pyx_L1_error)

  /* "bsd/dialog.pyx":671
 * 
 *       @property
 *       def menu_height(self):             # <<<<<<<<<<<<<<
 *             return self._menu_height
 *       @menu_height.setter
 */
  __pyx_tuple__189 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_menu_height, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 671, __pyx_L1_error)

  /* "bsd/dialog.pyx":674
 *             return self._menu_height
 *       @menu_height.setter
 *       def menu_height(self, m):             # <<<<<<<<<<<<<<
 *             self._menu_height = m
 * 
 */
  __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_m); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_menu_height, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 674, __pyx_L1_error)

  /* "bsd/dialog.pyx":678
 * 
 *       @property
 *       def menu_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @menu_items.setter
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_menu_items, 678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 678, __pyx_L1_error)

  /* "bsd/dialog.pyx":681
 *             return self._items
 *       @menu_items.setter
 *       def menu_items(self, i):             # <<<<<<<<<<<<<<
 *             self._items = i
 * 
 */
  __pyx_tuple__195 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_i); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_menu_items, 681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 681, __pyx_L1_error)

  /* "bsd/dialog.pyx":684
 *             self._items = i
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")
 */
  __pyx_tuple__197 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_list_items, __pyx_n_s_current_item, __pyx_n_s_indx, __pyx_n_s_item, __pyx_n_s_tmp_name_str, __pyx_n_s_tmp_text_str, __pyx_n_s_result_2, __pyx_n_s_rv, __pyx_n_s_i); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 684, __pyx_L1_error)

  /* "bsd/dialog.pyx":740
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_tuple__199 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_result_2, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 740, __pyx_L1_error)

  /* "bsd/dialog.pyx":747
 * class CheckList(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 */
  __pyx_tuple__201 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 747, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 747, __pyx_L1_error)

  /* "bsd/dialog.pyx":755
 * 
 *       @property
 *       def list_height(self):             # <<<<<<<<<<<<<<
 *             return self._list_height
 *       @list_height.setter
 */
  __pyx_tuple__203 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_list_height, 755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 755, __pyx_L1_error)

  /* "bsd/dialog.pyx":758
 *             return self._list_height
 *       @list_height.setter
 *       def list_height(self, h):             # <<<<<<<<<<<<<<
 *             self._list_height = h
 * 
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_list_height, 758, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 758, __pyx_L1_error)

  /* "bsd/dialog.pyx":762
 * 
 *       @property
 *       def list_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @list_items.setter
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_list_items, 762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 762, __pyx_L1_error)

  /* "bsd/dialog.pyx":765
 *             return self._items
 *       @list_items.setter
 *       def list_items(self, l):             # <<<<<<<<<<<<<<
 *             self._items = l
 * 
 */
  __pyx_tuple__209 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_l); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_list_items, 765, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 765, __pyx_L1_error)

  /* "bsd/dialog.pyx":769
 * 
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")
 */
  __pyx_tuple__211 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_list_items, __pyx_n_s_current_choice, __pyx_n_s_indx, __pyx_n_s_item, __pyx_n_s_tmp_name_str, __pyx_n_s_tmp_text_str, __pyx_n_s_tmp_help_str, __pyx_n_s_result_2, __pyx_n_s_rv, __pyx_n_s_i, __pyx_n_s_tnam, __pyx_n_s_ttxt, __pyx_n_s_thlp); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "bsd/dialog.pyx":830
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_result_2, 830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 830, __pyx_L1_error)

  /* "bsd/dialog.pyx":836
 * 
 * class Gauge(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 0)
 */
  __pyx_tuple__215 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 836, __pyx_L1_error)

  /* "bsd/dialog.pyx":841
 * 
 *       @property
 *       def percentage(self):             # <<<<<<<<<<<<<<
 *             return self._pct
 *       @percentage.setter
 */
  __pyx_tuple__217 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_percentage, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 841, __pyx_L1_error)

  /* "bsd/dialog.pyx":844
 *             return self._pct
 *       @percentage.setter
 *       def percentage(self, pctg):             # <<<<<<<<<<<<<<
 *             self._pct = pctg
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pctg); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_percentage, 844, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 844, __pyx_L1_error)

  /* "bsd/dialog.pyx":849
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Allocate the gauge.
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 849, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 849, __pyx_L1_error)

  /* "bsd/dialog.pyx":864
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             global stupid_gauge
 *             if stupid_gauge:
 */
  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_result_2, 864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 864, __pyx_L1_error)

  /* "bsd/dialog.pyx":878
 * 
 * class RadioList(CheckList):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 */
  __pyx_tuple__225 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 878, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 878, __pyx_L1_error)

  /* "bsd/dialog.pyx":885
 * 
 * class Form(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)
 */
  __pyx_tuple__227 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_title, __pyx_n_s_prompt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_init, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 885, __pyx_L1_error)

  /* "bsd/dialog.pyx":891
 * 
 *       @property
 *       def form_height(self):             # <<<<<<<<<<<<<<
 *             return self._form_height
 *       @form_height.setter
 */
  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_form_height, 891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 891, __pyx_L1_error)

  /* "bsd/dialog.pyx":894
 *             return self._form_height
 *       @form_height.setter
 *       def form_height(self, h):             # <<<<<<<<<<<<<<
 *             self._form_height = h
 *       @property
 */
  __pyx_tuple__231 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_form_height, 894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 894, __pyx_L1_error)

  /* "bsd/dialog.pyx":897
 *             self._form_height = h
 *       @property
 *       def form_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @form_items.setter
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_form_items, 897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 897, __pyx_L1_error)

  /* "bsd/dialog.pyx":900
 *             return self._items
 *       @form_items.setter
 *       def form_items(self, f):             # <<<<<<<<<<<<<<
 *             self._items = f
 * 
 */
  __pyx_tuple__235 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_f); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_form_items, 900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 900, __pyx_L1_error)

  /* "bsd/dialog.pyx":903
 *             self._items = f
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")
 */
  __pyx_tuple__237 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_form_items, __pyx_n_s_packed_item, __pyx_n_s_choice, __pyx_n_s_ci, __pyx_n_s_fiLoopValue, __pyx_n_s_base_y, __pyx_n_s_max_label, __pyx_n_s_indx, __pyx_n_s_temp_value, __pyx_n_s_incr, __pyx_n_s_result_2, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_run, 903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "bsd/dialog.pyx":987
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_tuple__239 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd_dialo, __pyx_n_s_result_2, 987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  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_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __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)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initdialog(void); /*proto*/
PyMODINIT_FUNC initdialog(void)
#else
PyMODINIT_FUNC PyInit_dialog(void); /*proto*/
PyMODINIT_FUNC PyInit_dialog(void)
#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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannyDeclarations
  #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("PyMODINIT_FUNC PyInit_dialog(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __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_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 PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("dialog", __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)
  __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)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  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_bsd__dialog) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __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, "bsd.dialog")) {
      if (unlikely(PyDict_SetItemString(modules, "bsd.dialog", __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 init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_vtabptr_3bsd_6dialog_FormItem = &__pyx_vtable_3bsd_6dialog_FormItem;
  __pyx_vtable_3bsd_6dialog_FormItem.Pack1 = (PyObject *(*)(struct __pyx_obj_3bsd_6dialog_FormItem *, DIALOG_FORMITEM *))__pyx_f_3bsd_6dialog_8FormItem_Pack1;
  if (PyType_Ready(&__pyx_type_3bsd_6dialog_FormItem) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_type_3bsd_6dialog_FormItem.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_3bsd_6dialog_FormItem.tp_dict, __pyx_vtabptr_3bsd_6dialog_FormItem) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "FormItem", (PyObject *)&__pyx_type_3bsd_6dialog_FormItem) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_ptype_3bsd_6dialog_FormItem = &__pyx_type_3bsd_6dialog_FormItem;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- 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

  /* "bsd/dialog.pyx":1
 * import os, sys             # <<<<<<<<<<<<<<
 * import types
 * import enum
 */
  __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;
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 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_sys, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":2
 * import os, sys
 * import types             # <<<<<<<<<<<<<<
 * import enum
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 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_types, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":3
 * import os, sys
 * import types
 * import enum             # <<<<<<<<<<<<<<
 * 
 * from libc.stdlib cimport malloc, free, calloc
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 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_enum, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":13
 * cdef void *stupid_gauge
 * 
 * def LogIt(msg):             # <<<<<<<<<<<<<<
 *       with open("/tmp/dialog.log", "a") as f:
 *             f.write(msg)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3bsd_6dialog_1LogIt, NULL, __pyx_n_s_bsd_dialog); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogIt, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/dialog.pyx":18
 *             f.write("\n")
 * 
 * class DialogType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *       READONLY = 2
 *       HIDDEN = 1
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __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, 18, __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, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DialogType, __pyx_n_s_DialogType, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":19
 * 
 * class DialogType(enum.IntEnum):
 *       READONLY = 2             # <<<<<<<<<<<<<<
 *       HIDDEN = 1
 * 
 */
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_READONLY, __pyx_int_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error)

  /* "bsd/dialog.pyx":20
 * class DialogType(enum.IntEnum):
 *       READONLY = 2
 *       HIDDEN = 1             # <<<<<<<<<<<<<<
 * 
 * class DialogError(Exception):
 */
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_HIDDEN, __pyx_int_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)

  /* "bsd/dialog.pyx":18
 *             f.write("\n")
 * 
 * class DialogType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *       READONLY = 2
 *       HIDDEN = 1
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DialogType, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DialogType, __pyx_t_4) < 0) __PYX_ERR(0, 18, __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;

  /* "bsd/dialog.pyx":22
 *       HIDDEN = 1
 * 
 * class DialogError(Exception):             # <<<<<<<<<<<<<<
 *       def __init__(self, code=0, message=None):
 *             self.code = code
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DialogError, __pyx_n_s_DialogError, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":23
 * 
 * class DialogError(Exception):
 *       def __init__(self, code=0, message=None):             # <<<<<<<<<<<<<<
 *             self.code = code
 *             self.message = message
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_11DialogError_1__init__, 0, __pyx_n_s_DialogError___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__63);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":26
 *             self.code = code
 *             self.message = message
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_11DialogError_3__str__, 0, __pyx_n_s_DialogError___str, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":22
 *       HIDDEN = 1
 * 
 * class DialogError(Exception):             # <<<<<<<<<<<<<<
 *       def __init__(self, code=0, message=None):
 *             self.code = code
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DialogError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DialogError, __pyx_t_4) < 0) __PYX_ERR(0, 22, __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;

  /* "bsd/dialog.pyx":29
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 * class DialogEscape(DialogError):             # <<<<<<<<<<<<<<
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DialogError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DialogEscape, __pyx_n_s_DialogEscape, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":30
 * 
 * class DialogEscape(DialogError):
 *       def __init__(self):             # <<<<<<<<<<<<<<
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_12DialogEscape_1__init__, 0, __pyx_n_s_DialogEscape___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":32
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "DialogEscape<>"
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_12DialogEscape_3__str__, 0, __pyx_n_s_DialogEscape___str, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":29
 *             return "DialogError<code={}, message={}>".format(self.code, self.message)
 * 
 * class DialogEscape(DialogError):             # <<<<<<<<<<<<<<
 *       def __init__(self):
 *             super(DialogEscape, self).__init__(defs.DLG_EXIT_ESC, "Escape out of dialog")
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DialogEscape, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DialogEscape, __pyx_t_4) < 0) __PYX_ERR(0, 29, __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;

  /* "bsd/dialog.pyx":35
 *             return "DialogEscape<>"
 * 
 * class FormLabel(object):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for form labels (and base class for input).
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FormLabel, __pyx_n_s_FormLabel, (PyObject *) NULL, __pyx_n_s_bsd_dialog, __pyx_kp_s_A_wrapper_object_for_form_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":40
 *       This provides the name and x/y coordinates.
 *       """
 *       def __init__(self, label, width=None, position=None):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.width = width if width else len(label) + 1
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_1__init__, 0, __pyx_n_s_FormLabel___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__72);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":45
 *             self.position = position
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_3__str__, 0, __pyx_n_s_FormLabel___str, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":48
 *             return "<FormLabel(label={}, width={}, position={})>".format(
 *                   self.label, self.width, self.position)
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormLabel({}, width={}, position={})".format(
 *                   self.label, self.width, self.position)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_5__repr__, 0, __pyx_n_s_FormLabel___repr, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":57
 *       """
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_7label, 0, __pyx_n_s_FormLabel_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":56
 *       It can be empty.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def label(self):
 *             return self._label
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":59
 *       def label(self):
 *             return self._label
 *       @label.setter             # <<<<<<<<<<<<<<
 *       def label(self, l):
 *             self._label = l
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_label);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_label);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":60
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       """
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_9label, 0, __pyx_n_s_FormLabel_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":69
 *       """
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_11width, 0, __pyx_n_s_FormLabel_width, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":68
 *       of the label plus one space.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def width(self):
 *             return self._width
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 68, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_width, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":71
 *       def width(self):
 *             return self._width
 *       @width.setter             # <<<<<<<<<<<<<<
 *       def width(self, w):
 *             self._width = w
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_width);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_width);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":72
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_13width, 0, __pyx_n_s_FormLabel_width, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_width, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":82
 *       """
 *       @property
 *       def position(self):             # <<<<<<<<<<<<<<
 *             return self._coord
 *       @position.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_15position, 0, __pyx_n_s_FormLabel_position, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":81
 *       those coordinates.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def position(self):
 *             return self._coord
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":84
 *       def position(self):
 *             return self._coord
 *       @position.setter             # <<<<<<<<<<<<<<
 *       def position(self, c):
 *             self._coord = c
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_position);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_position);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":85
 *             return self._coord
 *       @position.setter
 *       def position(self, c):             # <<<<<<<<<<<<<<
 *             self._coord = c
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormLabel_17position, 0, __pyx_n_s_FormLabel_position, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":35
 *             return "DialogEscape<>"
 * 
 * class FormLabel(object):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for form labels (and base class for input).
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FormLabel, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FormLabel, __pyx_t_4) < 0) __PYX_ERR(0, 35, __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;

  /* "bsd/dialog.pyx":88
 *             self._coord = c
 * 
 * class ListItem(object):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for checklists / radio boxes.
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ListItem, __pyx_n_s_ListItem, (PyObject *) NULL, __pyx_n_s_bsd_dialog, __pyx_kp_s_A_wrapper_object_for_checklists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":94
 *       and a state.
 *       """
 *       def __init__(self, label, text, help=None, state=False):             # <<<<<<<<<<<<<<
 *             self.label = label
 *             self.text = text
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_1__init__, 0, __pyx_n_s_ListItem___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__91);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":100
 *             self.state = state
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_3label, 0, __pyx_n_s_ListItem_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":99
 *             self.help = help
 *             self.state = state
 *       @property             # <<<<<<<<<<<<<<
 *       def label(self):
 *             return self._label
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":102
 *       def label(self):
 *             return self._label
 *       @label.setter             # <<<<<<<<<<<<<<
 *       def label(self, l):
 *             self._label = l
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_label);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_label);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":103
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 *       @property
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_5label, 0, __pyx_n_s_ListItem_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":106
 *             self._label = l
 *       @property
 *       def text(self):             # <<<<<<<<<<<<<<
 *             return self._text
 *       @text.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_7text, 0, __pyx_n_s_ListItem_text, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":105
 *       def label(self, l):
 *             self._label = l
 *       @property             # <<<<<<<<<<<<<<
 *       def text(self):
 *             return self._text
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":108
 *       def text(self):
 *             return self._text
 *       @text.setter             # <<<<<<<<<<<<<<
 *       def text(self, t):
 *             self._text = t
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_text);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_text);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":109
 *             return self._text
 *       @text.setter
 *       def text(self, t):             # <<<<<<<<<<<<<<
 *             self._text = t
 *       @property
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_9text, 0, __pyx_n_s_ListItem_text, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":112
 *             self._text = t
 *       @property
 *       def help(self):             # <<<<<<<<<<<<<<
 *             return self._help
 *       @help.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_11help, 0, __pyx_n_s_ListItem_help, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":111
 *       def text(self, t):
 *             self._text = t
 *       @property             # <<<<<<<<<<<<<<
 *       def help(self):
 *             return self._help
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_t_4) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":114
 *       def help(self):
 *             return self._help
 *       @help.setter             # <<<<<<<<<<<<<<
 *       def help(self, h):
 *             self._help = h
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_help);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_help);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":115
 *             return self._help
 *       @help.setter
 *       def help(self, h):             # <<<<<<<<<<<<<<
 *             self._help = h
 *       @property
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_13help, 0, __pyx_n_s_ListItem_help, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_t_4) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":118
 *             self._help = h
 *       @property
 *       def state(self):             # <<<<<<<<<<<<<<
 *             return self._state
 *       @state.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_15state, 0, __pyx_n_s_ListItem_state, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":117
 *       def help(self, h):
 *             self._help = h
 *       @property             # <<<<<<<<<<<<<<
 *       def state(self):
 *             return self._state
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":120
 *       def state(self):
 *             return self._state
 *       @state.setter             # <<<<<<<<<<<<<<
 *       def state(self, b):
 *             self._state = bool(b)
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_state);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_state);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":121
 *             return self._state
 *       @state.setter
 *       def state(self, b):             # <<<<<<<<<<<<<<
 *             self._state = bool(b)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_8ListItem_17state, 0, __pyx_n_s_ListItem_state, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_t_4) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":88
 *             self._coord = c
 * 
 * class ListItem(object):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for checklists / radio boxes.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ListItem, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ListItem, __pyx_t_4) < 0) __PYX_ERR(0, 88, __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;

  /* "bsd/dialog.pyx":124
 *             self._state = bool(b)
 * 
 * class FormInput(FormLabel):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for form input fields, which are a superset
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormLabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __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, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FormInput, __pyx_n_s_FormInput, (PyObject *) NULL, __pyx_n_s_bsd_dialog, __pyx_kp_s_A_wrapper_object_for_form_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":131
 *       called "value.")
 *       """
 *       def __init__(self, value="",             # <<<<<<<<<<<<<<
 *                    width=None,
 *                    position=None,
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_1__init__, 0, __pyx_n_s_FormInput___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__110);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":142
 *             self.hidden = hidden
 * 
 *       def __str__(self):             # <<<<<<<<<<<<<<
 *             return "<FormInput(value={}, width={}, position={}, maximum_input={}, readonly={}>".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_3__str__, 0, __pyx_n_s_FormInput___str, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":146
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 * 
 *       def __repr__(self):             # <<<<<<<<<<<<<<
 *             return "FormInput({}, width={}, position={}, maximum_input={}, readonly={})".format(
 *                   self.value, self.width, self.position, self.maximum_input, self.readonly)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_5__repr__, 0, __pyx_n_s_FormInput___repr, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":157
 *       """
 *       @property
 *       def value(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @value.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_7value, 0, __pyx_n_s_FormInput_value, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":156
 *       it'll be at least ''.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def value(self):
 *             return self._label
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":159
 *       def value(self):
 *             return self._label
 *       @value.setter             # <<<<<<<<<<<<<<
 *       def value(self, v):
 *             self._label = v
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_value);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_value);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":160
 *             return self._label
 *       @value.setter
 *       def value(self, v):             # <<<<<<<<<<<<<<
 *             self._label = v
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_9value, 0, __pyx_n_s_FormInput_value, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":169
 *       """
 *       @property
 *       def maximum_input(self):             # <<<<<<<<<<<<<<
 *             return self._max_input
 *       @maximum_input.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_11maximum_input, 0, __pyx_n_s_FormInput_maximum_input, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":168
 *       an input value wider than the display width.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def maximum_input(self):
 *             return self._max_input
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_maximum_input, __pyx_t_4) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":171
 *       def maximum_input(self):
 *             return self._max_input
 *       @maximum_input.setter             # <<<<<<<<<<<<<<
 *       def maximum_input(self, m):
 *             self._max_input = m
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_maximum_input);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_maximum_input);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":172
 *             return self._max_input
 *       @maximum_input.setter
 *       def maximum_input(self, m):             # <<<<<<<<<<<<<<
 *             self._max_input = m
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_13maximum_input, 0, __pyx_n_s_FormInput_maximum_input, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_maximum_input, __pyx_t_4) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":180
 *       """
 *       @property
 *       def hidden(self):             # <<<<<<<<<<<<<<
 *             return self._hidden
 *       @hidden.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_15hidden, 0, __pyx_n_s_FormInput_hidden, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":179
 *       forms.
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def hidden(self):
 *             return self._hidden
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_hidden, __pyx_t_4) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":182
 *       def hidden(self):
 *             return self._hidden
 *       @hidden.setter             # <<<<<<<<<<<<<<
 *       def hidden(self, b):
 *             self._hidden = bool(b)
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_hidden);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_hidden);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":183
 *             return self._hidden
 *       @hidden.setter
 *       def hidden(self, b):             # <<<<<<<<<<<<<<
 *             self._hidden = bool(b)
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9FormInput_17hidden, 0, __pyx_n_s_FormInput_hidden, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_hidden, __pyx_t_4) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":124
 *             self._state = bool(b)
 * 
 * class FormInput(FormLabel):             # <<<<<<<<<<<<<<
 *       """
 *       A wrapper object for form input fields, which are a superset
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FormInput, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FormInput, __pyx_t_4) < 0) __PYX_ERR(0, 124, __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;

  /* "bsd/dialog.pyx":445
 *       memcpy(<void*>&defs.dialog_state, <void*>state[1], sizeof(defs.DIALOG_STATE))
 * 
 * class Dialog(object):             # <<<<<<<<<<<<<<
 *       """
 *       Python interface to libdialog.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Dialog, __pyx_n_s_Dialog, (PyObject *) NULL, __pyx_n_s_bsd_dialog, __pyx_kp_s_Python_interface_to_libdialog_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":453
 *       a time.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             self.title = title
 *             self.prompt = prompt
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_1__init__, 0, __pyx_n_s_Dialog___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":472
 *             self.cancel_label = kwargs.pop("cancel_label", None)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_3run, 0, __pyx_n_s_Dialog_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":476
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             # This SHOULD be over-ridden by subclasses
 *             if self._result is None:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_5result, 0, __pyx_n_s_Dialog_result, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":475
 *             return None
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def result(self):
 *             # This SHOULD be over-ridden by subclasses
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_4) < 0) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":492
 * 
 *       @property
 *       def title(self):             # <<<<<<<<<<<<<<
 *             return self._title
 *       @title.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_7title, 0, __pyx_n_s_Dialog_title, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":491
 *             return self._result
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def title(self):
 *             return self._title
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_t_4) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":494
 *       def title(self):
 *             return self._title
 *       @title.setter             # <<<<<<<<<<<<<<
 *       def title(self, t):
 *             self._title = t
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_title);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_title);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":495
 *             return self._title
 *       @title.setter
 *       def title(self, t):             # <<<<<<<<<<<<<<
 *             self._title = t
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_9title, 0, __pyx_n_s_Dialog_title, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_t_4) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":499
 * 
 *       @property
 *       def prompt(self):             # <<<<<<<<<<<<<<
 *             return self._prompt
 *       @prompt.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_11prompt, 0, __pyx_n_s_Dialog_prompt, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":498
 *             self._title = t
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def prompt(self):
 *             return self._prompt
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_prompt, __pyx_t_4) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":501
 *       def prompt(self):
 *             return self._prompt
 *       @prompt.setter             # <<<<<<<<<<<<<<
 *       def prompt(self, p):
 *             self._prompt = p
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_prompt);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_prompt);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":502
 *             return self._prompt
 *       @prompt.setter
 *       def prompt(self, p):             # <<<<<<<<<<<<<<
 *             self._prompt = p
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_13prompt, 0, __pyx_n_s_Dialog_prompt, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_prompt, __pyx_t_4) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":506
 * 
 *       @property
 *       def height(self):             # <<<<<<<<<<<<<<
 *             return self._height
 *       @height.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_15height, 0, __pyx_n_s_Dialog_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":505
 *             self._prompt = p
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def height(self):
 *             return self._height
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_height, __pyx_t_4) < 0) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":508
 *       def height(self):
 *             return self._height
 *       @height.setter             # <<<<<<<<<<<<<<
 *       def height(self, h):
 *             self._height = h
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_height);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_height);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":509
 *             return self._height
 *       @height.setter
 *       def height(self, h):             # <<<<<<<<<<<<<<
 *             self._height = h
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_17height, 0, __pyx_n_s_Dialog_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_height, __pyx_t_4) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":513
 * 
 *       @property
 *       def width(self):             # <<<<<<<<<<<<<<
 *             return self._width
 *       @width.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_19width, 0, __pyx_n_s_Dialog_width, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":512
 *             self._height = h
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def width(self):
 *             return self._width
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_width, __pyx_t_4) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":515
 *       def width(self):
 *             return self._width
 *       @width.setter             # <<<<<<<<<<<<<<
 *       def width(self, w):
 *             self._width = w
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_width);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_width);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":516
 *             return self._width
 *       @width.setter
 *       def width(self, w):             # <<<<<<<<<<<<<<
 *             self._width = w
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_21width, 0, __pyx_n_s_Dialog_width, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_width, __pyx_t_4) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":523
 *       """
 *       @property
 *       def ok_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.ok_label
 *             if tstr:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_23ok_label, 0, __pyx_n_s_Dialog_ok_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":522
 *       Labels:  OK, No, Yes, Cancel
 *       """
 *       @property             # <<<<<<<<<<<<<<
 *       def ok_label(self):
 *             tstr = defs.dialog_vars.ok_label
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ok_label, __pyx_t_4) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":529
 *             else:
 *                   return "OK"
 *       @ok_label.setter             # <<<<<<<<<<<<<<
 *       def ok_label(self, txt):
 *             if txt:
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ok_label);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_ok_label);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":530
 *                   return "OK"
 *       @ok_label.setter
 *       def ok_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_25ok_label, 0, __pyx_n_s_Dialog_ok_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ok_label, __pyx_t_4) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":539
 * 
 *       @property
 *       def no_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.no_label
 *             if tstr:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_27no_label, 0, __pyx_n_s_Dialog_no_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":538
 *                   defs.dialog_vars.ok_label = <char*>NULL
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def no_label(self):
 *             tstr = defs.dialog_vars.no_label
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_no_label, __pyx_t_4) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":545
 *             else:
 *                   return "No"
 *       @no_label.setter             # <<<<<<<<<<<<<<
 *       def no_label(self, txt):
 *             if txt:
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_no_label);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_no_label);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":546
 *                   return "No"
 *       @no_label.setter
 *       def no_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_29no_label, 0, __pyx_n_s_Dialog_no_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_no_label, __pyx_t_4) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":555
 * 
 *       @property
 *       def yes_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.yes_label
 *             if tstr:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_31yes_label, 0, __pyx_n_s_Dialog_yes_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":554
 *                   defs.dialog_vars.no_label = <char*>NULL
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def yes_label(self):
 *             tstr = defs.dialog_vars.yes_label
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_yes_label, __pyx_t_4) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":561
 *             else:
 *                   return "Yes"
 *       @yes_label.setter             # <<<<<<<<<<<<<<
 *       def yes_label(self, txt):
 *             if txt:
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_yes_label);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_yes_label);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":562
 *                   return "Yes"
 *       @yes_label.setter
 *       def yes_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_33yes_label, 0, __pyx_n_s_Dialog_yes_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_yes_label, __pyx_t_4) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":571
 * 
 *       @property
 *       def cancel_label(self):             # <<<<<<<<<<<<<<
 *             tstr = defs.dialog_vars.cancel_label
 *             if tstr:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_35cancel_label, 0, __pyx_n_s_Dialog_cancel_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":570
 *                   defs.dialog_vars.yes_label = <char*>NULL
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def cancel_label(self):
 *             tstr = defs.dialog_vars.cancel_label
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_cancel_label, __pyx_t_4) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":577
 *             else:
 *                   return "Cancel"
 *       @cancel_label.setter             # <<<<<<<<<<<<<<
 *       def cancel_label(self, txt):
 *             if txt:
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_cancel_label);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cancel_label);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":578
 *                   return "Cancel"
 *       @cancel_label.setter
 *       def cancel_label(self, txt):             # <<<<<<<<<<<<<<
 *             if txt:
 *                   tmp_stupid_string = txt.encode('utf-8')
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_37cancel_label, 0, __pyx_n_s_Dialog_cancel_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_cancel_label, __pyx_t_4) < 0) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":586
 *                   defs.dialog_vars.cancel_label = <char*>NULL
 * 
 *       def clear(self):             # <<<<<<<<<<<<<<
 *             defs.dlg_clear()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_6Dialog_39clear, 0, __pyx_n_s_Dialog_clear, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_clear, __pyx_t_4) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":445
 *       memcpy(<void*>&defs.dialog_state, <void*>state[1], sizeof(defs.DIALOG_STATE))
 * 
 * class Dialog(object):             # <<<<<<<<<<<<<<
 *       """
 *       Python interface to libdialog.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Dialog, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dialog, __pyx_t_4) < 0) __PYX_ERR(0, 445, __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;

  /* "bsd/dialog.pyx":589
 *             defs.dlg_clear()
 * 
 * class YesNo(Dialog):             # <<<<<<<<<<<<<<
 *       """
 *       Dialog window with two options (default "Yes" and "No").
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_YesNo, __pyx_n_s_YesNo, (PyObject *) NULL, __pyx_n_s_bsd_dialog, __pyx_kp_s_Dialog_window_with_two_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":594
 *       By default, the Yes button is selected.
 *       """
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(YesNo, self).__init__(title, prompt, **kwargs)
 *             self.default = kwargs.pop("default", False)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5YesNo_1__init__, 0, __pyx_n_s_YesNo___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":598
 *             self.default = kwargs.pop("default", False)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Do all the work.
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5YesNo_3run, 0, __pyx_n_s_YesNo_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":619
 * 
 *       @property
 *       def default(self):             # <<<<<<<<<<<<<<
 *             return self._default
 *       @default.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5YesNo_5default, 0, __pyx_n_s_YesNo_default, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":618
 *             return rv
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def default(self):
 *             return self._default
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_t_4) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":621
 *       def default(self):
 *             return self._default
 *       @default.setter             # <<<<<<<<<<<<<<
 *       def default(self, b):
 *             self._default = b
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_default);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_default);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":622
 *             return self._default
 *       @default.setter
 *       def default(self, b):             # <<<<<<<<<<<<<<
 *             self._default = b
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5YesNo_7default, 0, __pyx_n_s_YesNo_default, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_t_4) < 0) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":589
 *             defs.dlg_clear()
 * 
 * class YesNo(Dialog):             # <<<<<<<<<<<<<<
 *       """
 *       Dialog window with two options (default "Yes" and "No").
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_YesNo, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_YesNo, __pyx_t_4) < 0) __PYX_ERR(0, 589, __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;

  /* "bsd/dialog.pyx":625
 *             self._default = b
 * 
 * class MessageBox(Dialog):             # <<<<<<<<<<<<<<
 * 
 *       def __init__(self, title, prompt, **kwargs):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __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, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_MessageBox, __pyx_n_s_MessageBox, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":627
 * class MessageBox(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             """
 *             Display a message, with an OK button.  (Use the label if set.)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_1__init__, 0, __pyx_n_s_MessageBox___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":636
 * 
 *       @property
 *       def label(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *       @label.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_3label, 0, __pyx_n_s_MessageBox_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":635
 *             self.wait = kwargs.pop("wait", True)
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def label(self):
 *             return self._label
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":638
 *       def label(self):
 *             return self._label
 *       @label.setter             # <<<<<<<<<<<<<<
 *       def label(self, l):
 *             self._label = l
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_label);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_label);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":639
 *             return self._label
 *       @label.setter
 *       def label(self, l):             # <<<<<<<<<<<<<<
 *             self._label = l
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_5label, 0, __pyx_n_s_MessageBox_label, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_t_4) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":643
 * 
 *       @property
 *       def wait(self):             # <<<<<<<<<<<<<<
 *             return self._wait
 *       @wait.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_7wait, 0, __pyx_n_s_MessageBox_wait, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":642
 *             self._label = l
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def wait(self):
 *             return self._wait
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_wait, __pyx_t_4) < 0) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":645
 *       def wait(self):
 *             return self._wait
 *       @wait.setter             # <<<<<<<<<<<<<<
 *       def wait(self, w):
 *             self._wait = bool(w)
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wait);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_wait);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":646
 *             return self._wait
 *       @wait.setter
 *       def wait(self, w):             # <<<<<<<<<<<<<<
 *             self._wait = bool(w)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_9wait, 0, __pyx_n_s_MessageBox_wait, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_wait, __pyx_t_4) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":649
 *             self._wait = bool(w)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if self.width is None:
 *                   self.width = len(self.title) + 10
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_10MessageBox_11run, 0, __pyx_n_s_MessageBox_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":625
 *             self._default = b
 * 
 * class MessageBox(Dialog):             # <<<<<<<<<<<<<<
 * 
 *       def __init__(self, title, prompt, **kwargs):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MessageBox, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MessageBox, __pyx_t_4) < 0) __PYX_ERR(0, 625, __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;

  /* "bsd/dialog.pyx":663
 *             return result
 * 
 * class Menu(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Menu, __pyx_n_s_Menu, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":664
 * 
 * class Menu(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 *             # Note that these can be set later
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_1__init__, 0, __pyx_n_s_Menu___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":671
 * 
 *       @property
 *       def menu_height(self):             # <<<<<<<<<<<<<<
 *             return self._menu_height
 *       @menu_height.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_3menu_height, 0, __pyx_n_s_Menu_menu_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":670
 *             self.menu_items = kwargs.pop("menu_items", None)
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def menu_height(self):
 *             return self._menu_height
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_menu_height, __pyx_t_4) < 0) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":673
 *       def menu_height(self):
 *             return self._menu_height
 *       @menu_height.setter             # <<<<<<<<<<<<<<
 *       def menu_height(self, m):
 *             self._menu_height = m
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_menu_height);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_menu_height);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":674
 *             return self._menu_height
 *       @menu_height.setter
 *       def menu_height(self, m):             # <<<<<<<<<<<<<<
 *             self._menu_height = m
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_5menu_height, 0, __pyx_n_s_Menu_menu_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_menu_height, __pyx_t_4) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":678
 * 
 *       @property
 *       def menu_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @menu_items.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_7menu_items, 0, __pyx_n_s_Menu_menu_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":677
 *             self._menu_height = m
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def menu_items(self):
 *             return self._items
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_menu_items, __pyx_t_4) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":680
 *       def menu_items(self):
 *             return self._items
 *       @menu_items.setter             # <<<<<<<<<<<<<<
 *       def menu_items(self, i):
 *             self._items = i
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_menu_items);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_menu_items);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":681
 *             return self._items
 *       @menu_items.setter
 *       def menu_items(self, i):             # <<<<<<<<<<<<<<
 *             self._items = i
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_9menu_items, 0, __pyx_n_s_Menu_menu_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_menu_items, __pyx_t_4) < 0) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":684
 *             self._items = i
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.menu_items:
 *                   raise ValueError("Menu must have items to display")
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_11run, 0, __pyx_n_s_Menu_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":740
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Menu_13result, 0, __pyx_n_s_Menu_result, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":739
 *                   raise DialogError(code=result, message="Unknown return value")
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def result(self):
 *             if self._result is None:
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_4) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":663
 *             return result
 * 
 * class Menu(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Menu, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Menu, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Menu, __pyx_t_4) < 0) __PYX_ERR(0, 663, __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;

  /* "bsd/dialog.pyx":745
 *             return self._result
 * 
 * class CheckList(Dialog):             # <<<<<<<<<<<<<<
 * 
 *       def __init__(self, title, prompt, **kwargs):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __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, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CheckList, __pyx_n_s_CheckList, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":747
 * class CheckList(Dialog):
 * 
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(CheckList, self).__init__(title, prompt, **kwargs)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_1__init__, 0, __pyx_n_s_CheckList___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":755
 * 
 *       @property
 *       def list_height(self):             # <<<<<<<<<<<<<<
 *             return self._list_height
 *       @list_height.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_3list_height, 0, __pyx_n_s_CheckList_list_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":754
 *             self._radio = False
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def list_height(self):
 *             return self._list_height
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_list_height, __pyx_t_4) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":757
 *       def list_height(self):
 *             return self._list_height
 *       @list_height.setter             # <<<<<<<<<<<<<<
 *       def list_height(self, h):
 *             self._list_height = h
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_list_height);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_height);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":758
 *             return self._list_height
 *       @list_height.setter
 *       def list_height(self, h):             # <<<<<<<<<<<<<<
 *             self._list_height = h
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_5list_height, 0, __pyx_n_s_CheckList_list_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_list_height, __pyx_t_4) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":762
 * 
 *       @property
 *       def list_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @list_items.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_7list_items, 0, __pyx_n_s_CheckList_list_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":761
 *             self._list_height = h
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def list_items(self):
 *             return self._items
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_list_items, __pyx_t_4) < 0) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":764
 *       def list_items(self):
 *             return self._items
 *       @list_items.setter             # <<<<<<<<<<<<<<
 *       def list_items(self, l):
 *             self._items = l
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_list_items);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_items);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/dialog.pyx":765
 *             return self._items
 *       @list_items.setter
 *       def list_items(self, l):             # <<<<<<<<<<<<<<
 *             self._items = l
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_9list_items, 0, __pyx_n_s_CheckList_list_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_list_items, __pyx_t_4) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":769
 * 
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.list_items:
 *                   raise ValueError("A checklist needs item to check")
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_11run, 0, __pyx_n_s_CheckList_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":830
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9CheckList_13result, 0, __pyx_n_s_CheckList_result, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":829
 *                   raise DialogError(code=result, message="Unknown return value")
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def result(self):
 *             if self._result is None:
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 829, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_4) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":745
 *             return self._result
 * 
 * class CheckList(Dialog):             # <<<<<<<<<<<<<<
 * 
 *       def __init__(self, title, prompt, **kwargs):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CheckList, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CheckList, __pyx_t_4) < 0) __PYX_ERR(0, 745, __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;

  /* "bsd/dialog.pyx":835
 *             return self._result
 * 
 * class Gauge(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Gauge, __pyx_n_s_Gauge, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":836
 * 
 * class Gauge(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 *             self._pct = kwargs.pop("percentage", 0)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5Gauge_1__init__, 0, __pyx_n_s_Gauge___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":841
 * 
 *       @property
 *       def percentage(self):             # <<<<<<<<<<<<<<
 *             return self._pct
 *       @percentage.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5Gauge_3percentage, 0, __pyx_n_s_Gauge_percentage, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":840
 *             self._pct = kwargs.pop("percentage", 0)
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def percentage(self):
 *             return self._pct
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __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;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_percentage, __pyx_t_4) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":843
 *       def percentage(self):
 *             return self._pct
 *       @percentage.setter             # <<<<<<<<<<<<<<
 *       def percentage(self, pctg):
 *             self._pct = pctg
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_percentage);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_percentage);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "bsd/dialog.pyx":844
 *             return self._pct
 *       @percentage.setter
 *       def percentage(self, pctg):             # <<<<<<<<<<<<<<
 *             self._pct = pctg
 *             #defs.dlg_update_gauge(<void*>self._gauge, self._pct)
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5Gauge_5percentage, 0, __pyx_n_s_Gauge_percentage, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_percentage, __pyx_t_4) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":849
 *             defs.dlg_update_gauge(stupid_gauge, self._pct)
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             """
 *             Allocate the gauge.
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5Gauge_7run, 0, __pyx_n_s_Gauge_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":864
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             global stupid_gauge
 *             if stupid_gauge:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_5Gauge_9result, 0, __pyx_n_s_Gauge_result, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":863
 *                                                    self.height, self.width, self.percentage)
 *             defs.dlg_update_gauge(stupid_gauge, self.percentage)
 *       @property             # <<<<<<<<<<<<<<
 *       def result(self):
 *             global stupid_gauge
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_4) < 0) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":835
 *             return self._result
 * 
 * class Gauge(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Gauge, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Gauge, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Gauge, __pyx_t_4) < 0) __PYX_ERR(0, 835, __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;

  /* "bsd/dialog.pyx":877
 *             return defs.DLG_EXIT_OK
 * 
 * class RadioList(CheckList):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CheckList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __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, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_RadioList, __pyx_n_s_RadioList, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":878
 * 
 * class RadioList(CheckList):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 *             self._radio = True
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_9RadioList_1__init__, 0, __pyx_n_s_RadioList___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":877
 *             return defs.DLG_EXIT_OK
 * 
 * class RadioList(CheckList):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(RadioList, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_RadioList, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RadioList, __pyx_t_4) < 0) __PYX_ERR(0, 877, __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;

  /* "bsd/dialog.pyx":884
 *             self.list_items = kwargs.pop("list_items", None)
 * 
 * class Form(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Form, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dialog); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Form, __pyx_n_s_Form, (PyObject *) NULL, __pyx_n_s_bsd_dialog, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/dialog.pyx":885
 * 
 * class Form(Dialog):
 *       def __init__(self, title, prompt, **kwargs):             # <<<<<<<<<<<<<<
 *             super(Form, self).__init__(title, prompt, **kwargs)
 *             self.form_height = kwargs.pop("form_height", None)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_1__init__, 0, __pyx_n_s_Form___init, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":891
 * 
 *       @property
 *       def form_height(self):             # <<<<<<<<<<<<<<
 *             return self._form_height
 *       @form_height.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_3form_height, 0, __pyx_n_s_Form_form_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":890
 *             self.form_items = kwargs.pop("form_items", None)
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def form_height(self):
 *             return self._form_height
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_form_height, __pyx_t_4) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":893
 *       def form_height(self):
 *             return self._form_height
 *       @form_height.setter             # <<<<<<<<<<<<<<
 *       def form_height(self, h):
 *             self._form_height = h
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_form_height);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_form_height);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "bsd/dialog.pyx":894
 *             return self._form_height
 *       @form_height.setter
 *       def form_height(self, h):             # <<<<<<<<<<<<<<
 *             self._form_height = h
 *       @property
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_5form_height, 0, __pyx_n_s_Form_form_height, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_form_height, __pyx_t_4) < 0) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":897
 *             self._form_height = h
 *       @property
 *       def form_items(self):             # <<<<<<<<<<<<<<
 *             return self._items
 *       @form_items.setter
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_7form_items, 0, __pyx_n_s_Form_form_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":896
 *       def form_height(self, h):
 *             self._form_height = h
 *       @property             # <<<<<<<<<<<<<<
 *       def form_items(self):
 *             return self._items
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_form_items, __pyx_t_4) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":899
 *       def form_items(self):
 *             return self._items
 *       @form_items.setter             # <<<<<<<<<<<<<<
 *       def form_items(self, f):
 *             self._items = f
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_form_items);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_form_items);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "bsd/dialog.pyx":900
 *             return self._items
 *       @form_items.setter
 *       def form_items(self, f):             # <<<<<<<<<<<<<<
 *             self._items = f
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_9form_items, 0, __pyx_n_s_Form_form_items, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_form_items, __pyx_t_4) < 0) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":903
 *             self._items = f
 * 
 *       def run(self):             # <<<<<<<<<<<<<<
 *             if not self.form_items:
 *                   raise ValueError("Form items must contain values")
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_11run, 0, __pyx_n_s_Form_run, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_run, __pyx_t_4) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":987
 * 
 *       @property
 *       def result(self):             # <<<<<<<<<<<<<<
 *             if self._result is None:
 *                   self.run()
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3bsd_6dialog_4Form_13result, 0, __pyx_n_s_Form_result, NULL, __pyx_n_s_bsd_dialog, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "bsd/dialog.pyx":986
 *                   raise DialogError(code=result, message="Unknown return value")
 * 
 *       @property             # <<<<<<<<<<<<<<
 *       def result(self):
 *             if self._result is None:
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_4) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/dialog.pyx":884
 *             self.list_items = kwargs.pop("list_items", None)
 * 
 * class Form(Dialog):             # <<<<<<<<<<<<<<
 *       def __init__(self, title, prompt, **kwargs):
 *             super(Form, self).__init__(title, prompt, **kwargs)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Form, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Form, __pyx_t_4) < 0) __PYX_ERR(0, 884, __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;

  /* "bsd/dialog.pyx":1
 * import os, sys             # <<<<<<<<<<<<<<
 * import types
 * import enum
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init bsd.dialog", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init bsd.dialog");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #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((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#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;
}

/* 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

/* 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) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    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

/* PyObjectCallNoArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#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

/* SaveResetException */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    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;
    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;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
    #if CYTHON_COMPILING_IN_CPYTHON
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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
    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;
    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_COMPILING_IN_CPYTHON
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

/* 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;
}

/* 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);
}

/* GetModuleGlobalName */
      static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* decode_c_string */
        static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* 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_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || 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;
}

/* GetItemInt */
        static CYTHON_INLINE 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_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, 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_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, 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_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (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((n >= 0) & (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));
}

/* 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 PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        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 = PyThreadState_GET();
        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

/* PyIntBinop */
          #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #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 && PY_MAJOR_VERSION >= 3
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
        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;
                    } 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;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
    }
    #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

/* PyIntBinop */
          #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #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_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
        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;
                    } 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;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* ExtTypeTest */
          static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* SetVTable */
          static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* 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_VERSION_HEX < 0x03030000
    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, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* 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;
}

/* 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 */
          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)
{
    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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    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_COMPILING_IN_CPYTHON
    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) {
    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) {
    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) {
    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) {
    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) {
    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) {
    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(__pyx_CyFunctionObject, func.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 = 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)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(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("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    PyObject *self = f->m_self;
    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)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 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                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;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
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_Call,
    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
};
static int __pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__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 (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    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);
}

/* 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;
    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(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* 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

/* 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) -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);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        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) -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))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } 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))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#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 unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned 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 (unsigned int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
            } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned 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 (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (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))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } 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))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#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;
}

/* CheckBinaryVersion */
              static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
              static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #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;
        ++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 char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__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)) {
#if PY_VERSION_HEX < 0x03030000
        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
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (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
    } 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 PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  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(x);
  }
#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_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
