Mercurial > cpython-lru_cache-weakref
annotate Mac/Modules/list/_Listmodule.c @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | fd25030223b0 |
| children |
| rev | line source |
|---|---|
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 /* ========================== Module _List ========================== */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 #include "Python.h" |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
6 #ifndef __LP64__ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 #include "pymactoolbox.h" |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 /* Macro to test whether a weak-loaded CFM function exists */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
13 PyErr_SetString(PyExc_NotImplementedError, \ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
14 "Not available in this shared library/OS version"); \ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
15 return NULL; \ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 }} while(0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
19 #include <Carbon/Carbon.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
20 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
21 #ifdef USE_TOOLBOX_OBJECT_GLUE |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
22 extern PyObject *_ListObj_New(ListHandle); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
23 extern int _ListObj_Convert(PyObject *, ListHandle *); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
24 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
25 #define ListObj_New _ListObj_New |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
26 #define ListObj_Convert _ListObj_Convert |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
27 #endif |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
28 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
29 #define as_List(x) ((ListHandle)x) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 #define as_Resource(lh) ((Handle)lh) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
31 |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
32 static ListDefUPP myListDefFunctionUPP; |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
33 |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
34 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
35 static PyObject *List_Error; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
36 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
37 /* ------------------------ Object type List ------------------------ */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
38 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
39 PyTypeObject List_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
40 |
|
26720
a12e1727850a
Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26610
diff
changeset
|
41 #define ListObj_Check(x) ((x)->ob_type == &List_Type || PyObject_TypeCheck((x), &List_Type)) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
42 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
43 typedef struct ListObject { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
44 PyObject_HEAD |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
45 ListHandle ob_itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
46 PyObject *ob_ldef_func; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
47 int ob_must_be_disposed; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
48 } ListObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
49 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
50 PyObject *ListObj_New(ListHandle itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
51 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
52 ListObject *it; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
53 if (itself == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
54 PyErr_SetString(List_Error,"Cannot create null List"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
55 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
56 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
57 it = PyObject_NEW(ListObject, &List_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
58 if (it == NULL) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
59 it->ob_itself = itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
60 it->ob_ldef_func = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
61 it->ob_must_be_disposed = 1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
62 SetListRefCon(itself, (long)it); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
63 return (PyObject *)it; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
64 } |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
65 |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
66 int ListObj_Convert(PyObject *v, ListHandle *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
67 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
68 if (!ListObj_Check(v)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
69 { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
70 PyErr_SetString(PyExc_TypeError, "List required"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
71 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
72 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
73 *p_itself = ((ListObject *)v)->ob_itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
74 return 1; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
75 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
76 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
77 static void ListObj_dealloc(ListObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
78 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
79 Py_XDECREF(self->ob_ldef_func); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
80 self->ob_ldef_func = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
81 SetListRefCon(self->ob_itself, (long)0); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
82 if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
83 self->ob_type->tp_free((PyObject *)self); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
84 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
85 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
86 static PyObject *ListObj_LAddColumn(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
88 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
89 short _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
90 short count; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
91 short colNum; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
92 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
93 &count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
94 &colNum)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
95 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
96 _rv = LAddColumn(count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
97 colNum, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
98 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
99 _res = Py_BuildValue("h", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
100 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
101 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
102 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
103 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
104 static PyObject *ListObj_LAddRow(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
105 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
106 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
107 short _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
108 short count; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
109 short rowNum; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
110 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
111 &count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
112 &rowNum)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
113 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
114 _rv = LAddRow(count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
115 rowNum, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
116 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
117 _res = Py_BuildValue("h", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
118 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
119 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
120 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
121 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
122 static PyObject *ListObj_LDelColumn(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
123 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
124 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
125 short count; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
126 short colNum; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
127 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
128 &count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
129 &colNum)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
130 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
131 LDelColumn(count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
132 colNum, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
133 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
134 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
135 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
136 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
137 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
138 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
139 static PyObject *ListObj_LDelRow(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
140 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
141 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
142 short count; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
143 short rowNum; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
144 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
145 &count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
146 &rowNum)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
147 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
148 LDelRow(count, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
149 rowNum, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
150 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
151 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
152 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
153 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
154 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
155 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
156 static PyObject *ListObj_LGetSelect(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
157 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
158 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
159 Boolean _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
160 Boolean next; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
161 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
162 if (!PyArg_ParseTuple(_args, "bO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
163 &next, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
164 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
165 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
166 _rv = LGetSelect(next, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
167 &theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
168 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
169 _res = Py_BuildValue("bO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
170 _rv, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
171 PyMac_BuildPoint, theCell); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
172 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
173 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
174 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
175 static PyObject *ListObj_LLastClick(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
176 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
177 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
178 Point _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
179 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
180 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
181 _rv = LLastClick(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
182 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
183 PyMac_BuildPoint, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
184 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
185 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
186 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
187 static PyObject *ListObj_LNextCell(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
188 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
189 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
190 Boolean _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
191 Boolean hNext; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
192 Boolean vNext; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
193 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
194 if (!PyArg_ParseTuple(_args, "bbO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
195 &hNext, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
196 &vNext, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
197 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
198 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
199 _rv = LNextCell(hNext, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
200 vNext, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
201 &theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
202 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
203 _res = Py_BuildValue("bO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
204 _rv, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
205 PyMac_BuildPoint, theCell); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
206 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
207 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
208 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
209 static PyObject *ListObj_LSize(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
210 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
211 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
212 short listWidth; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
213 short listHeight; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
214 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
215 &listWidth, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
216 &listHeight)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
217 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
218 LSize(listWidth, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
219 listHeight, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
220 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
221 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
222 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
223 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
224 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
225 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
226 static PyObject *ListObj_LSetDrawingMode(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
227 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
228 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
229 Boolean drawIt; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
230 if (!PyArg_ParseTuple(_args, "b", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
231 &drawIt)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
232 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
233 LSetDrawingMode(drawIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
234 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
235 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
236 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
237 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
238 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
239 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
240 static PyObject *ListObj_LScroll(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
241 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
242 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
243 short dCols; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
244 short dRows; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
245 if (!PyArg_ParseTuple(_args, "hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
246 &dCols, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
247 &dRows)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
248 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
249 LScroll(dCols, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
250 dRows, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
251 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
252 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
253 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
254 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
255 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
256 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
257 static PyObject *ListObj_LAutoScroll(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
258 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
259 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
260 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
261 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
262 LAutoScroll(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
263 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
264 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
265 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
266 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
267 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
268 static PyObject *ListObj_LUpdate(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
269 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
270 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
271 RgnHandle theRgn; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
272 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
273 ResObj_Convert, &theRgn)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
274 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
275 LUpdate(theRgn, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
276 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
277 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
278 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
279 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
280 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
281 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
282 static PyObject *ListObj_LActivate(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
283 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
284 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
285 Boolean act; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
286 if (!PyArg_ParseTuple(_args, "b", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
287 &act)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
288 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
289 LActivate(act, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
290 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
291 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
292 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
293 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
294 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
295 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
296 static PyObject *ListObj_LCellSize(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
297 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
298 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
299 Point cSize; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
300 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
301 PyMac_GetPoint, &cSize)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
302 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
303 LCellSize(cSize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
304 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
305 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
306 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
307 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
308 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
309 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
310 static PyObject *ListObj_LClick(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
311 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
312 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
313 Boolean _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
314 Point pt; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
315 EventModifiers modifiers; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
316 if (!PyArg_ParseTuple(_args, "O&H", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
317 PyMac_GetPoint, &pt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
318 &modifiers)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
319 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
320 _rv = LClick(pt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
321 modifiers, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
322 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
323 _res = Py_BuildValue("b", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
324 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
325 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
326 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
327 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
328 static PyObject *ListObj_LAddToCell(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
329 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
330 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
331 char *dataPtr__in__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
332 short dataPtr__len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
333 int dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
334 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
335 if (!PyArg_ParseTuple(_args, "s#O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
336 &dataPtr__in__, &dataPtr__in_len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
337 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
338 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
339 dataPtr__len__ = dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
340 LAddToCell(dataPtr__in__, dataPtr__len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
341 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
342 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
343 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
344 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
345 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
346 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
347 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
348 static PyObject *ListObj_LClrCell(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
349 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
350 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
351 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
352 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
353 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
354 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
355 LClrCell(theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
356 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
357 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
358 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
359 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
360 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
361 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
362 static PyObject *ListObj_LGetCell(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
363 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
364 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
365 char *dataPtr__out__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
366 short dataPtr__len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
367 int dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
368 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
369 if (!PyArg_ParseTuple(_args, "iO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
370 &dataPtr__in_len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
371 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
372 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
373 if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
374 { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
375 PyErr_NoMemory(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
376 goto dataPtr__error__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
377 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
378 dataPtr__len__ = dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
379 LGetCell(dataPtr__out__, &dataPtr__len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
380 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
381 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
382 _res = Py_BuildValue("s#", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
383 dataPtr__out__, (int)dataPtr__len__); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
384 free(dataPtr__out__); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
385 dataPtr__error__: ; |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
386 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
387 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
388 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
389 static PyObject *ListObj_LRect(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
390 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
391 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
392 Rect cellRect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
393 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
394 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
395 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
396 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
397 LRect(&cellRect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
398 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
399 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
400 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
401 PyMac_BuildRect, &cellRect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
402 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
403 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
404 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
405 static PyObject *ListObj_LSetCell(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
406 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
407 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
408 char *dataPtr__in__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
409 short dataPtr__len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
410 int dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
411 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
412 if (!PyArg_ParseTuple(_args, "s#O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
413 &dataPtr__in__, &dataPtr__in_len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
414 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
415 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
416 dataPtr__len__ = dataPtr__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
417 LSetCell(dataPtr__in__, dataPtr__len__, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
418 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
419 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
420 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
421 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
422 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
423 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
424 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
425 static PyObject *ListObj_LSetSelect(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
426 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
427 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
428 Boolean setIt; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
429 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
430 if (!PyArg_ParseTuple(_args, "bO&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
431 &setIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
432 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
433 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
434 LSetSelect(setIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
435 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
436 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
437 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
438 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
439 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
440 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
441 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
442 static PyObject *ListObj_LDraw(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
443 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
444 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
445 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
446 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
447 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
448 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
449 LDraw(theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
450 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
451 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
452 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
453 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
454 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
455 |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
456 static PyObject *ListObj_LGetCellDataLocation(ListObject *_self, PyObject *_args) |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
457 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
458 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
459 short offset; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
460 short len; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
461 Point theCell; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
462 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
463 PyMac_GetPoint, &theCell)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
464 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
465 LGetCellDataLocation(&offset, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
466 &len, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
467 theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
468 _self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
469 _res = Py_BuildValue("hh", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
470 offset, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
471 len); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
472 return _res; |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
473 } |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
474 |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
475 static PyObject *ListObj_GetListPort(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
476 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
477 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
478 CGrafPtr _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
479 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
480 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
481 _rv = GetListPort(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
482 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
483 GrafObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
484 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
485 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
486 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
487 static PyObject *ListObj_GetListVerticalScrollBar(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
488 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
489 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
490 ControlHandle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
491 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
492 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
493 _rv = GetListVerticalScrollBar(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
494 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
495 CtlObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
496 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
497 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
498 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
499 static PyObject *ListObj_GetListHorizontalScrollBar(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
500 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
501 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
502 ControlHandle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
503 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
504 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
505 _rv = GetListHorizontalScrollBar(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
506 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
507 CtlObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
508 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
509 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
510 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
511 static PyObject *ListObj_GetListActive(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
512 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
513 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
514 Boolean _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
515 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
516 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
517 _rv = GetListActive(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
518 _res = Py_BuildValue("b", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
519 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
520 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
521 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
522 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
523 static PyObject *ListObj_GetListClickTime(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
524 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
525 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
526 SInt32 _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
527 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
528 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
529 _rv = GetListClickTime(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
530 _res = Py_BuildValue("l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
531 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
532 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
533 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
534 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
535 static PyObject *ListObj_GetListRefCon(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
536 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
537 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
538 SInt32 _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
539 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
540 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
541 _rv = GetListRefCon(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
542 _res = Py_BuildValue("l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
543 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
544 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
545 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
546 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
547 static PyObject *ListObj_GetListDefinition(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
548 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
549 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
550 Handle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
551 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
552 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
553 _rv = GetListDefinition(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
554 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
555 ResObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
556 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
557 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
558 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
559 static PyObject *ListObj_GetListUserHandle(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
560 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
561 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
562 Handle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
563 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
564 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
565 _rv = GetListUserHandle(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
566 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
567 ResObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
568 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
569 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
570 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
571 static PyObject *ListObj_GetListDataHandle(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
572 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
573 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
574 DataHandle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
575 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
576 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
577 _rv = GetListDataHandle(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
578 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
579 ResObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
580 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
581 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
582 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
583 static PyObject *ListObj_GetListFlags(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
584 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
585 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
586 OptionBits _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
587 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
588 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
589 _rv = GetListFlags(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
590 _res = Py_BuildValue("l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
591 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
592 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
593 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
594 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
595 static PyObject *ListObj_GetListSelectionFlags(ListObject *_self, PyObject *_args) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
596 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
597 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
598 OptionBits _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
599 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
600 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
601 _rv = GetListSelectionFlags(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
602 _res = Py_BuildValue("l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
603 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
604 return _res; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
605 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
606 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
607 static PyObject *ListObj_as_Resource(ListObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
608 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
609 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
610 Handle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
611 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
612 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
613 _rv = as_Resource(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
614 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
615 ResObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
616 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
617 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
618 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
619 static PyMethodDef ListObj_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
620 {"LAddColumn", (PyCFunction)ListObj_LAddColumn, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
621 PyDoc_STR("(short count, short colNum) -> (short _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
622 {"LAddRow", (PyCFunction)ListObj_LAddRow, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
623 PyDoc_STR("(short count, short rowNum) -> (short _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
624 {"LDelColumn", (PyCFunction)ListObj_LDelColumn, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
625 PyDoc_STR("(short count, short colNum) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
626 {"LDelRow", (PyCFunction)ListObj_LDelRow, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
627 PyDoc_STR("(short count, short rowNum) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
628 {"LGetSelect", (PyCFunction)ListObj_LGetSelect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
629 PyDoc_STR("(Boolean next, Point theCell) -> (Boolean _rv, Point theCell)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
630 {"LLastClick", (PyCFunction)ListObj_LLastClick, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
631 PyDoc_STR("() -> (Point _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
632 {"LNextCell", (PyCFunction)ListObj_LNextCell, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
633 PyDoc_STR("(Boolean hNext, Boolean vNext, Point theCell) -> (Boolean _rv, Point theCell)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
634 {"LSize", (PyCFunction)ListObj_LSize, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
635 PyDoc_STR("(short listWidth, short listHeight) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
636 {"LSetDrawingMode", (PyCFunction)ListObj_LSetDrawingMode, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
637 PyDoc_STR("(Boolean drawIt) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
638 {"LScroll", (PyCFunction)ListObj_LScroll, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
639 PyDoc_STR("(short dCols, short dRows) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
640 {"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
641 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
642 {"LUpdate", (PyCFunction)ListObj_LUpdate, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
643 PyDoc_STR("(RgnHandle theRgn) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
644 {"LActivate", (PyCFunction)ListObj_LActivate, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
645 PyDoc_STR("(Boolean act) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
646 {"LCellSize", (PyCFunction)ListObj_LCellSize, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
647 PyDoc_STR("(Point cSize) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
648 {"LClick", (PyCFunction)ListObj_LClick, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
649 PyDoc_STR("(Point pt, EventModifiers modifiers) -> (Boolean _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
650 {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
651 PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
652 {"LClrCell", (PyCFunction)ListObj_LClrCell, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
653 PyDoc_STR("(Point theCell) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
654 {"LGetCell", (PyCFunction)ListObj_LGetCell, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
655 PyDoc_STR("(Buffer dataPtr, Point theCell) -> (Buffer dataPtr)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
656 {"LRect", (PyCFunction)ListObj_LRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
657 PyDoc_STR("(Point theCell) -> (Rect cellRect)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
658 {"LSetCell", (PyCFunction)ListObj_LSetCell, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
659 PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
660 {"LSetSelect", (PyCFunction)ListObj_LSetSelect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
661 PyDoc_STR("(Boolean setIt, Point theCell) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
662 {"LDraw", (PyCFunction)ListObj_LDraw, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
663 PyDoc_STR("(Point theCell) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
664 {"LGetCellDataLocation", (PyCFunction)ListObj_LGetCellDataLocation, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
665 PyDoc_STR("(Point theCell) -> (short offset, short len)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
666 {"GetListPort", (PyCFunction)ListObj_GetListPort, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
667 PyDoc_STR("() -> (CGrafPtr _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
668 {"GetListVerticalScrollBar", (PyCFunction)ListObj_GetListVerticalScrollBar, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
669 PyDoc_STR("() -> (ControlHandle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
670 {"GetListHorizontalScrollBar", (PyCFunction)ListObj_GetListHorizontalScrollBar, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
671 PyDoc_STR("() -> (ControlHandle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
672 {"GetListActive", (PyCFunction)ListObj_GetListActive, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
673 PyDoc_STR("() -> (Boolean _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
674 {"GetListClickTime", (PyCFunction)ListObj_GetListClickTime, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
675 PyDoc_STR("() -> (SInt32 _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
676 {"GetListRefCon", (PyCFunction)ListObj_GetListRefCon, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
677 PyDoc_STR("() -> (SInt32 _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
678 {"GetListDefinition", (PyCFunction)ListObj_GetListDefinition, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
679 PyDoc_STR("() -> (Handle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
680 {"GetListUserHandle", (PyCFunction)ListObj_GetListUserHandle, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
681 PyDoc_STR("() -> (Handle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
682 {"GetListDataHandle", (PyCFunction)ListObj_GetListDataHandle, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
683 PyDoc_STR("() -> (DataHandle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
684 {"GetListFlags", (PyCFunction)ListObj_GetListFlags, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
685 PyDoc_STR("() -> (OptionBits _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
686 {"GetListSelectionFlags", (PyCFunction)ListObj_GetListSelectionFlags, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
687 PyDoc_STR("() -> (OptionBits _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
688 {"as_Resource", (PyCFunction)ListObj_as_Resource, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
689 PyDoc_STR("() -> (Handle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
690 {NULL, NULL, 0} |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
691 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
692 |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
693 static PyObject *ListObj_get_listFlags(ListObject *self, void *closure) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
694 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
695 return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff); |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
696 } |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
697 |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
698 static int ListObj_set_listFlags(ListObject *self, PyObject *v, void *closure) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
699 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
700 if (!PyArg_Parse(v, "B", &(*self->ob_itself)->listFlags)) return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
701 return 0; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
702 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
703 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
704 static PyObject *ListObj_get_selFlags(ListObject *self, void *closure) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
705 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
706 return Py_BuildValue("l", (long)GetListSelectionFlags(self->ob_itself) & 0xff); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
707 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
708 |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
709 static int ListObj_set_selFlags(ListObject *self, PyObject *v, void *closure) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
710 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
711 if (!PyArg_Parse(v, "B", &(*self->ob_itself)->selFlags)) return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
712 return 0; |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
713 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
714 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
715 static PyObject *ListObj_get_cellSize(ListObject *self, void *closure) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
716 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
717 return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->cellSize); |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
718 } |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
719 |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
720 static int ListObj_set_cellSize(ListObject *self, PyObject *v, void *closure) |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
721 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
722 if (!PyArg_Parse(v, "O&", PyMac_GetPoint, &(*self->ob_itself)->cellSize)) return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
723 return 0; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
724 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
725 |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
726 static PyGetSetDef ListObj_getsetlist[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
727 {"listFlags", (getter)ListObj_get_listFlags, (setter)ListObj_set_listFlags, NULL}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
728 {"selFlags", (getter)ListObj_get_selFlags, (setter)ListObj_set_selFlags, NULL}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
729 {"cellSize", (getter)ListObj_get_cellSize, (setter)ListObj_set_cellSize, NULL}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
730 {NULL, NULL, NULL, NULL}, |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
731 }; |
|
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
732 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
733 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
734 #define ListObj_compare NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
735 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
736 #define ListObj_repr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
737 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
738 #define ListObj_hash NULL |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
739 #define ListObj_tp_init 0 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
740 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
741 #define ListObj_tp_alloc PyType_GenericAlloc |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
742 |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
743 static PyObject *ListObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds) |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
744 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
745 PyObject *_self; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
746 ListHandle itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
747 char *kw[] = {"itself", 0}; |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
748 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
749 if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ListObj_Convert, &itself)) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
750 if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
751 ((ListObject *)_self)->ob_itself = itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
752 return _self; |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
753 } |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
754 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
755 #define ListObj_tp_free PyObject_Del |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
756 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
757 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
758 PyTypeObject List_Type = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
759 PyObject_HEAD_INIT(NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
760 0, /*ob_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
761 "_List.List", /*tp_name*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
762 sizeof(ListObject), /*tp_basicsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
763 0, /*tp_itemsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
764 /* methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
765 (destructor) ListObj_dealloc, /*tp_dealloc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
766 0, /*tp_print*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
767 (getattrfunc)0, /*tp_getattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
768 (setattrfunc)0, /*tp_setattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
769 (cmpfunc) ListObj_compare, /*tp_compare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
770 (reprfunc) ListObj_repr, /*tp_repr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
771 (PyNumberMethods *)0, /* tp_as_number */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
772 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
773 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
774 (hashfunc) ListObj_hash, /*tp_hash*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
775 0, /*tp_call*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
776 0, /*tp_str*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
777 PyObject_GenericGetAttr, /*tp_getattro*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
778 PyObject_GenericSetAttr, /*tp_setattro */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
779 0, /*tp_as_buffer*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
780 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
781 0, /*tp_doc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
782 0, /*tp_traverse*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
783 0, /*tp_clear*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
784 0, /*tp_richcompare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
785 0, /*tp_weaklistoffset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
786 0, /*tp_iter*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
787 0, /*tp_iternext*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
788 ListObj_methods, /* tp_methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
789 0, /*tp_members*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
790 ListObj_getsetlist, /*tp_getset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
791 0, /*tp_base*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
792 0, /*tp_dict*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
793 0, /*tp_descr_get*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
794 0, /*tp_descr_set*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
795 0, /*tp_dictoffset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
796 ListObj_tp_init, /* tp_init */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
797 ListObj_tp_alloc, /* tp_alloc */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
798 ListObj_tp_new, /* tp_new */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
799 ListObj_tp_free, /* tp_free */ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
800 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
801 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
802 /* ---------------------- End object type List ---------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
803 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
804 |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
805 static PyObject *List_CreateCustomList(PyObject *_self, PyObject *_args) |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
806 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
807 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
808 Rect rView; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
809 Rect dataBounds; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
810 Point cellSize; |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
811 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
812 PyObject *listDefFunc; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
813 ListDefSpec theSpec; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
814 WindowPtr theWindow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
815 Boolean drawIt; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
816 Boolean hasGrow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
817 Boolean scrollHoriz; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
818 Boolean scrollVert; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
819 ListHandle outList; |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
820 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
821 if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
822 PyMac_GetRect, &rView, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
823 PyMac_GetRect, &dataBounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
824 PyMac_GetPoint, &cellSize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
825 &theSpec.defType, &listDefFunc, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
826 WinObj_Convert, &theWindow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
827 &drawIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
828 &hasGrow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
829 &scrollHoriz, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
830 &scrollVert)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
831 return NULL; |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
832 |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
833 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
834 /* Carbon applications use the CreateCustomList API */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
835 theSpec.u.userProc = myListDefFunctionUPP; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
836 CreateCustomList(&rView, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
837 &dataBounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
838 cellSize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
839 &theSpec, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
840 theWindow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
841 drawIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
842 hasGrow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
843 scrollHoriz, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
844 scrollVert, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
845 &outList); |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
846 |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
847 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
848 _res = ListObj_New(outList); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
849 if (_res == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
850 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
851 Py_INCREF(listDefFunc); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
852 ((ListObject*)_res)->ob_ldef_func = listDefFunc; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
853 return _res; |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
854 } |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
855 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
856 static PyObject *List_LNew(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
857 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
858 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
859 ListHandle _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
860 Rect rView; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
861 Rect dataBounds; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
862 Point cSize; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
863 short theProc; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
864 WindowPtr theWindow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
865 Boolean drawIt; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
866 Boolean hasGrow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
867 Boolean scrollHoriz; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
868 Boolean scrollVert; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
869 if (!PyArg_ParseTuple(_args, "O&O&O&hO&bbbb", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
870 PyMac_GetRect, &rView, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
871 PyMac_GetRect, &dataBounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
872 PyMac_GetPoint, &cSize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
873 &theProc, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
874 WinObj_Convert, &theWindow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
875 &drawIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
876 &hasGrow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
877 &scrollHoriz, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
878 &scrollVert)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
879 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
880 _rv = LNew(&rView, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
881 &dataBounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
882 cSize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
883 theProc, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
884 theWindow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
885 drawIt, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
886 hasGrow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
887 scrollHoriz, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
888 scrollVert); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
889 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
890 ListObj_New, _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
891 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
892 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
893 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
894 static PyObject *List_SetListViewBounds(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
895 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
896 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
897 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
898 Rect view; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
899 if (!PyArg_ParseTuple(_args, "O&O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
900 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
901 PyMac_GetRect, &view)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
902 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
903 SetListViewBounds(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
904 &view); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
905 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
906 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
907 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
908 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
909 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
910 static PyObject *List_SetListPort(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
911 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
912 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
913 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
914 CGrafPtr port; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
915 if (!PyArg_ParseTuple(_args, "O&O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
916 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
917 GrafObj_Convert, &port)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
918 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
919 SetListPort(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
920 port); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
921 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
922 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
923 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
924 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
925 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
926 static PyObject *List_SetListCellIndent(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
927 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
928 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
929 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
930 Point indent; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
931 if (!PyArg_ParseTuple(_args, "O&O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
932 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
933 PyMac_GetPoint, &indent)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
934 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
935 SetListCellIndent(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
936 &indent); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
937 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
938 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
939 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
940 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
941 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
942 static PyObject *List_SetListClickTime(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
943 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
944 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
945 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
946 SInt32 time; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
947 if (!PyArg_ParseTuple(_args, "O&l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
948 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
949 &time)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
950 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
951 SetListClickTime(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
952 time); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
953 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
954 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
955 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
956 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
957 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
958 static PyObject *List_SetListRefCon(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
959 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
960 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
961 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
962 SInt32 refCon; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
963 if (!PyArg_ParseTuple(_args, "O&l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
964 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
965 &refCon)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
966 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
967 SetListRefCon(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
968 refCon); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
969 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
970 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
971 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
972 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
973 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
974 static PyObject *List_SetListUserHandle(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
975 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
976 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
977 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
978 Handle userHandle; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
979 if (!PyArg_ParseTuple(_args, "O&O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
980 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
981 ResObj_Convert, &userHandle)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
982 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
983 SetListUserHandle(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
984 userHandle); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
985 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
986 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
987 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
988 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
989 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
990 static PyObject *List_SetListFlags(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
991 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
992 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
993 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
994 OptionBits listFlags; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
995 if (!PyArg_ParseTuple(_args, "O&l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
996 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
997 &listFlags)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
998 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
999 SetListFlags(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1000 listFlags); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1001 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1002 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1003 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1004 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1005 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1006 static PyObject *List_SetListSelectionFlags(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1007 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1008 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1009 ListHandle list; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1010 OptionBits selectionFlags; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1011 if (!PyArg_ParseTuple(_args, "O&l", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1012 ListObj_Convert, &list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1013 &selectionFlags)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1014 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1015 SetListSelectionFlags(list, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1016 selectionFlags); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1017 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1018 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1019 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1020 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1021 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1022 static PyObject *List_as_List(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1023 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1024 PyObject *_res = NULL; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1025 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1026 Handle h; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1027 ListObject *l; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1028 if (!PyArg_ParseTuple(_args, "O&", ResObj_Convert, &h)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1029 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1030 l = (ListObject *)ListObj_New(as_List(h)); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1031 l->ob_must_be_disposed = 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1032 _res = Py_BuildValue("O", l); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1033 return _res; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1034 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1035 } |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1036 #endif /* __LP64__ */ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1037 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1038 static PyMethodDef List_methods[] = { |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1039 #ifndef __LP64__ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1040 {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1041 PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1042 {"LNew", (PyCFunction)List_LNew, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1043 PyDoc_STR("(Rect rView, Rect dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1044 {"SetListViewBounds", (PyCFunction)List_SetListViewBounds, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1045 PyDoc_STR("(ListHandle list, Rect view) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1046 {"SetListPort", (PyCFunction)List_SetListPort, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1047 PyDoc_STR("(ListHandle list, CGrafPtr port) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1048 {"SetListCellIndent", (PyCFunction)List_SetListCellIndent, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1049 PyDoc_STR("(ListHandle list, Point indent) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1050 {"SetListClickTime", (PyCFunction)List_SetListClickTime, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1051 PyDoc_STR("(ListHandle list, SInt32 time) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1052 {"SetListRefCon", (PyCFunction)List_SetListRefCon, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1053 PyDoc_STR("(ListHandle list, SInt32 refCon) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1054 {"SetListUserHandle", (PyCFunction)List_SetListUserHandle, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1055 PyDoc_STR("(ListHandle list, Handle userHandle) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1056 {"SetListFlags", (PyCFunction)List_SetListFlags, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1057 PyDoc_STR("(ListHandle list, OptionBits listFlags) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1058 {"SetListSelectionFlags", (PyCFunction)List_SetListSelectionFlags, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1059 PyDoc_STR("(ListHandle list, OptionBits selectionFlags) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1060 {"as_List", (PyCFunction)List_as_List, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1061 PyDoc_STR("(Resource)->List.\nReturns List object (which is not auto-freed!)")}, |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1062 #endif /* __LP64__ */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1063 {NULL, NULL, 0} |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1064 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1065 |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1066 #ifndef __LP64__ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1067 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1068 |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1069 static void myListDefFunction(SInt16 message, |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1070 Boolean selected, |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1071 Rect *cellRect, |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1072 Cell theCell, |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1073 SInt16 dataOffset, |
|
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1074 SInt16 dataLen, |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
1075 ListHandle theList) |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1076 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1077 PyObject *listDefFunc, *args, *rv=NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1078 ListObject *self; |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
1079 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1080 self = (ListObject*)GetListRefCon(theList); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1081 if (self == NULL || self->ob_itself != theList) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1082 return; /* nothing we can do */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1083 listDefFunc = self->ob_ldef_func; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1084 if (listDefFunc == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1085 return; /* nothing we can do */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1086 args = Py_BuildValue("hbO&O&hhO", message, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1087 selected, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1088 PyMac_BuildRect, cellRect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1089 PyMac_BuildPoint, theCell, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1090 dataOffset, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1091 dataLen, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1092 self); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1093 if (args != NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1094 rv = PyEval_CallObject(listDefFunc, args); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1095 Py_DECREF(args); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1096 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1097 if (rv == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1098 PySys_WriteStderr("error in list definition callback:\n"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1099 PyErr_Print(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1100 } else { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1101 Py_DECREF(rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1102 } |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1103 } |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1104 #endif /* __LP64__ */ |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1105 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1106 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1107 void init_List(void) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1108 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1109 PyObject *m; |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1110 #ifndef __LP64__ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1111 PyObject *d; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1112 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1113 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1114 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1115 myListDefFunctionUPP = NewListDefUPP((ListDefProcPtr)myListDefFunction); |
|
20873
7e247f0837e2
More List Manager interfacing:
Just van Rossum <just@letterror.com>
parents:
19723
diff
changeset
|
1116 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1117 PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1118 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert); |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1119 #endif /* __LP64__ */ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1120 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1121 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1122 m = Py_InitModule("_List", List_methods); |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1123 #ifndef __LP64__ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1124 d = PyModule_GetDict(m); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1125 List_Error = PyMac_GetOSErrException(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1126 if (List_Error == NULL || |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1127 PyDict_SetItemString(d, "Error", List_Error) != 0) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1128 return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1129 List_Type.ob_type = &PyType_Type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1130 if (PyType_Ready(&List_Type) < 0) return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1131 Py_INCREF(&List_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1132 PyModule_AddObject(m, "List", (PyObject *)&List_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1133 /* Backward-compatible name */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1134 Py_INCREF(&List_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1135 PyModule_AddObject(m, "ListType", (PyObject *)&List_Type); |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1136 #endif /* __LP64__ */ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1137 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1138 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1139 /* ======================== End module _List ======================== */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1140 |
