annotate Mac/Modules/ctl/_Ctlmodule.c @ 58925:eecf1bef052d 2.6

Merged revisions 78207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #7930: fix stripid ........
author Ezio Melotti <ezio.melotti@gmail.com>
date Tue, 16 Feb 2010 23:29:44 +0000
parents c34e34057714
children e38335d4df91 1d8f24bf4399
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 _Ctl =========================== */
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 ) {\
30973
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
13 PyErr_SetString(PyExc_NotImplementedError, \
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
14 "Not available in this shared library/OS version"); \
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
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 *_CtlObj_New(ControlHandle);
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 _CtlObj_Convert(PyObject *, ControlHandle *);
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 CtlObj_New _CtlObj_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 CtlObj_Convert _CtlObj_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
24280
1598a1e473e2 staticforward bites the dust.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 23261
diff changeset
29 static PyObject *CtlObj_WhichControl(ControlHandle);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 #define as_Control(h) ((ControlHandle)h)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32 #define as_Resource(ctl) ((Handle)ctl)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
33 #define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
34
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
35 #define MAXTABS 32 /* maximum number of tabs that we support in a tabs control */
19443
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 ** Parse/generate ControlFontStyleRec records
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 #if 0 /* Not needed */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 static PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41 ControlFontStyle_New(ControlFontStyleRec *itself)
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
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
44 return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
45 itself->size, itself->style, itself->mode, itself->just,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
46 QdRGB_New, &itself->foreColor, QdRGB_New, &itself->backColor);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
48 #endif
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 static int
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51 ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
52 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
53 return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
54 &itself->font, &itself->size, &itself->style, &itself->mode,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
55 &itself->just, QdRGB_Convert, &itself->foreColor,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
56 QdRGB_Convert, &itself->backColor);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
57 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
58
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
59 /*
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60 ** Parse/generate ControlID records
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61 */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
62 static PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
63 PyControlID_New(ControlID *itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
64 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
65
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
66 return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
67 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
68
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
69 static int
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
70 PyControlID_Convert(PyObject *v, ControlID *itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
71 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
72 return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
73 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
74
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
75 /*
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
76 ** generate DataBrowserListViewColumnDesc records
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
77 */
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
78 static int
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
79 DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
80 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
81 return PyArg_Parse(v, "(lO&l)",
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
82 &itself->propertyID,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
83 PyMac_GetOSType, &itself->propertyType,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
84 &itself->propertyFlags);
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
85 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
86
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
87 static int
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
88 ControlButtonContentInfo_Convert(PyObject *v, ControlButtonContentInfo *itself)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
89 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
90 return PyArg_Parse(v, "(hO&)",
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
91 &itself->contentType,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
92 OptResObj_Convert, &itself->u.iconSuite);
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
93 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
94
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
95 static int
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
96 DataBrowserListViewHeaderDesc_Convert(PyObject *v, DataBrowserListViewHeaderDesc *itself)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
97 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
98 itself->version = kDataBrowserListViewLatestHeaderDesc;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
99 return PyArg_Parse(v, "(HHhO&HO&O&)",
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
100 &itself->minimumWidth,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
101 &itself->maximumWidth,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
102 &itself->titleOffset,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
103 CFStringRefObj_Convert, &itself->titleString,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
104 &itself->initialOrder,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
105 ControlFontStyle_Convert, &itself->btnFontStyle,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
106 ControlButtonContentInfo_Convert, &itself->btnContentInfo);
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
107 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
108
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
109 static int
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
110 DataBrowserListViewColumnDesc_Convert(PyObject *v, DataBrowserListViewColumnDesc *itself)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
111 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
112 return PyArg_Parse(v, "(O&O&)",
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
113 DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
114 DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc);
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
115 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
116
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
117 /* TrackControl and HandleControlClick callback support */
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
118 #define kMyControlActionProcTag 'ACTN' /* not an official tag, only for internal use */
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
119 static PyObject *tracker;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120 static ControlActionUPP mytracker_upp;
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
121 static ControlActionUPP myactionproc_upp;
21635
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
122 static ControlUserPaneKeyDownUPP mykeydownproc_upp;
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
123 static ControlUserPaneFocusUPP myfocusproc_upp;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
124 static ControlUserPaneDrawUPP mydrawproc_upp;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
125 static ControlUserPaneIdleUPP myidleproc_upp;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
126 static ControlUserPaneHitTestUPP myhittestproc_upp;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
127 static ControlUserPaneTrackingUPP mytrackingproc_upp;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
129 static int settrackfunc(PyObject *); /* forward */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
130 static void clrtrackfunc(void); /* forward */
24280
1598a1e473e2 staticforward bites the dust.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 23261
diff changeset
131 static int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
132
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
133 static PyObject *Ctl_Error;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
134
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
135 /* ---------------------- Object type Control ----------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
136
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
137 PyTypeObject Control_Type;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
138
26720
a12e1727850a Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26610
diff changeset
139 #define CtlObj_Check(x) ((x)->ob_type == &Control_Type || PyObject_TypeCheck((x), &Control_Type))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
140
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
141 typedef struct ControlObject {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
142 PyObject_HEAD
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
143 ControlHandle ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
144 PyObject *ob_callbackdict;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
145 } ControlObject;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
146
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
147 PyObject *CtlObj_New(ControlHandle itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
148 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
149 ControlObject *it;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
150 if (itself == NULL) return PyMac_Error(resNotFound);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
151 it = PyObject_NEW(ControlObject, &Control_Type);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
152 if (it == NULL) return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
153 it->ob_itself = itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
154 SetControlReference(itself, (long)it);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
155 it->ob_callbackdict = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
156 return (PyObject *)it;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
157 }
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
158
19708
6eafc4a6359a Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19443
diff changeset
159 int CtlObj_Convert(PyObject *v, ControlHandle *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
160 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
161 if (!CtlObj_Check(v))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
162 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
163 PyErr_SetString(PyExc_TypeError, "Control required");
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
164 return 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
165 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
166 *p_itself = ((ControlObject *)v)->ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
167 return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
168 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
169
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
170 static void CtlObj_dealloc(ControlObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
171 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
172 Py_XDECREF(self->ob_callbackdict);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
173 if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
174 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
175 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
176
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
177 static PyObject *CtlObj_HiliteControl(ControlObject *_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
178 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
179 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
180 ControlPartCode hiliteState;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
181 #ifndef HiliteControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
182 PyMac_PRECHECK(HiliteControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
183 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
184 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
185 &hiliteState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
186 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
187 HiliteControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
188 hiliteState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
189 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
190 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
191 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
192 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
193
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
194 static PyObject *CtlObj_ShowControl(ControlObject *_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
195 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
196 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
197 #ifndef ShowControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
198 PyMac_PRECHECK(ShowControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
199 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
200 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
201 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
202 ShowControl(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
203 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
204 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
205 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
206 }
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 static PyObject *CtlObj_HideControl(ControlObject *_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
209 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
210 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
211 #ifndef HideControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
212 PyMac_PRECHECK(HideControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
213 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
214 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
215 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
216 HideControl(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
217 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
218 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
219 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
220 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
221
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
222 static PyObject *CtlObj_IsControlActive(ControlObject *_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
223 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
224 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
225 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
226 #ifndef IsControlActive
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
227 PyMac_PRECHECK(IsControlActive);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
228 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
229 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
230 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
231 _rv = IsControlActive(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
232 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
233 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
234 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
235 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
236
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
237 static PyObject *CtlObj_IsControlVisible(ControlObject *_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
238 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
239 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
240 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
241 #ifndef IsControlVisible
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
242 PyMac_PRECHECK(IsControlVisible);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
243 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
244 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
245 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
246 _rv = IsControlVisible(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
247 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
248 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
249 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
250 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
251
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
252 static PyObject *CtlObj_ActivateControl(ControlObject *_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
253 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
254 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
255 OSErr _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
256 #ifndef ActivateControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
257 PyMac_PRECHECK(ActivateControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
258 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
259 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
260 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
261 _err = ActivateControl(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
262 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
263 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
264 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
265 return _res;
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 *CtlObj_DeactivateControl(ControlObject *_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 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
270 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
271 OSErr _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
272 #ifndef DeactivateControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
273 PyMac_PRECHECK(DeactivateControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
274 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
275 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
276 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
277 _err = DeactivateControl(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
278 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
279 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
280 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
281 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
282 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
283
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
284 static PyObject *CtlObj_SetControlVisibility(ControlObject *_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
285 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
286 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
287 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
288 Boolean inIsVisible;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
289 Boolean inDoDraw;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
290 #ifndef SetControlVisibility
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
291 PyMac_PRECHECK(SetControlVisibility);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
292 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
293 if (!PyArg_ParseTuple(_args, "bb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
294 &inIsVisible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
295 &inDoDraw))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
296 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
297 _err = SetControlVisibility(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
298 inIsVisible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
299 inDoDraw);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
300 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
301 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
302 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
303 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
304 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
305
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
306 static PyObject *CtlObj_IsControlEnabled(ControlObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
307 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
308 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
309 Boolean _rv;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
310 #ifndef IsControlEnabled
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
311 PyMac_PRECHECK(IsControlEnabled);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
312 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
313 if (!PyArg_ParseTuple(_args, ""))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
314 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
315 _rv = IsControlEnabled(_self->ob_itself);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
316 _res = Py_BuildValue("b",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
317 _rv);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
318 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
319 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
320
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
321 static PyObject *CtlObj_EnableControl(ControlObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
322 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
323 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
324 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
325 #ifndef EnableControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
326 PyMac_PRECHECK(EnableControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
327 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
328 if (!PyArg_ParseTuple(_args, ""))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
329 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
330 _err = EnableControl(_self->ob_itself);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
331 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
332 Py_INCREF(Py_None);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
333 _res = Py_None;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
334 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
335 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
336
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
337 static PyObject *CtlObj_DisableControl(ControlObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
338 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
339 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
340 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
341 #ifndef DisableControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
342 PyMac_PRECHECK(DisableControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
343 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
344 if (!PyArg_ParseTuple(_args, ""))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
345 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
346 _err = DisableControl(_self->ob_itself);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
347 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
348 Py_INCREF(Py_None);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
349 _res = Py_None;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
350 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
351 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
352
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
353 static PyObject *CtlObj_Draw1Control(ControlObject *_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
354 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
355 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
356 #ifndef Draw1Control
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
357 PyMac_PRECHECK(Draw1Control);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
358 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
359 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
360 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
361 Draw1Control(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
362 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
363 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
364 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
365 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
366
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
367 static PyObject *CtlObj_GetBestControlRect(ControlObject *_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
368 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
369 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
370 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
371 Rect outRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
372 SInt16 outBaseLineOffset;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
373 #ifndef GetBestControlRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
374 PyMac_PRECHECK(GetBestControlRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
375 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
376 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
377 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
378 _err = GetBestControlRect(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
379 &outRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
380 &outBaseLineOffset);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
381 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
382 _res = Py_BuildValue("O&h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
383 PyMac_BuildRect, &outRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
384 outBaseLineOffset);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
385 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
386 }
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 static PyObject *CtlObj_SetControlFontStyle(ControlObject *_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
389 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
390 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
391 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
392 ControlFontStyleRec inStyle;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
393 #ifndef SetControlFontStyle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
394 PyMac_PRECHECK(SetControlFontStyle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
395 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
396 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
397 ControlFontStyle_Convert, &inStyle))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
398 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
399 _err = SetControlFontStyle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
400 &inStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
401 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
402 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
403 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
404 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
405 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
406
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
407 static PyObject *CtlObj_DrawControlInCurrentPort(ControlObject *_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
408 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
409 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
410 #ifndef DrawControlInCurrentPort
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
411 PyMac_PRECHECK(DrawControlInCurrentPort);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
412 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
413 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
414 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
415 DrawControlInCurrentPort(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
416 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
417 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
418 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
419 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
420
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
421 static PyObject *CtlObj_SetUpControlBackground(ControlObject *_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
422 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
423 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
424 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
425 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
426 Boolean inIsColorDevice;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
427 #ifndef SetUpControlBackground
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
428 PyMac_PRECHECK(SetUpControlBackground);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
429 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
430 if (!PyArg_ParseTuple(_args, "hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
431 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
432 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
433 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
434 _err = SetUpControlBackground(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
435 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
436 inIsColorDevice);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
437 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
438 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
439 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
440 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
443 static PyObject *CtlObj_SetUpControlTextColor(ControlObject *_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
444 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
445 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
446 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
447 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
448 Boolean inIsColorDevice;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
449 #ifndef SetUpControlTextColor
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
450 PyMac_PRECHECK(SetUpControlTextColor);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
451 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
452 if (!PyArg_ParseTuple(_args, "hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
453 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
454 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
455 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
456 _err = SetUpControlTextColor(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
457 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
458 inIsColorDevice);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
459 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
460 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
461 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
462 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
463 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
464
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
465 static PyObject *CtlObj_DragControl(ControlObject *_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
466 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
467 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
468 Point startPoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
469 Rect limitRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
470 Rect slopRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
471 DragConstraint axis;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
472 #ifndef DragControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
473 PyMac_PRECHECK(DragControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
474 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
475 if (!PyArg_ParseTuple(_args, "O&O&O&H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
476 PyMac_GetPoint, &startPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
477 PyMac_GetRect, &limitRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
478 PyMac_GetRect, &slopRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
479 &axis))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
480 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
481 DragControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
482 startPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
483 &limitRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
484 &slopRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
485 axis);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
486 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
487 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
488 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
489 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
490
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
491 static PyObject *CtlObj_TestControl(ControlObject *_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
492 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
493 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
494 ControlPartCode _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
495 Point testPoint;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
496 #ifndef TestControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
497 PyMac_PRECHECK(TestControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
498 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
499 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
500 PyMac_GetPoint, &testPoint))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
501 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
502 _rv = TestControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
503 testPoint);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
504 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
505 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
506 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
507 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
508
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
509 static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_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
510 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
511 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
512 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
513 Point inWhere;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
514 Boolean menuDisplayed;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
515 #ifndef HandleControlContextualMenuClick
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
516 PyMac_PRECHECK(HandleControlContextualMenuClick);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
517 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
518 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
519 PyMac_GetPoint, &inWhere))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
520 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
521 _err = HandleControlContextualMenuClick(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
522 inWhere,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
523 &menuDisplayed);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
524 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
525 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
526 menuDisplayed);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
527 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
528 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
529
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
530 static PyObject *CtlObj_GetControlClickActivation(ControlObject *_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
531 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
532 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
533 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
534 Point inWhere;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
535 EventModifiers inModifiers;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
536 ClickActivationResult outResult;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
537 #ifndef GetControlClickActivation
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
538 PyMac_PRECHECK(GetControlClickActivation);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
539 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
540 if (!PyArg_ParseTuple(_args, "O&H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
541 PyMac_GetPoint, &inWhere,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
542 &inModifiers))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
543 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
544 _err = GetControlClickActivation(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
545 inWhere,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
546 inModifiers,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
547 &outResult);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
548 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
549 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
550 outResult);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
551 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
552 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
553
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
554 static PyObject *CtlObj_HandleControlKey(ControlObject *_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
555 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
556 PyObject *_res = NULL;
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
557 ControlPartCode _rv;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
558 SInt16 inKeyCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
559 SInt16 inCharCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
560 EventModifiers inModifiers;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
561 #ifndef HandleControlKey
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
562 PyMac_PRECHECK(HandleControlKey);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
563 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
564 if (!PyArg_ParseTuple(_args, "hhH",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
565 &inKeyCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
566 &inCharCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
567 &inModifiers))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
568 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
569 _rv = HandleControlKey(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
570 inKeyCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
571 inCharCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
572 inModifiers);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
573 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
574 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
575 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
576 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
577
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
578 static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_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
579 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
580 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
581 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
582 Point localPoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
583 EventModifiers modifiers;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
584 Boolean cursorWasSet;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
585 #ifndef HandleControlSetCursor
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
586 PyMac_PRECHECK(HandleControlSetCursor);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
587 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
588 if (!PyArg_ParseTuple(_args, "O&H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
589 PyMac_GetPoint, &localPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
590 &modifiers))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
591 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
592 _err = HandleControlSetCursor(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
593 localPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
594 modifiers,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
595 &cursorWasSet);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
596 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
597 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
598 cursorWasSet);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
599 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
600 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
601
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
602 static PyObject *CtlObj_MoveControl(ControlObject *_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
603 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
604 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
605 SInt16 h;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
606 SInt16 v;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
607 #ifndef MoveControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
608 PyMac_PRECHECK(MoveControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
609 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
610 if (!PyArg_ParseTuple(_args, "hh",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
611 &h,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
612 &v))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
613 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
614 MoveControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
615 h,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
616 v);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
617 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
618 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
619 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
620 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
621
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
622 static PyObject *CtlObj_SizeControl(ControlObject *_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
623 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
624 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
625 SInt16 w;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
626 SInt16 h;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
627 #ifndef SizeControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
628 PyMac_PRECHECK(SizeControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
629 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
630 if (!PyArg_ParseTuple(_args, "hh",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
631 &w,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
632 &h))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
633 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
634 SizeControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
635 w,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
636 h);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
637 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
638 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
639 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
640 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
641
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
642 static PyObject *CtlObj_SetControlTitle(ControlObject *_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
643 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
644 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
645 Str255 title;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
646 #ifndef SetControlTitle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
647 PyMac_PRECHECK(SetControlTitle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
648 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
649 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
650 PyMac_GetStr255, title))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
651 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
652 SetControlTitle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
653 title);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
654 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
655 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
656 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
657 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
658
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
659 static PyObject *CtlObj_GetControlTitle(ControlObject *_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
660 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
661 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
662 Str255 title;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
663 #ifndef GetControlTitle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
664 PyMac_PRECHECK(GetControlTitle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
665 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
666 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
667 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
668 GetControlTitle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
669 title);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
670 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
671 PyMac_BuildStr255, title);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
672 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
673 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
674
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
675 static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
676 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
677 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
678 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
679 CFStringRef inString;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
680 #ifndef SetControlTitleWithCFString
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
681 PyMac_PRECHECK(SetControlTitleWithCFString);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
682 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
683 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
684 CFStringRefObj_Convert, &inString))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
685 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
686 _err = SetControlTitleWithCFString(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
687 inString);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
688 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
689 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
690 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
691 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
692 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
693
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
694 static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
695 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
696 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
697 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
698 CFStringRef outString;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
699 #ifndef CopyControlTitleAsCFString
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
700 PyMac_PRECHECK(CopyControlTitleAsCFString);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
701 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
702 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
703 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
704 _err = CopyControlTitleAsCFString(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
705 &outString);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
706 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
707 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
708 CFStringRefObj_New, outString);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
709 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
710 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
711
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
712 static PyObject *CtlObj_GetControlValue(ControlObject *_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
713 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
714 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
715 SInt16 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
716 #ifndef GetControlValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
717 PyMac_PRECHECK(GetControlValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
718 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
719 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
720 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
721 _rv = GetControlValue(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
722 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
723 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
724 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
725 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
726
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
727 static PyObject *CtlObj_SetControlValue(ControlObject *_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
728 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
729 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
730 SInt16 newValue;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
731 #ifndef SetControlValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
732 PyMac_PRECHECK(SetControlValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
733 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
734 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
735 &newValue))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
736 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
737 SetControlValue(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
738 newValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
739 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
740 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
741 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
742 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
743
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
744 static PyObject *CtlObj_GetControlMinimum(ControlObject *_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
745 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
746 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
747 SInt16 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
748 #ifndef GetControlMinimum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
749 PyMac_PRECHECK(GetControlMinimum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
750 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
751 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
752 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
753 _rv = GetControlMinimum(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
754 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
755 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
756 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
759 static PyObject *CtlObj_SetControlMinimum(ControlObject *_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
760 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
761 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
762 SInt16 newMinimum;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
763 #ifndef SetControlMinimum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
764 PyMac_PRECHECK(SetControlMinimum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
765 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
766 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
767 &newMinimum))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
768 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
769 SetControlMinimum(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
770 newMinimum);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
771 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
772 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
773 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
774 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
775
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
776 static PyObject *CtlObj_GetControlMaximum(ControlObject *_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
777 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
778 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
779 SInt16 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
780 #ifndef GetControlMaximum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
781 PyMac_PRECHECK(GetControlMaximum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
782 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
783 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
784 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
785 _rv = GetControlMaximum(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
786 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
787 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
788 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
789 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
790
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
791 static PyObject *CtlObj_SetControlMaximum(ControlObject *_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
792 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
793 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
794 SInt16 newMaximum;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
795 #ifndef SetControlMaximum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
796 PyMac_PRECHECK(SetControlMaximum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
797 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
798 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
799 &newMaximum))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
800 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
801 SetControlMaximum(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
802 newMaximum);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
803 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
804 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
805 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
806 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
807
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
808 static PyObject *CtlObj_GetControlViewSize(ControlObject *_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
809 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
810 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
811 SInt32 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
812 #ifndef GetControlViewSize
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
813 PyMac_PRECHECK(GetControlViewSize);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
814 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
815 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
816 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
817 _rv = GetControlViewSize(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
818 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
819 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
820 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
821 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
822
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
823 static PyObject *CtlObj_SetControlViewSize(ControlObject *_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
824 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
825 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
826 SInt32 newViewSize;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
827 #ifndef SetControlViewSize
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
828 PyMac_PRECHECK(SetControlViewSize);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
829 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
830 if (!PyArg_ParseTuple(_args, "l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
831 &newViewSize))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
832 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
833 SetControlViewSize(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
834 newViewSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
835 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
836 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
837 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
838 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
839
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
840 static PyObject *CtlObj_GetControl32BitValue(ControlObject *_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
841 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
842 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
843 SInt32 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
844 #ifndef GetControl32BitValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
845 PyMac_PRECHECK(GetControl32BitValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
846 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
847 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
848 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
849 _rv = GetControl32BitValue(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
850 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
851 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
852 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
853 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
854
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
855 static PyObject *CtlObj_SetControl32BitValue(ControlObject *_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
856 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
857 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
858 SInt32 newValue;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
859 #ifndef SetControl32BitValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
860 PyMac_PRECHECK(SetControl32BitValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
861 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
862 if (!PyArg_ParseTuple(_args, "l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
863 &newValue))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
864 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
865 SetControl32BitValue(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
866 newValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
867 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
868 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
869 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
870 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
871
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
872 static PyObject *CtlObj_GetControl32BitMaximum(ControlObject *_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
873 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
874 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
875 SInt32 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
876 #ifndef GetControl32BitMaximum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
877 PyMac_PRECHECK(GetControl32BitMaximum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
878 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
879 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
880 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
881 _rv = GetControl32BitMaximum(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
882 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
883 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
884 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
885 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
886
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
887 static PyObject *CtlObj_SetControl32BitMaximum(ControlObject *_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
888 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
889 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
890 SInt32 newMaximum;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
891 #ifndef SetControl32BitMaximum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
892 PyMac_PRECHECK(SetControl32BitMaximum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
893 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
894 if (!PyArg_ParseTuple(_args, "l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
895 &newMaximum))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
896 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
897 SetControl32BitMaximum(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
898 newMaximum);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
899 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
900 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
901 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
902 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
903
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
904 static PyObject *CtlObj_GetControl32BitMinimum(ControlObject *_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
905 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
906 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
907 SInt32 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
908 #ifndef GetControl32BitMinimum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
909 PyMac_PRECHECK(GetControl32BitMinimum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
910 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
911 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
912 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
913 _rv = GetControl32BitMinimum(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
914 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
915 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
916 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
917 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
918
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
919 static PyObject *CtlObj_SetControl32BitMinimum(ControlObject *_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
920 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
921 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
922 SInt32 newMinimum;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
923 #ifndef SetControl32BitMinimum
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
924 PyMac_PRECHECK(SetControl32BitMinimum);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
925 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
926 if (!PyArg_ParseTuple(_args, "l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
927 &newMinimum))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
928 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
929 SetControl32BitMinimum(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
930 newMinimum);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
931 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
932 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
933 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
934 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
935
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
936 static PyObject *CtlObj_IsValidControlHandle(ControlObject *_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
937 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
938 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
939 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
940 #ifndef IsValidControlHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
941 PyMac_PRECHECK(IsValidControlHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
942 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
943 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
944 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
945 _rv = IsValidControlHandle(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
946 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
947 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
948 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
949 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
950
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
951 static PyObject *CtlObj_SetControlID(ControlObject *_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
952 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
953 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
954 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
955 ControlID inID;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
956 #ifndef SetControlID
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
957 PyMac_PRECHECK(SetControlID);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
958 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
959 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
960 PyControlID_Convert, &inID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
961 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
962 _err = SetControlID(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
963 &inID);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
964 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
965 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
966 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
967 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
968 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
969
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
970 static PyObject *CtlObj_GetControlID(ControlObject *_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
971 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
972 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
973 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
974 ControlID outID;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
975 #ifndef GetControlID
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
976 PyMac_PRECHECK(GetControlID);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
977 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
978 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
979 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
980 _err = GetControlID(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
981 &outID);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
982 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
983 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
984 PyControlID_New, &outID);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
985 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
986 }
21417
c3920c435333 Many of the new calls are Carbon-only. Flagged them as such.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21403
diff changeset
987
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
988 static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
989 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
990 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
991 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
992 UInt32 inCommandID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
993 #ifndef SetControlCommandID
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
994 PyMac_PRECHECK(SetControlCommandID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
995 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
996 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
997 &inCommandID))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
998 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
999 _err = SetControlCommandID(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1000 inCommandID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1001 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1002 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1003 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1004 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1005 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1006
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1007 static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1008 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1009 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1010 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1011 UInt32 outCommandID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1012 #ifndef GetControlCommandID
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1013 PyMac_PRECHECK(GetControlCommandID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1014 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1015 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1016 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1017 _err = GetControlCommandID(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1018 &outCommandID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1019 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1020 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1021 outCommandID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1022 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1023 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1024
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1025 static PyObject *CtlObj_RemoveControlProperty(ControlObject *_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
1026 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1027 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1028 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1029 OSType propertyCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1030 OSType propertyTag;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1031 #ifndef RemoveControlProperty
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1032 PyMac_PRECHECK(RemoveControlProperty);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1033 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1034 if (!PyArg_ParseTuple(_args, "O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1035 PyMac_GetOSType, &propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1036 PyMac_GetOSType, &propertyTag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1037 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1038 _err = RemoveControlProperty(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1039 propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1040 propertyTag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1041 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1042 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1043 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1044 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1045 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1046
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1047 static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_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
1048 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1049 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1050 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1051 OSType propertyCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1052 OSType propertyTag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1053 UInt32 attributes;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1054 #ifndef GetControlPropertyAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1055 PyMac_PRECHECK(GetControlPropertyAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1056 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1057 if (!PyArg_ParseTuple(_args, "O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1058 PyMac_GetOSType, &propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1059 PyMac_GetOSType, &propertyTag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1060 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1061 _err = GetControlPropertyAttributes(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1062 propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1063 propertyTag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1064 &attributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1065 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1066 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1067 attributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1068 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1069 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1070
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1071 static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_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
1072 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1073 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1074 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1075 OSType propertyCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1076 OSType propertyTag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1077 UInt32 attributesToSet;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1078 UInt32 attributesToClear;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1079 #ifndef ChangeControlPropertyAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1080 PyMac_PRECHECK(ChangeControlPropertyAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1081 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1082 if (!PyArg_ParseTuple(_args, "O&O&ll",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1083 PyMac_GetOSType, &propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1084 PyMac_GetOSType, &propertyTag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1085 &attributesToSet,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1086 &attributesToClear))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1087 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1088 _err = ChangeControlPropertyAttributes(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1089 propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1090 propertyTag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1091 attributesToSet,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1092 attributesToClear);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1093 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1094 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1095 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1096 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1097 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1098
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1099 static PyObject *CtlObj_GetControlRegion(ControlObject *_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
1100 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1101 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1102 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1103 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1104 RgnHandle outRegion;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1105 #ifndef GetControlRegion
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1106 PyMac_PRECHECK(GetControlRegion);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1107 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1108 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1109 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1110 ResObj_Convert, &outRegion))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1111 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1112 _err = GetControlRegion(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1113 inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1114 outRegion);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1115 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1116 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1117 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1118 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1119 }
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 static PyObject *CtlObj_GetControlVariant(ControlObject *_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
1122 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1123 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1124 ControlVariant _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1125 #ifndef GetControlVariant
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1126 PyMac_PRECHECK(GetControlVariant);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1127 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1128 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1129 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1130 _rv = GetControlVariant(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1131 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1132 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1133 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1134 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1135
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1136 static PyObject *CtlObj_SetControlAction(ControlObject *_self, PyObject *_args)
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1137 {
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1138 PyObject *_res = NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1139 PyObject* actionProc;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1140 UniversalProcPtr c_callback;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1141 #ifndef SetControlAction
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1142 PyMac_PRECHECK(SetControlAction);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1143 #endif
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1144 if (!PyArg_ParseTuple(_args, "O",
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1145 &actionProc))
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1146 return NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1147 SetControlAction(_self->ob_itself,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1148 myactionproc_upp);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1149 Py_INCREF(Py_None);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1150 _res = Py_None;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1151 setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1152 return _res;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1153 }
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
1154
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1155 static PyObject *CtlObj_SetControlReference(ControlObject *_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
1156 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1157 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1158 SInt32 data;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1159 #ifndef SetControlReference
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1160 PyMac_PRECHECK(SetControlReference);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1161 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1162 if (!PyArg_ParseTuple(_args, "l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1163 &data))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1164 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1165 SetControlReference(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1166 data);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1167 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1168 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1169 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1170 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1171
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1172 static PyObject *CtlObj_GetControlReference(ControlObject *_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
1173 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1174 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1175 SInt32 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1176 #ifndef GetControlReference
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1177 PyMac_PRECHECK(GetControlReference);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1178 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1179 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1180 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1181 _rv = GetControlReference(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1182 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1183 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1184 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1185 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1186
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1187 static PyObject *CtlObj_EmbedControl(ControlObject *_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
1188 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1189 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1190 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1191 ControlHandle inContainer;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1192 #ifndef EmbedControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1193 PyMac_PRECHECK(EmbedControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1194 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1195 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1196 CtlObj_Convert, &inContainer))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1197 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1198 _err = EmbedControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1199 inContainer);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1200 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1201 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1202 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1203 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1204 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1205
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1206 static PyObject *CtlObj_AutoEmbedControl(ControlObject *_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
1207 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1208 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1209 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1210 WindowPtr inWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1211 #ifndef AutoEmbedControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1212 PyMac_PRECHECK(AutoEmbedControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1213 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1214 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1215 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1216 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1217 _err = AutoEmbedControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1218 inWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1219 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1220 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1221 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1222 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1223 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1224
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1225 static PyObject *CtlObj_GetSuperControl(ControlObject *_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
1226 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1227 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1228 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1229 ControlHandle outParent;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1230 #ifndef GetSuperControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1231 PyMac_PRECHECK(GetSuperControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1232 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1233 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1234 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1235 _err = GetSuperControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1236 &outParent);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1237 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1238 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1239 CtlObj_WhichControl, outParent);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1240 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1241 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1242
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1243 static PyObject *CtlObj_CountSubControls(ControlObject *_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
1244 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1245 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1246 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1247 UInt16 outNumChildren;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1248 #ifndef CountSubControls
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1249 PyMac_PRECHECK(CountSubControls);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1250 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1251 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1252 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1253 _err = CountSubControls(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1254 &outNumChildren);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1255 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1256 _res = Py_BuildValue("H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1257 outNumChildren);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1258 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1259 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1260
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1261 static PyObject *CtlObj_GetIndexedSubControl(ControlObject *_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
1262 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1263 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1264 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1265 UInt16 inIndex;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1266 ControlHandle outSubControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1267 #ifndef GetIndexedSubControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1268 PyMac_PRECHECK(GetIndexedSubControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1269 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1270 if (!PyArg_ParseTuple(_args, "H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1271 &inIndex))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1272 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1273 _err = GetIndexedSubControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1274 inIndex,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1275 &outSubControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1276 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1277 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1278 CtlObj_WhichControl, outSubControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1279 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1280 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1281
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1282 static PyObject *CtlObj_SetControlSupervisor(ControlObject *_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
1283 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1284 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1285 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1286 ControlHandle inBoss;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1287 #ifndef SetControlSupervisor
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1288 PyMac_PRECHECK(SetControlSupervisor);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1289 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1290 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1291 CtlObj_Convert, &inBoss))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1292 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1293 _err = SetControlSupervisor(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1294 inBoss);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1295 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1296 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1297 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1298 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1299 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1300
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1301 static PyObject *CtlObj_GetControlFeatures(ControlObject *_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
1302 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1303 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1304 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1305 UInt32 outFeatures;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1306 #ifndef GetControlFeatures
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1307 PyMac_PRECHECK(GetControlFeatures);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1308 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1309 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1310 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1311 _err = GetControlFeatures(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1312 &outFeatures);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1313 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1314 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1315 outFeatures);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1316 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1317 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1318
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1319 static PyObject *CtlObj_GetControlDataSize(ControlObject *_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
1320 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1321 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1322 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1323 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1324 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1325 Size outMaxSize;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1326 #ifndef GetControlDataSize
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1327 PyMac_PRECHECK(GetControlDataSize);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1328 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1329 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1330 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1331 PyMac_GetOSType, &inTagName))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1332 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1333 _err = GetControlDataSize(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1334 inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1335 inTagName,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1336 &outMaxSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1337 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1338 _res = Py_BuildValue("l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1339 outMaxSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1340 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1341 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1342
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1343 static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_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
1344 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1345 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1346 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1347 DragTrackingMessage inMessage;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1348 DragReference inDrag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1349 Boolean outLikesDrag;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1350 #ifndef HandleControlDragTracking
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1351 PyMac_PRECHECK(HandleControlDragTracking);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1352 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1353 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1354 &inMessage,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1355 DragObj_Convert, &inDrag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1356 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1357 _err = HandleControlDragTracking(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1358 inMessage,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1359 inDrag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1360 &outLikesDrag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1361 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1362 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1363 outLikesDrag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1364 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1365 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1366
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1367 static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_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
1368 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1369 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1370 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1371 DragReference inDrag;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1372 #ifndef HandleControlDragReceive
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1373 PyMac_PRECHECK(HandleControlDragReceive);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1374 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1375 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1376 DragObj_Convert, &inDrag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1377 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1378 _err = HandleControlDragReceive(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1379 inDrag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1380 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1381 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1382 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1383 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1384 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1385
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1386 static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_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
1387 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1388 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1389 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1390 Boolean inTracks;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1391 #ifndef SetControlDragTrackingEnabled
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1392 PyMac_PRECHECK(SetControlDragTrackingEnabled);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1393 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1394 if (!PyArg_ParseTuple(_args, "b",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1395 &inTracks))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1396 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1397 _err = SetControlDragTrackingEnabled(_self->ob_itself,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1398 inTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1399 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1400 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1401 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1402 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1403 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1404
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1405 static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_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
1406 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1407 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1408 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1409 Boolean outTracks;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1410 #ifndef IsControlDragTrackingEnabled
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1411 PyMac_PRECHECK(IsControlDragTrackingEnabled);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1412 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1413 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1414 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1415 _err = IsControlDragTrackingEnabled(_self->ob_itself,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1416 &outTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1417 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1418 _res = Py_BuildValue("b",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1419 outTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1420 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1421 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1422
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1423 static PyObject *CtlObj_GetControlBounds(ControlObject *_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
1424 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1425 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1426 Rect bounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1427 #ifndef GetControlBounds
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1428 PyMac_PRECHECK(GetControlBounds);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1429 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1430 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1431 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1432 GetControlBounds(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1433 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1434 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1435 PyMac_BuildRect, &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1436 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1437 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1438
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1439 static PyObject *CtlObj_IsControlHilited(ControlObject *_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
1440 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1441 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1442 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1443 #ifndef IsControlHilited
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1444 PyMac_PRECHECK(IsControlHilited);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1445 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1446 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1447 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1448 _rv = IsControlHilited(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1449 _res = Py_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1450 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1451 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1452 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1453
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1454 static PyObject *CtlObj_GetControlHilite(ControlObject *_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
1455 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1456 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1457 UInt16 _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1458 #ifndef GetControlHilite
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1459 PyMac_PRECHECK(GetControlHilite);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1460 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1461 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1462 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1463 _rv = GetControlHilite(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1464 _res = Py_BuildValue("H",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1465 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1466 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1467 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1468
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1469 static PyObject *CtlObj_GetControlOwner(ControlObject *_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
1470 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1471 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1472 WindowPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1473 #ifndef GetControlOwner
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1474 PyMac_PRECHECK(GetControlOwner);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1475 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1476 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1477 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1478 _rv = GetControlOwner(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1479 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1480 WinObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1481 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1482 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1483
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1484 static PyObject *CtlObj_GetControlDataHandle(ControlObject *_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
1485 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1486 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1487 Handle _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1488 #ifndef GetControlDataHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1489 PyMac_PRECHECK(GetControlDataHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1490 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1491 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1492 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1493 _rv = GetControlDataHandle(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1494 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1495 ResObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1496 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1497 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1498
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1499 static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_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
1500 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1501 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1502 MenuHandle _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1503 #ifndef GetControlPopupMenuHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1504 PyMac_PRECHECK(GetControlPopupMenuHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1505 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1506 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1507 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1508 _rv = GetControlPopupMenuHandle(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1509 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1510 MenuObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1511 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1512 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1513
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1514 static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_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
1515 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1516 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1517 short _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1518 #ifndef GetControlPopupMenuID
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1519 PyMac_PRECHECK(GetControlPopupMenuID);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1520 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1521 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1522 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1523 _rv = GetControlPopupMenuID(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1524 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1525 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1526 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1527 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1528
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1529 static PyObject *CtlObj_SetControlDataHandle(ControlObject *_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
1530 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1531 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1532 Handle dataHandle;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1533 #ifndef SetControlDataHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1534 PyMac_PRECHECK(SetControlDataHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1535 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1536 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1537 ResObj_Convert, &dataHandle))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1538 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1539 SetControlDataHandle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1540 dataHandle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1541 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1542 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1543 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1544 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1545
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1546 static PyObject *CtlObj_SetControlBounds(ControlObject *_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
1547 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1548 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1549 Rect bounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1550 #ifndef SetControlBounds
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1551 PyMac_PRECHECK(SetControlBounds);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1552 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1553 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1554 PyMac_GetRect, &bounds))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1555 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1556 SetControlBounds(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1557 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1558 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1559 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1560 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1561 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1562
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1563 static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_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
1564 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1565 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1566 MenuHandle popupMenu;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1567 #ifndef SetControlPopupMenuHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1568 PyMac_PRECHECK(SetControlPopupMenuHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1569 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1570 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1571 MenuObj_Convert, &popupMenu))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1572 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1573 SetControlPopupMenuHandle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1574 popupMenu);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1575 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1576 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1577 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1578 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1579
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1580 static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_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
1581 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1582 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1583 short menuID;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1584 #ifndef SetControlPopupMenuID
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1585 PyMac_PRECHECK(SetControlPopupMenuID);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1586 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1587 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1588 &menuID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1589 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1590 SetControlPopupMenuID(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1591 menuID);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1592 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1593 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1594 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1595 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1596
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1597 static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_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
1598 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1599 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1600 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1601 SInt16 outValue;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1602 #ifndef GetBevelButtonMenuValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1603 PyMac_PRECHECK(GetBevelButtonMenuValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1604 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1605 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1606 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1607 _err = GetBevelButtonMenuValue(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1608 &outValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1609 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1610 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1611 outValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1612 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1613 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1614
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1615 static PyObject *CtlObj_SetBevelButtonMenuValue(ControlObject *_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
1616 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1617 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1618 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1619 SInt16 inValue;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1620 #ifndef SetBevelButtonMenuValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1621 PyMac_PRECHECK(SetBevelButtonMenuValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1622 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1623 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1624 &inValue))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1625 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1626 _err = SetBevelButtonMenuValue(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1627 inValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1628 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1629 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1630 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1631 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1632 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1633
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1634 static PyObject *CtlObj_GetBevelButtonMenuHandle(ControlObject *_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
1635 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1636 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1637 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1638 MenuHandle outHandle;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1639 #ifndef GetBevelButtonMenuHandle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1640 PyMac_PRECHECK(GetBevelButtonMenuHandle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1641 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1642 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1643 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1644 _err = GetBevelButtonMenuHandle(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1645 &outHandle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1646 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1647 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1648 MenuObj_New, outHandle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1649 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1650 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1651
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1652 static PyObject *CtlObj_SetBevelButtonContentInfo(ControlObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1653 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1654 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1655 OSErr _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1656 ControlButtonContentInfo inContent;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1657 #ifndef SetBevelButtonContentInfo
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1658 PyMac_PRECHECK(SetBevelButtonContentInfo);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1659 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1660 if (!PyArg_ParseTuple(_args, "O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1661 ControlButtonContentInfo_Convert, &inContent))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1662 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1663 _err = SetBevelButtonContentInfo(_self->ob_itself,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1664 &inContent);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1665 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1666 Py_INCREF(Py_None);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1667 _res = Py_None;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1668 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1669 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1670
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1671 static PyObject *CtlObj_SetBevelButtonTransform(ControlObject *_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
1672 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1673 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1674 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1675 IconTransformType transform;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1676 #ifndef SetBevelButtonTransform
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1677 PyMac_PRECHECK(SetBevelButtonTransform);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1678 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1679 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1680 &transform))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1681 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1682 _err = SetBevelButtonTransform(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1683 transform);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1684 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1685 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1686 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1687 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1688 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1689
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1690 static PyObject *CtlObj_SetDisclosureTriangleLastValue(ControlObject *_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
1691 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1692 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1693 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1694 SInt16 inValue;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1695 #ifndef SetDisclosureTriangleLastValue
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1696 PyMac_PRECHECK(SetDisclosureTriangleLastValue);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1697 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1698 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1699 &inValue))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1700 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1701 _err = SetDisclosureTriangleLastValue(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1702 inValue);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1703 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1704 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1705 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1706 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1707 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1708
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1709 static PyObject *CtlObj_GetTabContentRect(ControlObject *_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
1710 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1711 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1712 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1713 Rect outContentRect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1714 #ifndef GetTabContentRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1715 PyMac_PRECHECK(GetTabContentRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1716 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1717 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1718 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1719 _err = GetTabContentRect(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1720 &outContentRect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1721 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1722 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1723 PyMac_BuildRect, &outContentRect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1724 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1725 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1726
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1727 static PyObject *CtlObj_SetTabEnabled(ControlObject *_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
1728 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1729 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1730 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1731 SInt16 inTabToHilite;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1732 Boolean inEnabled;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1733 #ifndef SetTabEnabled
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1734 PyMac_PRECHECK(SetTabEnabled);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1735 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1736 if (!PyArg_ParseTuple(_args, "hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1737 &inTabToHilite,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1738 &inEnabled))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1739 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1740 _err = SetTabEnabled(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1741 inTabToHilite,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1742 inEnabled);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1743 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1744 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1745 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1746 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1747 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1748
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1749 static PyObject *CtlObj_SetImageWellContentInfo(ControlObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1750 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1751 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1752 OSErr _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1753 ControlButtonContentInfo inContent;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1754 #ifndef SetImageWellContentInfo
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1755 PyMac_PRECHECK(SetImageWellContentInfo);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1756 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1757 if (!PyArg_ParseTuple(_args, "O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1758 ControlButtonContentInfo_Convert, &inContent))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1759 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1760 _err = SetImageWellContentInfo(_self->ob_itself,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1761 &inContent);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1762 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1763 Py_INCREF(Py_None);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1764 _res = Py_None;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1765 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1766 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
1767
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1768 static PyObject *CtlObj_SetImageWellTransform(ControlObject *_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
1769 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1770 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1771 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1772 IconTransformType inTransform;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1773 #ifndef SetImageWellTransform
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1774 PyMac_PRECHECK(SetImageWellTransform);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
1775 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1776 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1777 &inTransform))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1778 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1779 _err = SetImageWellTransform(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1780 inTransform);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1781 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1782 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1783 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1784 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1785 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1786
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1787 static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1788 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1789 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1790 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1791 OSType style;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1792 #ifndef GetDataBrowserViewStyle
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1793 PyMac_PRECHECK(GetDataBrowserViewStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1794 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1795 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1796 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1797 _err = GetDataBrowserViewStyle(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1798 &style);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1799 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1800 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1801 PyMac_BuildOSType, style);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1802 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1803 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1804
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1805 static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1806 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1807 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1808 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1809 OSType style;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1810 #ifndef SetDataBrowserViewStyle
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1811 PyMac_PRECHECK(SetDataBrowserViewStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1812 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1813 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1814 PyMac_GetOSType, &style))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1815 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1816 _err = SetDataBrowserViewStyle(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1817 style);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1818 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1819 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1820 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1821 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1822 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1823
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1824 static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1825 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1826 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1827 Boolean _rv;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1828 UInt32 command;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1829 #ifndef EnableDataBrowserEditCommand
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1830 PyMac_PRECHECK(EnableDataBrowserEditCommand);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1831 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1832 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1833 &command))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1834 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1835 _rv = EnableDataBrowserEditCommand(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1836 command);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1837 _res = Py_BuildValue("b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1838 _rv);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1839 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1840 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1841
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1842 static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1843 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1844 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1845 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1846 UInt32 command;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1847 #ifndef ExecuteDataBrowserEditCommand
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1848 PyMac_PRECHECK(ExecuteDataBrowserEditCommand);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1849 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1850 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1851 &command))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1852 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1853 _err = ExecuteDataBrowserEditCommand(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1854 command);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1855 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1856 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1857 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1858 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1859 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1860
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1861 static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1862 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1863 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1864 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1865 UInt32 first;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1866 UInt32 last;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1867 #ifndef GetDataBrowserSelectionAnchor
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1868 PyMac_PRECHECK(GetDataBrowserSelectionAnchor);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1869 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1870 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1871 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1872 _err = GetDataBrowserSelectionAnchor(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1873 &first,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1874 &last);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1875 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1876 _res = Py_BuildValue("ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1877 first,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1878 last);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1879 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1880 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1881
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1882 static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1883 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1884 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1885 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1886 UInt32 direction;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1887 Boolean extendSelection;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1888 #ifndef MoveDataBrowserSelectionAnchor
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1889 PyMac_PRECHECK(MoveDataBrowserSelectionAnchor);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1890 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1891 if (!PyArg_ParseTuple(_args, "lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1892 &direction,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1893 &extendSelection))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1894 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1895 _err = MoveDataBrowserSelectionAnchor(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1896 direction,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1897 extendSelection);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1898 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1899 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1900 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1901 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1902 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1903
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1904 static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1905 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1906 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1907 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1908 UInt32 container;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1909 #ifndef OpenDataBrowserContainer
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1910 PyMac_PRECHECK(OpenDataBrowserContainer);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1911 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1912 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1913 &container))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1914 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1915 _err = OpenDataBrowserContainer(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1916 container);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1917 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1918 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1919 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1920 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1921 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1922
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1923 static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1924 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1925 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1926 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1927 UInt32 container;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1928 #ifndef CloseDataBrowserContainer
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1929 PyMac_PRECHECK(CloseDataBrowserContainer);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1930 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1931 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1932 &container))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1933 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1934 _err = CloseDataBrowserContainer(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1935 container);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1936 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1937 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1938 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1939 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1940 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1941
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1942 static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1943 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1944 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1945 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1946 UInt32 container;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1947 Boolean sortChildren;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1948 #ifndef SortDataBrowserContainer
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1949 PyMac_PRECHECK(SortDataBrowserContainer);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1950 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1951 if (!PyArg_ParseTuple(_args, "lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1952 &container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1953 &sortChildren))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1954 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1955 _err = SortDataBrowserContainer(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1956 container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1957 sortChildren);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1958 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1959 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1960 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1961 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1962 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1963
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1964 static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1965 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1966 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1967 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1968 UInt32 container;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1969 Boolean recurse;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1970 UInt32 state;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1971 Handle items;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1972 #ifndef GetDataBrowserItems
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1973 PyMac_PRECHECK(GetDataBrowserItems);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1974 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1975 if (!PyArg_ParseTuple(_args, "lblO&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1976 &container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1977 &recurse,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1978 &state,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1979 ResObj_Convert, &items))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1980 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1981 _err = GetDataBrowserItems(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1982 container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1983 recurse,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1984 state,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1985 items);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1986 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1987 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1988 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1989 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1990 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1991
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1992 static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1993 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1994 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1995 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1996 UInt32 container;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1997 Boolean recurse;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1998 UInt32 state;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
1999 UInt32 numItems;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2000 #ifndef GetDataBrowserItemCount
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2001 PyMac_PRECHECK(GetDataBrowserItemCount);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2002 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2003 if (!PyArg_ParseTuple(_args, "lbl",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2004 &container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2005 &recurse,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2006 &state))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2007 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2008 _err = GetDataBrowserItemCount(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2009 container,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2010 recurse,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2011 state,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2012 &numItems);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2013 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2014 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2015 numItems);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2016 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2017 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2018
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2019 static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2020 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2021 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2022 Boolean _rv;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2023 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2024 #ifndef IsDataBrowserItemSelected
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2025 PyMac_PRECHECK(IsDataBrowserItemSelected);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2026 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2027 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2028 &item))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2029 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2030 _rv = IsDataBrowserItemSelected(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2031 item);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2032 _res = Py_BuildValue("b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2033 _rv);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2034 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2035 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2036
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2037 static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2038 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2039 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2040 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2041 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2042 UInt32 state;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2043 #ifndef GetDataBrowserItemState
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2044 PyMac_PRECHECK(GetDataBrowserItemState);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2045 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2046 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2047 &item))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2048 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2049 _err = GetDataBrowserItemState(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2050 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2051 &state);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2052 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2053 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2054 state);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2055 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2056 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2057
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2058 static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2059 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2060 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2061 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2062 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2063 UInt32 propertyID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2064 UInt8 options;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2065 #ifndef RevealDataBrowserItem
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2066 PyMac_PRECHECK(RevealDataBrowserItem);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2067 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2068 if (!PyArg_ParseTuple(_args, "llb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2069 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2070 &propertyID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2071 &options))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2072 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2073 _err = RevealDataBrowserItem(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2074 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2075 propertyID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2076 options);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2077 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2078 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2079 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2080 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2081 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2082
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2083 static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2084 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2085 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2086 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2087 Boolean active;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2088 #ifndef SetDataBrowserActiveItems
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2089 PyMac_PRECHECK(SetDataBrowserActiveItems);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2090 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2091 if (!PyArg_ParseTuple(_args, "b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2092 &active))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2093 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2094 _err = SetDataBrowserActiveItems(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2095 active);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2096 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2097 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2098 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2099 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2100 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2101
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2102 static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2103 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2104 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2105 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2106 Boolean active;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2107 #ifndef GetDataBrowserActiveItems
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2108 PyMac_PRECHECK(GetDataBrowserActiveItems);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2109 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2110 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2111 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2112 _err = GetDataBrowserActiveItems(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2113 &active);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2114 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2115 _res = Py_BuildValue("b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2116 active);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2117 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2118 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2119
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2120 static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2121 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2122 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2123 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2124 Rect insetRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2125 #ifndef SetDataBrowserScrollBarInset
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2126 PyMac_PRECHECK(SetDataBrowserScrollBarInset);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2127 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2128 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2129 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2130 _err = SetDataBrowserScrollBarInset(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2131 &insetRect);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2132 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2133 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2134 PyMac_BuildRect, &insetRect);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2135 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2136 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2137
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2138 static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2139 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2140 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2141 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2142 Rect insetRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2143 #ifndef GetDataBrowserScrollBarInset
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2144 PyMac_PRECHECK(GetDataBrowserScrollBarInset);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2145 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2146 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2147 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2148 _err = GetDataBrowserScrollBarInset(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2149 &insetRect);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2150 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2151 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2152 PyMac_BuildRect, &insetRect);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2153 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2154 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2155
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2156 static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2157 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2158 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2159 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2160 UInt32 target;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2161 #ifndef SetDataBrowserTarget
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2162 PyMac_PRECHECK(SetDataBrowserTarget);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2163 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2164 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2165 &target))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2166 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2167 _err = SetDataBrowserTarget(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2168 target);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2169 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2170 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2171 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2172 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2173 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2174
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2175 static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2176 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2177 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2178 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2179 UInt32 target;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2180 #ifndef GetDataBrowserTarget
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2181 PyMac_PRECHECK(GetDataBrowserTarget);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2182 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2183 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2184 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2185 _err = GetDataBrowserTarget(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2186 &target);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2187 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2188 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2189 target);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2190 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2191 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2192
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2193 static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2194 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2195 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2196 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2197 UInt16 order;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2198 #ifndef SetDataBrowserSortOrder
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2199 PyMac_PRECHECK(SetDataBrowserSortOrder);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2200 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2201 if (!PyArg_ParseTuple(_args, "H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2202 &order))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2203 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2204 _err = SetDataBrowserSortOrder(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2205 order);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2206 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2207 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2208 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2209 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2210 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2211
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2212 static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2213 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2214 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2215 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2216 UInt16 order;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2217 #ifndef GetDataBrowserSortOrder
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2218 PyMac_PRECHECK(GetDataBrowserSortOrder);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2219 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2220 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2221 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2222 _err = GetDataBrowserSortOrder(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2223 &order);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2224 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2225 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2226 order);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2227 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2228 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2229
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2230 static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2231 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2232 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2233 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2234 UInt32 top;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2235 UInt32 left;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2236 #ifndef SetDataBrowserScrollPosition
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2237 PyMac_PRECHECK(SetDataBrowserScrollPosition);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2238 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2239 if (!PyArg_ParseTuple(_args, "ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2240 &top,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2241 &left))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2242 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2243 _err = SetDataBrowserScrollPosition(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2244 top,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2245 left);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2246 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2247 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2248 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2249 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2250 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2251
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2252 static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2253 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2254 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2255 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2256 UInt32 top;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2257 UInt32 left;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2258 #ifndef GetDataBrowserScrollPosition
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2259 PyMac_PRECHECK(GetDataBrowserScrollPosition);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2260 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2261 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2262 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2263 _err = GetDataBrowserScrollPosition(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2264 &top,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2265 &left);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2266 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2267 _res = Py_BuildValue("ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2268 top,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2269 left);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2270 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2271 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2272
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2273 static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2274 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2275 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2276 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2277 Boolean horiz;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2278 Boolean vert;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2279 #ifndef SetDataBrowserHasScrollBars
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2280 PyMac_PRECHECK(SetDataBrowserHasScrollBars);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2281 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2282 if (!PyArg_ParseTuple(_args, "bb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2283 &horiz,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2284 &vert))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2285 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2286 _err = SetDataBrowserHasScrollBars(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2287 horiz,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2288 vert);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2289 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2290 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2291 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2292 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2293 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2294
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2295 static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2296 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2297 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2298 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2299 Boolean horiz;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2300 Boolean vert;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2301 #ifndef GetDataBrowserHasScrollBars
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2302 PyMac_PRECHECK(GetDataBrowserHasScrollBars);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2303 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2304 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2305 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2306 _err = GetDataBrowserHasScrollBars(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2307 &horiz,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2308 &vert);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2309 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2310 _res = Py_BuildValue("bb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2311 horiz,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2312 vert);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2313 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2314 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2315
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2316 static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2317 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2318 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2319 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2320 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2321 #ifndef SetDataBrowserSortProperty
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2322 PyMac_PRECHECK(SetDataBrowserSortProperty);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2323 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2324 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2325 &property))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2326 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2327 _err = SetDataBrowserSortProperty(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2328 property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2329 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2330 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2331 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2332 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2333 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2334
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2335 static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2336 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2337 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2338 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2339 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2340 #ifndef GetDataBrowserSortProperty
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2341 PyMac_PRECHECK(GetDataBrowserSortProperty);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2342 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2343 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2344 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2345 _err = GetDataBrowserSortProperty(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2346 &property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2347 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2348 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2349 property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2350 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2351 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2352
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2353 static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2354 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2355 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2356 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2357 UInt32 selectionFlags;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2358 #ifndef SetDataBrowserSelectionFlags
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2359 PyMac_PRECHECK(SetDataBrowserSelectionFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2360 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2361 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2362 &selectionFlags))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2363 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2364 _err = SetDataBrowserSelectionFlags(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2365 selectionFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2366 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2367 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2368 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2369 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2370 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2371
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2372 static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2373 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2374 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2375 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2376 UInt32 selectionFlags;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2377 #ifndef GetDataBrowserSelectionFlags
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2378 PyMac_PRECHECK(GetDataBrowserSelectionFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2379 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2380 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2381 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2382 _err = GetDataBrowserSelectionFlags(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2383 &selectionFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2384 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2385 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2386 selectionFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2387 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2388 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2389
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2390 static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2391 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2392 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2393 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2394 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2395 UInt32 flags;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2396 #ifndef SetDataBrowserPropertyFlags
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2397 PyMac_PRECHECK(SetDataBrowserPropertyFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2398 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2399 if (!PyArg_ParseTuple(_args, "ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2400 &property,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2401 &flags))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2402 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2403 _err = SetDataBrowserPropertyFlags(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2404 property,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2405 flags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2406 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2407 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2408 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2409 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2410 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2411
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2412 static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2413 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2414 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2415 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2416 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2417 UInt32 flags;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2418 #ifndef GetDataBrowserPropertyFlags
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2419 PyMac_PRECHECK(GetDataBrowserPropertyFlags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2420 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2421 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2422 &property))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2423 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2424 _err = GetDataBrowserPropertyFlags(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2425 property,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2426 &flags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2427 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2428 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2429 flags);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2430 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2431 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2432
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2433 static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2434 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2435 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2436 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2437 CFStringRef text;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2438 #ifndef SetDataBrowserEditText
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2439 PyMac_PRECHECK(SetDataBrowserEditText);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2440 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2441 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2442 CFStringRefObj_Convert, &text))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2443 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2444 _err = SetDataBrowserEditText(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2445 text);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2446 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2447 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2448 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2449 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2450 }
21417
c3920c435333 Many of the new calls are Carbon-only. Flagged them as such.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21403
diff changeset
2451
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2452 static PyObject *CtlObj_CopyDataBrowserEditText(ControlObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2453 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2454 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2455 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2456 CFStringRef text;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2457 #ifndef CopyDataBrowserEditText
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2458 PyMac_PRECHECK(CopyDataBrowserEditText);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2459 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2460 if (!PyArg_ParseTuple(_args, ""))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2461 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2462 _err = CopyDataBrowserEditText(_self->ob_itself,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2463 &text);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2464 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2465 _res = Py_BuildValue("O&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2466 CFStringRefObj_New, text);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2467 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2468 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
2469
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2470 static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2471 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2472 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2473 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2474 CFMutableStringRef text;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2475 #ifndef GetDataBrowserEditText
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2476 PyMac_PRECHECK(GetDataBrowserEditText);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2477 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2478 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2479 CFMutableStringRefObj_Convert, &text))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2480 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2481 _err = GetDataBrowserEditText(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2482 text);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2483 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2484 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2485 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2486 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2487 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2488
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2489 static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2490 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2491 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2492 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2493 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2494 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2495 #ifndef SetDataBrowserEditItem
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2496 PyMac_PRECHECK(SetDataBrowserEditItem);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2497 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2498 if (!PyArg_ParseTuple(_args, "ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2499 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2500 &property))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2501 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2502 _err = SetDataBrowserEditItem(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2503 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2504 property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2505 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2506 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2507 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2508 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2509 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2510
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2511 static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2512 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2513 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2514 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2515 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2516 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2517 #ifndef GetDataBrowserEditItem
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2518 PyMac_PRECHECK(GetDataBrowserEditItem);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2519 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2520 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2521 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2522 _err = GetDataBrowserEditItem(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2523 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2524 &property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2525 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2526 _res = Py_BuildValue("ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2527 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2528 property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2529 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2530 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2531
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2532 static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2533 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2534 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2535 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2536 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2537 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2538 OSType part;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2539 Rect bounds;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2540 #ifndef GetDataBrowserItemPartBounds
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2541 PyMac_PRECHECK(GetDataBrowserItemPartBounds);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2542 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2543 if (!PyArg_ParseTuple(_args, "llO&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2544 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2545 &property,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2546 PyMac_GetOSType, &part))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2547 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2548 _err = GetDataBrowserItemPartBounds(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2549 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2550 property,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2551 part,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2552 &bounds);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2553 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2554 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2555 PyMac_BuildRect, &bounds);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2556 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2557 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2558
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2559 static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2560 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2561 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2562 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2563 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2564 #ifndef RemoveDataBrowserTableViewColumn
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2565 PyMac_PRECHECK(RemoveDataBrowserTableViewColumn);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2566 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2567 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2568 &column))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2569 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2570 _err = RemoveDataBrowserTableViewColumn(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2571 column);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2572 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2573 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2574 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2575 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2576 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2577
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2578 static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2579 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2580 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2581 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2582 UInt32 numColumns;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2583 #ifndef GetDataBrowserTableViewColumnCount
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2584 PyMac_PRECHECK(GetDataBrowserTableViewColumnCount);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2585 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2586 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2587 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2588 _err = GetDataBrowserTableViewColumnCount(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2589 &numColumns);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2590 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2591 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2592 numColumns);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2593 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2594 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2595
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2596 static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2597 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2598 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2599 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2600 UInt32 hiliteStyle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2601 #ifndef SetDataBrowserTableViewHiliteStyle
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2602 PyMac_PRECHECK(SetDataBrowserTableViewHiliteStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2603 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2604 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2605 &hiliteStyle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2606 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2607 _err = SetDataBrowserTableViewHiliteStyle(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2608 hiliteStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2609 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2610 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2611 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2612 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2613 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2614
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2615 static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2616 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2617 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2618 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2619 UInt32 hiliteStyle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2620 #ifndef GetDataBrowserTableViewHiliteStyle
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2621 PyMac_PRECHECK(GetDataBrowserTableViewHiliteStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2622 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2623 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2624 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2625 _err = GetDataBrowserTableViewHiliteStyle(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2626 &hiliteStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2627 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2628 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2629 hiliteStyle);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2630 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2631 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2632
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2633 static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2634 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2635 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2636 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2637 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2638 #ifndef SetDataBrowserTableViewRowHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2639 PyMac_PRECHECK(SetDataBrowserTableViewRowHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2640 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2641 if (!PyArg_ParseTuple(_args, "H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2642 &height))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2643 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2644 _err = SetDataBrowserTableViewRowHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2645 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2646 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2647 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2648 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2649 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2650 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2651
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2652 static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2653 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2654 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2655 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2656 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2657 #ifndef GetDataBrowserTableViewRowHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2658 PyMac_PRECHECK(GetDataBrowserTableViewRowHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2659 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2660 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2661 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2662 _err = GetDataBrowserTableViewRowHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2663 &height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2664 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2665 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2666 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2667 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2668 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2669
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2670 static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2671 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2672 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2673 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2674 UInt16 width;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2675 #ifndef SetDataBrowserTableViewColumnWidth
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2676 PyMac_PRECHECK(SetDataBrowserTableViewColumnWidth);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2677 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2678 if (!PyArg_ParseTuple(_args, "H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2679 &width))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2680 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2681 _err = SetDataBrowserTableViewColumnWidth(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2682 width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2683 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2684 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2685 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2686 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2687 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2688
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2689 static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2690 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2691 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2692 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2693 UInt16 width;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2694 #ifndef GetDataBrowserTableViewColumnWidth
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2695 PyMac_PRECHECK(GetDataBrowserTableViewColumnWidth);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2696 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2697 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2698 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2699 _err = GetDataBrowserTableViewColumnWidth(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2700 &width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2701 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2702 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2703 width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2704 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2705 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2706
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2707 static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2708 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2709 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2710 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2711 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2712 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2713 #ifndef SetDataBrowserTableViewItemRowHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2714 PyMac_PRECHECK(SetDataBrowserTableViewItemRowHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2715 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2716 if (!PyArg_ParseTuple(_args, "lH",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2717 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2718 &height))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2719 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2720 _err = SetDataBrowserTableViewItemRowHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2721 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2722 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2723 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2724 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2725 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2726 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2727 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2728
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2729 static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2730 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2731 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2732 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2733 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2734 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2735 #ifndef GetDataBrowserTableViewItemRowHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2736 PyMac_PRECHECK(GetDataBrowserTableViewItemRowHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2737 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2738 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2739 &item))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2740 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2741 _err = GetDataBrowserTableViewItemRowHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2742 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2743 &height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2744 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2745 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2746 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2747 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2748 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2749
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2750 static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2751 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2752 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2753 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2754 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2755 UInt16 width;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2756 #ifndef SetDataBrowserTableViewNamedColumnWidth
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2757 PyMac_PRECHECK(SetDataBrowserTableViewNamedColumnWidth);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2758 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2759 if (!PyArg_ParseTuple(_args, "lH",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2760 &column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2761 &width))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2762 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2763 _err = SetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2764 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2765 width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2766 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2767 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2768 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2769 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2770 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2771
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2772 static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2773 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2774 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2775 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2776 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2777 UInt16 width;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2778 #ifndef GetDataBrowserTableViewNamedColumnWidth
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2779 PyMac_PRECHECK(GetDataBrowserTableViewNamedColumnWidth);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2780 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2781 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2782 &column))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2783 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2784 _err = GetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2785 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2786 &width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2787 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2788 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2789 width);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2790 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2791 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2792
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2793 static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2794 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2795 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2796 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2797 Boolean variableWidthColumns;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2798 Boolean variableHeightRows;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2799 #ifndef SetDataBrowserTableViewGeometry
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2800 PyMac_PRECHECK(SetDataBrowserTableViewGeometry);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2801 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2802 if (!PyArg_ParseTuple(_args, "bb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2803 &variableWidthColumns,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2804 &variableHeightRows))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2805 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2806 _err = SetDataBrowserTableViewGeometry(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2807 variableWidthColumns,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2808 variableHeightRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2809 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2810 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2811 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2812 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2813 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2814
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2815 static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2816 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2817 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2818 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2819 Boolean variableWidthColumns;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2820 Boolean variableHeightRows;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2821 #ifndef GetDataBrowserTableViewGeometry
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2822 PyMac_PRECHECK(GetDataBrowserTableViewGeometry);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2823 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2824 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2825 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2826 _err = GetDataBrowserTableViewGeometry(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2827 &variableWidthColumns,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2828 &variableHeightRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2829 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2830 _res = Py_BuildValue("bb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2831 variableWidthColumns,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2832 variableHeightRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2833 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2834 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2835
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2836 static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2837 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2838 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2839 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2840 UInt32 row;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2841 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2842 #ifndef GetDataBrowserTableViewItemID
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2843 PyMac_PRECHECK(GetDataBrowserTableViewItemID);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2844 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2845 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2846 &row))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2847 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2848 _err = GetDataBrowserTableViewItemID(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2849 row,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2850 &item);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2851 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2852 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2853 item);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2854 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2855 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2856
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2857 static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2858 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2859 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2860 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2861 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2862 UInt32 row;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2863 #ifndef SetDataBrowserTableViewItemRow
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2864 PyMac_PRECHECK(SetDataBrowserTableViewItemRow);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2865 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2866 if (!PyArg_ParseTuple(_args, "ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2867 &item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2868 &row))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2869 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2870 _err = SetDataBrowserTableViewItemRow(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2871 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2872 row);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2873 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2874 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2875 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2876 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2877 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2878
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2879 static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2880 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2881 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2882 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2883 UInt32 item;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2884 UInt32 row;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2885 #ifndef GetDataBrowserTableViewItemRow
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2886 PyMac_PRECHECK(GetDataBrowserTableViewItemRow);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2887 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2888 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2889 &item))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2890 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2891 _err = GetDataBrowserTableViewItemRow(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2892 item,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2893 &row);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2894 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2895 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2896 row);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2897 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2898 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2899
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2900 static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2901 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2902 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2903 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2904 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2905 UInt32 position;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2906 #ifndef SetDataBrowserTableViewColumnPosition
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2907 PyMac_PRECHECK(SetDataBrowserTableViewColumnPosition);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2908 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2909 if (!PyArg_ParseTuple(_args, "ll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2910 &column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2911 &position))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2912 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2913 _err = SetDataBrowserTableViewColumnPosition(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2914 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2915 position);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2916 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2917 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2918 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2919 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2920 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2921
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2922 static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2923 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2924 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2925 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2926 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2927 UInt32 position;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2928 #ifndef GetDataBrowserTableViewColumnPosition
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2929 PyMac_PRECHECK(GetDataBrowserTableViewColumnPosition);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2930 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2931 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2932 &column))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2933 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2934 _err = GetDataBrowserTableViewColumnPosition(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2935 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2936 &position);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2937 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2938 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2939 position);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2940 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2941 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2942
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2943 static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2944 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2945 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2946 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2947 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2948 UInt32 property;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2949 #ifndef GetDataBrowserTableViewColumnProperty
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2950 PyMac_PRECHECK(GetDataBrowserTableViewColumnProperty);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2951 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2952 if (!PyArg_ParseTuple(_args, "l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2953 &column))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2954 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2955 _err = GetDataBrowserTableViewColumnProperty(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2956 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2957 &property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2958 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2959 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2960 property);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2961 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2962 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2963
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2964 static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2965 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2966 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2967 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2968 #ifndef AutoSizeDataBrowserListViewColumns
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2969 PyMac_PRECHECK(AutoSizeDataBrowserListViewColumns);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2970 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2971 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2972 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2973 _err = AutoSizeDataBrowserListViewColumns(_self->ob_itself);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2974 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2975 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2976 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2977 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2978 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
2979
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2980 static PyObject *CtlObj_AddDataBrowserListViewColumn(ControlObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2981 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2982 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2983 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2984 DataBrowserListViewColumnDesc columnDesc;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2985 UInt32 position;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2986 #ifndef AddDataBrowserListViewColumn
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2987 PyMac_PRECHECK(AddDataBrowserListViewColumn);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2988 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2989 if (!PyArg_ParseTuple(_args, "O&l",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2990 DataBrowserListViewColumnDesc_Convert, &columnDesc,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2991 &position))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2992 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2993 _err = AddDataBrowserListViewColumn(_self->ob_itself,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2994 &columnDesc,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2995 position);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2996 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2997 Py_INCREF(Py_None);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2998 _res = Py_None;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
2999 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
3000 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
3001
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3002 static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3003 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3004 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3005 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3006 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3007 #ifndef SetDataBrowserListViewHeaderBtnHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3008 PyMac_PRECHECK(SetDataBrowserListViewHeaderBtnHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3009 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3010 if (!PyArg_ParseTuple(_args, "H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3011 &height))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3012 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3013 _err = SetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3014 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3015 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3016 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3017 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3018 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3019 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3020
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3021 static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3022 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3023 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3024 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3025 UInt16 height;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3026 #ifndef GetDataBrowserListViewHeaderBtnHeight
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3027 PyMac_PRECHECK(GetDataBrowserListViewHeaderBtnHeight);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3028 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3029 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3030 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3031 _err = GetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3032 &height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3033 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3034 _res = Py_BuildValue("H",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3035 height);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3036 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3037 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3038
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3039 static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3040 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3041 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3042 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3043 Boolean usePlainBackground;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3044 #ifndef SetDataBrowserListViewUsePlainBackground
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3045 PyMac_PRECHECK(SetDataBrowserListViewUsePlainBackground);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3046 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3047 if (!PyArg_ParseTuple(_args, "b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3048 &usePlainBackground))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3049 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3050 _err = SetDataBrowserListViewUsePlainBackground(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3051 usePlainBackground);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3052 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3053 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3054 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3055 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3056 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3057
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3058 static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3059 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3060 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3061 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3062 Boolean usePlainBackground;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3063 #ifndef GetDataBrowserListViewUsePlainBackground
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3064 PyMac_PRECHECK(GetDataBrowserListViewUsePlainBackground);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3065 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3066 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3067 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3068 _err = GetDataBrowserListViewUsePlainBackground(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3069 &usePlainBackground);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3070 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3071 _res = Py_BuildValue("b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3072 usePlainBackground);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3073 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3074 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3075
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3076 static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3077 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3078 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3079 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3080 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3081 Boolean expandableRows;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3082 #ifndef SetDataBrowserListViewDisclosureColumn
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3083 PyMac_PRECHECK(SetDataBrowserListViewDisclosureColumn);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3084 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3085 if (!PyArg_ParseTuple(_args, "lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3086 &column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3087 &expandableRows))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3088 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3089 _err = SetDataBrowserListViewDisclosureColumn(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3090 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3091 expandableRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3092 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3093 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3094 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3095 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3096 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3097
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3098 static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3099 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3100 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3101 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3102 UInt32 column;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3103 Boolean expandableRows;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3104 #ifndef GetDataBrowserListViewDisclosureColumn
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3105 PyMac_PRECHECK(GetDataBrowserListViewDisclosureColumn);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3106 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3107 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3108 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3109 _err = GetDataBrowserListViewDisclosureColumn(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3110 &column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3111 &expandableRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3112 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3113 _res = Py_BuildValue("lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3114 column,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3115 expandableRows);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3116 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3117 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3118
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3119 static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3120 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3121 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3122 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3123 Handle path;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3124 #ifndef GetDataBrowserColumnViewPath
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3125 PyMac_PRECHECK(GetDataBrowserColumnViewPath);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3126 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3127 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3128 ResObj_Convert, &path))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3129 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3130 _err = GetDataBrowserColumnViewPath(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3131 path);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3132 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3133 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3134 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3135 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3136 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3137
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3138 static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3139 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3140 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3141 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3142 UInt32 pathLength;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3143 #ifndef GetDataBrowserColumnViewPathLength
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3144 PyMac_PRECHECK(GetDataBrowserColumnViewPathLength);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3145 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3146 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3147 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3148 _err = GetDataBrowserColumnViewPathLength(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3149 &pathLength);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3150 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3151 _res = Py_BuildValue("l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3152 pathLength);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3153 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3154 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3155
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3156 static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3157 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3158 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3159 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3160 OSType propertyType;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3161 #ifndef SetDataBrowserColumnViewDisplayType
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3162 PyMac_PRECHECK(SetDataBrowserColumnViewDisplayType);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3163 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3164 if (!PyArg_ParseTuple(_args, "O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3165 PyMac_GetOSType, &propertyType))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3166 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3167 _err = SetDataBrowserColumnViewDisplayType(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3168 propertyType);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3169 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3170 Py_INCREF(Py_None);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3171 _res = Py_None;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3172 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3173 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3174
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3175 static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3176 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3177 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3178 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3179 OSType propertyType;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3180 #ifndef GetDataBrowserColumnViewDisplayType
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3181 PyMac_PRECHECK(GetDataBrowserColumnViewDisplayType);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3182 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3183 if (!PyArg_ParseTuple(_args, ""))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3184 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3185 _err = GetDataBrowserColumnViewDisplayType(_self->ob_itself,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3186 &propertyType);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3187 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3188 _res = Py_BuildValue("O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3189 PyMac_BuildOSType, propertyType);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3190 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3191 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3192
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3193 static PyObject *CtlObj_as_Resource(ControlObject *_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
3194 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3195 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3196 Handle _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3197 #ifndef as_Resource
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3198 PyMac_PRECHECK(as_Resource);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3199 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3200 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3201 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3202 _rv = as_Resource(_self->ob_itself);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3203 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3204 ResObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3205 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3206 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3207
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3208 static PyObject *CtlObj_GetControlRect(ControlObject *_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
3209 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3210 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3211 Rect rect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3212 #ifndef GetControlRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3213 PyMac_PRECHECK(GetControlRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3214 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3215 if (!PyArg_ParseTuple(_args, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3216 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3217 GetControlRect(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3218 &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3219 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3220 PyMac_BuildRect, &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3221 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3222 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3223
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3224 static PyObject *CtlObj_DisposeControl(ControlObject *_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
3225 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3226 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3227
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3228 if (!PyArg_ParseTuple(_args, ""))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3229 return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3230 if ( _self->ob_itself ) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3231 SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3232 DisposeControl(_self->ob_itself);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3233 _self->ob_itself = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3234 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3235 Py_INCREF(Py_None);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3236 _res = Py_None;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3237 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
3238
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3239 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3240
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3241 static PyObject *CtlObj_TrackControl(ControlObject *_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
3242 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3243 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3244
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3245 ControlPartCode _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3246 Point startPoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3247 ControlActionUPP upp = 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3248 PyObject *callback = 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3249
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3250 if (!PyArg_ParseTuple(_args, "O&|O",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3251 PyMac_GetPoint, &startPoint, &callback))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3252 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
3253 if (callback && callback != Py_None) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3254 if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3255 upp = (ControlActionUPP)-1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3256 else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3257 settrackfunc(callback);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3258 upp = mytracker_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3259 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3260 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3261 _rv = TrackControl(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3262 startPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3263 upp);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3264 clrtrackfunc();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3265 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3266 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3267 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3268
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3269 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3270
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3271 static PyObject *CtlObj_HandleControlClick(ControlObject *_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
3272 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3273 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3274
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3275 ControlPartCode _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3276 Point startPoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3277 SInt16 modifiers;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3278 ControlActionUPP upp = 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3279 PyObject *callback = 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3280
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3281 if (!PyArg_ParseTuple(_args, "O&h|O",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3282 PyMac_GetPoint, &startPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3283 &modifiers,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3284 &callback))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3285 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
3286 if (callback && callback != Py_None) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3287 if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3288 upp = (ControlActionUPP)-1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3289 else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3290 settrackfunc(callback);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3291 upp = mytracker_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3292 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3293 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3294 _rv = HandleControlClick(_self->ob_itself,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3295 startPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3296 modifiers,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3297 upp);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3298 clrtrackfunc();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3299 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3300 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3301 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3302
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3303 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3304
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3305 static PyObject *CtlObj_SetControlData(ControlObject *_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
3306 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3307 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3308
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3309 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3310 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3311 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3312 Size bufferSize;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3313 Ptr buffer;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3314
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3315 if (!PyArg_ParseTuple(_args, "hO&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3316 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3317 PyMac_GetOSType, &inTagName,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3318 &buffer, &bufferSize))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3319 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
3320
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3321 _err = SetControlData(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3322 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3323 inTagName,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3324 bufferSize,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3325 buffer);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3326
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3327 if (_err != noErr)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3328 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3329 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3330 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3331
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3332 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3333
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3334 static PyObject *CtlObj_GetControlData(ControlObject *_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
3335 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3336 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3337
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3338 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3339 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3340 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3341 Size bufferSize;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3342 Ptr buffer;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3343 Size outSize;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3344
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3345 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3346 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3347 PyMac_GetOSType, &inTagName))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3348 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
3349
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3350 /* allocate a buffer for the data */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3351 _err = GetControlDataSize(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3352 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3353 inTagName,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3354 &bufferSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3355 if (_err != noErr)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3356 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3357 buffer = PyMem_NEW(char, bufferSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3358 if (buffer == NULL)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3359 return PyErr_NoMemory();
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3360
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3361 _err = GetControlData(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3362 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3363 inTagName,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3364 bufferSize,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3365 buffer,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3366 &outSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3367
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3368 if (_err != noErr) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3369 PyMem_DEL(buffer);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3370 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3371 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3372 _res = Py_BuildValue("s#", buffer, outSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3373 PyMem_DEL(buffer);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3374 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3375
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3376 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3377
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3378 static PyObject *CtlObj_SetControlData_Handle(ControlObject *_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
3379 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3380 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3381
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3382 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3383 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3384 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3385 Handle buffer;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3386
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3387 if (!PyArg_ParseTuple(_args, "hO&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3388 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3389 PyMac_GetOSType, &inTagName,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3390 OptResObj_Convert, &buffer))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3391 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
3392
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3393 _err = SetControlData(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3394 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3395 inTagName,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3396 sizeof(buffer),
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3397 (Ptr)&buffer);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3398
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3399 if (_err != noErr)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3400 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3401 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3402 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3403
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3404 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3405
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3406 static PyObject *CtlObj_GetControlData_Handle(ControlObject *_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
3407 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3408 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3409
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3410 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3411 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3412 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3413 Size bufferSize;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3414 Handle hdl;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3415
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3416 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3417 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3418 PyMac_GetOSType, &inTagName))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3419 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
3420
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3421 /* Check it is handle-sized */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3422 _err = GetControlDataSize(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3423 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3424 inTagName,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3425 &bufferSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3426 if (_err != noErr)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3427 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3428 if (bufferSize != sizeof(Handle)) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3429 PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3430 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
3431 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3432
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3433 _err = GetControlData(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3434 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3435 inTagName,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3436 sizeof(Handle),
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3437 (Ptr)&hdl,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3438 &bufferSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3439
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3440 if (_err != noErr) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3441 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3442 }
19723
2a9bbdbefbb1 Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19708
diff changeset
3443 _res = Py_BuildValue("O&", OptResObj_New, hdl);
2a9bbdbefbb1 Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19708
diff changeset
3444 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
3445
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3446 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3447
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3448 static PyObject *CtlObj_SetControlData_Callback(ControlObject *_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
3449 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3450 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3451
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3452 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3453 ControlPartCode inPart;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3454 ResType inTagName;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3455 PyObject *callback;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3456 UniversalProcPtr c_callback;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3457
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3458 if (!PyArg_ParseTuple(_args, "hO&O",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3459 &inPart,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3460 PyMac_GetOSType, &inTagName,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3461 &callback))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3462 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
3463
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3464 if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3465 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
3466 _err = SetControlData(_self->ob_itself,
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3467 inPart,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3468 inTagName,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3469 sizeof(c_callback),
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3470 (Ptr)&c_callback);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3471
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3472 if (_err != noErr)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3473 return PyMac_Error(_err);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3474 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3475 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3476
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3477 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3478
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3479 static PyMethodDef CtlObj_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3480 {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3481 PyDoc_STR("(ControlPartCode hiliteState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3482 {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3483 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3484 {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3485 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3486 {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3487 PyDoc_STR("() -> (Boolean _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3488 {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3489 PyDoc_STR("() -> (Boolean _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3490 {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3491 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3492 {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3493 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3494 {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3495 PyDoc_STR("(Boolean inIsVisible, Boolean inDoDraw) -> None")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
3496 {"IsControlEnabled", (PyCFunction)CtlObj_IsControlEnabled, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3497 PyDoc_STR("() -> (Boolean _rv)")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
3498 {"EnableControl", (PyCFunction)CtlObj_EnableControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3499 PyDoc_STR("() -> None")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
3500 {"DisableControl", (PyCFunction)CtlObj_DisableControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3501 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3502 {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3503 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3504 {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3505 PyDoc_STR("() -> (Rect outRect, SInt16 outBaseLineOffset)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3506 {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3507 PyDoc_STR("(ControlFontStyleRec inStyle) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3508 {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3509 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3510 {"SetUpControlBackground", (PyCFunction)CtlObj_SetUpControlBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3511 PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3512 {"SetUpControlTextColor", (PyCFunction)CtlObj_SetUpControlTextColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3513 PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3514 {"DragControl", (PyCFunction)CtlObj_DragControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3515 PyDoc_STR("(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3516 {"TestControl", (PyCFunction)CtlObj_TestControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3517 PyDoc_STR("(Point testPoint) -> (ControlPartCode _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3518 {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3519 PyDoc_STR("(Point inWhere) -> (Boolean menuDisplayed)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3520 {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3521 PyDoc_STR("(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3522 {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3523 PyDoc_STR("(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3524 {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3525 PyDoc_STR("(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3526 {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3527 PyDoc_STR("(SInt16 h, SInt16 v) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3528 {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3529 PyDoc_STR("(SInt16 w, SInt16 h) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3530 {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3531 PyDoc_STR("(Str255 title) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3532 {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3533 PyDoc_STR("() -> (Str255 title)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3534 {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3535 PyDoc_STR("(CFStringRef inString) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3536 {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3537 PyDoc_STR("() -> (CFStringRef outString)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3538 {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3539 PyDoc_STR("() -> (SInt16 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3540 {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3541 PyDoc_STR("(SInt16 newValue) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3542 {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3543 PyDoc_STR("() -> (SInt16 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3544 {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3545 PyDoc_STR("(SInt16 newMinimum) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3546 {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3547 PyDoc_STR("() -> (SInt16 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3548 {"SetControlMaximum", (PyCFunction)CtlObj_SetControlMaximum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3549 PyDoc_STR("(SInt16 newMaximum) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3550 {"GetControlViewSize", (PyCFunction)CtlObj_GetControlViewSize, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3551 PyDoc_STR("() -> (SInt32 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3552 {"SetControlViewSize", (PyCFunction)CtlObj_SetControlViewSize, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3553 PyDoc_STR("(SInt32 newViewSize) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3554 {"GetControl32BitValue", (PyCFunction)CtlObj_GetControl32BitValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3555 PyDoc_STR("() -> (SInt32 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3556 {"SetControl32BitValue", (PyCFunction)CtlObj_SetControl32BitValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3557 PyDoc_STR("(SInt32 newValue) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3558 {"GetControl32BitMaximum", (PyCFunction)CtlObj_GetControl32BitMaximum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3559 PyDoc_STR("() -> (SInt32 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3560 {"SetControl32BitMaximum", (PyCFunction)CtlObj_SetControl32BitMaximum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3561 PyDoc_STR("(SInt32 newMaximum) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3562 {"GetControl32BitMinimum", (PyCFunction)CtlObj_GetControl32BitMinimum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3563 PyDoc_STR("() -> (SInt32 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3564 {"SetControl32BitMinimum", (PyCFunction)CtlObj_SetControl32BitMinimum, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3565 PyDoc_STR("(SInt32 newMinimum) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3566 {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3567 PyDoc_STR("() -> (Boolean _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3568 {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3569 PyDoc_STR("(ControlID inID) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3570 {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3571 PyDoc_STR("() -> (ControlID outID)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3572 {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3573 PyDoc_STR("(UInt32 inCommandID) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3574 {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3575 PyDoc_STR("() -> (UInt32 outCommandID)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3576 {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3577 PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3578 {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3579 PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3580 {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3581 PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3582 {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3583 PyDoc_STR("(ControlPartCode inPart, RgnHandle outRegion) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3584 {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3585 PyDoc_STR("() -> (ControlVariant _rv)")},
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
3586 {"SetControlAction", (PyCFunction)CtlObj_SetControlAction, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3587 PyDoc_STR("(PyObject* actionProc) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3588 {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3589 PyDoc_STR("(SInt32 data) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3590 {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3591 PyDoc_STR("() -> (SInt32 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3592 {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3593 PyDoc_STR("(ControlHandle inContainer) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3594 {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3595 PyDoc_STR("(WindowPtr inWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3596 {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3597 PyDoc_STR("() -> (ControlHandle outParent)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3598 {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3599 PyDoc_STR("() -> (UInt16 outNumChildren)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3600 {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3601 PyDoc_STR("(UInt16 inIndex) -> (ControlHandle outSubControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3602 {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3603 PyDoc_STR("(ControlHandle inBoss) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3604 {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3605 PyDoc_STR("() -> (UInt32 outFeatures)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3606 {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3607 PyDoc_STR("(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3608 {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3609 PyDoc_STR("(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3610 {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3611 PyDoc_STR("(DragReference inDrag) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3612 {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
3613 PyDoc_STR("(Boolean inTracks) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3614 {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
3615 PyDoc_STR("() -> (Boolean outTracks)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3616 {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3617 PyDoc_STR("() -> (Rect bounds)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3618 {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3619 PyDoc_STR("() -> (Boolean _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3620 {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3621 PyDoc_STR("() -> (UInt16 _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3622 {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3623 PyDoc_STR("() -> (WindowPtr _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3624 {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3625 PyDoc_STR("() -> (Handle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3626 {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3627 PyDoc_STR("() -> (MenuHandle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3628 {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3629 PyDoc_STR("() -> (short _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3630 {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3631 PyDoc_STR("(Handle dataHandle) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3632 {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3633 PyDoc_STR("(Rect bounds) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3634 {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3635 PyDoc_STR("(MenuHandle popupMenu) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3636 {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3637 PyDoc_STR("(short menuID) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3638 {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3639 PyDoc_STR("() -> (SInt16 outValue)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3640 {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3641 PyDoc_STR("(SInt16 inValue) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3642 {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3643 PyDoc_STR("() -> (MenuHandle outHandle)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
3644 {"SetBevelButtonContentInfo", (PyCFunction)CtlObj_SetBevelButtonContentInfo, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3645 PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3646 {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3647 PyDoc_STR("(IconTransformType transform) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3648 {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3649 PyDoc_STR("(SInt16 inValue) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3650 {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3651 PyDoc_STR("() -> (Rect outContentRect)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3652 {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3653 PyDoc_STR("(SInt16 inTabToHilite, Boolean inEnabled) -> None")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
3654 {"SetImageWellContentInfo", (PyCFunction)CtlObj_SetImageWellContentInfo, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3655 PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3656 {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3657 PyDoc_STR("(IconTransformType inTransform) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3658 {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3659 PyDoc_STR("() -> (OSType style)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3660 {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3661 PyDoc_STR("(OSType style) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3662 {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3663 PyDoc_STR("(UInt32 command) -> (Boolean _rv)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3664 {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3665 PyDoc_STR("(UInt32 command) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3666 {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3667 PyDoc_STR("() -> (UInt32 first, UInt32 last)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3668 {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3669 PyDoc_STR("(UInt32 direction, Boolean extendSelection) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3670 {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3671 PyDoc_STR("(UInt32 container) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3672 {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3673 PyDoc_STR("(UInt32 container) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3674 {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3675 PyDoc_STR("(UInt32 container, Boolean sortChildren) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3676 {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3677 PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3678 {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3679 PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3680 {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3681 PyDoc_STR("(UInt32 item) -> (Boolean _rv)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3682 {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3683 PyDoc_STR("(UInt32 item) -> (UInt32 state)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3684 {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3685 PyDoc_STR("(UInt32 item, UInt32 propertyID, UInt8 options) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3686 {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3687 PyDoc_STR("(Boolean active) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3688 {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3689 PyDoc_STR("() -> (Boolean active)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3690 {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3691 PyDoc_STR("() -> (Rect insetRect)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3692 {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3693 PyDoc_STR("() -> (Rect insetRect)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3694 {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3695 PyDoc_STR("(UInt32 target) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3696 {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3697 PyDoc_STR("() -> (UInt32 target)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3698 {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3699 PyDoc_STR("(UInt16 order) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3700 {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3701 PyDoc_STR("() -> (UInt16 order)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3702 {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3703 PyDoc_STR("(UInt32 top, UInt32 left) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3704 {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3705 PyDoc_STR("() -> (UInt32 top, UInt32 left)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3706 {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3707 PyDoc_STR("(Boolean horiz, Boolean vert) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3708 {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3709 PyDoc_STR("() -> (Boolean horiz, Boolean vert)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3710 {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3711 PyDoc_STR("(UInt32 property) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3712 {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3713 PyDoc_STR("() -> (UInt32 property)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3714 {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3715 PyDoc_STR("(UInt32 selectionFlags) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3716 {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3717 PyDoc_STR("() -> (UInt32 selectionFlags)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3718 {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3719 PyDoc_STR("(UInt32 property, UInt32 flags) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3720 {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3721 PyDoc_STR("(UInt32 property) -> (UInt32 flags)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3722 {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3723 PyDoc_STR("(CFStringRef text) -> None")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
3724 {"CopyDataBrowserEditText", (PyCFunction)CtlObj_CopyDataBrowserEditText, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3725 PyDoc_STR("() -> (CFStringRef text)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3726 {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3727 PyDoc_STR("(CFMutableStringRef text) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3728 {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3729 PyDoc_STR("(UInt32 item, UInt32 property) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3730 {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3731 PyDoc_STR("() -> (UInt32 item, UInt32 property)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3732 {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3733 PyDoc_STR("(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3734 {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3735 PyDoc_STR("(UInt32 column) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3736 {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3737 PyDoc_STR("() -> (UInt32 numColumns)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3738 {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3739 PyDoc_STR("(UInt32 hiliteStyle) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3740 {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3741 PyDoc_STR("() -> (UInt32 hiliteStyle)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3742 {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3743 PyDoc_STR("(UInt16 height) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3744 {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3745 PyDoc_STR("() -> (UInt16 height)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3746 {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3747 PyDoc_STR("(UInt16 width) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3748 {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3749 PyDoc_STR("() -> (UInt16 width)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3750 {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3751 PyDoc_STR("(UInt32 item, UInt16 height) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3752 {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3753 PyDoc_STR("(UInt32 item) -> (UInt16 height)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3754 {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3755 PyDoc_STR("(UInt32 column, UInt16 width) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3756 {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3757 PyDoc_STR("(UInt32 column) -> (UInt16 width)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3758 {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3759 PyDoc_STR("(Boolean variableWidthColumns, Boolean variableHeightRows) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3760 {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3761 PyDoc_STR("() -> (Boolean variableWidthColumns, Boolean variableHeightRows)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3762 {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3763 PyDoc_STR("(UInt32 row) -> (UInt32 item)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3764 {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3765 PyDoc_STR("(UInt32 item, UInt32 row) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3766 {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3767 PyDoc_STR("(UInt32 item) -> (UInt32 row)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3768 {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3769 PyDoc_STR("(UInt32 column, UInt32 position) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3770 {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3771 PyDoc_STR("(UInt32 column) -> (UInt32 position)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3772 {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3773 PyDoc_STR("(UInt32 column) -> (UInt32 property)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3774 {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3775 PyDoc_STR("() -> None")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
3776 {"AddDataBrowserListViewColumn", (PyCFunction)CtlObj_AddDataBrowserListViewColumn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3777 PyDoc_STR("(DataBrowserListViewColumnDesc columnDesc, UInt32 position) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3778 {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3779 PyDoc_STR("(UInt16 height) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3780 {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3781 PyDoc_STR("() -> (UInt16 height)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3782 {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3783 PyDoc_STR("(Boolean usePlainBackground) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3784 {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3785 PyDoc_STR("() -> (Boolean usePlainBackground)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3786 {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3787 PyDoc_STR("(UInt32 column, Boolean expandableRows) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3788 {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3789 PyDoc_STR("() -> (UInt32 column, Boolean expandableRows)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3790 {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3791 PyDoc_STR("(Handle path) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3792 {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3793 PyDoc_STR("() -> (UInt32 pathLength)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3794 {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3795 PyDoc_STR("(OSType propertyType) -> None")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
3796 {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3797 PyDoc_STR("() -> (OSType propertyType)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3798 {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3799 PyDoc_STR("() -> (Handle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3800 {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3801 PyDoc_STR("() -> (Rect rect)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3802 {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3803 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3804 {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3805 PyDoc_STR("(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3806 {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3807 PyDoc_STR("(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3808 {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3809 PyDoc_STR("(stuff) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3810 {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3811 PyDoc_STR("(part, type) -> String")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3812 {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3813 PyDoc_STR("(ResObj) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3814 {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3815 PyDoc_STR("(part, type) -> ResObj")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3816 {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
3817 PyDoc_STR("(callbackfunc) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3818 {NULL, NULL, 0}
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3819 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3820
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3821 #define CtlObj_getsetlist NULL
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3822
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3823
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3824 static int CtlObj_compare(ControlObject *self, ControlObject *other)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3825 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3826 unsigned long v, w;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3827
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3828 if (!CtlObj_Check((PyObject *)other))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3829 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3830 v=(unsigned long)self;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3831 w=(unsigned long)other;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3832 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3833 else
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3834 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3835 v=(unsigned long)self->ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3836 w=(unsigned long)other->ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3837 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3838 if( v < w ) return -1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3839 if( v > w ) return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3840 return 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3841 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3842
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3843 #define CtlObj_repr NULL
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3844
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3845 static long CtlObj_hash(ControlObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3846 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3847 return (long)self->ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3848 }
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3849 #define CtlObj_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
3850
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3851 #define CtlObj_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
3852
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3853 static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3854 {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3855 PyObject *_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
3856 ControlHandle itself;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3857 char *kw[] = {"itself", 0};
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3858
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3859 if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CtlObj_Convert, &itself)) return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3860 if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3861 ((ControlObject *)_self)->ob_itself = itself;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3862 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
3863 }
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3864
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3865 #define CtlObj_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
3866
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3867
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3868 PyTypeObject Control_Type = {
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3869 PyObject_HEAD_INIT(NULL)
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3870 0, /*ob_size*/
21313
91dd223829c6 Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents: 21113
diff changeset
3871 "_Ctl.Control", /*tp_name*/
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3872 sizeof(ControlObject), /*tp_basicsize*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3873 0, /*tp_itemsize*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3874 /* methods */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3875 (destructor) CtlObj_dealloc, /*tp_dealloc*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3876 0, /*tp_print*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3877 (getattrfunc)0, /*tp_getattr*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3878 (setattrfunc)0, /*tp_setattr*/
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3879 (cmpfunc) CtlObj_compare, /*tp_compare*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3880 (reprfunc) CtlObj_repr, /*tp_repr*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3881 (PyNumberMethods *)0, /* tp_as_number */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3882 (PySequenceMethods *)0, /* tp_as_sequence */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3883 (PyMappingMethods *)0, /* tp_as_mapping */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3884 (hashfunc) CtlObj_hash, /*tp_hash*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3885 0, /*tp_call*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3886 0, /*tp_str*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3887 PyObject_GenericGetAttr, /*tp_getattro*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3888 PyObject_GenericSetAttr, /*tp_setattro */
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3889 0, /*tp_as_buffer*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3890 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3891 0, /*tp_doc*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3892 0, /*tp_traverse*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3893 0, /*tp_clear*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3894 0, /*tp_richcompare*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3895 0, /*tp_weaklistoffset*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3896 0, /*tp_iter*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3897 0, /*tp_iternext*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3898 CtlObj_methods, /* tp_methods */
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3899 0, /*tp_members*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
3900 CtlObj_getsetlist, /*tp_getset*/
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3901 0, /*tp_base*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3902 0, /*tp_dict*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3903 0, /*tp_descr_get*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3904 0, /*tp_descr_set*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3905 0, /*tp_dictoffset*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3906 CtlObj_tp_init, /* tp_init */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3907 CtlObj_tp_alloc, /* tp_alloc */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3908 CtlObj_tp_new, /* tp_new */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3909 CtlObj_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
3910 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3911
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3912 /* -------------------- End object type Control --------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3913
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3914
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3915 static PyObject *Ctl_NewControl(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
3916 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3917 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3918 ControlHandle _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3919 WindowPtr owningWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3920 Rect boundsRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3921 Str255 controlTitle;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3922 Boolean initiallyVisible;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3923 SInt16 initialValue;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3924 SInt16 minimumValue;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3925 SInt16 maximumValue;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3926 SInt16 procID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3927 SInt32 controlReference;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3928 #ifndef NewControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3929 PyMac_PRECHECK(NewControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3930 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3931 if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3932 WinObj_Convert, &owningWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3933 PyMac_GetRect, &boundsRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3934 PyMac_GetStr255, controlTitle,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3935 &initiallyVisible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3936 &initialValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3937 &minimumValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3938 &maximumValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3939 &procID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3940 &controlReference))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3941 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3942 _rv = NewControl(owningWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3943 &boundsRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3944 controlTitle,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3945 initiallyVisible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3946 initialValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3947 minimumValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3948 maximumValue,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3949 procID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3950 controlReference);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3951 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3952 CtlObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3953 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3954 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3955
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3956 static PyObject *Ctl_GetNewControl(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
3957 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3958 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3959 ControlHandle _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3960 SInt16 resourceID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3961 WindowPtr owningWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3962 #ifndef GetNewControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3963 PyMac_PRECHECK(GetNewControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3964 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3965 if (!PyArg_ParseTuple(_args, "hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3966 &resourceID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3967 WinObj_Convert, &owningWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3968 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3969 _rv = GetNewControl(resourceID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3970 owningWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3971 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3972 CtlObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3973 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3974 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3975
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3976 static PyObject *Ctl_DrawControls(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
3977 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3978 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3979 WindowPtr theWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3980 #ifndef DrawControls
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3981 PyMac_PRECHECK(DrawControls);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3982 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3983 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3984 WinObj_Convert, &theWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3985 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3986 DrawControls(theWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3987 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3988 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3989 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3990 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3991
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3992 static PyObject *Ctl_UpdateControls(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
3993 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3994 PyObject *_res = NULL;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
3995 WindowPtr inWindow;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
3996 RgnHandle inUpdateRegion;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3997 #ifndef UpdateControls
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3998 PyMac_PRECHECK(UpdateControls);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
3999 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4000 if (!PyArg_ParseTuple(_args, "O&O&",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4001 WinObj_Convert, &inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4002 ResObj_Convert, &inUpdateRegion))
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4003 return NULL;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4004 UpdateControls(inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4005 inUpdateRegion);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4006 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4007 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4008 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4009 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4010
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4011 static PyObject *Ctl_FindControl(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
4012 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4013 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4014 ControlPartCode _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4015 Point testPoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4016 WindowPtr theWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4017 ControlHandle theControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4018 #ifndef FindControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4019 PyMac_PRECHECK(FindControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4020 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4021 if (!PyArg_ParseTuple(_args, "O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4022 PyMac_GetPoint, &testPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4023 WinObj_Convert, &theWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4024 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4025 _rv = FindControl(testPoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4026 theWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4027 &theControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4028 _res = Py_BuildValue("hO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4029 _rv,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4030 CtlObj_WhichControl, theControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4031 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4032 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4033
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4034 static PyObject *Ctl_IdleControls(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
4035 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4036 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4037 WindowPtr inWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4038 #ifndef IdleControls
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4039 PyMac_PRECHECK(IdleControls);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4040 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4041 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4042 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4043 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4044 IdleControls(inWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4045 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4046 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4047 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4048 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4049
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4050 static PyObject *Ctl_GetControlByID(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
4051 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4052 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4053 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4054 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4055 ControlID inID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4056 ControlHandle outControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4057 #ifndef GetControlByID
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4058 PyMac_PRECHECK(GetControlByID);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4059 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4060 if (!PyArg_ParseTuple(_args, "O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4061 WinObj_Convert, &inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4062 PyControlID_Convert, &inID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4063 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4064 _err = GetControlByID(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4065 &inID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4066 &outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4067 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4068 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4069 CtlObj_WhichControl, outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4070 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4071 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4072
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4073 static PyObject *Ctl_DumpControlHierarchy(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
4074 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4075 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4076 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4077 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4078 FSSpec inDumpFile;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4079 #ifndef DumpControlHierarchy
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4080 PyMac_PRECHECK(DumpControlHierarchy);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4081 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4082 if (!PyArg_ParseTuple(_args, "O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4083 WinObj_Convert, &inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4084 PyMac_GetFSSpec, &inDumpFile))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4085 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4086 _err = DumpControlHierarchy(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4087 &inDumpFile);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4088 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4089 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4090 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4091 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4092 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4093
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4094 static PyObject *Ctl_CreateRootControl(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
4095 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4096 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4097 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4098 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4099 ControlHandle outControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4100 #ifndef CreateRootControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4101 PyMac_PRECHECK(CreateRootControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4102 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4103 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4104 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4105 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4106 _err = CreateRootControl(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4107 &outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4108 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4109 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4110 CtlObj_New, outControl);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4111 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4112 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4113
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4114 static PyObject *Ctl_GetRootControl(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
4115 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4116 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4117 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4118 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4119 ControlHandle outControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4120 #ifndef GetRootControl
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4121 PyMac_PRECHECK(GetRootControl);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4122 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4123 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4124 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4125 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4126 _err = GetRootControl(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4127 &outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4128 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4129 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4130 CtlObj_WhichControl, outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4131 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4132 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4133
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4134 static PyObject *Ctl_GetKeyboardFocus(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
4135 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4136 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4137 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4138 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4139 ControlHandle outControl;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4140 #ifndef GetKeyboardFocus
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4141 PyMac_PRECHECK(GetKeyboardFocus);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4142 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4143 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4144 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4145 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4146 _err = GetKeyboardFocus(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4147 &outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4148 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4149 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4150 CtlObj_WhichControl, outControl);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4151 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4152 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4153
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4154 static PyObject *Ctl_SetKeyboardFocus(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
4155 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4156 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4157 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4158 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4159 ControlHandle inControl;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4160 ControlFocusPart inPart;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4161 #ifndef SetKeyboardFocus
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4162 PyMac_PRECHECK(SetKeyboardFocus);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4163 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4164 if (!PyArg_ParseTuple(_args, "O&O&h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4165 WinObj_Convert, &inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4166 CtlObj_Convert, &inControl,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4167 &inPart))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4168 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4169 _err = SetKeyboardFocus(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4170 inControl,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4171 inPart);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4172 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4173 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4174 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4175 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4176 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4177
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4178 static PyObject *Ctl_AdvanceKeyboardFocus(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
4179 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4180 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4181 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4182 WindowPtr inWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4183 #ifndef AdvanceKeyboardFocus
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4184 PyMac_PRECHECK(AdvanceKeyboardFocus);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4185 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4186 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4187 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4188 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4189 _err = AdvanceKeyboardFocus(inWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4190 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4191 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4192 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4193 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4194 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4195
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4196 static PyObject *Ctl_ReverseKeyboardFocus(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
4197 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4198 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4199 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4200 WindowPtr inWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4201 #ifndef ReverseKeyboardFocus
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4202 PyMac_PRECHECK(ReverseKeyboardFocus);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4203 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4204 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4205 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4206 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4207 _err = ReverseKeyboardFocus(inWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4208 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4209 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4210 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4211 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4212 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4213
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4214 static PyObject *Ctl_ClearKeyboardFocus(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
4215 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4216 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4217 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4218 WindowPtr inWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4219 #ifndef ClearKeyboardFocus
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4220 PyMac_PRECHECK(ClearKeyboardFocus);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4221 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4222 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4223 WinObj_Convert, &inWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4224 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4225 _err = ClearKeyboardFocus(inWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4226 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4227 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4228 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4229 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4230 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4231
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4232 static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(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
4233 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4234 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4235 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4236 WindowPtr inWindow;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4237 Boolean inTracks;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4238 #ifndef SetAutomaticControlDragTrackingEnabledForWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4239 PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4240 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4241 if (!PyArg_ParseTuple(_args, "O&b",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4242 WinObj_Convert, &inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4243 &inTracks))
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4244 return NULL;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4245 _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4246 inTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4247 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4248 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4249 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4250 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4251 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4252
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4253 static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(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
4254 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4255 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4256 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4257 WindowPtr inWindow;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4258 Boolean outTracks;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4259 #ifndef IsAutomaticControlDragTrackingEnabledForWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4260 PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
4261 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4262 if (!PyArg_ParseTuple(_args, "O&",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4263 WinObj_Convert, &inWindow))
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4264 return NULL;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4265 _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4266 &outTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4267 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4268 _res = Py_BuildValue("b",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4269 outTracks);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4270 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4271 }
21417
c3920c435333 Many of the new calls are Carbon-only. Flagged them as such.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21403
diff changeset
4272
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4273 static PyObject *Ctl_CreateBevelButtonControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4274 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4275 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4276 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4277 WindowPtr window;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4278 Rect boundsRect;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4279 CFStringRef title;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4280 UInt16 thickness;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4281 UInt16 behavior;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4282 ControlButtonContentInfo info;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4283 SInt16 menuID;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4284 UInt16 menuBehavior;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4285 UInt16 menuPlacement;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4286 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4287 #ifndef CreateBevelButtonControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4288 PyMac_PRECHECK(CreateBevelButtonControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4289 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4290 if (!PyArg_ParseTuple(_args, "O&O&O&HHO&hHH",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4291 WinObj_Convert, &window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4292 PyMac_GetRect, &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4293 CFStringRefObj_Convert, &title,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4294 &thickness,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4295 &behavior,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4296 ControlButtonContentInfo_Convert, &info,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4297 &menuID,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4298 &menuBehavior,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4299 &menuPlacement))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4300 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4301 _err = CreateBevelButtonControl(window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4302 &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4303 title,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4304 thickness,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4305 behavior,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4306 &info,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4307 menuID,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4308 menuBehavior,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4309 menuPlacement,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4310 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4311 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4312 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4313 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4314 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4315 }
21601
52b3b846f11f Oops, forgot to mark CreateScrollBarControl and CreateSliderControl
Just van Rossum <just@letterror.com>
parents: 21597
diff changeset
4316
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4317 static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args)
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4318 {
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4319 PyObject *_res = NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4320 OSStatus _err;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4321 WindowPtr window;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4322 Rect boundsRect;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4323 SInt32 value;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4324 SInt32 minimum;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4325 SInt32 maximum;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4326 UInt16 orientation;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4327 UInt16 numTickMarks;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4328 Boolean liveTracking;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4329 PyObject* liveTrackingProc;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4330 UniversalProcPtr c_callback;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4331 ControlHandle outControl;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4332 #ifndef CreateSliderControl
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4333 PyMac_PRECHECK(CreateSliderControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4334 #endif
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4335 if (!PyArg_ParseTuple(_args, "O&O&lllHHbO",
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4336 WinObj_Convert, &window,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4337 PyMac_GetRect, &boundsRect,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4338 &value,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4339 &minimum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4340 &maximum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4341 &orientation,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4342 &numTickMarks,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4343 &liveTracking,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4344 &liveTrackingProc))
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4345 return NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4346 _err = CreateSliderControl(window,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4347 &boundsRect,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4348 value,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4349 minimum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4350 maximum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4351 orientation,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4352 numTickMarks,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4353 liveTracking,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4354 myactionproc_upp,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4355 &outControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4356 if (_err != noErr) return PyMac_Error(_err);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4357 _res = Py_BuildValue("O&",
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4358 CtlObj_New, outControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4359 setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4360 return _res;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
4361 }
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4362
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4363 static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4364 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4365 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4366 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4367 WindowPtr inWindow;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4368 Rect inBoundsRect;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4369 UInt16 inOrientation;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4370 CFStringRef inTitle;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4371 SInt32 inInitialValue;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4372 Boolean inDrawTitle;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4373 Boolean inAutoToggles;
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4374 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4375 #ifndef CreateDisclosureTriangleControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4376 PyMac_PRECHECK(CreateDisclosureTriangleControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4377 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4378 if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4379 WinObj_Convert, &inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4380 PyMac_GetRect, &inBoundsRect,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4381 &inOrientation,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4382 CFStringRefObj_Convert, &inTitle,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4383 &inInitialValue,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4384 &inDrawTitle,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4385 &inAutoToggles))
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4386 return NULL;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4387 _err = CreateDisclosureTriangleControl(inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4388 &inBoundsRect,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4389 inOrientation,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4390 inTitle,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4391 inInitialValue,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4392 inDrawTitle,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4393 inAutoToggles,
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4394 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4395 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4396 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4397 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4398 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4399 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4400
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4401 static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4402 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4403 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4404 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4405 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4406 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4407 SInt32 value;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4408 SInt32 minimum;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4409 SInt32 maximum;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4410 Boolean indeterminate;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4411 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4412 #ifndef CreateProgressBarControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4413 PyMac_PRECHECK(CreateProgressBarControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4414 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4415 if (!PyArg_ParseTuple(_args, "O&O&lllb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4416 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4417 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4418 &value,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4419 &minimum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4420 &maximum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4421 &indeterminate))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4422 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4423 _err = CreateProgressBarControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4424 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4425 value,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4426 minimum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4427 maximum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4428 indeterminate,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4429 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4430 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4431 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4432 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4433 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4434 }
21417
c3920c435333 Many of the new calls are Carbon-only. Flagged them as such.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21403
diff changeset
4435
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4436 static PyObject *Ctl_CreateRelevanceBarControl(PyObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4437 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4438 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4439 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4440 WindowPtr window;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4441 Rect boundsRect;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4442 SInt32 value;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4443 SInt32 minimum;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4444 SInt32 maximum;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4445 ControlHandle outControl;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4446 #ifndef CreateRelevanceBarControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4447 PyMac_PRECHECK(CreateRelevanceBarControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4448 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4449 if (!PyArg_ParseTuple(_args, "O&O&lll",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4450 WinObj_Convert, &window,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4451 PyMac_GetRect, &boundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4452 &value,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4453 &minimum,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4454 &maximum))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4455 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4456 _err = CreateRelevanceBarControl(window,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4457 &boundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4458 value,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4459 minimum,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4460 maximum,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4461 &outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4462 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4463 _res = Py_BuildValue("O&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4464 CtlObj_New, outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4465 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4466 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
4467
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4468 static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4469 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4470 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4471 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4472 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4473 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4474 SInt32 value;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4475 SInt32 minimum;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4476 SInt32 maximum;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4477 SInt32 increment;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4478 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4479 #ifndef CreateLittleArrowsControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4480 PyMac_PRECHECK(CreateLittleArrowsControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4481 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4482 if (!PyArg_ParseTuple(_args, "O&O&llll",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4483 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4484 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4485 &value,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4486 &minimum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4487 &maximum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4488 &increment))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4489 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4490 _err = CreateLittleArrowsControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4491 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4492 value,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4493 minimum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4494 maximum,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4495 increment,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4496 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4497 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4498 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4499 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4500 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4501 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4502
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4503 static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4504 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4505 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4506 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4507 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4508 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4509 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4510 #ifndef CreateChasingArrowsControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4511 PyMac_PRECHECK(CreateChasingArrowsControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4512 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4513 if (!PyArg_ParseTuple(_args, "O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4514 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4515 PyMac_GetRect, &boundsRect))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4516 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4517 _err = CreateChasingArrowsControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4518 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4519 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4520 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4521 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4522 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4523 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4524 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4525
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4526 static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4527 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4528 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4529 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4530 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4531 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4532 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4533 #ifndef CreateSeparatorControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4534 PyMac_PRECHECK(CreateSeparatorControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4535 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4536 if (!PyArg_ParseTuple(_args, "O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4537 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4538 PyMac_GetRect, &boundsRect))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4539 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4540 _err = CreateSeparatorControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4541 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4542 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4543 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4544 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4545 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4546 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4547 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4548
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4549 static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4550 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4551 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4552 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4553 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4554 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4555 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4556 Boolean primary;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4557 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4558 #ifndef CreateGroupBoxControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4559 PyMac_PRECHECK(CreateGroupBoxControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4560 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4561 if (!PyArg_ParseTuple(_args, "O&O&O&b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4562 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4563 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4564 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4565 &primary))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4566 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4567 _err = CreateGroupBoxControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4568 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4569 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4570 primary,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4571 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4572 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4573 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4574 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4575 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4576 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4577
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4578 static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4579 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4580 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4581 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4582 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4583 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4584 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4585 SInt32 initialValue;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4586 Boolean primary;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4587 Boolean autoToggle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4588 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4589 #ifndef CreateCheckGroupBoxControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4590 PyMac_PRECHECK(CreateCheckGroupBoxControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4591 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4592 if (!PyArg_ParseTuple(_args, "O&O&O&lbb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4593 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4594 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4595 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4596 &initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4597 &primary,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4598 &autoToggle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4599 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4600 _err = CreateCheckGroupBoxControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4601 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4602 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4603 initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4604 primary,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4605 autoToggle,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4606 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4607 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4608 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4609 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4610 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4611 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4612
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4613 static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4614 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4615 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4616 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4617 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4618 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4619 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4620 Boolean primary;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4621 SInt16 menuID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4622 Boolean variableWidth;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4623 SInt16 titleWidth;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4624 SInt16 titleJustification;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4625 Style titleStyle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4626 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4627 #ifndef CreatePopupGroupBoxControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4628 PyMac_PRECHECK(CreatePopupGroupBoxControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4629 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4630 if (!PyArg_ParseTuple(_args, "O&O&O&bhbhhb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4631 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4632 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4633 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4634 &primary,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4635 &menuID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4636 &variableWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4637 &titleWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4638 &titleJustification,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4639 &titleStyle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4640 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4641 _err = CreatePopupGroupBoxControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4642 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4643 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4644 primary,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4645 menuID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4646 variableWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4647 titleWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4648 titleJustification,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4649 titleStyle,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4650 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4651 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4652 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4653 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4654 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4655 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4656
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4657 static PyObject *Ctl_CreateImageWellControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4658 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4659 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4660 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4661 WindowPtr window;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4662 Rect boundsRect;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4663 ControlButtonContentInfo info;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4664 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4665 #ifndef CreateImageWellControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4666 PyMac_PRECHECK(CreateImageWellControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4667 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4668 if (!PyArg_ParseTuple(_args, "O&O&O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4669 WinObj_Convert, &window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4670 PyMac_GetRect, &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4671 ControlButtonContentInfo_Convert, &info))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4672 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4673 _err = CreateImageWellControl(window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4674 &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4675 &info,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4676 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4677 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4678 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4679 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4680 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4681 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4682
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4683 static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4684 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4685 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4686 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4687 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4688 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4689 UInt16 orientation;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4690 UInt16 size;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4691 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4692 #ifndef CreatePopupArrowControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4693 PyMac_PRECHECK(CreatePopupArrowControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4694 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4695 if (!PyArg_ParseTuple(_args, "O&O&HH",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4696 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4697 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4698 &orientation,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4699 &size))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4700 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4701 _err = CreatePopupArrowControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4702 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4703 orientation,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4704 size,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4705 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4706 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4707 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4708 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4709 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4710 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4711
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4712 static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4713 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4714 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4715 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4716 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4717 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4718 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4719 #ifndef CreatePlacardControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4720 PyMac_PRECHECK(CreatePlacardControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4721 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4722 if (!PyArg_ParseTuple(_args, "O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4723 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4724 PyMac_GetRect, &boundsRect))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4725 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4726 _err = CreatePlacardControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4727 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4728 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4729 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4730 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4731 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4732 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4733 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4734
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4735 static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4736 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4737 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4738 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4739 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4740 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4741 UInt16 clockType;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4742 UInt32 clockFlags;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4743 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4744 #ifndef CreateClockControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4745 PyMac_PRECHECK(CreateClockControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4746 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4747 if (!PyArg_ParseTuple(_args, "O&O&Hl",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4748 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4749 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4750 &clockType,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4751 &clockFlags))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4752 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4753 _err = CreateClockControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4754 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4755 clockType,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4756 clockFlags,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4757 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4758 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4759 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4760 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4761 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4762 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4763
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4764 static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4765 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4766 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4767 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4768 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4769 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4770 UInt32 features;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4771 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4772 #ifndef CreateUserPaneControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4773 PyMac_PRECHECK(CreateUserPaneControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4774 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4775 if (!PyArg_ParseTuple(_args, "O&O&l",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4776 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4777 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4778 &features))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4779 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4780 _err = CreateUserPaneControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4781 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4782 features,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4783 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4784 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4785 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4786 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4787 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4788 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4789
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4790 static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4791 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4792 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4793 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4794 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4795 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4796 CFStringRef text;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4797 Boolean isPassword;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4798 Boolean useInlineInput;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4799 ControlFontStyleRec style;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4800 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4801 #ifndef CreateEditTextControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4802 PyMac_PRECHECK(CreateEditTextControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4803 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4804 if (!PyArg_ParseTuple(_args, "O&O&O&bbO&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4805 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4806 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4807 CFStringRefObj_Convert, &text,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4808 &isPassword,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4809 &useInlineInput,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4810 ControlFontStyle_Convert, &style))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4811 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4812 _err = CreateEditTextControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4813 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4814 text,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4815 isPassword,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4816 useInlineInput,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4817 &style,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4818 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4819 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4820 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4821 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4822 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4823 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4824
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4825 static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4826 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4827 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4828 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4829 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4830 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4831 CFStringRef text;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4832 ControlFontStyleRec style;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4833 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4834 #ifndef CreateStaticTextControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4835 PyMac_PRECHECK(CreateStaticTextControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4836 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4837 if (!PyArg_ParseTuple(_args, "O&O&O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4838 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4839 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4840 CFStringRefObj_Convert, &text,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4841 ControlFontStyle_Convert, &style))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4842 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4843 _err = CreateStaticTextControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4844 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4845 text,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4846 &style,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4847 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4848 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4849 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4850 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4851 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4852 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4853
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4854 static PyObject *Ctl_CreatePictureControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4855 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4856 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4857 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4858 WindowPtr window;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4859 Rect boundsRect;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4860 ControlButtonContentInfo content;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4861 Boolean dontTrack;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4862 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4863 #ifndef CreatePictureControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4864 PyMac_PRECHECK(CreatePictureControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4865 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4866 if (!PyArg_ParseTuple(_args, "O&O&O&b",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4867 WinObj_Convert, &window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4868 PyMac_GetRect, &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4869 ControlButtonContentInfo_Convert, &content,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4870 &dontTrack))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4871 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4872 _err = CreatePictureControl(window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4873 &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4874 &content,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4875 dontTrack,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4876 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4877 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4878 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4879 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4880 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4881 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4882
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4883 static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4884 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4885 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4886 OSStatus _err;
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4887 WindowPtr inWindow;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4888 Rect inBoundsRect;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4889 ControlButtonContentInfo inIconContent;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4890 Boolean inDontTrack;
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4891 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4892 #ifndef CreateIconControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4893 PyMac_PRECHECK(CreateIconControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4894 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4895 if (!PyArg_ParseTuple(_args, "O&O&O&b",
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4896 WinObj_Convert, &inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4897 PyMac_GetRect, &inBoundsRect,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4898 ControlButtonContentInfo_Convert, &inIconContent,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4899 &inDontTrack))
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4900 return NULL;
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4901 _err = CreateIconControl(inWindow,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4902 &inBoundsRect,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4903 &inIconContent,
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
4904 inDontTrack,
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4905 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4906 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4907 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4908 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4909 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4910 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4911
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4912 static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4913 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4914 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4915 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4916 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4917 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4918 Boolean isListHeader;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4919 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4920 #ifndef CreateWindowHeaderControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4921 PyMac_PRECHECK(CreateWindowHeaderControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4922 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4923 if (!PyArg_ParseTuple(_args, "O&O&b",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4924 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4925 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4926 &isListHeader))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4927 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4928 _err = CreateWindowHeaderControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4929 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4930 isListHeader,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4931 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4932 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4933 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4934 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4935 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4936 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4937
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4938 static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4939 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4940 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4941 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4942 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4943 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4944 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4945 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4946 #ifndef CreatePushButtonControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4947 PyMac_PRECHECK(CreatePushButtonControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4948 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4949 if (!PyArg_ParseTuple(_args, "O&O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4950 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4951 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4952 CFStringRefObj_Convert, &title))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4953 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4954 _err = CreatePushButtonControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4955 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4956 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4957 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4958 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4959 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
4960 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4961 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4962 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4963
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4964 static PyObject *Ctl_CreatePushButtonWithIconControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4965 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4966 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4967 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4968 WindowPtr window;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4969 Rect boundsRect;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4970 CFStringRef title;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4971 ControlButtonContentInfo icon;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4972 UInt16 iconAlignment;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4973 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4974 #ifndef CreatePushButtonWithIconControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4975 PyMac_PRECHECK(CreatePushButtonWithIconControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4976 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4977 if (!PyArg_ParseTuple(_args, "O&O&O&O&H",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4978 WinObj_Convert, &window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4979 PyMac_GetRect, &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4980 CFStringRefObj_Convert, &title,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4981 ControlButtonContentInfo_Convert, &icon,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4982 &iconAlignment))
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4983 return NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4984 _err = CreatePushButtonWithIconControl(window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4985 &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4986 title,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4987 &icon,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4988 iconAlignment,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4989 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4990 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4991 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4992 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4993 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4994 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
4995
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4996 static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4997 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4998 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
4999 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5000 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5001 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5002 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5003 SInt32 initialValue;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5004 Boolean autoToggle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5005 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5006 #ifndef CreateRadioButtonControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5007 PyMac_PRECHECK(CreateRadioButtonControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5008 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5009 if (!PyArg_ParseTuple(_args, "O&O&O&lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5010 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5011 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5012 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5013 &initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5014 &autoToggle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5015 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5016 _err = CreateRadioButtonControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5017 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5018 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5019 initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5020 autoToggle,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5021 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5022 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5023 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5024 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5025 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5026 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5027
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5028 static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5029 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5030 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5031 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5032 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5033 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5034 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5035 SInt32 initialValue;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5036 Boolean autoToggle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5037 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5038 #ifndef CreateCheckBoxControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5039 PyMac_PRECHECK(CreateCheckBoxControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5040 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5041 if (!PyArg_ParseTuple(_args, "O&O&O&lb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5042 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5043 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5044 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5045 &initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5046 &autoToggle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5047 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5048 _err = CreateCheckBoxControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5049 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5050 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5051 initialValue,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5052 autoToggle,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5053 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5054 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5055 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5056 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5057 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5058 }
21601
52b3b846f11f Oops, forgot to mark CreateScrollBarControl and CreateSliderControl
Just van Rossum <just@letterror.com>
parents: 21597
diff changeset
5059
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5060 static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args)
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5061 {
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5062 PyObject *_res = NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5063 OSStatus _err;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5064 WindowPtr window;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5065 Rect boundsRect;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5066 SInt32 value;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5067 SInt32 minimum;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5068 SInt32 maximum;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5069 SInt32 viewSize;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5070 Boolean liveTracking;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5071 PyObject* liveTrackingProc;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5072 UniversalProcPtr c_callback;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5073 ControlHandle outControl;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5074 #ifndef CreateScrollBarControl
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5075 PyMac_PRECHECK(CreateScrollBarControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5076 #endif
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5077 if (!PyArg_ParseTuple(_args, "O&O&llllbO",
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5078 WinObj_Convert, &window,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5079 PyMac_GetRect, &boundsRect,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5080 &value,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5081 &minimum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5082 &maximum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5083 &viewSize,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5084 &liveTracking,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5085 &liveTrackingProc))
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5086 return NULL;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5087 _err = CreateScrollBarControl(window,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5088 &boundsRect,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5089 value,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5090 minimum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5091 maximum,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5092 viewSize,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5093 liveTracking,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5094 myactionproc_upp,
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5095 &outControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5096 if (_err != noErr) return PyMac_Error(_err);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5097 _res = Py_BuildValue("O&",
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5098 CtlObj_New, outControl);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5099 setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5100 return _res;
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5101 }
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5102
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5103 static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5104 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5105 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5106 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5107 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5108 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5109 CFStringRef title;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5110 SInt16 menuID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5111 Boolean variableWidth;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5112 SInt16 titleWidth;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5113 SInt16 titleJustification;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5114 Style titleStyle;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5115 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5116 #ifndef CreatePopupButtonControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5117 PyMac_PRECHECK(CreatePopupButtonControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5118 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5119 if (!PyArg_ParseTuple(_args, "O&O&O&hbhhb",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5120 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5121 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5122 CFStringRefObj_Convert, &title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5123 &menuID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5124 &variableWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5125 &titleWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5126 &titleJustification,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5127 &titleStyle))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5128 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5129 _err = CreatePopupButtonControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5130 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5131 title,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5132 menuID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5133 variableWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5134 titleWidth,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5135 titleJustification,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5136 titleStyle,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5137 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5138 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5139 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5140 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5141 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5142 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5143
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5144 static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5145 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5146 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5147 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5148 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5149 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5150 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5151 #ifndef CreateRadioGroupControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5152 PyMac_PRECHECK(CreateRadioGroupControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5153 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5154 if (!PyArg_ParseTuple(_args, "O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5155 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5156 PyMac_GetRect, &boundsRect))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5157 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5158 _err = CreateRadioGroupControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5159 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5160 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5161 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5162 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5163 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5164 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5165 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5166
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5167 static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5168 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5169 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5170 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5171 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5172 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5173 SInt16 contentResID;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5174 Boolean autoScroll;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5175 UInt32 delayBeforeAutoScroll;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5176 UInt32 delayBetweenAutoScroll;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5177 UInt16 autoScrollAmount;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5178 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5179 #ifndef CreateScrollingTextBoxControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5180 PyMac_PRECHECK(CreateScrollingTextBoxControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5181 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5182 if (!PyArg_ParseTuple(_args, "O&O&hbllH",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5183 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5184 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5185 &contentResID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5186 &autoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5187 &delayBeforeAutoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5188 &delayBetweenAutoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5189 &autoScrollAmount))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5190 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5191 _err = CreateScrollingTextBoxControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5192 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5193 contentResID,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5194 autoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5195 delayBeforeAutoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5196 delayBetweenAutoScroll,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5197 autoScrollAmount,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5198 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5199 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5200 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5201 CtlObj_New, outControl);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5202 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5203 }
21417
c3920c435333 Many of the new calls are Carbon-only. Flagged them as such.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21403
diff changeset
5204
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5205 static PyObject *Ctl_CreateDisclosureButtonControl(PyObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5206 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5207 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5208 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5209 WindowPtr inWindow;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5210 Rect inBoundsRect;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5211 SInt32 inValue;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5212 Boolean inAutoToggles;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5213 ControlHandle outControl;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5214 #ifndef CreateDisclosureButtonControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5215 PyMac_PRECHECK(CreateDisclosureButtonControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5216 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5217 if (!PyArg_ParseTuple(_args, "O&O&lb",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5218 WinObj_Convert, &inWindow,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5219 PyMac_GetRect, &inBoundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5220 &inValue,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5221 &inAutoToggles))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5222 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5223 _err = CreateDisclosureButtonControl(inWindow,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5224 &inBoundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5225 inValue,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5226 inAutoToggles,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5227 &outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5228 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5229 _res = Py_BuildValue("O&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5230 CtlObj_New, outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5231 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5232 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5233
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5234 static PyObject *Ctl_CreateRoundButtonControl(PyObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5235 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5236 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5237 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5238 WindowPtr inWindow;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5239 Rect inBoundsRect;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5240 SInt16 inSize;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5241 ControlButtonContentInfo inContent;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5242 ControlHandle outControl;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5243 #ifndef CreateRoundButtonControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5244 PyMac_PRECHECK(CreateRoundButtonControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5245 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5246 if (!PyArg_ParseTuple(_args, "O&O&hO&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5247 WinObj_Convert, &inWindow,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5248 PyMac_GetRect, &inBoundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5249 &inSize,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5250 ControlButtonContentInfo_Convert, &inContent))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5251 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5252 _err = CreateRoundButtonControl(inWindow,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5253 &inBoundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5254 inSize,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5255 &inContent,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5256 &outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5257 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5258 _res = Py_BuildValue("O&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5259 CtlObj_New, outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5260 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5261 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5262
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5263 static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5264 {
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5265 PyObject *_res = NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5266 OSStatus _err;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5267 WindowPtr window;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5268 Rect boundsRect;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5269 OSType style;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5270 ControlHandle outControl;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5271 #ifndef CreateDataBrowserControl
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5272 PyMac_PRECHECK(CreateDataBrowserControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5273 #endif
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5274 if (!PyArg_ParseTuple(_args, "O&O&O&",
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5275 WinObj_Convert, &window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5276 PyMac_GetRect, &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5277 PyMac_GetOSType, &style))
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5278 return NULL;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5279 _err = CreateDataBrowserControl(window,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5280 &boundsRect,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5281 style,
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5282 &outControl);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5283 if (_err != noErr) return PyMac_Error(_err);
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5284 _res = Py_BuildValue("O&",
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5285 CtlObj_New, outControl);
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5286 return _res;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5287 }
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5288
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5289 static PyObject *Ctl_CreateEditUnicodeTextControl(PyObject *_self, PyObject *_args)
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5290 {
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5291 PyObject *_res = NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5292 OSStatus _err;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5293 WindowPtr window;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5294 Rect boundsRect;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5295 CFStringRef text;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5296 Boolean isPassword;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5297 ControlFontStyleRec style;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5298 ControlHandle outControl;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5299 #ifndef CreateEditUnicodeTextControl
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5300 PyMac_PRECHECK(CreateEditUnicodeTextControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5301 #endif
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5302 if (!PyArg_ParseTuple(_args, "O&O&O&bO&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5303 WinObj_Convert, &window,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5304 PyMac_GetRect, &boundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5305 CFStringRefObj_Convert, &text,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5306 &isPassword,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5307 ControlFontStyle_Convert, &style))
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5308 return NULL;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5309 _err = CreateEditUnicodeTextControl(window,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5310 &boundsRect,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5311 text,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5312 isPassword,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5313 &style,
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5314 &outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5315 if (_err != noErr) return PyMac_Error(_err);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5316 _res = Py_BuildValue("O&",
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5317 CtlObj_New, outControl);
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5318 return _res;
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5319 }
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5320
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5321 static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5322 {
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5323 PyObject *_res = NULL;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5324 ControlHandle _rv;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5325 Point inWhere;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5326 WindowPtr inWindow;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5327 SInt16 outPart;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5328 #ifndef FindControlUnderMouse
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5329 PyMac_PRECHECK(FindControlUnderMouse);
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5330 #endif
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5331 if (!PyArg_ParseTuple(_args, "O&O&",
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5332 PyMac_GetPoint, &inWhere,
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5333 WinObj_Convert, &inWindow))
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5334 return NULL;
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5335 _rv = FindControlUnderMouse(inWhere,
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5336 inWindow,
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5337 &outPart);
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5338 _res = Py_BuildValue("O&h",
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5339 CtlObj_WhichControl, _rv,
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5340 outPart);
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5341 return _res;
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5342 }
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5343
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5344 static PyObject *Ctl_as_Control(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
5345 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5346 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5347 ControlHandle _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5348 Handle h;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
5349 #ifndef as_Control
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
5350 PyMac_PRECHECK(as_Control);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
5351 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5352 if (!PyArg_ParseTuple(_args, "O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5353 ResObj_Convert, &h))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5354 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5355 _rv = as_Control(h);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5356 _res = Py_BuildValue("O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5357 CtlObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5358 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5359 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5360
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5361 static PyObject *Ctl_CreateTabsControl(PyObject *_self, PyObject *_args)
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5362 {
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5363 PyObject *_res = NULL;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5364 OSStatus _err;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5365 WindowPtr window;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5366 Rect boundsRect;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5367 UInt16 size;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5368 UInt16 direction;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5369 int i;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5370 UInt16 numTabs;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5371 ControlTabEntry tabArray[MAXTABS];
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5372 ControlHandle outControl;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5373 PyObject *tabArrayObj, *tabEntry;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5374
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5375 #ifndef CreateTabsControl
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5376 PyMac_PRECHECK(CreateTabsControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5377 #endif
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5378 if (!PyArg_ParseTuple(_args, "O&O&HHO",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5379 WinObj_Convert, &window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5380 PyMac_GetRect, &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5381 &size,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5382 &direction,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5383 &tabArrayObj))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5384 return NULL;
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5385
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5386 i = PySequence_Length(tabArrayObj);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5387 if (i == -1)
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5388 return NULL;
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5389 if (i > MAXTABS) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5390 PyErr_SetString(Ctl_Error, "Too many tabs");
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5391 return NULL;
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5392 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5393 numTabs = i;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5394 for (i=0; i<numTabs; i++) {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5395 tabEntry = PySequence_GetItem(tabArrayObj, i);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5396 if (tabEntry == NULL)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5397 return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5398 if (!PyArg_Parse(tabEntry, "(O&O&B)",
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5399 ControlButtonContentInfo_Convert, &tabArray[i].icon,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5400 CFStringRefObj_Convert, &tabArray[i].name,
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5401 &tabArray[i].enabled
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5402 ))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5403 return NULL;
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5404 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5405
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5406 _err = CreateTabsControl(window,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5407 &boundsRect,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5408 size,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5409 direction,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5410 numTabs,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5411 tabArray,
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5412 &outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5413 if (_err != noErr) return PyMac_Error(_err);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5414 _res = Py_BuildValue("O&",
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5415 CtlObj_New, outControl);
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5416 return _res;
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5417 }
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5418
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5419 static PyMethodDef Ctl_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5420 {"NewControl", (PyCFunction)Ctl_NewControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5421 PyDoc_STR("(WindowPtr owningWindow, Rect boundsRect, Str255 controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference) -> (ControlHandle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5422 {"GetNewControl", (PyCFunction)Ctl_GetNewControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5423 PyDoc_STR("(SInt16 resourceID, WindowPtr owningWindow) -> (ControlHandle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5424 {"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5425 PyDoc_STR("(WindowPtr theWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5426 {"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
5427 PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5428 {"FindControl", (PyCFunction)Ctl_FindControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5429 PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5430 {"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5431 PyDoc_STR("(WindowPtr inWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5432 {"GetControlByID", (PyCFunction)Ctl_GetControlByID, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5433 PyDoc_STR("(WindowPtr inWindow, ControlID inID) -> (ControlHandle outControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5434 {"DumpControlHierarchy", (PyCFunction)Ctl_DumpControlHierarchy, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5435 PyDoc_STR("(WindowPtr inWindow, FSSpec inDumpFile) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5436 {"CreateRootControl", (PyCFunction)Ctl_CreateRootControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5437 PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5438 {"GetRootControl", (PyCFunction)Ctl_GetRootControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5439 PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5440 {"GetKeyboardFocus", (PyCFunction)Ctl_GetKeyboardFocus, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5441 PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5442 {"SetKeyboardFocus", (PyCFunction)Ctl_SetKeyboardFocus, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5443 PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl, ControlFocusPart inPart) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5444 {"AdvanceKeyboardFocus", (PyCFunction)Ctl_AdvanceKeyboardFocus, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5445 PyDoc_STR("(WindowPtr inWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5446 {"ReverseKeyboardFocus", (PyCFunction)Ctl_ReverseKeyboardFocus, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5447 PyDoc_STR("(WindowPtr inWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5448 {"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5449 PyDoc_STR("(WindowPtr inWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5450 {"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
5451 PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5452 {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
5453 PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5454 {"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5455 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5456 {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5457 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5458 {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
5459 PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5460 {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5461 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5462 {"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5463 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5464 {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5465 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5466 {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5467 PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5468 {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5469 PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5470 {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5471 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5472 {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5473 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5474 {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5475 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5476 {"CreateImageWellControl", (PyCFunction)Ctl_CreateImageWellControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5477 PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo info) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5478 {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5479 PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5480 {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5481 PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5482 {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5483 PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5484 {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5485 PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5486 {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5487 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5488 {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5489 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5490 {"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5491 PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5492 {"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
31091
3861eb467c29 Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
5493 PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5494 {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5495 PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5496 {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5497 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5498 {"CreatePushButtonWithIconControl", (PyCFunction)Ctl_CreatePushButtonWithIconControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5499 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, ControlButtonContentInfo icon, UInt16 iconAlignment) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5500 {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5501 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5502 {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5503 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5504 {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5505 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5506 {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5507 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5508 {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5509 PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5510 {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5511 PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5512 {"CreateDisclosureButtonControl", (PyCFunction)Ctl_CreateDisclosureButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5513 PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt32 inValue, Boolean inAutoToggles) -> (ControlHandle outControl)")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5514 {"CreateRoundButtonControl", (PyCFunction)Ctl_CreateRoundButtonControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5515 PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt16 inSize, ControlButtonContentInfo inContent) -> (ControlHandle outControl)")},
21375
7e0d2d59bbce Updated for Universal Headers 3.4.
Just van Rossum <just@letterror.com>
parents: 21313
diff changeset
5516 {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5517 PyDoc_STR("(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)")},
21471
803aa0c2b130 Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
5518 {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5519 PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, ControlFontStyleRec style) -> (ControlHandle outControl)")},
21403
fbd57ee5b77d - "manage" controls created by CreateXxxXxxControl() functions.
Just van Rossum <just@letterror.com>
parents: 21378
diff changeset
5520 {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5521 PyDoc_STR("(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5522 {"as_Control", (PyCFunction)Ctl_as_Control, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5523 PyDoc_STR("(Handle h) -> (ControlHandle _rv)")},
21461
3303f2d92cef Added support for tab controls and initial (incomplete) support
Just van Rossum <just@letterror.com>
parents: 21417
diff changeset
5524 {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24280
diff changeset
5525 PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5526 {NULL, NULL, 0}
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5527 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5528
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5529
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5530
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5531 static PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5532 CtlObj_NewUnmanaged(ControlHandle itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5533 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5534 ControlObject *it;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5535 if (itself == NULL) return PyMac_Error(resNotFound);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5536 it = PyObject_NEW(ControlObject, &Control_Type);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5537 if (it == NULL) return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5538 it->ob_itself = itself;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5539 it->ob_callbackdict = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5540 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
5541 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5542
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5543 static PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5544 CtlObj_WhichControl(ControlHandle c)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5545 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5546 PyObject *it;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5547
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5548 if (c == NULL)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5549 it = Py_None;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5550 else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5551 it = (PyObject *) GetControlReference(c);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5552 /*
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5553 ** If the refcon is zero or doesn't point back to the Python object
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5554 ** the control is not ours. Return a temporary object.
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5555 */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5556 if (it == NULL || ((ControlObject *)it)->ob_itself != c)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5557 return CtlObj_NewUnmanaged(c);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5558 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5559 Py_INCREF(it);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5560 return it;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5561 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5562
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5563 static int
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5564 settrackfunc(PyObject *obj)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5565 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5566 if (tracker) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5567 PyErr_SetString(Ctl_Error, "Tracker function in use");
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5568 return 0;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5569 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5570 tracker = obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5571 Py_INCREF(tracker);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5572 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
5573 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5574
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5575 static void
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5576 clrtrackfunc(void)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5577 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5578 Py_XDECREF(tracker);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5579 tracker = 0;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5580 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5581
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5582 static pascal void
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5583 mytracker(ControlHandle ctl, short part)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5584 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5585 PyObject *args, *rv=0;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5586
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5587 args = Py_BuildValue("(O&i)", CtlObj_WhichControl, ctl, (int)part);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5588 if (args && tracker) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5589 rv = PyEval_CallObject(tracker, args);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5590 Py_DECREF(args);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5591 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5592 if (rv)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5593 Py_DECREF(rv);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5594 else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5595 PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5596 PyErr_Print();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5597 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5598 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5599
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5600 static int
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5601 setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5602 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5603 ControlObject *self = (ControlObject *)myself;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5604 char keybuf[9];
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5605
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5606 if ( which == kMyControlActionProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5607 *uppp = (UniversalProcPtr)myactionproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5608 else if ( which == kControlUserPaneKeyDownProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5609 *uppp = (UniversalProcPtr)mykeydownproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5610 else if ( which == kControlUserPaneFocusProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5611 *uppp = (UniversalProcPtr)myfocusproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5612 else if ( which == kControlUserPaneDrawProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5613 *uppp = (UniversalProcPtr)mydrawproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5614 else if ( which == kControlUserPaneIdleProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5615 *uppp = (UniversalProcPtr)myidleproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5616 else if ( which == kControlUserPaneHitTestProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5617 *uppp = (UniversalProcPtr)myhittestproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5618 else if ( which == kControlUserPaneTrackingProcTag )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5619 *uppp = (UniversalProcPtr)mytrackingproc_upp;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5620 else
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5621 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5622 /* Only now do we test for clearing of the callback: */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5623 if ( callback == Py_None )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5624 *uppp = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5625 /* Create the dict if it doesn't exist yet (so we don't get such a dict for every control) */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5626 if ( self->ob_callbackdict == NULL )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5627 if ( (self->ob_callbackdict = PyDict_New()) == NULL )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5628 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5629 /* And store the Python callback */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5630 sprintf(keybuf, "%x", (unsigned)which);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5631 if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5632 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5633 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
5634 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5635
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5636 static PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5637 callcallback(ControlObject *self, OSType which, PyObject *arglist)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5638 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5639 char keybuf[9];
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5640 PyObject *func, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5641
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5642 sprintf(keybuf, "%x", (unsigned)which);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5643 if ( self->ob_callbackdict == NULL ||
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5644 (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5645 PySys_WriteStderr("Control callback %x without callback object\n", (unsigned)which);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5646 return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5647 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5648 rv = PyEval_CallObject(func, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5649 if ( rv == NULL ) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5650 PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5651 PyErr_Print();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5652 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5653 return rv;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5654 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5655
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5656 static pascal void
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5657 myactionproc(ControlHandle control, SInt16 part)
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5658 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5659 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5660 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5661
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5662 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5663 arglist = Py_BuildValue("Oh", ctl_obj, part);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5664 rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5665 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5666 Py_XDECREF(rv);
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5667 }
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5668
21635
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5669 static pascal ControlPartCode
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5670 mykeydownproc(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5671 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5672 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5673 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5674 short c_rv = 0;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5675
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5676 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5677 arglist = Py_BuildValue("Ohhh", ctl_obj, keyCode, charCode, modifiers);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5678 rv = callcallback(ctl_obj, kControlUserPaneKeyDownProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5679 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5680 if ( rv )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5681 if (!PyArg_Parse(rv, "h", &c_rv))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5682 PyErr_Clear();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5683 Py_XDECREF(rv);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5684 return (ControlPartCode)c_rv;
21635
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5685 }
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5686
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5687 static pascal ControlPartCode
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5688 myfocusproc(ControlHandle control, ControlPartCode part)
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5689 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5690 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5691 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5692 short c_rv = kControlFocusNoPart;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5693
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5694 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5695 arglist = Py_BuildValue("Oh", ctl_obj, part);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5696 rv = callcallback(ctl_obj, kControlUserPaneFocusProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5697 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5698 if ( rv )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5699 if (!PyArg_Parse(rv, "h", &c_rv))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5700 PyErr_Clear();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5701 Py_XDECREF(rv);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5702 return (ControlPartCode)c_rv;
21635
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5703 }
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5704
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5705 static pascal void
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5706 mydrawproc(ControlHandle control, SInt16 part)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5707 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5708 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5709 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5710
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5711 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5712 arglist = Py_BuildValue("Oh", ctl_obj, part);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5713 rv = callcallback(ctl_obj, kControlUserPaneDrawProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5714 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5715 Py_XDECREF(rv);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5716 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5717
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5718 static pascal void
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5719 myidleproc(ControlHandle control)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5720 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5721 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5722 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5723
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5724 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5725 arglist = Py_BuildValue("O", ctl_obj);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5726 rv = callcallback(ctl_obj, kControlUserPaneIdleProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5727 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5728 Py_XDECREF(rv);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5729 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5730
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5731 static pascal ControlPartCode
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5732 myhittestproc(ControlHandle control, Point where)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5733 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5734 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5735 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5736 short c_rv = -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5737
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5738 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5739 arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, where);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5740 rv = callcallback(ctl_obj, kControlUserPaneHitTestProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5741 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5742 /* Ignore errors, nothing we can do about them */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5743 if ( rv )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5744 if (!PyArg_Parse(rv, "h", &c_rv))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5745 PyErr_Clear();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5746 Py_XDECREF(rv);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5747 return (ControlPartCode)c_rv;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5748 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5749
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5750 static pascal ControlPartCode
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5751 mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5752 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5753 ControlObject *ctl_obj;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5754 PyObject *arglist, *rv;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5755 short c_rv = -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5756
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5757 ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5758 /* We cannot pass the actionProc without lots of work */
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5759 arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, startPt);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5760 rv = callcallback(ctl_obj, kControlUserPaneTrackingProcTag, arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5761 Py_XDECREF(arglist);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5762 if ( rv )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5763 if (!PyArg_Parse(rv, "h", &c_rv))
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5764 PyErr_Clear();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5765 Py_XDECREF(rv);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
5766 return (ControlPartCode)c_rv;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5767 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5768
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5769 #else /* __LP64__ */
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5770
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5771 static PyMethodDef Ctl_methods[] = {
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5772 {NULL, NULL, 0}
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5773 };
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5774
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5775 #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
5776
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5777 void init_Ctl(void)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5778 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5779 PyObject *m;
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5780
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5781 #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
5782 PyObject *d;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5783
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5784 mytracker_upp = NewControlActionUPP(mytracker);
21597
8578355d23d3 - added support for ControlActionProcs, exposing the following calls:
Just van Rossum <just@letterror.com>
parents: 21471
diff changeset
5785 myactionproc_upp = NewControlActionUPP(myactionproc);
21635
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5786 mykeydownproc_upp = NewControlUserPaneKeyDownUPP(mykeydownproc);
6ae85d838466 - added support for UserPaneKeyDownProc and UserPaneFocusProc
Just van Rossum <just@letterror.com>
parents: 21601
diff changeset
5787 myfocusproc_upp = NewControlUserPaneFocusUPP(myfocusproc);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5788 mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5789 myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5790 myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5791 mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5792 PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5793 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5794 #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
5795
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5796 m = Py_InitModule("_Ctl", Ctl_methods);
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5797
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5798 #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
5799 d = PyModule_GetDict(m);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5800 Ctl_Error = PyMac_GetOSErrException();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5801 if (Ctl_Error == NULL ||
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5802 PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5803 return;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5804 Control_Type.ob_type = &PyType_Type;
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
5805 if (PyType_Ready(&Control_Type) < 0) return;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5806 Py_INCREF(&Control_Type);
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
5807 PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
5808 /* Backward-compatible name */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
5809 Py_INCREF(&Control_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
5810 PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 35200
diff changeset
5811 #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
5812 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5813
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5814 /* ======================== End module _Ctl ========================= */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5815