annotate Mac/Modules/win/_Winmodule.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 52294af4b663
children fd25030223b0
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 _Win =========================== */
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: 47294
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 #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
9
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
10 /* 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
11 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
12 PyErr_SetString(PyExc_NotImplementedError, \
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
13 "Not available in this shared library/OS version"); \
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
14 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
15 }} while(0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16
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 #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
19
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 #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
21 extern PyObject *_WinObj_New(WindowRef);
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 *_WinObj_WhichWindow(WindowRef);
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 _WinObj_Convert(PyObject *, WindowRef *);
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 WinObj_New _WinObj_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 WinObj_WhichWindow _WinObj_WhichWindow
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
27 #define WinObj_Convert _WinObj_Convert
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28 #endif
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30 /* Classic calls that we emulate in carbon mode */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 #define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32 #define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
33 #define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
34
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35 /* Function to dispose a window, with a "normal" calling sequence */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
36 static void
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 PyMac_AutoDisposeWindow(WindowPtr w)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
39 DisposeWindow(w);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
42 static PyObject *Win_Error;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
43
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
44 /* ----------------------- Object type Window ----------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
46 PyTypeObject Window_Type;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47
26720
a12e1727850a Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26636
diff changeset
48 #define WinObj_Check(x) ((x)->ob_type == &Window_Type || PyObject_TypeCheck((x), &Window_Type))
19443
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 typedef struct WindowObject {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51 PyObject_HEAD
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
52 WindowPtr ob_itself;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
53 void (*ob_freeit)(WindowPtr ptr);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
54 } WindowObject;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
55
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
56 PyObject *WinObj_New(WindowPtr itself)
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 WindowObject *it;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
59 if (itself == NULL) return PyMac_Error(resNotFound);
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
60 /* XXXX Or should we use WhichWindow code here? */
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61 it = PyObject_NEW(WindowObject, &Window_Type);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
62 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
63 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
64 it->ob_freeit = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
65 if (GetWRefCon(itself) == 0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
66 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
67 SetWRefCon(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
68 it->ob_freeit = PyMac_AutoDisposeWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
69 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
70 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
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
19708
6eafc4a6359a Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19443
diff changeset
73 int WinObj_Convert(PyObject *v, WindowPtr *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
74 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
76 if (v == Py_None) { *p_itself = NULL; return 1; }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
77 if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
78
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
79 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
80 DialogRef dlg;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
81 if (DlgObj_Convert(v, &dlg) && dlg) {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
82 *p_itself = GetDialogWindow(dlg);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
83 return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
84 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
85 PyErr_Clear();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
86 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
87 if (!WinObj_Check(v))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
88 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
89 PyErr_SetString(PyExc_TypeError, "Window required");
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
90 return 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
91 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
92 *p_itself = ((WindowObject *)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
93 return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
94 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
95
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
96 static void WinObj_dealloc(WindowObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
97 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98 if (self->ob_freeit && 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
99 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
100 SetWRefCon(self->ob_itself, 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
101 self->ob_freeit(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
102 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
103 self->ob_itself = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
104 self->ob_freeit = NULL;
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
105 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
106 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
108 static PyObject *WinObj_GetWindowOwnerCount(WindowObject *_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
109 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
110 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
111 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
112 UInt32 outCount;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
113 #ifndef GetWindowOwnerCount
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
114 PyMac_PRECHECK(GetWindowOwnerCount);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
115 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
116 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
117 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118 _err = GetWindowOwnerCount(_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
119 &outCount);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120 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
121 _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
122 outCount);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
123 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
124 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
125
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
126 static PyObject *WinObj_CloneWindow(WindowObject *_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
127 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128 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
129 OSStatus _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
130 #ifndef CloneWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
131 PyMac_PRECHECK(CloneWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
132 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
133 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
134 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
135 _err = CloneWindow(_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
136 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
137 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
138 _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
139 return _res;
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
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
142 static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
143 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
144 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
145 ItemCount _rv;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
146 #ifndef GetWindowRetainCount
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
147 PyMac_PRECHECK(GetWindowRetainCount);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
148 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
149 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
150 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
151 _rv = GetWindowRetainCount(_self->ob_itself);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
152 _res = Py_BuildValue("l",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
153 _rv);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
154 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
155 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
156
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
157 static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
158 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
159 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
160 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
161 #ifndef RetainWindow
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
162 PyMac_PRECHECK(RetainWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
163 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
164 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
165 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
166 _err = RetainWindow(_self->ob_itself);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
167 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
168 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
169 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
170 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
171 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
172
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
173 static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
174 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
175 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
176 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
177 #ifndef ReleaseWindow
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
178 PyMac_PRECHECK(ReleaseWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
179 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
180 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
181 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
182 _err = ReleaseWindow(_self->ob_itself);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
183 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
184 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
185 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
186 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
187 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
188
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
189 static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_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
190 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
191 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
192 OSStatus _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
193 #ifndef ReshapeCustomWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
194 PyMac_PRECHECK(ReshapeCustomWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
195 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
196 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
197 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
198 _err = ReshapeCustomWindow(_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
199 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
200 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
201 _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
202 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
203 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
204
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
205 static PyObject *WinObj_GetWindowWidgetHilite(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
206 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
207 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
208 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
209 WindowDefPartCode outHilite;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
210 #ifndef GetWindowWidgetHilite
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
211 PyMac_PRECHECK(GetWindowWidgetHilite);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
212 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
213 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
214 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
215 _err = GetWindowWidgetHilite(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
216 &outHilite);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
217 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
218 _res = Py_BuildValue("h",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
219 outHilite);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
220 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
221 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
222
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
223 static PyObject *WinObj_GetWindowClass(WindowObject *_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
224 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
225 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
226 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
227 WindowClass outClass;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
228 #ifndef GetWindowClass
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
229 PyMac_PRECHECK(GetWindowClass);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
230 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
231 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
232 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
233 _err = GetWindowClass(_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
234 &outClass);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
235 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
236 _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
237 outClass);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
238 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
239 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
240
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
241 static PyObject *WinObj_GetWindowAttributes(WindowObject *_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
242 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
243 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
244 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
245 WindowAttributes outAttributes;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
246 #ifndef GetWindowAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
247 PyMac_PRECHECK(GetWindowAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
248 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
249 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
250 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
251 _err = GetWindowAttributes(_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
252 &outAttributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
253 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
254 _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
255 outAttributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
256 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
257 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
258
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
259 static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_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
260 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
261 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
262 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
263 WindowAttributes setTheseAttributes;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
264 WindowAttributes clearTheseAttributes;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
265 #ifndef ChangeWindowAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
266 PyMac_PRECHECK(ChangeWindowAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
267 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
268 if (!PyArg_ParseTuple(_args, "ll",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
269 &setTheseAttributes,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
270 &clearTheseAttributes))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
271 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
272 _err = ChangeWindowAttributes(_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
273 setTheseAttributes,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
274 clearTheseAttributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
275 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
276 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
277 _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
278 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
279 }
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
280
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
281 static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
282 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
283 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
284 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
285 WindowClass inWindowClass;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
286 #ifndef SetWindowClass
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
287 PyMac_PRECHECK(SetWindowClass);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
288 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
289 if (!PyArg_ParseTuple(_args, "l",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
290 &inWindowClass))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
291 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
292 _err = SetWindowClass(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
293 inWindowClass);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
294 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
295 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
296 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
297 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
298 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
299
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
300 static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
301 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
302 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
303 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
304 WindowModality inModalKind;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
305 WindowPtr inUnavailableWindow;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
306 #ifndef SetWindowModality
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
307 PyMac_PRECHECK(SetWindowModality);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
308 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
309 if (!PyArg_ParseTuple(_args, "lO&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
310 &inModalKind,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
311 WinObj_Convert, &inUnavailableWindow))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
312 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
313 _err = SetWindowModality(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
314 inModalKind,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
315 inUnavailableWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
316 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
317 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
318 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
319 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
320 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
321
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
322 static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
323 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
324 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
325 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
326 WindowModality outModalKind;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
327 WindowPtr outUnavailableWindow;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
328 #ifndef GetWindowModality
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
329 PyMac_PRECHECK(GetWindowModality);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
330 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
331 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
332 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
333 _err = GetWindowModality(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
334 &outModalKind,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
335 &outUnavailableWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
336 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
337 _res = Py_BuildValue("lO&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
338 outModalKind,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
339 WinObj_WhichWindow, outUnavailableWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
340 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
341 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
342
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
343 static PyObject *WinObj_SetWindowContentColor(WindowObject *_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
344 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
345 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
346 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
347 RGBColor color;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
348 #ifndef SetWindowContentColor
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
349 PyMac_PRECHECK(SetWindowContentColor);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
350 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
351 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
352 QdRGB_Convert, &color))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
353 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
354 _err = SetWindowContentColor(_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
355 &color);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
356 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
357 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
358 _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
359 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
360 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
361
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
362 static PyObject *WinObj_GetWindowContentColor(WindowObject *_self, PyObject *_args)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
363 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
364 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
365 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
366 RGBColor color;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
367 #ifndef GetWindowContentColor
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
368 PyMac_PRECHECK(GetWindowContentColor);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
369 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
370 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
371 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
372 _err = GetWindowContentColor(_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
373 &color);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
374 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
375 _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
376 QdRGB_New, &color);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
377 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
378 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
379
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
380 static PyObject *WinObj_GetWindowContentPattern(WindowObject *_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
381 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
382 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
383 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
384 PixPatHandle outPixPat;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
385 #ifndef GetWindowContentPattern
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
386 PyMac_PRECHECK(GetWindowContentPattern);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
387 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
388 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
389 ResObj_Convert, &outPixPat))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
390 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
391 _err = GetWindowContentPattern(_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
392 outPixPat);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
393 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
394 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
395 _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
396 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
397 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
398
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
399 static PyObject *WinObj_SetWindowContentPattern(WindowObject *_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
400 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
401 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
402 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
403 PixPatHandle pixPat;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
404 #ifndef SetWindowContentPattern
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
405 PyMac_PRECHECK(SetWindowContentPattern);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
406 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
407 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
408 ResObj_Convert, &pixPat))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
409 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
410 _err = SetWindowContentPattern(_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
411 pixPat);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
412 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
413 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
414 _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
415 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
416 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
417
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
418 static PyObject *WinObj_ScrollWindowRect(WindowObject *_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
419 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
420 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
421 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
422 Rect inScrollRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
423 SInt16 inHPixels;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
424 SInt16 inVPixels;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
425 ScrollWindowOptions inOptions;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
426 RgnHandle outExposedRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
427 #ifndef ScrollWindowRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
428 PyMac_PRECHECK(ScrollWindowRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
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, "O&hhlO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
431 PyMac_GetRect, &inScrollRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
432 &inHPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
433 &inVPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
434 &inOptions,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
435 ResObj_Convert, &outExposedRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
436 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
437 _err = ScrollWindowRect(_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
438 &inScrollRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
439 inHPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
440 inVPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
441 inOptions,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
442 outExposedRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
443 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
444 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
445 _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
446 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
447 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
448
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
449 static PyObject *WinObj_ScrollWindowRegion(WindowObject *_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
450 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
451 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
452 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
453 RgnHandle inScrollRgn;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
454 SInt16 inHPixels;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
455 SInt16 inVPixels;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
456 ScrollWindowOptions inOptions;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
457 RgnHandle outExposedRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
458 #ifndef ScrollWindowRegion
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
459 PyMac_PRECHECK(ScrollWindowRegion);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
460 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
461 if (!PyArg_ParseTuple(_args, "O&hhlO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
462 ResObj_Convert, &inScrollRgn,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
463 &inHPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
464 &inVPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
465 &inOptions,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
466 ResObj_Convert, &outExposedRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
467 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
468 _err = ScrollWindowRegion(_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
469 inScrollRgn,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
470 inHPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
471 inVPixels,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
472 inOptions,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
473 outExposedRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
474 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
475 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
476 _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
477 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
478 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
479
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
480 static PyObject *WinObj_ClipAbove(WindowObject *_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
481 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
482 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
483 #ifndef ClipAbove
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
484 PyMac_PRECHECK(ClipAbove);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
485 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
486 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
487 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
488 ClipAbove(_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
489 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
490 _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
491 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
494 static PyObject *WinObj_PaintOne(WindowObject *_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
495 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
496 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
497 RgnHandle clobberedRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
498 #ifndef PaintOne
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
499 PyMac_PRECHECK(PaintOne);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
500 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
501 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
502 ResObj_Convert, &clobberedRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
503 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
504 PaintOne(_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
505 clobberedRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
506 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
507 _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
508 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
509 }
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 static PyObject *WinObj_PaintBehind(WindowObject *_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
512 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
513 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
514 RgnHandle clobberedRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
515 #ifndef PaintBehind
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
516 PyMac_PRECHECK(PaintBehind);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
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 ResObj_Convert, &clobberedRgn))
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 PaintBehind(_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 clobberedRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
523 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
524 _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
525 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
526 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
527
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
528 static PyObject *WinObj_CalcVis(WindowObject *_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
529 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
530 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
531 #ifndef CalcVis
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
532 PyMac_PRECHECK(CalcVis);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
533 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
534 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
535 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
536 CalcVis(_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
537 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
538 _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
539 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
540 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
541
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
542 static PyObject *WinObj_CalcVisBehind(WindowObject *_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
543 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
544 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
545 RgnHandle clobberedRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
546 #ifndef CalcVisBehind
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
547 PyMac_PRECHECK(CalcVisBehind);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
548 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
549 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
550 ResObj_Convert, &clobberedRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
551 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
552 CalcVisBehind(_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
553 clobberedRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
554 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
555 _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
556 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
557 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
558
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
559 static PyObject *WinObj_BringToFront(WindowObject *_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
560 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
561 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
562 #ifndef BringToFront
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
563 PyMac_PRECHECK(BringToFront);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
564 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
565 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
566 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
567 BringToFront(_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
568 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
569 _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
570 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
571 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
572
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
573 static PyObject *WinObj_SendBehind(WindowObject *_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
574 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
575 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
576 WindowPtr behindWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
577 #ifndef SendBehind
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
578 PyMac_PRECHECK(SendBehind);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
579 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
580 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
581 WinObj_Convert, &behindWindow))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
582 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
583 SendBehind(_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
584 behindWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
585 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
586 _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
587 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
588 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
589
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
590 static PyObject *WinObj_SelectWindow(WindowObject *_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
591 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
592 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
593 #ifndef SelectWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
594 PyMac_PRECHECK(SelectWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
595 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
596 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
597 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
598 SelectWindow(_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
599 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
600 _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
601 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
602 }
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 static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_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
605 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
606 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
607 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
608 WindowClass inWindowClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
609 Boolean mustBeVisible;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
610 #ifndef GetNextWindowOfClass
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
611 PyMac_PRECHECK(GetNextWindowOfClass);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
612 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
613 if (!PyArg_ParseTuple(_args, "lb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
614 &inWindowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
615 &mustBeVisible))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
616 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
617 _rv = GetNextWindowOfClass(_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
618 inWindowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
619 mustBeVisible);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
620 _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
621 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
622 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
623 }
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
624
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
625 static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
626 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
627 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
628 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
629 CFStringRef inTitle;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
630 #ifndef SetWindowAlternateTitle
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
631 PyMac_PRECHECK(SetWindowAlternateTitle);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
632 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
633 if (!PyArg_ParseTuple(_args, "O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
634 CFStringRefObj_Convert, &inTitle))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
635 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
636 _err = SetWindowAlternateTitle(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
637 inTitle);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
638 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
639 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
640 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
641 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
642 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
643
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
644 static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
645 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
646 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
647 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
648 CFStringRef outTitle;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
649 #ifndef CopyWindowAlternateTitle
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
650 PyMac_PRECHECK(CopyWindowAlternateTitle);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
651 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
652 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
653 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
654 _err = CopyWindowAlternateTitle(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
655 &outTitle);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
656 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
657 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
658 CFStringRefObj_New, outTitle);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
659 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
660 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
661
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
662 static PyObject *WinObj_HiliteWindow(WindowObject *_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
663 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
664 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
665 Boolean fHilite;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
666 #ifndef HiliteWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
667 PyMac_PRECHECK(HiliteWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
668 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
669 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
670 &fHilite))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
671 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
672 HiliteWindow(_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
673 fHilite);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
674 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
675 _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
676 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
677 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
678
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
679 static PyObject *WinObj_SetWRefCon(WindowObject *_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
680 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
681 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
682 long data;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
683 #ifndef SetWRefCon
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
684 PyMac_PRECHECK(SetWRefCon);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
685 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
686 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
687 &data))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
688 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
689 SetWRefCon(_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
690 data);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
691 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
692 _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
693 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
694 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
695
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
696 static PyObject *WinObj_GetWRefCon(WindowObject *_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
697 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
698 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
699 long _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
700 #ifndef GetWRefCon
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
701 PyMac_PRECHECK(GetWRefCon);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
702 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
703 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
704 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
705 _rv = GetWRefCon(_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
706 _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
707 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
708 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
709 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
710
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
711 static PyObject *WinObj_SetWindowPic(WindowObject *_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
712 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
713 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
714 PicHandle pic;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
715 #ifndef SetWindowPic
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
716 PyMac_PRECHECK(SetWindowPic);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
717 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
718 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
719 ResObj_Convert, &pic))
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 SetWindowPic(_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 pic);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
723 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
724 _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
725 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
728 static PyObject *WinObj_GetWindowPic(WindowObject *_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
729 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
730 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
731 PicHandle _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
732 #ifndef GetWindowPic
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
733 PyMac_PRECHECK(GetWindowPic);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
734 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
735 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
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 _rv = GetWindowPic(_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 _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
739 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
740 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
741 }
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 static PyObject *WinObj_GetWVariant(WindowObject *_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
744 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
745 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
746 short _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
747 #ifndef GetWVariant
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
748 PyMac_PRECHECK(GetWVariant);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
749 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
750 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
751 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
752 _rv = GetWVariant(_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
753 _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
754 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
755 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
756 }
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 static PyObject *WinObj_GetWindowFeatures(WindowObject *_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
759 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
760 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
761 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
762 UInt32 outFeatures;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
763 #ifndef GetWindowFeatures
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
764 PyMac_PRECHECK(GetWindowFeatures);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
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, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
767 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
768 _err = GetWindowFeatures(_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
769 &outFeatures);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
770 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
771 _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
772 outFeatures);
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 *WinObj_GetWindowRegion(WindowObject *_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 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
780 WindowRegionCode inRegionCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
781 RgnHandle ioWinRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
782 #ifndef GetWindowRegion
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
783 PyMac_PRECHECK(GetWindowRegion);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
784 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
785 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
786 &inRegionCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
787 ResObj_Convert, &ioWinRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
788 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
789 _err = GetWindowRegion(_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
790 inRegionCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
791 ioWinRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
792 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
793 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
794 _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
795 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
796 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
797
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
798 static PyObject *WinObj_GetWindowStructureWidths(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
799 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
800 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
801 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
802 Rect outRect;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
803 #ifndef GetWindowStructureWidths
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
804 PyMac_PRECHECK(GetWindowStructureWidths);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
805 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
806 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
807 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
808 _err = GetWindowStructureWidths(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
809 &outRect);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
810 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
811 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
812 PyMac_BuildRect, &outRect);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
813 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
814 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
815
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
816 static PyObject *WinObj_BeginUpdate(WindowObject *_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
817 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
818 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
819 #ifndef BeginUpdate
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
820 PyMac_PRECHECK(BeginUpdate);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
821 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
822 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
823 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
824 BeginUpdate(_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
825 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
826 _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
827 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
828 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
829
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
830 static PyObject *WinObj_EndUpdate(WindowObject *_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
831 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
832 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
833 #ifndef EndUpdate
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
834 PyMac_PRECHECK(EndUpdate);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
835 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
836 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
837 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
838 EndUpdate(_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
839 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
840 _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
841 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
842 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
843
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
844 static PyObject *WinObj_InvalWindowRgn(WindowObject *_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
845 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
846 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
847 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
848 RgnHandle region;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
849 #ifndef InvalWindowRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
850 PyMac_PRECHECK(InvalWindowRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
851 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
852 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
853 ResObj_Convert, &region))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
854 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
855 _err = InvalWindowRgn(_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
856 region);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
857 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
858 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
859 _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
860 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
861 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
862
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
863 static PyObject *WinObj_InvalWindowRect(WindowObject *_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
864 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
865 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
866 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
867 Rect bounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
868 #ifndef InvalWindowRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
869 PyMac_PRECHECK(InvalWindowRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
870 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
871 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
872 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
873 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
874 _err = InvalWindowRect(_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
875 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
876 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
877 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
878 _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
879 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
880 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
881
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
882 static PyObject *WinObj_ValidWindowRgn(WindowObject *_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
883 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
884 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
885 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
886 RgnHandle region;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
887 #ifndef ValidWindowRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
888 PyMac_PRECHECK(ValidWindowRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
889 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
890 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
891 ResObj_Convert, &region))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
892 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
893 _err = ValidWindowRgn(_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
894 region);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
895 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
896 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
897 _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
898 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
899 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
900
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
901 static PyObject *WinObj_ValidWindowRect(WindowObject *_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
902 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
903 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
904 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
905 Rect bounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
906 #ifndef ValidWindowRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
907 PyMac_PRECHECK(ValidWindowRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
908 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
909 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
910 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
911 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
912 _err = ValidWindowRect(_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
913 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
914 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
915 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
916 _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
917 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
920 static PyObject *WinObj_DrawGrowIcon(WindowObject *_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
921 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
922 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
923 #ifndef DrawGrowIcon
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
924 PyMac_PRECHECK(DrawGrowIcon);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
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, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
927 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
928 DrawGrowIcon(_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
929 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
930 _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
931 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
932 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
933
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
934 static PyObject *WinObj_SetWTitle(WindowObject *_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
935 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
936 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
937 Str255 title;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
938 #ifndef SetWTitle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
939 PyMac_PRECHECK(SetWTitle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
940 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
941 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
942 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
943 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
944 SetWTitle(_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
945 title);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
946 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
947 _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
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 *WinObj_GetWTitle(WindowObject *_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 Str255 title;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
955 #ifndef GetWTitle
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
956 PyMac_PRECHECK(GetWTitle);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
957 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
958 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
959 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
960 GetWTitle(_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
961 title);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
962 _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
963 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
964 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
965 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
966
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
967 static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
968 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
969 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
970 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
971 CFStringRef inString;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
972 #ifndef SetWindowTitleWithCFString
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
973 PyMac_PRECHECK(SetWindowTitleWithCFString);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
974 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
975 if (!PyArg_ParseTuple(_args, "O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
976 CFStringRefObj_Convert, &inString))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
977 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
978 _err = SetWindowTitleWithCFString(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
979 inString);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
980 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
981 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
982 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
983 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
984 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
985
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
986 static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
987 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
988 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
989 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
990 CFStringRef outString;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
991 #ifndef CopyWindowTitleAsCFString
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
992 PyMac_PRECHECK(CopyWindowTitleAsCFString);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
993 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
994 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
995 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
996 _err = CopyWindowTitleAsCFString(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
997 &outString);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
998 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
999 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1000 CFStringRefObj_New, outString);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1001 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1002 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1003
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1004 static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_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
1005 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1006 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
1007 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1008 FSSpec inFile;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1009 #ifndef SetWindowProxyFSSpec
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1010 PyMac_PRECHECK(SetWindowProxyFSSpec);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1011 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1012 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
1013 PyMac_GetFSSpec, &inFile))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1014 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1015 _err = SetWindowProxyFSSpec(_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
1016 &inFile);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1017 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
1018 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
1019 _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
1020 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1021 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1022
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1023 static PyObject *WinObj_GetWindowProxyFSSpec(WindowObject *_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
1024 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1025 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
1026 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1027 FSSpec outFile;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1028 #ifndef GetWindowProxyFSSpec
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1029 PyMac_PRECHECK(GetWindowProxyFSSpec);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1030 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1031 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
1032 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1033 _err = GetWindowProxyFSSpec(_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
1034 &outFile);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1035 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
1036 _res = Py_BuildValue("O&",
22387
b59e8a8df57e Backport of _CFmodule.c 1.11 and _Winmodule 1.8:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21464
diff changeset
1037 PyMac_BuildFSSpec, &outFile);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1038 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1039 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1040
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1041 static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_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
1042 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1043 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
1044 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
1045 AliasHandle inAlias;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1046 #ifndef SetWindowProxyAlias
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1047 PyMac_PRECHECK(SetWindowProxyAlias);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1048 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1049 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
1050 ResObj_Convert, &inAlias))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1051 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1052 _err = SetWindowProxyAlias(_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
1053 inAlias);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1054 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
1055 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
1056 _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
1057 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1058 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1059
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1060 static PyObject *WinObj_GetWindowProxyAlias(WindowObject *_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
1061 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1062 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
1063 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1064 AliasHandle alias;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1065 #ifndef GetWindowProxyAlias
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1066 PyMac_PRECHECK(GetWindowProxyAlias);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1067 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1068 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
1069 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1070 _err = GetWindowProxyAlias(_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
1071 &alias);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1072 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
1073 _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
1074 ResObj_New, alias);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1075 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1076 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1077
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1078 static PyObject *WinObj_SetWindowProxyCreatorAndType(WindowObject *_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
1079 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1080 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
1081 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1082 OSType fileCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1083 OSType fileType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1084 SInt16 vRefNum;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1085 #ifndef SetWindowProxyCreatorAndType
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1086 PyMac_PRECHECK(SetWindowProxyCreatorAndType);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1087 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1088 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
1089 PyMac_GetOSType, &fileCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1090 PyMac_GetOSType, &fileType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1091 &vRefNum))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1092 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1093 _err = SetWindowProxyCreatorAndType(_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
1094 fileCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1095 fileType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1096 vRefNum);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1097 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
1098 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
1099 _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
1100 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1101 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1102
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1103 static PyObject *WinObj_GetWindowProxyIcon(WindowObject *_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
1104 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1105 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
1106 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1107 IconRef outIcon;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1108 #ifndef GetWindowProxyIcon
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1109 PyMac_PRECHECK(GetWindowProxyIcon);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1110 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1111 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
1112 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1113 _err = GetWindowProxyIcon(_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
1114 &outIcon);
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 _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
1117 ResObj_New, outIcon);
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 *WinObj_SetWindowProxyIcon(WindowObject *_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 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1125 IconRef icon;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1126 #ifndef SetWindowProxyIcon
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1127 PyMac_PRECHECK(SetWindowProxyIcon);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1128 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1129 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
1130 ResObj_Convert, &icon))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1131 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1132 _err = SetWindowProxyIcon(_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
1133 icon);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1134 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
1135 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
1136 _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
1137 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1138 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1139
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1140 static PyObject *WinObj_RemoveWindowProxy(WindowObject *_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
1141 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1142 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
1143 OSStatus _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1144 #ifndef RemoveWindowProxy
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1145 PyMac_PRECHECK(RemoveWindowProxy);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1146 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1147 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
1148 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1149 _err = RemoveWindowProxy(_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
1150 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
1151 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
1152 _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
1153 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1154 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1155
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1156 static PyObject *WinObj_BeginWindowProxyDrag(WindowObject *_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
1157 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1158 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
1159 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1160 DragReference outNewDrag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1161 RgnHandle outDragOutlineRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1162 #ifndef BeginWindowProxyDrag
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1163 PyMac_PRECHECK(BeginWindowProxyDrag);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1164 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1165 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
1166 ResObj_Convert, &outDragOutlineRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1167 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1168 _err = BeginWindowProxyDrag(_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
1169 &outNewDrag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1170 outDragOutlineRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1171 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
1172 _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
1173 DragObj_New, outNewDrag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1174 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1175 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1176
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1177 static PyObject *WinObj_EndWindowProxyDrag(WindowObject *_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
1178 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1179 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
1180 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1181 DragReference theDrag;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1182 #ifndef EndWindowProxyDrag
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1183 PyMac_PRECHECK(EndWindowProxyDrag);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1184 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1185 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
1186 DragObj_Convert, &theDrag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1187 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1188 _err = EndWindowProxyDrag(_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
1189 theDrag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1190 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
1191 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
1192 _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
1193 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1194 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1195
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1196 static PyObject *WinObj_TrackWindowProxyFromExistingDrag(WindowObject *_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
1197 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1198 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
1199 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1200 Point startPt;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1201 DragReference drag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1202 RgnHandle inDragOutlineRgn;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1203 #ifndef TrackWindowProxyFromExistingDrag
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1204 PyMac_PRECHECK(TrackWindowProxyFromExistingDrag);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1205 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1206 if (!PyArg_ParseTuple(_args, "O&O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1207 PyMac_GetPoint, &startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1208 DragObj_Convert, &drag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1209 ResObj_Convert, &inDragOutlineRgn))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1210 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1211 _err = TrackWindowProxyFromExistingDrag(_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
1212 startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1213 drag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1214 inDragOutlineRgn);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1215 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
1216 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
1217 _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
1218 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1219 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1220
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1221 static PyObject *WinObj_TrackWindowProxyDrag(WindowObject *_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
1222 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1223 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
1224 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1225 Point startPt;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1226 #ifndef TrackWindowProxyDrag
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1227 PyMac_PRECHECK(TrackWindowProxyDrag);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1228 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1229 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
1230 PyMac_GetPoint, &startPt))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1231 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1232 _err = TrackWindowProxyDrag(_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
1233 startPt);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1234 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
1235 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
1236 _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
1237 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1238 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1239
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1240 static PyObject *WinObj_IsWindowModified(WindowObject *_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
1241 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1242 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
1243 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1244 #ifndef IsWindowModified
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1245 PyMac_PRECHECK(IsWindowModified);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1246 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1247 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
1248 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1249 _rv = IsWindowModified(_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
1250 _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
1251 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1252 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1253 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1254
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1255 static PyObject *WinObj_SetWindowModified(WindowObject *_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
1256 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1257 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
1258 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1259 Boolean modified;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1260 #ifndef SetWindowModified
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1261 PyMac_PRECHECK(SetWindowModified);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1262 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1263 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1264 &modified))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1265 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1266 _err = SetWindowModified(_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
1267 modified);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1268 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
1269 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
1270 _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
1271 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1272 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1273
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1274 static PyObject *WinObj_IsWindowPathSelectClick(WindowObject *_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
1275 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1276 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
1277 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1278 EventRecord event;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1279 #ifndef IsWindowPathSelectClick
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1280 PyMac_PRECHECK(IsWindowPathSelectClick);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1281 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1282 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
1283 PyMac_GetEventRecord, &event))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1284 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1285 _rv = IsWindowPathSelectClick(_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
1286 &event);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1287 _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
1288 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1289 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1290 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1291
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1292 static PyObject *WinObj_WindowPathSelect(WindowObject *_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
1293 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1294 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
1295 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1296 MenuHandle menu;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1297 SInt32 outMenuResult;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1298 #ifndef WindowPathSelect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1299 PyMac_PRECHECK(WindowPathSelect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1300 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1301 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
1302 MenuObj_Convert, &menu))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1303 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1304 _err = WindowPathSelect(_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
1305 menu,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1306 &outMenuResult);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1307 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
1308 _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
1309 outMenuResult);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1310 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1311 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1312
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1313 static PyObject *WinObj_HiliteWindowFrameForDrag(WindowObject *_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
1314 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1315 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
1316 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1317 Boolean hilited;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1318 #ifndef HiliteWindowFrameForDrag
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1319 PyMac_PRECHECK(HiliteWindowFrameForDrag);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1320 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1321 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1322 &hilited))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1323 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1324 _err = HiliteWindowFrameForDrag(_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
1325 hilited);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1326 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
1327 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
1328 _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
1329 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1330 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1331
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1332 static PyObject *WinObj_TransitionWindow(WindowObject *_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
1333 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1334 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
1335 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
1336 WindowTransitionEffect inEffect;
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
1337 WindowTransitionAction inAction;
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
1338 Rect inRect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1339 #ifndef TransitionWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1340 PyMac_PRECHECK(TransitionWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1341 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1342 if (!PyArg_ParseTuple(_args, "llO&",
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
1343 &inEffect,
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
1344 &inAction,
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
1345 PyMac_GetRect, &inRect))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1346 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1347 _err = TransitionWindow(_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
1348 inEffect,
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
1349 inAction,
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
1350 &inRect);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1351 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
1352 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
1353 _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
1354 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1355 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1356
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1357 static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1358 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1359 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1360 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
1361 WindowPtr inParentWindow;
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
1362 WindowTransitionEffect inEffect;
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
1363 WindowTransitionAction inAction;
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
1364 Rect inRect;
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1365 #ifndef TransitionWindowAndParent
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1366 PyMac_PRECHECK(TransitionWindowAndParent);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1367 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1368 if (!PyArg_ParseTuple(_args, "O&llO&",
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
1369 WinObj_Convert, &inParentWindow,
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
1370 &inEffect,
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
1371 &inAction,
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
1372 PyMac_GetRect, &inRect))
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1373 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1374 _err = TransitionWindowAndParent(_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
1375 inParentWindow,
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
1376 inEffect,
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
1377 inAction,
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
1378 &inRect);
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1379 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1380 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1381 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1382 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1383 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1384
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1385 static PyObject *WinObj_MacMoveWindow(WindowObject *_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
1386 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1387 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
1388 short hGlobal;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1389 short vGlobal;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1390 Boolean front;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1391 #ifndef MacMoveWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1392 PyMac_PRECHECK(MacMoveWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
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, "hhb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1395 &hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1396 &vGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1397 &front))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1398 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1399 MacMoveWindow(_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
1400 hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1401 vGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1402 front);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1403 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
1404 _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
1405 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1408 static PyObject *WinObj_SizeWindow(WindowObject *_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
1409 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1410 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
1411 short w;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1412 short h;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1413 Boolean fUpdate;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1414 #ifndef SizeWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1415 PyMac_PRECHECK(SizeWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1416 #endif
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 (!PyArg_ParseTuple(_args, "hhb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1418 &w,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1419 &h,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1420 &fUpdate))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1421 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1422 SizeWindow(_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
1423 w,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1424 h,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1425 fUpdate);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1426 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
1427 _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
1428 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1429 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1430
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1431 static PyObject *WinObj_GrowWindow(WindowObject *_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
1432 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1433 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
1434 long _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1435 Point startPt;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1436 Rect bBox;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1437 #ifndef GrowWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1438 PyMac_PRECHECK(GrowWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1439 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1440 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
1441 PyMac_GetPoint, &startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1442 PyMac_GetRect, &bBox))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1443 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1444 _rv = GrowWindow(_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
1445 startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1446 &bBox);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1447 _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
1448 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1449 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1450 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1451
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1452 static PyObject *WinObj_DragWindow(WindowObject *_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
1453 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1454 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
1455 Point startPt;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1456 Rect boundsRect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1457 #ifndef DragWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1458 PyMac_PRECHECK(DragWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1459 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1460 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
1461 PyMac_GetPoint, &startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1462 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
1463 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1464 DragWindow(_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
1465 startPt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1466 &boundsRect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1467 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
1468 _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
1469 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1472 static PyObject *WinObj_ZoomWindow(WindowObject *_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
1473 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1474 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
1475 WindowPartCode partCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1476 Boolean front;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1477 #ifndef ZoomWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1478 PyMac_PRECHECK(ZoomWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1479 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1480 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
1481 &partCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1482 &front))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1483 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1484 ZoomWindow(_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
1485 partCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1486 front);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1487 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
1488 _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
1489 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1490 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1491
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1492 static PyObject *WinObj_IsWindowCollapsable(WindowObject *_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
1493 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1494 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
1495 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1496 #ifndef IsWindowCollapsable
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1497 PyMac_PRECHECK(IsWindowCollapsable);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1498 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1499 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
1500 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1501 _rv = IsWindowCollapsable(_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
1502 _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
1503 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1504 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1505 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1506
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1507 static PyObject *WinObj_IsWindowCollapsed(WindowObject *_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
1508 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1509 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
1510 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1511 #ifndef IsWindowCollapsed
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1512 PyMac_PRECHECK(IsWindowCollapsed);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1513 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1514 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
1515 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1516 _rv = IsWindowCollapsed(_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
1517 _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
1518 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1519 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1520 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1521
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1522 static PyObject *WinObj_CollapseWindow(WindowObject *_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
1523 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1524 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
1525 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1526 Boolean collapse;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1527 #ifndef CollapseWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1528 PyMac_PRECHECK(CollapseWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1529 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1530 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1531 &collapse))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1532 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1533 _err = CollapseWindow(_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
1534 collapse);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1535 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
1536 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
1537 _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
1538 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1539 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1540
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1541 static PyObject *WinObj_GetWindowBounds(WindowObject *_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
1542 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1543 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
1544 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1545 WindowRegionCode regionCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1546 Rect globalBounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1547 #ifndef GetWindowBounds
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1548 PyMac_PRECHECK(GetWindowBounds);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1549 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1550 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
1551 &regionCode))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1552 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1553 _err = GetWindowBounds(_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
1554 regionCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1555 &globalBounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1556 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
1557 _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
1558 PyMac_BuildRect, &globalBounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1559 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1560 }
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 static PyObject *WinObj_ResizeWindow(WindowObject *_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
1563 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1564 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
1565 Boolean _rv;
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
1566 Point inStartPoint;
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
1567 Rect inSizeConstraints;
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
1568 Rect outNewContentRect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1569 #ifndef ResizeWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1570 PyMac_PRECHECK(ResizeWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1571 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1572 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
1573 PyMac_GetPoint, &inStartPoint,
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
1574 PyMac_GetRect, &inSizeConstraints))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1575 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1576 _rv = ResizeWindow(_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
1577 inStartPoint,
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
1578 &inSizeConstraints,
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
1579 &outNewContentRect);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1580 _res = Py_BuildValue("bO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1581 _rv,
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
1582 PyMac_BuildRect, &outNewContentRect);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1583 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1584 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1585
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1586 static PyObject *WinObj_SetWindowBounds(WindowObject *_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
1587 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1588 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
1589 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1590 WindowRegionCode regionCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1591 Rect globalBounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1592 #ifndef SetWindowBounds
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1593 PyMac_PRECHECK(SetWindowBounds);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1594 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1595 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
1596 &regionCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1597 PyMac_GetRect, &globalBounds))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1598 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1599 _err = SetWindowBounds(_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
1600 regionCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1601 &globalBounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1602 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
1603 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
1604 _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
1605 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1606 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1607
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1608 static PyObject *WinObj_RepositionWindow(WindowObject *_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
1609 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1610 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
1611 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1612 WindowPtr parentWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1613 WindowPositionMethod method;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1614 #ifndef RepositionWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1615 PyMac_PRECHECK(RepositionWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1616 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1617 if (!PyArg_ParseTuple(_args, "O&l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1618 WinObj_Convert, &parentWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1619 &method))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1620 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1621 _err = RepositionWindow(_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
1622 parentWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1623 method);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1624 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
1625 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
1626 _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
1627 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1628 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1629
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1630 static PyObject *WinObj_MoveWindowStructure(WindowObject *_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
1631 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1632 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
1633 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1634 short hGlobal;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1635 short vGlobal;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1636 #ifndef MoveWindowStructure
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1637 PyMac_PRECHECK(MoveWindowStructure);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1638 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1639 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
1640 &hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1641 &vGlobal))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1642 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1643 _err = MoveWindowStructure(_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
1644 hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1645 vGlobal);
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 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
1648 _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
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1652 static PyObject *WinObj_IsWindowInStandardState(WindowObject *_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
1653 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1654 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
1655 Boolean _rv;
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
1656 Point inIdealSize;
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
1657 Rect outIdealStandardState;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1658 #ifndef IsWindowInStandardState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1659 PyMac_PRECHECK(IsWindowInStandardState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1660 #endif
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
1661 if (!PyArg_ParseTuple(_args, "O&",
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
1662 PyMac_GetPoint, &inIdealSize))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1663 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1664 _rv = IsWindowInStandardState(_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
1665 &inIdealSize,
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
1666 &outIdealStandardState);
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
1667 _res = Py_BuildValue("bO&",
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1668 _rv,
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
1669 PyMac_BuildRect, &outIdealStandardState);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1670 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1671 }
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 static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_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
1674 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1675 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
1676 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
1677 WindowPartCode inPartCode;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1678 Point ioIdealSize;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1679 #ifndef ZoomWindowIdeal
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1680 PyMac_PRECHECK(ZoomWindowIdeal);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1681 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1682 if (!PyArg_ParseTuple(_args, "h",
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
1683 &inPartCode))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1684 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1685 _err = ZoomWindowIdeal(_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
1686 inPartCode,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1687 &ioIdealSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1688 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
1689 _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
1690 PyMac_BuildPoint, ioIdealSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1691 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1692 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1693
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1694 static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_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
1695 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1696 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
1697 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
1698 Rect outUserState;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1699 #ifndef GetWindowIdealUserState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1700 PyMac_PRECHECK(GetWindowIdealUserState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1701 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1702 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
1703 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1704 _err = GetWindowIdealUserState(_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
1705 &outUserState);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1706 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
1707 _res = Py_BuildValue("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
1708 PyMac_BuildRect, &outUserState);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1709 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1712 static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_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
1713 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1714 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
1715 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
1716 Rect inUserState;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1717 #ifndef SetWindowIdealUserState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1718 PyMac_PRECHECK(SetWindowIdealUserState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1719 #endif
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1720 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
1721 PyMac_GetRect, &inUserState))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1722 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1723 _err = SetWindowIdealUserState(_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
1724 &inUserState);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1725 if (_err != noErr) return PyMac_Error(_err);
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1726 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1727 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1728 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1729 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1730
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1731 static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1732 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1733 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1734 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1735 WindowRegionCode inRegion;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1736 GDHandle outGreatestDevice;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1737 Rect outGreatestDeviceRect;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1738 #ifndef GetWindowGreatestAreaDevice
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1739 PyMac_PRECHECK(GetWindowGreatestAreaDevice);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1740 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1741 if (!PyArg_ParseTuple(_args, "H",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1742 &inRegion))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1743 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1744 _err = GetWindowGreatestAreaDevice(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1745 inRegion,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1746 &outGreatestDevice,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1747 &outGreatestDeviceRect);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1748 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1749 _res = Py_BuildValue("O&O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1750 ResObj_New, outGreatestDevice,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1751 PyMac_BuildRect, &outGreatestDeviceRect);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1752 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1753 }
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1754
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1755 static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1756 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1757 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1758 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1759 WindowRegionCode inRegionCode;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1760 WindowConstrainOptions inOptions;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1761 Rect inScreenRect;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1762 Rect outStructure;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1763 #ifndef ConstrainWindowToScreen
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1764 PyMac_PRECHECK(ConstrainWindowToScreen);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1765 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1766 if (!PyArg_ParseTuple(_args, "HlO&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1767 &inRegionCode,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1768 &inOptions,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1769 PyMac_GetRect, &inScreenRect))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1770 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1771 _err = ConstrainWindowToScreen(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1772 inRegionCode,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1773 inOptions,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1774 &inScreenRect,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1775 &outStructure);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1776 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1777 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1778 PyMac_BuildRect, &outStructure);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1779 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1780 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1781
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1782 static PyObject *WinObj_HideWindow(WindowObject *_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
1783 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1784 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1785 #ifndef HideWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1786 PyMac_PRECHECK(HideWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1787 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1788 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
1789 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1790 HideWindow(_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
1791 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
1792 _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
1793 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1794 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1795
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1796 static PyObject *WinObj_MacShowWindow(WindowObject *_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
1797 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1798 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1799 #ifndef MacShowWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1800 PyMac_PRECHECK(MacShowWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1801 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1802 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
1803 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1804 MacShowWindow(_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
1805 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
1806 _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
1807 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1808 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1809
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1810 static PyObject *WinObj_ShowHide(WindowObject *_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
1811 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1812 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
1813 Boolean showFlag;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1814 #ifndef ShowHide
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1815 PyMac_PRECHECK(ShowHide);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1816 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1817 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1818 &showFlag))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1819 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1820 ShowHide(_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
1821 showFlag);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1822 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
1823 _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
1824 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1825 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1826
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1827 static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1828 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1829 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1830 Boolean _rv;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1831 #ifndef MacIsWindowVisible
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1832 PyMac_PRECHECK(MacIsWindowVisible);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1833 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1834 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1835 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1836 _rv = MacIsWindowVisible(_self->ob_itself);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1837 _res = Py_BuildValue("b",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1838 _rv);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1839 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1840 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1841
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1842 static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1843 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1844 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1845 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1846 WindowPtr inParentWindow;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1847 #ifndef ShowSheetWindow
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1848 PyMac_PRECHECK(ShowSheetWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1849 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1850 if (!PyArg_ParseTuple(_args, "O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1851 WinObj_Convert, &inParentWindow))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1852 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1853 _err = ShowSheetWindow(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1854 inParentWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1855 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1856 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1857 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1858 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1859 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1860
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1861 static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1862 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1863 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1864 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1865 #ifndef HideSheetWindow
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1866 PyMac_PRECHECK(HideSheetWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1867 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1868 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1869 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1870 _err = HideSheetWindow(_self->ob_itself);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1871 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1872 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1873 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1874 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1875 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1876
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1877 static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1878 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1879 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1880 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1881 WindowPtr outParentWindow;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1882 #ifndef GetSheetWindowParent
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1883 PyMac_PRECHECK(GetSheetWindowParent);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1884 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1885 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1886 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1887 _err = GetSheetWindowParent(_self->ob_itself,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1888 &outParentWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1889 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1890 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1891 WinObj_WhichWindow, outParentWindow);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1892 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
1893 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1894
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1895 static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_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
1896 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1897 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
1898 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1899 OSType propertyCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1900 OSType propertyTag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1901 UInt32 attributes;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1902 #ifndef GetWindowPropertyAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1903 PyMac_PRECHECK(GetWindowPropertyAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1904 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1905 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
1906 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
1907 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
1908 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1909 _err = GetWindowPropertyAttributes(_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
1910 propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1911 propertyTag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1912 &attributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1913 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
1914 _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
1915 attributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1916 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1917 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1918
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1919 static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_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
1920 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1921 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
1922 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1923 OSType propertyCreator;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1924 OSType propertyTag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1925 UInt32 attributesToSet;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1926 UInt32 attributesToClear;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1927 #ifndef ChangeWindowPropertyAttributes
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1928 PyMac_PRECHECK(ChangeWindowPropertyAttributes);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1929 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1930 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
1931 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
1932 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
1933 &attributesToSet,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1934 &attributesToClear))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1935 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1936 _err = ChangeWindowPropertyAttributes(_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
1937 propertyCreator,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1938 propertyTag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1939 attributesToSet,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1940 attributesToClear);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1941 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
1942 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
1943 _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
1944 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1945 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1946
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1947 static PyObject *WinObj_TrackBox(WindowObject *_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
1948 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1949 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
1950 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1951 Point thePt;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1952 WindowPartCode partCode;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1953 #ifndef TrackBox
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1954 PyMac_PRECHECK(TrackBox);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1955 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1956 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
1957 PyMac_GetPoint, &thePt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1958 &partCode))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1959 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1960 _rv = TrackBox(_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
1961 thePt,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1962 partCode);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1963 _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
1964 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1965 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1966 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1967
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1968 static PyObject *WinObj_TrackGoAway(WindowObject *_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
1969 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1970 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
1971 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1972 Point thePt;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1973 #ifndef TrackGoAway
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1974 PyMac_PRECHECK(TrackGoAway);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1975 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1976 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
1977 PyMac_GetPoint, &thePt))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1978 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1979 _rv = TrackGoAway(_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
1980 thePt);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1981 _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
1982 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1983 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1984 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1985
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1986 static PyObject *WinObj_GetWindowPort(WindowObject *_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
1987 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1988 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
1989 CGrafPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1990 #ifndef GetWindowPort
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1991 PyMac_PRECHECK(GetWindowPort);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
1992 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1993 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
1994 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1995 _rv = GetWindowPort(_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
1996 _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
1997 GrafObj_New, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1998 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1999 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2000
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
2001 static PyObject *WinObj_GetWindowStructurePort(WindowObject *_self, PyObject *_args)
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
2002 {
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
2003 PyObject *_res = 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
2004 CGrafPtr _rv;
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
2005 #ifndef GetWindowStructurePort
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
2006 PyMac_PRECHECK(GetWindowStructurePort);
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
2007 #endif
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
2008 if (!PyArg_ParseTuple(_args, ""))
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
2009 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
2010 _rv = GetWindowStructurePort(_self->ob_itself);
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
2011 _res = Py_BuildValue("O&",
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
2012 GrafObj_New, _rv);
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
2013 return _res;
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
2014 }
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
2015
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2016 static PyObject *WinObj_GetWindowKind(WindowObject *_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
2017 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2018 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
2019 short _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2020 #ifndef GetWindowKind
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2021 PyMac_PRECHECK(GetWindowKind);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2022 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2023 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
2024 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2025 _rv = GetWindowKind(_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
2026 _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
2027 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2028 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2029 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2030
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2031 static PyObject *WinObj_IsWindowHilited(WindowObject *_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
2032 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2033 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
2034 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2035 #ifndef IsWindowHilited
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2036 PyMac_PRECHECK(IsWindowHilited);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2037 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2038 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
2039 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2040 _rv = IsWindowHilited(_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
2041 _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
2042 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2043 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2044 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2045
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2046 static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_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
2047 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2048 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
2049 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2050 #ifndef IsWindowUpdatePending
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2051 PyMac_PRECHECK(IsWindowUpdatePending);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2052 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2053 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
2054 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2055 _rv = IsWindowUpdatePending(_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
2056 _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
2057 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2058 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2059 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2060
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2061 static PyObject *WinObj_MacGetNextWindow(WindowObject *_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
2062 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2063 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
2064 WindowPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2065 #ifndef MacGetNextWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2066 PyMac_PRECHECK(MacGetNextWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2067 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2068 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
2069 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2070 _rv = MacGetNextWindow(_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
2071 _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
2072 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
2073 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2074 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2075
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2076 static PyObject *WinObj_GetWindowStandardState(WindowObject *_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
2077 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2078 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
2079 Rect rect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2080 #ifndef GetWindowStandardState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2081 PyMac_PRECHECK(GetWindowStandardState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2082 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2083 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
2084 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2085 GetWindowStandardState(_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
2086 &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2087 _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
2088 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
2089 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2090 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2091
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2092 static PyObject *WinObj_GetWindowUserState(WindowObject *_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
2093 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2094 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
2095 Rect rect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2096 #ifndef GetWindowUserState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2097 PyMac_PRECHECK(GetWindowUserState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2098 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2099 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
2100 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2101 GetWindowUserState(_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
2102 &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2103 _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
2104 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
2105 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2106 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2107
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2108 static PyObject *WinObj_SetWindowKind(WindowObject *_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
2109 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2110 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
2111 short kind;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2112 #ifndef SetWindowKind
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2113 PyMac_PRECHECK(SetWindowKind);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2114 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2115 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
2116 &kind))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2117 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2118 SetWindowKind(_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
2119 kind);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2120 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
2121 _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
2122 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2123 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2124
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2125 static PyObject *WinObj_SetWindowStandardState(WindowObject *_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
2126 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2127 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
2128 Rect rect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2129 #ifndef SetWindowStandardState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2130 PyMac_PRECHECK(SetWindowStandardState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2131 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2132 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
2133 PyMac_GetRect, &rect))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2134 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2135 SetWindowStandardState(_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
2136 &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2137 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
2138 _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
2139 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2140 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2141
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2142 static PyObject *WinObj_SetWindowUserState(WindowObject *_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
2143 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2144 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
2145 Rect rect;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2146 #ifndef SetWindowUserState
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2147 PyMac_PRECHECK(SetWindowUserState);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2148 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2149 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
2150 PyMac_GetRect, &rect))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2151 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2152 SetWindowUserState(_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
2153 &rect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2154 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
2155 _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
2156 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2157 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2158
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2159 static PyObject *WinObj_SetPortWindowPort(WindowObject *_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
2160 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2161 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2162 #ifndef SetPortWindowPort
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2163 PyMac_PRECHECK(SetPortWindowPort);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2164 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2165 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
2166 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2167 SetPortWindowPort(_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
2168 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
2169 _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
2170 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2171 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2172
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2173 static PyObject *WinObj_GetWindowPortBounds(WindowObject *_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
2174 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2175 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
2176 Rect bounds;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2177 #ifndef GetWindowPortBounds
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2178 PyMac_PRECHECK(GetWindowPortBounds);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2179 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2180 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
2181 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2182 GetWindowPortBounds(_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
2183 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2184 _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
2185 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
2186 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2187 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2188
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2189 static PyObject *WinObj_IsWindowVisible(WindowObject *_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
2190 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2191 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
2192 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2193 #ifndef IsWindowVisible
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2194 PyMac_PRECHECK(IsWindowVisible);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2195 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2196 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
2197 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2198 _rv = IsWindowVisible(_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
2199 _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
2200 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2201 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2202 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2203
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2204 static PyObject *WinObj_GetWindowStructureRgn(WindowObject *_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
2205 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2206 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
2207 RgnHandle r;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2208 #ifndef GetWindowStructureRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2209 PyMac_PRECHECK(GetWindowStructureRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2210 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2211 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
2212 ResObj_Convert, &r))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2213 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2214 GetWindowStructureRgn(_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
2215 r);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2216 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
2217 _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
2218 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2219 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2220
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2221 static PyObject *WinObj_GetWindowContentRgn(WindowObject *_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
2222 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2223 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
2224 RgnHandle r;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2225 #ifndef GetWindowContentRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2226 PyMac_PRECHECK(GetWindowContentRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2227 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2228 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
2229 ResObj_Convert, &r))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2230 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2231 GetWindowContentRgn(_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
2232 r);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2233 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
2234 _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
2235 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2236 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2237
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2238 static PyObject *WinObj_GetWindowUpdateRgn(WindowObject *_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
2239 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2240 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
2241 RgnHandle r;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2242 #ifndef GetWindowUpdateRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2243 PyMac_PRECHECK(GetWindowUpdateRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2244 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2245 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
2246 ResObj_Convert, &r))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2247 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2248 GetWindowUpdateRgn(_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
2249 r);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2250 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
2251 _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
2252 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2253 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2254
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2255 static PyObject *WinObj_GetNextWindow(WindowObject *_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
2256 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2257 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
2258 WindowPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2259 #ifndef GetNextWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2260 PyMac_PRECHECK(GetNextWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2261 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2262 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
2263 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2264 _rv = GetNextWindow(_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
2265 _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
2266 WinObj_WhichWindow, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2267 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2268 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2269
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2270 static PyObject *WinObj_MoveWindow(WindowObject *_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
2271 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2272 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
2273 short hGlobal;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2274 short vGlobal;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2275 Boolean front;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2276 #ifndef MoveWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2277 PyMac_PRECHECK(MoveWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2278 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2279 if (!PyArg_ParseTuple(_args, "hhb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2280 &hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2281 &vGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2282 &front))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2283 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2284 MoveWindow(_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
2285 hGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2286 vGlobal,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2287 front);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2288 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
2289 _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
2290 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2291 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2292
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2293 static PyObject *WinObj_ShowWindow(WindowObject *_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
2294 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2295 PyObject *_res = NULL;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2296 #ifndef ShowWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2297 PyMac_PRECHECK(ShowWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2298 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2299 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
2300 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2301 ShowWindow(_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
2302 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
2303 _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
2304 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2305 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2306
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2307 static PyObject *WinObj_AutoDispose(WindowObject *_self, PyObject *_args)
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2308 {
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2309 PyObject *_res = NULL;
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2310
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2311 int onoff, old = 0;
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2312 if (!PyArg_ParseTuple(_args, "i", &onoff))
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2313 return NULL;
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2314 if ( _self->ob_freeit )
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2315 old = 1;
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2316 if ( onoff )
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2317 _self->ob_freeit = PyMac_AutoDisposeWindow;
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2318 else
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2319 _self->ob_freeit = NULL;
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2320 _res = Py_BuildValue("i", old);
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2321 return _res;
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2322
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2323 }
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2324
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2325 static PyMethodDef WinObj_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2326 {"GetWindowOwnerCount", (PyCFunction)WinObj_GetWindowOwnerCount, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2327 PyDoc_STR("() -> (UInt32 outCount)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2328 {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2329 PyDoc_STR("() -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2330 {"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2331 PyDoc_STR("() -> (ItemCount _rv)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2332 {"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2333 PyDoc_STR("() -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2334 {"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2335 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
2336 {"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2337 PyDoc_STR("() -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2338 {"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2339 PyDoc_STR("() -> (WindowDefPartCode outHilite)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2340 {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2341 PyDoc_STR("() -> (WindowClass outClass)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2342 {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2343 PyDoc_STR("() -> (WindowAttributes outAttributes)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2344 {"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2345 PyDoc_STR("(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2346 {"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2347 PyDoc_STR("(WindowClass inWindowClass) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2348 {"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2349 PyDoc_STR("(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2350 {"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2351 PyDoc_STR("() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2352 {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2353 PyDoc_STR("(RGBColor color) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2354 {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2355 PyDoc_STR("() -> (RGBColor color)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2356 {"GetWindowContentPattern", (PyCFunction)WinObj_GetWindowContentPattern, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2357 PyDoc_STR("(PixPatHandle outPixPat) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2358 {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2359 PyDoc_STR("(PixPatHandle pixPat) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2360 {"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2361 PyDoc_STR("(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2362 {"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2363 PyDoc_STR("(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2364 {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2365 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
2366 {"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2367 PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2368 {"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2369 PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2370 {"CalcVis", (PyCFunction)WinObj_CalcVis, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2371 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
2372 {"CalcVisBehind", (PyCFunction)WinObj_CalcVisBehind, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2373 PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2374 {"BringToFront", (PyCFunction)WinObj_BringToFront, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2375 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
2376 {"SendBehind", (PyCFunction)WinObj_SendBehind, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2377 PyDoc_STR("(WindowPtr behindWindow) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2378 {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2379 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
2380 {"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2381 PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2382 {"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2383 PyDoc_STR("(CFStringRef inTitle) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2384 {"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2385 PyDoc_STR("() -> (CFStringRef outTitle)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2386 {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2387 PyDoc_STR("(Boolean fHilite) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2388 {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2389 PyDoc_STR("(long 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
2390 {"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2391 PyDoc_STR("() -> (long _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2392 {"SetWindowPic", (PyCFunction)WinObj_SetWindowPic, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2393 PyDoc_STR("(PicHandle pic) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2394 {"GetWindowPic", (PyCFunction)WinObj_GetWindowPic, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2395 PyDoc_STR("() -> (PicHandle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2396 {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2397 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
2398 {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2399 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
2400 {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2401 PyDoc_STR("(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2402 {"GetWindowStructureWidths", (PyCFunction)WinObj_GetWindowStructureWidths, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2403 PyDoc_STR("() -> (Rect outRect)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2404 {"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2405 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
2406 {"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2407 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
2408 {"InvalWindowRgn", (PyCFunction)WinObj_InvalWindowRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2409 PyDoc_STR("(RgnHandle region) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2410 {"InvalWindowRect", (PyCFunction)WinObj_InvalWindowRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2411 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
2412 {"ValidWindowRgn", (PyCFunction)WinObj_ValidWindowRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2413 PyDoc_STR("(RgnHandle region) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2414 {"ValidWindowRect", (PyCFunction)WinObj_ValidWindowRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2415 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
2416 {"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2417 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
2418 {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2419 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
2420 {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2421 PyDoc_STR("() -> (Str255 title)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2422 {"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2423 PyDoc_STR("(CFStringRef inString) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2424 {"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2425 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
2426 {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2427 PyDoc_STR("(FSSpec inFile) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2428 {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2429 PyDoc_STR("() -> (FSSpec outFile)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2430 {"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 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
2431 PyDoc_STR("(AliasHandle inAlias) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2432 {"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2433 PyDoc_STR("() -> (AliasHandle alias)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2434 {"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2435 PyDoc_STR("(OSType fileCreator, OSType fileType, SInt16 vRefNum) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2436 {"GetWindowProxyIcon", (PyCFunction)WinObj_GetWindowProxyIcon, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2437 PyDoc_STR("() -> (IconRef outIcon)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2438 {"SetWindowProxyIcon", (PyCFunction)WinObj_SetWindowProxyIcon, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2439 PyDoc_STR("(IconRef icon) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2440 {"RemoveWindowProxy", (PyCFunction)WinObj_RemoveWindowProxy, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2441 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
2442 {"BeginWindowProxyDrag", (PyCFunction)WinObj_BeginWindowProxyDrag, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2443 PyDoc_STR("(RgnHandle outDragOutlineRgn) -> (DragReference outNewDrag)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2444 {"EndWindowProxyDrag", (PyCFunction)WinObj_EndWindowProxyDrag, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2445 PyDoc_STR("(DragReference theDrag) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2446 {"TrackWindowProxyFromExistingDrag", (PyCFunction)WinObj_TrackWindowProxyFromExistingDrag, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2447 PyDoc_STR("(Point startPt, DragReference drag, RgnHandle inDragOutlineRgn) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2448 {"TrackWindowProxyDrag", (PyCFunction)WinObj_TrackWindowProxyDrag, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2449 PyDoc_STR("(Point startPt) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2450 {"IsWindowModified", (PyCFunction)WinObj_IsWindowModified, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2451 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
2452 {"SetWindowModified", (PyCFunction)WinObj_SetWindowModified, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2453 PyDoc_STR("(Boolean modified) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2454 {"IsWindowPathSelectClick", (PyCFunction)WinObj_IsWindowPathSelectClick, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2455 PyDoc_STR("(EventRecord event) -> (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
2456 {"WindowPathSelect", (PyCFunction)WinObj_WindowPathSelect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2457 PyDoc_STR("(MenuHandle menu) -> (SInt32 outMenuResult)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2458 {"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2459 PyDoc_STR("(Boolean hilited) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2460 {"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 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
2461 PyDoc_STR("(WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2462 {"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 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
2463 PyDoc_STR("(WindowPtr inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2464 {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2465 PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2466 {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2467 PyDoc_STR("(short w, short h, Boolean fUpdate) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2468 {"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2469 PyDoc_STR("(Point startPt, Rect bBox) -> (long _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2470 {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2471 PyDoc_STR("(Point startPt, Rect boundsRect) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2472 {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2473 PyDoc_STR("(WindowPartCode partCode, Boolean front) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2474 {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2475 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
2476 {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2477 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
2478 {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2479 PyDoc_STR("(Boolean collapse) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2480 {"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2481 PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2482 {"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 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
2483 PyDoc_STR("(Point inStartPoint, Rect inSizeConstraints) -> (Boolean _rv, Rect outNewContentRect)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2484 {"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2485 PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2486 {"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2487 PyDoc_STR("(WindowPtr parentWindow, WindowPositionMethod method) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2488 {"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2489 PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2490 {"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 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
2491 PyDoc_STR("(Point inIdealSize) -> (Boolean _rv, Rect outIdealStandardState)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2492 {"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 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
2493 PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2494 {"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 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
2495 PyDoc_STR("() -> (Rect outUserState)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2496 {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 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
2497 PyDoc_STR("(Rect inUserState) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2498 {"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2499 PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2500 {"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2501 PyDoc_STR("(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2502 {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2503 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
2504 {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2505 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
2506 {"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2507 PyDoc_STR("(Boolean showFlag) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2508 {"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2509 PyDoc_STR("() -> (Boolean _rv)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2510 {"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2511 PyDoc_STR("(WindowPtr inParentWindow) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2512 {"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2513 PyDoc_STR("() -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2514 {"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2515 PyDoc_STR("() -> (WindowPtr outParentWindow)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2516 {"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2517 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
2518 {"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2519 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
2520 {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2521 PyDoc_STR("(Point thePt, WindowPartCode partCode) -> (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
2522 {"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2523 PyDoc_STR("(Point thePt) -> (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
2524 {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2525 PyDoc_STR("() -> (CGrafPtr _rv)")},
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
2526 {"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
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
2527 PyDoc_STR("() -> (CGrafPtr _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2528 {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2529 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
2530 {"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2531 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
2532 {"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2533 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
2534 {"MacGetNextWindow", (PyCFunction)WinObj_MacGetNextWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2535 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
2536 {"GetWindowStandardState", (PyCFunction)WinObj_GetWindowStandardState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2537 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
2538 {"GetWindowUserState", (PyCFunction)WinObj_GetWindowUserState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2539 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
2540 {"SetWindowKind", (PyCFunction)WinObj_SetWindowKind, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2541 PyDoc_STR("(short kind) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2542 {"SetWindowStandardState", (PyCFunction)WinObj_SetWindowStandardState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2543 PyDoc_STR("(Rect rect) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2544 {"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2545 PyDoc_STR("(Rect rect) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2546 {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2547 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
2548 {"GetWindowPortBounds", (PyCFunction)WinObj_GetWindowPortBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2549 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
2550 {"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2551 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
2552 {"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2553 PyDoc_STR("(RgnHandle r) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2554 {"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2555 PyDoc_STR("(RgnHandle r) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2556 {"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2557 PyDoc_STR("(RgnHandle r) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2558 {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2559 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
2560 {"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2561 PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2562 {"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
2563 PyDoc_STR("() -> None")},
28722
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2564 {"AutoDispose", (PyCFunction)WinObj_AutoDispose, 1,
8160bc78c93a Allow setting the auto dispose flag on window objects.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
2565 PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2566 {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
2567 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2568
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
2569 #define WinObj_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
2570
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2571
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2572 static int WinObj_compare(WindowObject *self, WindowObject *other)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2573 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2574 if ( self->ob_itself > other->ob_itself ) return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2575 if ( self->ob_itself < other->ob_itself ) return -1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2576 return 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2577 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2578
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2579 static PyObject * WinObj_repr(WindowObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2580 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2581 char buf[100];
19723
2a9bbdbefbb1 Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19708
diff changeset
2582 sprintf(buf, "<Window object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47473
diff changeset
2583 return PyString_FromString(buf);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2584 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2585
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2586 static int WinObj_hash(WindowObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2587 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2588 return (int)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
2589 }
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2590 #define WinObj_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
2591
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2592 #define WinObj_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
2593
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2594 static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2595 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2596 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
2597 WindowPtr itself;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2598 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
2599
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
2600 if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, WinObj_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
2601 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
2602 ((WindowObject *)_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
2603 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
2604 }
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2605
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
2606 #define WinObj_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
2607
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2608
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2609 PyTypeObject Window_Type = {
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2610 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
2611 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
2612 "_Win.Window", /*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
2613 sizeof(WindowObject), /*tp_basicsize*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2614 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
2615 /* methods */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2616 (destructor) WinObj_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
2617 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
2618 (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
2619 (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
2620 (cmpfunc) WinObj_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
2621 (reprfunc) WinObj_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
2622 (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
2623 (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
2624 (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
2625 (hashfunc) WinObj_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
2626 0, /*tp_call*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
2627 0, /*tp_str*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
2628 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
2629 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
2630 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
2631 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
2632 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
2633 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
2634 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
2635 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
2636 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
2637 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
2638 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
2639 WinObj_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
2640 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
2641 WinObj_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
2642 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
2643 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
2644 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
2645 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
2646 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
2647 WinObj_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
2648 WinObj_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
2649 WinObj_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
2650 WinObj_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
2651 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2652
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2653 /* --------------------- End object type Window --------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2654
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2655
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2656 static PyObject *Win_GetNewCWindow(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
2657 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2658 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
2659 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2660 short windowID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2661 WindowPtr behind;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2662 #ifndef GetNewCWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2663 PyMac_PRECHECK(GetNewCWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2664 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2665 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
2666 &windowID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2667 WinObj_Convert, &behind))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2668 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2669 _rv = GetNewCWindow(windowID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2670 (void *)0,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2671 behind);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2672 _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
2673 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
2674 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2675 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2676
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2677 static PyObject *Win_NewWindow(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
2678 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2679 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
2680 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2681 Rect boundsRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2682 Str255 title;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2683 Boolean visible;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2684 short theProc;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2685 WindowPtr behind;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2686 Boolean goAwayFlag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2687 long refCon;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2688 #ifndef NewWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2689 PyMac_PRECHECK(NewWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2690 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2691 if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2692 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
2693 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
2694 &visible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2695 &theProc,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2696 WinObj_Convert, &behind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2697 &goAwayFlag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2698 &refCon))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2699 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2700 _rv = NewWindow((void *)0,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2701 &boundsRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2702 title,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2703 visible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2704 theProc,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2705 behind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2706 goAwayFlag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2707 refCon);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2708 _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
2709 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
2710 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2711 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2712
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2713 static PyObject *Win_GetNewWindow(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
2714 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2715 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
2716 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2717 short windowID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2718 WindowPtr behind;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2719 #ifndef GetNewWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2720 PyMac_PRECHECK(GetNewWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2721 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2722 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
2723 &windowID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2724 WinObj_Convert, &behind))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2725 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2726 _rv = GetNewWindow(windowID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2727 (void *)0,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2728 behind);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2729 _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
2730 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
2731 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2732 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2733
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2734 static PyObject *Win_NewCWindow(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
2735 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2736 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
2737 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2738 Rect boundsRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2739 Str255 title;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2740 Boolean visible;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2741 short procID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2742 WindowPtr behind;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2743 Boolean goAwayFlag;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2744 long refCon;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2745 #ifndef NewCWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2746 PyMac_PRECHECK(NewCWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2747 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2748 if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2749 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
2750 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
2751 &visible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2752 &procID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2753 WinObj_Convert, &behind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2754 &goAwayFlag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2755 &refCon))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2756 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2757 _rv = NewCWindow((void *)0,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2758 &boundsRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2759 title,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2760 visible,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2761 procID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2762 behind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2763 goAwayFlag,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2764 refCon);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2765 _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
2766 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
2767 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2768 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2769
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2770 static PyObject *Win_CreateNewWindow(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
2771 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2772 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
2773 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2774 WindowClass windowClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2775 WindowAttributes attributes;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2776 Rect contentBounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2777 WindowPtr outWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2778 #ifndef CreateNewWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2779 PyMac_PRECHECK(CreateNewWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2780 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2781 if (!PyArg_ParseTuple(_args, "llO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2782 &windowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2783 &attributes,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2784 PyMac_GetRect, &contentBounds))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2785 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2786 _err = CreateNewWindow(windowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2787 attributes,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2788 &contentBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2789 &outWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2790 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
2791 _res = Py_BuildValue("O&",
23690
399afce86eb0 fixed refcount leak in CreateNewWindow() and CreateWindowFromResource().
Just van Rossum <just@letterror.com>
parents: 23261
diff changeset
2792 WinObj_New, outWindow);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2793 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2794 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2795
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2796 static PyObject *Win_CreateWindowFromResource(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
2797 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2798 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
2799 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2800 SInt16 resID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2801 WindowPtr outWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2802 #ifndef CreateWindowFromResource
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2803 PyMac_PRECHECK(CreateWindowFromResource);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2804 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2805 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
2806 &resID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2807 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2808 _err = CreateWindowFromResource(resID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2809 &outWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2810 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
2811 _res = Py_BuildValue("O&",
23690
399afce86eb0 fixed refcount leak in CreateNewWindow() and CreateWindowFromResource().
Just van Rossum <just@letterror.com>
parents: 23261
diff changeset
2812 WinObj_New, outWindow);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2813 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2814 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2815
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2816 static PyObject *Win_ShowFloatingWindows(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
2817 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2818 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
2819 OSStatus _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2820 #ifndef ShowFloatingWindows
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2821 PyMac_PRECHECK(ShowFloatingWindows);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2822 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2823 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
2824 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2825 _err = ShowFloatingWindows();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2826 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
2827 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
2828 _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
2829 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2830 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2831
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2832 static PyObject *Win_HideFloatingWindows(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
2833 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2834 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
2835 OSStatus _err;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2836 #ifndef HideFloatingWindows
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2837 PyMac_PRECHECK(HideFloatingWindows);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2838 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2839 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
2840 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2841 _err = HideFloatingWindows();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2842 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
2843 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
2844 _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
2845 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2846 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2847
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2848 static PyObject *Win_AreFloatingWindowsVisible(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
2849 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2850 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
2851 Boolean _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2852 #ifndef AreFloatingWindowsVisible
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2853 PyMac_PRECHECK(AreFloatingWindowsVisible);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2854 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2855 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
2856 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2857 _rv = AreFloatingWindowsVisible();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2858 _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
2859 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2860 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2861 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2862
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2863 static PyObject *Win_CheckUpdate(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
2864 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2865 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
2866 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2867 EventRecord theEvent;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2868 #ifndef CheckUpdate
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2869 PyMac_PRECHECK(CheckUpdate);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2870 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2871 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
2872 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2873 _rv = CheckUpdate(&theEvent);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2874 _res = Py_BuildValue("bO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2875 _rv,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2876 PyMac_BuildEventRecord, &theEvent);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2877 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2878 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2879
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2880 static PyObject *Win_MacFindWindow(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
2881 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2882 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
2883 WindowPartCode _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2884 Point thePoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2885 WindowPtr window;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2886 #ifndef MacFindWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2887 PyMac_PRECHECK(MacFindWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2888 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2889 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
2890 PyMac_GetPoint, &thePoint))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2891 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2892 _rv = MacFindWindow(thePoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2893 &window);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2894 _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
2895 _rv,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2896 WinObj_WhichWindow, window);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2897 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2898 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2899
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2900 static PyObject *Win_FrontWindow(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
2901 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2902 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
2903 WindowPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2904 #ifndef FrontWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2905 PyMac_PRECHECK(FrontWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2906 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2907 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
2908 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2909 _rv = FrontWindow();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2910 _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
2911 WinObj_WhichWindow, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2912 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2913 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2914
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2915 static PyObject *Win_FrontNonFloatingWindow(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
2916 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2917 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
2918 WindowPtr _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2919 #ifndef FrontNonFloatingWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2920 PyMac_PRECHECK(FrontNonFloatingWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2921 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2922 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
2923 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2924 _rv = FrontNonFloatingWindow();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2925 _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
2926 WinObj_WhichWindow, _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2927 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2928 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2929
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2930 static PyObject *Win_GetFrontWindowOfClass(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
2931 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2932 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
2933 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2934 WindowClass inWindowClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2935 Boolean mustBeVisible;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2936 #ifndef GetFrontWindowOfClass
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2937 PyMac_PRECHECK(GetFrontWindowOfClass);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2938 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2939 if (!PyArg_ParseTuple(_args, "lb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2940 &inWindowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2941 &mustBeVisible))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2942 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2943 _rv = GetFrontWindowOfClass(inWindowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2944 mustBeVisible);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2945 _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
2946 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
2947 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2948 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2949
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2950 static PyObject *Win_FindWindowOfClass(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
2951 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2952 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
2953 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2954 Point where;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2955 WindowClass inWindowClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2956 WindowPtr outWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2957 WindowPartCode outWindowPart;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2958 #ifndef FindWindowOfClass
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2959 PyMac_PRECHECK(FindWindowOfClass);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
2960 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2961 if (!PyArg_ParseTuple(_args, "O&l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2962 PyMac_GetPoint, &where,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2963 &inWindowClass))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2964 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2965 _err = FindWindowOfClass(&where,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2966 inWindowClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2967 &outWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2968 &outWindowPart);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2969 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
2970 _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
2971 WinObj_WhichWindow, outWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2972 outWindowPart);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2973 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2974 }
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2975
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2976 static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2977 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2978 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2979 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2980 OptionBits inOptions;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2981 MenuHandle outMenu;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2982 #ifndef CreateStandardWindowMenu
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2983 PyMac_PRECHECK(CreateStandardWindowMenu);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2984 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2985 if (!PyArg_ParseTuple(_args, "l",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2986 &inOptions))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2987 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2988 _err = CreateStandardWindowMenu(inOptions,
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2989 &outMenu);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2990 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2991 _res = Py_BuildValue("O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2992 MenuObj_New, outMenu);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2993 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
2994 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2995
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2996 static PyObject *Win_CollapseAllWindows(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
2997 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2998 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
2999 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3000 Boolean collapse;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3001 #ifndef CollapseAllWindows
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3002 PyMac_PRECHECK(CollapseAllWindows);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3003 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3004 if (!PyArg_ParseTuple(_args, "b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3005 &collapse))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3006 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3007 _err = CollapseAllWindows(collapse);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3008 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
3009 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
3010 _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
3011 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3012 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3013
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3014 static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3015 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3016 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3017 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3018 GDHandle inDevice;
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
3019 Rect outAvailableRect;
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3020 #ifndef GetAvailableWindowPositioningBounds
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3021 PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3022 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3023 if (!PyArg_ParseTuple(_args, "O&",
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3024 ResObj_Convert, &inDevice))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3025 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3026 _err = GetAvailableWindowPositioningBounds(inDevice,
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
3027 &outAvailableRect);
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3028 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3029 _res = Py_BuildValue("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
3030 PyMac_BuildRect, &outAvailableRect);
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3031 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3032 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3033
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3034 static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3035 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3036 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3037 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3038 #ifndef DisableScreenUpdates
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3039 PyMac_PRECHECK(DisableScreenUpdates);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3040 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3041 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3042 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3043 _err = DisableScreenUpdates();
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3044 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3045 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3046 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3047 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3048 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3049
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3050 static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3051 {
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3052 PyObject *_res = NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3053 OSStatus _err;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3054 #ifndef EnableScreenUpdates
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3055 PyMac_PRECHECK(EnableScreenUpdates);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3056 #endif
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3057 if (!PyArg_ParseTuple(_args, ""))
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3058 return NULL;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3059 _err = EnableScreenUpdates();
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3060 if (_err != noErr) return PyMac_Error(_err);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3061 Py_INCREF(Py_None);
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3062 _res = Py_None;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3063 return _res;
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3064 }
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3065
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3066 static PyObject *Win_PinRect(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
3067 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3068 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
3069 long _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3070 Rect theRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3071 Point thePt;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3072 #ifndef PinRect
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3073 PyMac_PRECHECK(PinRect);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3074 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3075 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
3076 PyMac_GetRect, &theRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3077 PyMac_GetPoint, &thePt))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3078 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3079 _rv = PinRect(&theRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3080 thePt);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3081 _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
3082 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3083 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3084 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3085
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3086 static PyObject *Win_GetGrayRgn(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
3087 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3088 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
3089 RgnHandle _rv;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3090 #ifndef GetGrayRgn
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3091 PyMac_PRECHECK(GetGrayRgn);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3092 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3093 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
3094 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3095 _rv = GetGrayRgn();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3096 _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
3097 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
3098 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3099 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3100
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3101 static PyObject *Win_GetWindowFromPort(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
3102 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3103 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
3104 WindowPtr _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3105 CGrafPtr port;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3106 #ifndef GetWindowFromPort
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3107 PyMac_PRECHECK(GetWindowFromPort);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3108 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3109 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
3110 GrafObj_Convert, &port))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3111 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3112 _rv = GetWindowFromPort(port);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3113 _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
3114 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
3115 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3116 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3117
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3118 static PyObject *Win_WhichWindow(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
3119 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3120 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
3121
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3122 long ptr;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3123
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3124 if ( !PyArg_ParseTuple(_args, "i", &ptr) )
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3125 return NULL;
19723
2a9bbdbefbb1 Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19708
diff changeset
3126 _res = WinObj_WhichWindow((WindowPtr)ptr);
2a9bbdbefbb1 Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19708
diff changeset
3127 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
3128
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3129 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3130
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3131 static PyObject *Win_FindWindow(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
3132 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3133 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
3134 short _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3135 Point thePoint;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3136 WindowPtr theWindow;
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3137 #ifndef FindWindow
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3138 PyMac_PRECHECK(FindWindow);
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 20881
diff changeset
3139 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3140 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
3141 PyMac_GetPoint, &thePoint))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3142 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3143 _rv = FindWindow(thePoint,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3144 &theWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3145 _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
3146 _rv,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3147 WinObj_WhichWindow, theWindow);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3148 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3149 }
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3150 #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
3151
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3152 static PyMethodDef Win_methods[] = {
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3153 #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
3154 {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3155 PyDoc_STR("(short windowID, WindowPtr behind) -> (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
3156 {"NewWindow", (PyCFunction)Win_NewWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3157 PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (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
3158 {"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3159 PyDoc_STR("(short windowID, WindowPtr behind) -> (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
3160 {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3161 PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (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
3162 {"CreateNewWindow", (PyCFunction)Win_CreateNewWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3163 PyDoc_STR("(WindowClass windowClass, WindowAttributes attributes, Rect contentBounds) -> (WindowPtr outWindow)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3164 {"CreateWindowFromResource", (PyCFunction)Win_CreateWindowFromResource, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3165 PyDoc_STR("(SInt16 resID) -> (WindowPtr outWindow)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3166 {"ShowFloatingWindows", (PyCFunction)Win_ShowFloatingWindows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3167 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
3168 {"HideFloatingWindows", (PyCFunction)Win_HideFloatingWindows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3169 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
3170 {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3171 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
3172 {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3173 PyDoc_STR("() -> (Boolean _rv, EventRecord theEvent)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3174 {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3175 PyDoc_STR("(Point thePoint) -> (WindowPartCode _rv, WindowPtr window)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3176 {"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3177 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
3178 {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3179 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
3180 {"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3181 PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (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
3182 {"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3183 PyDoc_STR("(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3184 {"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3185 PyDoc_STR("(OptionBits inOptions) -> (MenuHandle outMenu)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3186 {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3187 PyDoc_STR("(Boolean collapse) -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3188 {"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 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
3189 PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3190 {"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3191 PyDoc_STR("() -> None")},
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21313
diff changeset
3192 {"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3193 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
3194 {"PinRect", (PyCFunction)Win_PinRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3195 PyDoc_STR("(Rect theRect, Point thePt) -> (long _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3196 {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3197 PyDoc_STR("() -> (RgnHandle _rv)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3198 {"GetWindowFromPort", (PyCFunction)Win_GetWindowFromPort, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3199 PyDoc_STR("(CGrafPtr port) -> (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
3200 {"WhichWindow", (PyCFunction)Win_WhichWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3201 PyDoc_STR("Resolve an integer WindowPtr address to a Window object")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3202 {"FindWindow", (PyCFunction)Win_FindWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23690
diff changeset
3203 PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3204 {NULL, NULL, 0}
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3205 #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
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3209
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3210 #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
3211 /* Return the object corresponding to the window, or NULL */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3212
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3213 PyObject *
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3214 WinObj_WhichWindow(WindowPtr w)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3215 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3216 PyObject *it;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3217
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3218 if (w == NULL) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3219 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
3220 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
3221 } else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3222 it = (PyObject *) GetWRefCon(w);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3223 if (it == NULL || !IsPointerValid((Ptr)it) || ((WindowObject *)it)->ob_itself != w || !WinObj_Check(it)) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3224 it = WinObj_New(w);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3225 ((WindowObject *)it)->ob_freeit = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3226 } else {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3227 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
3228 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3229 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 31091
diff changeset
3230 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
3231 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3232
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3233 #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
3234
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3235 void init_Win(void)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3236 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3237 PyObject *m;
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3238 #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
3239 PyObject *d;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3240
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3241 PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3242 PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3243 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3244
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3245 #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
3246
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3247 m = Py_InitModule("_Win", Win_methods);
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3248 #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
3249 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
3250 Win_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
3251 if (Win_Error == NULL ||
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3252 PyDict_SetItemString(d, "Error", Win_Error) != 0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3253 return;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3254 Window_Type.ob_type = &PyType_Type;
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
3255 if (PyType_Ready(&Window_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
3256 Py_INCREF(&Window_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
3257 PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3258 /* 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
3259 Py_INCREF(&Window_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
3260 PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
3261 #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
3262 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3263
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3264 /* ======================== End module _Win ========================= */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3265