関数 | |
BOOL | py_from_FORM_1 (PyObject **dict, FORM_1 *form) |
BOOL | py_to_FORM (FORM *form, PyObject *dict) |
変数 | |
pyconv | py_FORM [] |
pyconv | py_FORM_1 [] |
py_spoolss_forms_conv.c の 47 行で定義されています。
参照先 from_struct()・py_FORM_1.
参照元 spoolss_hnd_enumforms()・spoolss_hnd_getform().
00048 { 00049 *dict = from_struct(form, py_FORM_1); 00050 00051 PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); 00052 00053 return True; 00054 }
py_spoolss_forms_conv.c の 56 行で定義されています。
参照先 init_unistr2()・_form::name・name・py_FORM・result・to_struct()・UNI_STR_TERMINATE.
参照元 spoolss_hnd_addform()・spoolss_hnd_setform().
00057 { 00058 PyObject *obj, *dict_copy = PyDict_Copy(dict); 00059 char *name; 00060 BOOL result = False; 00061 00062 if (!(obj = PyDict_GetItemString(dict_copy, "name")) || 00063 !PyString_Check(obj)) 00064 goto done; 00065 00066 PyDict_DelItemString(dict_copy, "name"); 00067 00068 if (!(obj = PyDict_GetItemString(dict_copy, "level")) || 00069 !PyInt_Check(obj)) 00070 goto done; 00071 00072 PyDict_DelItemString(dict_copy, "level"); 00073 00074 if (!to_struct(form, dict_copy, py_FORM)) 00075 goto done; 00076 00077 /* Careful! We can't call PyString_AsString(obj) then delete 00078 obj and still expect to have our pointer pointing somewhere 00079 useful. */ 00080 00081 obj = PyDict_GetItemString(dict, "name"); 00082 name = PyString_AsString(obj); 00083 00084 init_unistr2(&form->name, name, UNI_STR_TERMINATE); 00085 00086 result = True; 00087 00088 done: 00089 Py_DECREF(dict_copy); 00090 return result; 00091 }
初期値:
{ { "flags", PY_UINT32, offsetof(FORM, flags) }, { "width", PY_UINT32, offsetof(FORM, size_x) }, { "length", PY_UINT32, offsetof(FORM, size_y) }, { "top", PY_UINT32, offsetof(FORM, top) }, { "left", PY_UINT32, offsetof(FORM, left) }, { "right", PY_UINT32, offsetof(FORM, right) }, { "bottom", PY_UINT32, offsetof(FORM, bottom) }, { NULL } }
py_spoolss_forms_conv.c の 24 行で定義されています。
参照元 py_to_FORM().
初期値:
{ { "flags", PY_UINT32, offsetof(FORM_1, flag) }, { "width", PY_UINT32, offsetof(FORM_1, width) }, { "length", PY_UINT32, offsetof(FORM_1, length) }, { "top", PY_UINT32, offsetof(FORM_1, top) }, { "left", PY_UINT32, offsetof(FORM_1, left) }, { "right", PY_UINT32, offsetof(FORM_1, right) }, { "bottom", PY_UINT32, offsetof(FORM_1, bottom) }, { "name", PY_UNISTR, offsetof(FORM_1, name) }, { NULL } }
py_spoolss_forms_conv.c の 35 行で定義されています。
参照元 py_from_FORM_1().